Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/EntityGeneratorDatabaseAnnotationNameBuilder.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaAnnotationDefinitionProvider.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaDataSource.java87
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFacet.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java283
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java136
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaNode.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java212
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformFactory.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformProvider.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformVariation.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java580
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java125
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaResourceModelProvider.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaStructureNode.java136
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaXmlStructureNode.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JptJpaCorePlugin.java581
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/MappingKeys.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/ResourceDefinition.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java163
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEnumeratedConverter.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseTemporalConverter.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java279
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java103
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdTypeMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java84
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java79
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java92
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedDiscriminatorColumn.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java217
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java224
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java82
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java118
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java83
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java109
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedDiscriminatorColumn.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java74
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java74
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java132
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java83
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableColumn.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java137
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java243
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedDiscriminatorColumn.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTableColumn.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEnumeratedConverter.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseTemporalConverter.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java153
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdTypeMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedDiscriminatorColumn.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java162
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableColumn.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java232
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java127
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEnumeratedConverter.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseTemporalConverter.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java93
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java97
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java85
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdTypeMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedDiscriminatorColumn.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java184
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java48
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableColumn.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java130
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java184
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java270
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java142
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java209
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java97
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java857
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlEnumValue.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaAnnotationDefinitionProvider.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java415
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaNode.java709
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaPlatformProvider.java154
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java2095
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/FileAdapterFactory.java130
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaAnnotationDefinitionProvider.java139
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaJpqlQueryHelper.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatform.java223
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformProvider.java164
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/InternalJpaProjectManager.java1422
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JarResourceModelProvider.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaPackageInfoResourceModelProvider.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaResourceModelProvider.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaAnnotationProvider.java174
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaContextNodePropertyTester.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptCoreMessages.java84
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptResourceModelPropertyTester.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/OrmResourceModelProvider.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/PersistenceResourceModelProvider.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/ProjectAdapterFactory.java120
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/SimpleJpaProjectConfig.java106
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/WorkspaceAdapterFactory.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java143
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java88
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AttributeMappingTools.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java148
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JptValidator.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java480
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributePropertyTester.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTools.java175
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/XmlFilePropertyTester.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java293
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java327
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java363
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java333
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java382
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddable.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java319
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java304
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java1722
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java249
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java494
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java305
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java195
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java97
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToManyMapping.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToOneMapping.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java140
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java132
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java1288
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java292
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToManyMapping.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToOneMapping.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java247
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java783
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java1123
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java280
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaReadOnlyUniqueConstraint.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java383
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSequenceGenerator.java165
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java155
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java550
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java327
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java298
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java265
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java195
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java118
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java212
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java365
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/DefaultJavaAttributeMappingDefinitionWrapper.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java321
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java199
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java195
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java275
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java214
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java274
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java303
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java224
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java345
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java365
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaAttributeMappingDefinitionWrapper.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaBasicMappingDefinition.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddableDefinition.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedMappingDefinition.java79
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityDefinition.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaIdMappingDefinition.java79
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToManyMappingDefinition.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToOneMappingDefinition.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassDefinition.java85
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java89
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToManyMappingDefinition.java79
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToOneMappingDefinition.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTransientMappingDefinition.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingDefinitionWrapper.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaVersionMappingDefinition.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java144
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java1163
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java541
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java321
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java319
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java390
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEmbeddable.java109
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java2264
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmGenerator.java301
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java481
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java310
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinTableRelationshipStrategy.java208
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToManyMapping.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToOneMapping.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java222
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappingRelationship.java136
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java1297
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java310
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToManyMapping.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToOneMapping.java102
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java313
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmReadOnlyUniqueConstraint.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmRelationshipMapping.java460
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSequenceGenerator.java150
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java156
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java583
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java662
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java313
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java263
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java187
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java117
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java210
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java364
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNode.java79
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java394
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlDefinition.java128
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java447
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToManyRelationship.java193
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToOneRelationship.java198
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappedByRelationshipStrategy.java243
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java161
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java267
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToOneRelationship.java294
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java181
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java327
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java384
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java368
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java286
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java129
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmBasicMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddableDefinition.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityDefinition.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmIdMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToManyMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToOneMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassDefinition.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToManyMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToOneMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTransientMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmVersionMappingDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java582
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java1365
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java379
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractJarFileRef.java391
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractMappingFileRef.java377
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java2933
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnitProperties.java559
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/FacetTools.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetActionDelegate.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java84
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java747
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProperties.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java206
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDelegate.java142
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java135
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDelegate.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/RuntimeChangedListener.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaDataSource.java228
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFactory.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFile.java146
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaProject.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java239
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java771
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java191
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java97
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java91
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java266
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java267
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java135
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java154
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java176
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/CollectionTableTableDescriptionProvider.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EmbeddableOverrideDescriptionProvider.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityTableDescriptionProvider.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java328
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java103
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java103
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableTableDescriptionProvider.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MappedSuperclassOverrideDescriptionProvider.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java173
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/RelationshipStrategyTableDescriptionProvider.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java136
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java150
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java593
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java243
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java144
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java172
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseEnumeratedConverter.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseTemporalConverter.java85
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBasicMapping.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java260
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaColumn.java221
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddable.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEntity.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java233
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java260
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaIdMapping.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java197
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java451
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaLobConverter.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java109
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java146
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedQuery.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java480
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java320
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentType.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java202
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java272
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java119
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java277
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java355
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTable.java103
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java596
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTransientMapping.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java154
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVersionMapping.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java103
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualColumn.java167
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java124
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java370
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java256
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java48
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java172
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java120
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedIdMapping.java294
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java325
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java149
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java195
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java491
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitDefaults.java397
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitMetadata.java205
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java119
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericEntityMappings.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java134
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java170
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseEnumeratedConverter.java121
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseTemporalConverter.java91
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmCascade.java306
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmColumn.java188
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEntity.java82
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java214
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java252
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmIdMapping.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java201
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java473
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmLobConverter.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java144
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java459
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java323
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitDefaults.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitMetadata.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentType.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java197
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java268
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryHint.java125
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java281
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java380
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java88
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java544
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java150
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualColumn.java167
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java123
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java256
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java129
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualUniqueConstraint.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXml.java324
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java92
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmConverter.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmJoinColumnRelationshipStrategy.java171
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java386
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericJarFileRef.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericMappingFileRef.java155
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistence.java322
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java160
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXml.java261
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java105
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java171
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformProvider.java170
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaFactory2_0.java164
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer.java434
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java104
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/SimpleMetamodelField.java107
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java2118
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java170
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java171
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java188
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java142
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java370
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java130
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java250
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java126
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java93
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java97
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java140
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java153
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaBasicMappingDefinition2_0.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java107
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddableDefinition2_0.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedIdMappingDefinition2_0.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedMappingDefinition2_0.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEntityDefinition2_0.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java100
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToManyMappingDefinition2_0.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToOneMappingDefinition2_0.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMappedSuperclassDefinition2_0.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToManyMappingDefinition2_0.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToOneMappingDefinition2_0.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaVersionMappingDefinition2_0.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java93
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java278
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java2101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java199
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java190
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java282
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java133
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java200
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java118
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java151
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java152
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java92
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java194
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java333
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/NullOptions2_0.java151
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java48
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyJoinColumnAnnotation.java48
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java76
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java113
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java139
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java92
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java83
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java145
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java111
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java185
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java111
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java161
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java203
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java220
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java145
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyJoinColumn2_0Annotation.java145
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java130
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java240
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java141
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java133
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaLibraryProviderInstallOperationConfigAdapterFactory.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaOsgiBundlesLibraryProviderInstallOperationConfig.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaUserLibraryProviderInstallOperationConfig.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderDetector.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderUninstallOperation.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/AbstractOsgiBundlesLibraryValidator.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericEclipseLinkBundlesLibraryValidator.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericJpaUserLibraryValidator.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java168
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java149
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/JpaFileCreationDataModelProperties.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProperties.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProvider.java278
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java106
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProperties.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProvider.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationOperation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JavaElementAdapterFactory.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformDescriptionImpl.java109
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformGroupDescriptionImpl.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformManagerImpl.java243
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformTester.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/ResourceAdapterFactory.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferenceInitializer.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java402
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaDeleteTypeParticipant.java302
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaMoveJavaElementParticipant.java308
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaRenameJavaElementParticipant.java271
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaCoreRefactoringMessages.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteMappingFileParticipant.java224
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeletePackageOrFolderParticipant.java254
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteTypeParticipant.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveFolderParticipant.java254
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveMappingFileParticipant.java257
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveTypeParticipant.java113
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameFolderParticipant.java208
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameMappingFileParticipant.java203
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenamePackageParticipant.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameTypeParticipant.java165
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/contenttypes/IndeterminateContentDescriber.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/BasicAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ColumnAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddableAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EntityAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EnumeratedAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/GeneratedValueAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdClassAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/InheritanceAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnsAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinTableAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/LobAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToManyAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToOneAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MapKeyAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueriesAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueryAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseColumnAnnotation.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseDiscriminatorColumnAnnotation.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseEnumeratedAnnotation.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTableAnnotation.java120
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTemporalAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullColumnAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullCompleteColumnAnnotation.java74
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorValueAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullEnumeratedAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullInheritanceAnnotation.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinColumnAnnotation.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinTableAnnotation.java84
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullNamedColumnAnnotation.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTableAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTemporalAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToManyAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToOneAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OrderByAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTableAnnotationDefinition.java63
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableGeneratorAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TemporalAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TransientAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/VersionAnnotationDefinition.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java111
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java186
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseDiscriminatorColumnAnnotation.java83
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java198
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBasicAnnotation.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryColumnAnnotation.java91
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java124
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEntityAnnotation.java74
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java100
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java130
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdClassAnnotation.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java154
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryLobAnnotation.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java90
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java117
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java119
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java147
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOrderByAnnotation.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOverrideAnnotation.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java85
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryAnnotation.java150
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java100
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java234
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java90
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableAnnotation.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java286
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTemporalAnnotation.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTransientAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryVersionAnnotation.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java157
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java204
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseColumnAnnotation.java338
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseDiscriminatorColumnAnnotation.java152
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java102
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java124
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTableAnnotation.java323
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java102
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBasicAnnotation.java160
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceColumnAnnotation.java106
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java218
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddableAnnotation.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedAnnotation.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEntityAnnotation.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEnumeratedAnnotation.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java163
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratorAnnotation.java213
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdClassAnnotation.java167
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceInheritanceAnnotation.java112
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinColumnAnnotation.java147
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinTableAnnotation.java221
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceLobAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToManyAnnotation.java148
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToOneAnnotation.java148
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java114
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedColumnAnnotation.java183
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java258
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedQueryAnnotation.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java201
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java254
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOrderByAnnotation.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOverrideAnnotation.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java188
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryAnnotation.java227
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryHintAnnotation.java192
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java385
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java185
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java139
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableAnnotation.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java448
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTemporalAnnotation.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTransientAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java164
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceVersionAnnotation.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/orm/OrmXmlResourceProvider.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/persistence/PersistenceXmlResourceProvider.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/DefaultJpaValidationMessages.java113
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationDescriptionMessages.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java304
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidator.java119
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaFactory2_0.java93
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaProject2_0.java101
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MappingKeys2_0.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MetamodelSynchronizer.java189
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AttributeMapping2_0.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cacheable2_0.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CacheableHolder2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cascade2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionMapping2_0.java153
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionTable2_0.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ConvertibleKeyMapping2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivableIdMapping2_0.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentity2_0.java100
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentityStrategy2_0.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ElementCollectionMapping2_0.java90
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedIdMapping2_0.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdDerivedIdentityStrategy2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdMapping2_0.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/JpaRootContextNode2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/LockModeType2_0.java120
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToManyMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneRelationship2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitMetadata2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingRelationshipStrategy2_0.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelField.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelSourceType.java114
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/NamedQuery2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyRelationship2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneRelationship2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrderColumn2_0.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Orderable2_0.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovable2_0.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovalHolder2_0.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OverrideRelationship2_0.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentAttribute2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentType2_0.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyPersistentAttribute2_0.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SequenceGenerator2_0.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SingleRelationshipMapping2_0.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/VirtualOverrideRelationship2_0.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverride2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverrideContainer2_0.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAttributeOverrideContainer2_0.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheable2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheableHolder2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCascade2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionMapping2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionTable2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaConvertibleKeyMapping2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaElementCollectionMapping2_0.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaEmbeddedMapping2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToManyMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneMapping2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneRelationship2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyEnumeratedConverter2_0.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinColumnRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinTableRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingMappedByRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingRelationshipStrategy2_0.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaNamedQuery2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyRelationship2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneRelationship2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderColumn2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderable2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovable2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideContainer2_0.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideRelationship2_0.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentAttribute2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentType2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSequenceGenerator2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualAssociationOverride2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualOverrideRelationship2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverride2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverrideContainer2_0.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheable2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheableHolder2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCascade2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionMapping2_0.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionTable2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmConvertibleKeyMapping2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmDerivedIdentity2_0.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToManyMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneRelationship2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java92
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java93
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinColumnRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinTableRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingMappedByRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingRelationshipStrategy2_0.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmNamedQuery2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyRelationship2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneRelationship2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderColumn2_0.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderable2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovable2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOverrideRelationship2_0.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitMetadata2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentAttribute2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentType2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmReadOnlyPersistentAttribute2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSequenceGenerator2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualAssociationOverride2_0.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualOverrideRelationship2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/Persistence2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceUnit2_0.java127
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceXml2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/connection/JpaConnection2_0.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/JpaOptions2_0.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/SharedCacheMode.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/ValidationMode.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Access2_0Annotation.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/AssociationOverride2_0Annotation.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Cacheable2_0Annotation.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/CollectionTable2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ElementCollection2_0Annotation.java90
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/GeneratedAnnotation.java116
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/JPA2_0.java147
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/LockModeType_2_0.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToMany2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToOne2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyClass2_0Annotation.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapsId2_0Annotation.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/NamedQuery2_0Annotation.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToMany2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToOne2_0Annotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OrderColumn2_0Annotation.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OwningRelationshipMapping2_0Annotation.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java84
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/StaticMetamodelAnnotation.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/JpaJpqlQueryHelper.java293
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/ClassConstructor.java148
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericJpaMapping.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericMappingBuilder.java48
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IJpaType.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IManagedTypeBuilder.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaConstructor.java104
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaType.java269
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaTypeDeclaration.java276
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaConstructor.java145
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEmbeddable.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEntity.java125
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedType.java179
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeBuilder.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeProvider.java333
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMappedSuperclass.java75
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java362
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaNullManagedType.java118
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaQuery.java121
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaType.java437
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeDeclaration.java110
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeRepository.java417
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/SimpleType.java149
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/libprov/JpaLibraryProviderInstallOperationConfig.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/GenericPlatform.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformDescription.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformGroupDescription.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformManager.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java76
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaValidationPreferencesManager.java134
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/AbstractXmlResourceProvider.java296
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/JpaXmlResourceProvider.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AccessType.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AssociationOverrideAnnotation.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AttributeOverrideAnnotation.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseColumnAnnotation.java147
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseEnumeratedAnnotation.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseJoinColumnAnnotation.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTableAnnotation.java158
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTemporalAnnotation.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BasicAnnotation.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CascadeType.java106
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ColumnAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteColumnAnnotation.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteJoinColumnAnnotation.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorColumnAnnotation.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorType.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorValueAnnotation.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddableAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedIdAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EntityAnnotation.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumType.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumeratedAnnotation.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/FetchType.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratedValueAnnotation.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GenerationType.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratorAnnotation.java90
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdClassAnnotation.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceAnnotation.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceType.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JPA.java303
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinColumnAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinTableAnnotation.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/LobAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToManyAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToOneAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MapKeyAnnotation.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MappedSuperclassAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedColumnAnnotation.java92
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedNativeQueryAnnotation.java87
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedQueryAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToManyAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToOneAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OrderByAnnotation.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OverrideAnnotation.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OwnableRelationshipMappingAnnotation.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/PrimaryKeyJoinColumnAnnotation.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryAnnotation.java111
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryHintAnnotation.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ReferenceTableAnnotation.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/RelationshipMappingAnnotation.java152
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SecondaryTableAnnotation.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SequenceGeneratorAnnotation.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SingleRelationshipMappingAnnotation.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableGeneratorAnnotation.java221
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalAnnotation.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalType.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TransientAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/UniqueConstraintAnnotation.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/VersionAnnotation.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlAttributeMapping.java293
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseColumn.java547
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseDiscriminatorColumn.java307
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlEmbedded.java220
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlMultiRelationshipMapping.java1146
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlNamedColumn.java288
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlReferenceTable.java222
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlRelationshipMapping.java409
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlSingleRelationshipMapping.java614
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTable.java467
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTypeMapping.java568
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AccessType.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Attributes.java792
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/CascadeType.java586
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnMapping.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnResult.java221
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/DiscriminatorType.java262
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListener.java928
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListeners.java200
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityResult.java363
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EnumType.java235
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EventMethod.java285
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FetchType.java235
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FieldResult.java294
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/GenerationType.java289
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Inheritance.java231
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/InheritanceType.java260
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/JPA.java120
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Lob.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/MapKey.java221
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmFactory.java944
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java12955
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmXmlResourceFactory.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostLoad.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostPersist.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostRemove.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostUpdate.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PrePersist.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreRemove.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreUpdate.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/SqlResultSetMapping.java418
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/TemporalType.java262
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAccessHolder.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverride.java531
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverrideContainer.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeMapping.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverride.java451
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverrideContainer.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseColumn.java177
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseDiscriminatorColumn.java94
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseJoinColumn.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBasic.java687
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlClassReference.java255
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlCollectionTable.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlColumn.java375
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlConvertibleMapping.java144
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlDiscriminatorColumn.java76
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlElementCollection.java1707
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddable.java81
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbedded.java256
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddedId.java74
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntity.java2308
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java1137
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEventMethodContainer.java227
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratedValue.java313
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGenerator.java128
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratorContainer.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlId.java801
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlIdClassContainer.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumn.java277
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumnContainer.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTable.java210
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTableContainer.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToMany.java88
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToOne.java85
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedByMapping.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedSuperclass.java570
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedColumn.java97
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedNativeQuery.java590
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedQuery.java564
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNullAttributeMapping.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToMany.java376
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToOne.java478
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderColumn.java404
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderable.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOverride.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitDefaults.java742
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitMetadata.java394
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumn.java273
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumnContainer.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQuery.java113
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryContainer.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryHint.java366
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlReferenceTable.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSecondaryTable.java205
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSequenceGenerator.java731
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTable.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTableGenerator.java994
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTransient.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTypeMapping.java167
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlUniqueConstraint.java286
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlVersion.java523
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/JPA2_0.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/LockModeType_2_0.java397
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Factory.java166
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Package.java3808
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributes_2_0.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCacheable_2_0.java71
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCascadeType_2_0.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCollectionTable_2_0.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlDerivedId_2_0.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlElementCollection_2_0.java269
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEmbedded_2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntityListener_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntity_2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEventMethod_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlGenerator_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlManyToMany_2_0.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyConvertibleMapping_2_0.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapsId_2_0.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java117
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlNamedQuery_2_0.java70
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToMany_2_0.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToOne_2_0.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderColumn_2_0.java121
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderable_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java65
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java94
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQueryHint_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQuery_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java94
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java67
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/JPA.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceFactory.java250
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistencePackage.java1302
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceXmlResourceFactory.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJarFileRef.java249
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJavaClassRef.java258
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlMappingFileRef.java277
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java249
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnit.java1105
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnitTransactionType.java236
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperties.java202
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperty.java322
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/JPA2_0.java39
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Factory.java192
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Package.java452
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java312
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java258
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaEObject.java366
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaRootEObject.java335
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonFactory.java115
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonPackage.java436
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/EmfTools.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaEObject.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaRootEObject.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java306
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/XML.java35
1582 files changed, 0 insertions, 215475 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/EntityGeneratorDatabaseAnnotationNameBuilder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/EntityGeneratorDatabaseAnnotationNameBuilder.java
deleted file mode 100644
index 7f22a04709..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/EntityGeneratorDatabaseAnnotationNameBuilder.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core;
-
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.ForeignKey;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Provide a pluggable way to determine whether and how the entity generator
- * prints the names of various database objects.
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.1
- */
-public interface EntityGeneratorDatabaseAnnotationNameBuilder {
-
- /**
- * Given the name of an entity and the table to which it is mapped,
- * build and return a string to be used as the value for the entity's
- * <code>Table</code> annotation's <code>name</code> element.
- * Return <code>null</code> if the entity maps to the table by default.
- */
- String buildTableAnnotationName(String entityName, Table table);
-
- /**
- * Given the name of an attribute (field or property) and the column
- * to which it is mapped,
- * build and return a string to be used as the value for the attribute's
- * <code>Column</code> annotation's <code>name</code> element.
- * Return <code>null</code> if the attribute maps to the column by default.
- */
- String buildColumnAnnotationName(String attributeName, Column column);
-
- /**
- * Given the name of an attribute (field or property) and the
- * many-to-one or many-to-many foreign key to which it is mapped,
- * build and return a string to be used as the value for the attribute's
- * <code>JoinColumn</code> annotation's <code>name</code> element.
- * Return <code>null</code> if the attribute maps to the join column by default.
- * The specified foreign key consists of a single column pair whose
- * referenced column is the single-column primary key of the foreign
- * key's referenced table.
- */
- String buildJoinColumnAnnotationName(String attributeName, ForeignKey foreignKey);
-
- /**
- * Build and return a string to be used as the value for a <code>JoinColumn</code>
- * annotation's <code>name</code> or <code>referencedColumnName</code> element.
- * This is called for many-to-one and many-to-many mappings when
- * the default join column name and/or referenced column name are/is
- * not applicable.
- *
- * @see #buildJoinColumnAnnotationName(String, ForeignKey)
- */
- String buildJoinColumnAnnotationName(Column column);
-
- /**
- * Build and return a string to be used as the value for a <code>JoinTable</code>
- * annotation's <code>name</code> element.
- * This is called for many-to-many mappings when the default
- * join table name is not applicable.
- */
- String buildJoinTableAnnotationName(Table table);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaAnnotationDefinitionProvider.java
deleted file mode 100644
index 0e6a73cbe2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaAnnotationDefinitionProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core;
-
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-
-
-/**
- * Provides annotation definitions and nestable annotation definitions
- * {@link AnnotationProvider}
- * then uses a collection of these to build annotations.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.2
- */
-public interface JpaAnnotationDefinitionProvider
-{
- /**
- * Return all annotation definitions
- */
- Iterable<AnnotationDefinition> getAnnotationDefinitions();
-
- /**
- * Return all nestable annotation definitions
- */
- Iterable<NestableAnnotationDefinition> getNestableAnnotationDefinitions();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaDataSource.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaDataSource.java
deleted file mode 100644
index 6610a45819..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaDataSource.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core;
-
-import org.eclipse.jpt.jpa.db.ConnectionProfile;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Interface to the connection profile.
- *
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JpaDataSource
- extends JpaNode {
-
- /**
- * Return the data source's connection profile name.
- * The connection profile is looked up based on this setting.
- */
- String getConnectionProfileName();
-
- /**
- * Set the data source's connection profile name.
- * The connection profile is looked up based on this setting.
- */
- void setConnectionProfileName(String connectionProfileName);
-
- /**
- * ID string used when connectionProfileName property is changed
- * @see org.eclipse.jpt.common.utility.model.Model#addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String CONNECTION_PROFILE_NAME_PROPERTY = "connectionProfileName"; //$NON-NLS-1$
-
- /**
- * The connection profile is null if the connection profile name is invalid.
- */
- ConnectionProfile getConnectionProfile();
-
- /**
- * ID string used when connectionProfile property is changed
- * @see org.eclipse.jpt.common.utility.model.Model#addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String CONNECTION_PROFILE_PROPERTY = "connectionProfile"; //$NON-NLS-1$
-
- /**
- * Return whether the profile is either connected to a live database
- * session or working off-line (i.e. it has access to meta-data).
- */
- boolean connectionProfileIsActive();
-
- /**
- * If the connection profile is active, return its database.
- */
- Database getDatabase();
-
- /**
- * Select and return the table with the specified identifier.
- * We need this unusual method because the JPA spec does not allow columns
- * or join columns to specify a schema and/or catalog (which is only a
- * problem when an entity has two tables from different schemata but with
- * the same name).
- *
- * @see org.eclipse.jpt.jpa.core.context.TypeMapping#resolveDbTable(String)
- */
- Table selectTableForIdentifier(Iterable<Table> tables, String identifier);
-
- /**
- * Dispose the data source.
- */
- void dispose();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFacet.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFacet.java
deleted file mode 100644
index 609cb4c1a5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFacet.java
+++ /dev/null
@@ -1,55 +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.jpa.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * 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.
- *
- * @version 3.0
- * @since 3.0
- */
-public final class JpaFacet {
-
- public static final String ID = "jpt.jpa"; //$NON-NLS-1$
-
- public static final IProjectFacet FACET = ProjectFacetsManager.getProjectFacet(ID);
-
- public static final IProjectFacetVersion VERSION_1_0 = FACET.getVersion("1.0"); //$NON-NLS-1$
-
- public static final IProjectFacetVersion VERSION_2_0 = FACET.getVersion("2.0"); //$NON-NLS-1$
-
-
- public static boolean isInstalled(final IProject project) {
- try {
- return FacetedProjectFramework.hasProjectFacet(project, ID);
- }
- catch (CoreException e) {
- JptJpaCorePlugin.log(e);
- return false;
- }
- }
-
-
- /**
- * Not for instantiation
- */
- private JpaFacet() {}
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
deleted file mode 100644
index 13b69b6a8b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.context.MappingFile;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.Accessor;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaBasicMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratedValue;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToOneMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTableGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaTransientMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaVersionMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * Use a JPA factory to build any core (e.g. {@link JpaProject})
- * model object or any Java (e.g. {@link JavaEntity}), ORM (e.g.
- * {@link EntityMappings}), or persistence (e.g. {@link PersistenceUnit})
- * context model objects.
- * <p>
- * Assumes a base JPA project context structure
- * corresponding to the JPA spec:<ul>
- * <li>RootContext<ul>
- * <li>persistence.xml<ul>
- * <li>persistence unit(s)<ul>
- * <li>mapping file(s) (e.g. <code>orm.xml</code>)<ul>
- * <li>type mapping(s) (e.g. Entity)<ul>
- * <li>attribute mapping(s) (e.g. Basic)
- * </ul>
- * </ul>
- * <li>type mapping(s)
- * </ul>
- * </ul>
- * </ul>
- * </ul>
- * ... and associated objects.
- *<p>
- * 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.
- *
- * @see org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaFactory
- *
- * @version 3.1
- * @since 2.0
- */
-public interface JpaFactory
-{
- // ********** Core Model **********
-
- /**
- * Construct a JpaProject for the specified config, to be
- * added to the specified JPA project. Return null if unable to create
- * the JPA file (e.g. the content type is unrecognized).
- */
- JpaProject buildJpaProject(JpaProject.Config config);
-
- JpaDataSource buildJpaDataSource(JpaProject jpaProject, String connectionProfileName);
-
- /**
- * Construct a JPA file for the specified JPA project, file, content type,
- * and resource model.
- */
- JpaFile buildJpaFile(JpaProject jpaProject, IFile file, IContentType contentType, JptResourceModel resourceModel);
-
-
- // ********** Context Nodes **********
-
- /**
- * Build a (/an updated) root context node to be associated with the given
- * JPA project.
- * The root context node will be built once, but updated many times.
- * @see org.eclipse.jpt.jpa.core.internal.AbstractJpaProject#update(org.eclipse.core.runtime.IProgressMonitor)
- */
- JpaRootContextNode buildRootContextNode(JpaProject jpaProject);
-
-
- // ********** XML Context Model **********
-
- PersistenceXml buildPersistenceXml(JpaRootContextNode parent, JpaXmlResource resource);
-
- MappingFile buildMappingFile(MappingFileRef parent, JpaXmlResource resource);
-
-
- // ********** Java Context Model **********
-
- JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourceType jrt);
-
- JavaEntity buildJavaEntity(JavaPersistentType parent, EntityAnnotation entityAnnotation);
-
- JavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent, MappedSuperclassAnnotation mappedSuperclassAnnotation);
-
- JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent, EmbeddableAnnotation embeddableAnnotation);
-
- JavaTypeMapping buildJavaNullTypeMapping(JavaPersistentType parent);
-
- JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent, Accessor accessor);
-
- JavaPersistentAttribute buildJavaPersistentField(PersistentType parent, JavaResourceField resourceField);
-
- JavaPersistentAttribute buildJavaPersistentProperty(PersistentType parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter);
-
- JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent);
-
- JavaEmbeddedIdMapping buildJavaEmbeddedIdMapping(JavaPersistentAttribute parent);
-
- JavaEmbeddedMapping buildJavaEmbeddedMapping(JavaPersistentAttribute parent);
-
- JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent);
-
- JavaManyToManyMapping buildJavaManyToManyMapping(JavaPersistentAttribute parent);
-
- JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent);
-
- JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent);
-
- JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent);
-
- JavaTransientMapping buildJavaTransientMapping(JavaPersistentAttribute parent);
-
- JavaVersionMapping buildJavaVersionMapping(JavaPersistentAttribute parent);
-
- JavaAttributeMapping buildJavaNullAttributeMapping(JavaPersistentAttribute parent);
-
- JavaGeneratorContainer buildJavaGeneratorContainer(JavaGeneratorContainer.ParentAdapter parentAdapter);
-
- JavaTable buildJavaTable(JavaEntity parent, Table.Owner owner);
-
- JavaJoinTable buildJavaJoinTable(JavaJoinTableRelationshipStrategy parent, Table.Owner owner);
-
- JavaVirtualJoinTable buildJavaVirtualJoinTable(JavaVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable);
-
- JavaColumn buildJavaColumn(JavaJpaContextNode parent, JavaColumn.Owner owner);
-
- JavaVirtualColumn buildJavaVirtualColumn(JavaJpaContextNode parent, JavaVirtualColumn.Owner owner);
-
- JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner);
-
- JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation);
-
- JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
-
- JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent, Table.Owner owner, SecondaryTableAnnotation tableAnnotation);
-
- JavaSequenceGenerator buildJavaSequenceGenerator(JavaGeneratorContainer parent, SequenceGeneratorAnnotation sequenceGeneratorAnnotation);
-
- JavaTableGenerator buildJavaTableGenerator(JavaGeneratorContainer parent, TableGeneratorAnnotation tableGeneratorAnnotation);
-
- JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent, GeneratedValueAnnotation generatedValueAnnotation);
-
- JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation);
-
- JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner);
-
- JavaAttributeOverride buildJavaAttributeOverride(JavaAttributeOverrideContainer parent, AttributeOverrideAnnotation annotation);
-
- JavaVirtualAttributeOverride buildJavaVirtualAttributeOverride(JavaAttributeOverrideContainer parent, String name);
-
- JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner);
-
- JavaAssociationOverride buildJavaAssociationOverride(JavaAssociationOverrideContainer parent, AssociationOverrideAnnotation annotation);
-
- JavaVirtualAssociationOverride buildJavaVirtualAssociationOverride(JavaAssociationOverrideContainer parent, String name);
-
- JavaOverrideRelationship buildJavaOverrideRelationship(JavaAssociationOverride parent);
-
- JavaVirtualOverrideRelationship buildJavaVirtualOverrideRelationship(JavaVirtualAssociationOverride parent);
-
- JavaQueryContainer buildJavaQueryContainer(JavaJpaContextNode parent, JavaQueryContainer.Owner owner);
-
- JavaNamedQuery buildJavaNamedQuery(JavaQueryContainer parent, NamedQueryAnnotation namedQueryAnnotation);
-
- JavaNamedNativeQuery buildJavaNamedNativeQuery(JavaQueryContainer parent, NamedNativeQueryAnnotation namedNativeQueryAnnotation);
-
- JavaQueryHint buildJavaQueryHint(JavaQuery parent, QueryHintAnnotation queryHintAnnotation);
-
- JavaUniqueConstraint buildJavaUniqueConstraint(JavaJpaContextNode parent, UniqueConstraint.Owner owner, UniqueConstraintAnnotation constraintAnnotation);
-
- JavaVirtualUniqueConstraint buildJavaVirtualUniqueConstraint(JavaJpaContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint);
-
- JavaBaseEnumeratedConverter buildJavaBaseEnumeratedConverter(JavaAttributeMapping parent, BaseEnumeratedAnnotation annotation, JavaConverter.Owner owner);
-
- JavaBaseTemporalConverter buildJavaBaseTemporalConverter(JavaAttributeMapping parent, BaseTemporalAnnotation annotation, JavaConverter.Owner owner);
-
- JavaLobConverter buildJavaLobConverter(JavaAttributeMapping parent, LobAnnotation annotation, JavaConverter.Owner owner);
-
- JavaOrderable buildJavaOrderable(JavaAttributeMapping parent);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java
deleted file mode 100644
index e077166050..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceModel;
-
-/**
- * A JPA Project contains JPA files for all files in the project that
- * are relevant to the JPA spec.
- * <p>
- * To retrieve the JPA file corresponding to an Eclipse file:
- * <pre>
- * IFile file = (IFile) ResourcesPlugin.getWorkspace().getRoot().findMember("Foo.java");
- * JpaFile jpaFile = (JpaFile) file.getAdapter(JpaFile.class);
- * </pre>
- * This is a non-blocking call; and as a result it will return <code>null</code>
- * if the JPA file or its JPA project is currently under construction. Use a
- * {@link Reference JPA file reference} to retrieve a JPA file in a blocking
- * fashion that will return a JPA file once it and its JPA project have been
- * constructed.
- * <p>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- *
- * @see Reference
- * @see org.eclipse.jpt.jpa.core.internal.FileAdapterFactory
- */
-public interface JpaFile
- extends JpaNode
-{
- /**
- * Return the JPA file's Eclipse file.
- */
- IFile getFile();
-
- /**
- * Return the JPA file's content type.
- */
- IContentType getContentType();
-
- /**
- * Return the resource model corresponding to the JPA file; typically a JPA
- * compilation unit, a JPA XML resource, or a JPA package fragment root (JAR).
- */
- JptResourceModel getResourceModel();
-
- /**
- * Convenience method. Return the resource model corresponding to the JPA
- * file if the file's content is a "kind-of" the specified content type;
- * otherwise, return null. This is useful when a client has looked up the
- * JPA file via a file name [and assumed content type].
- * @see #getResourceModel()
- */
- JptResourceModel getResourceModel(IContentType contentType);
-
-
- // ********** root structure nodes **********
-
- /**
- * Return the JPA file's root structure nodes.
- */
- Iterable<JpaStructureNode> getRootStructureNodes();
- String ROOT_STRUCTURE_NODES_COLLECTION = "rootStructureNodes"; //$NON-NLS-1$
-
- /**
- * Return the count of the JPA file's root context model objects.
- */
- int getRootStructureNodesSize();
-
- /**
- * Add a root structure node.
- * There is the potential for multiple root structure nodes
- * for a particular key. For example, a Java type can be listed
- * both as a {@code <class>} in the <code>persistence.xml</code> file
- * and as an {@code <entity>} in
- * an <code>orm.xml</code> file. In this case, the Jave type in
- * the <code>orm.xml</code> file must set
- * the root structure node <em>after</em> the Java type in the
- * <code>persistence.xml</code> file.
- * Last one in during project <em>update</em> wins.
- */
- void addRootStructureNode(Object key, JpaStructureNode rootStructureNode);
-
- /**
- * Remove the root structure node for the specified key if its current value
- * is the same as the specified node.
- *
- * @see #addRootStructureNode(Object, JpaStructureNode)
- */
- void removeRootStructureNode(Object key, JpaStructureNode rootStructureNode);
-
- /**
- * Return the structure node best corresponding to the location in the file.
- */
- JpaStructureNode getStructureNode(int textOffset);
-
-
- // ********** reference **********
-
- /**
- * Standard adapter for retrieving a {@link JpaFile JPA file}:
- * <pre>
- * IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Foo Project");
- * IFile file = project.getFile("plugin.xml");
- * JpaFile.Reference jpaFileRef = (JpaFile.Reference) file.getAdapter(JpaFile.Reference.class);
- * JpaFile jpaFile = jpaFileRef.getValue();
- * </pre>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- * @see org.eclipse.jpt.jpa.core.internal.FileAdapterFactory
- */
- interface Reference {
- /**
- * Return the JPA file corresponding to the reference's Eclipse file,
- * or <code>null</code> if unable to associate the specified file with a
- * JPA file. This method can be long-running.
- */
- JpaFile getValue() throws InterruptedException;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaNode.java
deleted file mode 100644
index 7a7085a2e5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaNode.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jpt.common.utility.model.Model;
-
-/**
- * JPA-specific protocol. All JPA objects belong to a JPA project, are
- * associated with a resource, and have a parent (excepting the JPA project).
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface JpaNode
- extends Model, IAdaptable
-{
- /**
- * Return the JPA project manager.
- */
- JpaProject.Manager getJpaProjectManager();
-
- /**
- * Return the JPA project the node belongs to.
- */
- JpaProject getJpaProject();
-
- /**
- * Return the JPA node's parent. The JPA project will not have a parent.
- */
- JpaNode getParent();
-
- /**
- * Some state or child (or grandchild etc.) of the JPA node changed.
- * Fire a state change event. Implied by this behavior is that any change
- * to any JPA node in a JPA project will trigger the JPA project to fire a
- * state change event.
- *
- * @see Model#addStateChangeListener(org.eclipse.jpt.common.utility.model.listener.StateChangeListener)
- * @see org.eclipse.jpt.common.utility.model.event.StateChangeEvent
- * @see org.eclipse.jpt.common.utility.model.listener.StateChangeListener
- */
- void stateChanged();
-
- /**
- * Return the node's resource, typically for validation messages.
- */
- IResource getResource();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java
deleted file mode 100644
index 25f2f20261..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core;
-
-import java.util.Comparator;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.AnnotationProvider;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationEditFormatter;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.db.ConnectionProfileFactory;
-import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar;
-import org.eclipse.wst.common.project.facet.core.DefaultVersionComparator;
-
-/**
- * This interface is to be implemented by a JPA vendor to provide extensions to
- * the core JPA model. The core JPA model will provide functionality for JPA
- * spec annotations in Java, <code>persistence.xml</code> and mapping
- * (<code>orm.xml</code>) files.
- * The <code>org.eclipse.jpt.jpa.core.generic</code> extension supplies
- * resource models for those file types. As another vendor option you
- * will have to supply those resource models as well or different ones
- * as necessary. In the extension point you actually provide a
- * {@link JpaPlatformFactory} that will build the JPA platform.
- * <p>
- * 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.
- * <p>
- * See the <code>org.eclipse.jpt.jpa.core.jpaPlatforms</code> extension point.
- * @see JpaPlatformFactory
- * @see JpaPlatformProvider
- *
- * @version 3.2
- * @since 2.0
- */
-public interface JpaPlatform
- extends IAdaptable
-{
- // ********** meta stuff **********
-
- /**
- * Get the ID for this platform
- */
- String getId();
-
- /**
- * Return the description for this platform
- */
- JpaPlatformDescription getDescription();
-
- /**
- * Get the version object for this platform.
- */
- Version getJpaVersion();
-
-
- // ********** factory **********
-
- /**
- * Return a factory responsible for creating core (e.g. JpaProject), resource
- * (e.g. PersistenceResource), and context (e.g. PersistenceUnit) model
- * objects
- */
- JpaFactory getJpaFactory();
-
-
- // ********** JPA files **********
-
- /**
- * Return a JPA file corresponding to the specified Eclipse file.
- * Return null if the file's content is unsupported.
- */
- JpaFile buildJpaFile(JpaProject jpaProject, IFile file);
-
-
- // ********** Java annotations **********
-
- /**
- * Return an annotation provider responsible for determining what Java
- * annotations are supported and constructing java resource model objects.
- */
- AnnotationProvider getAnnotationProvider();
-
- /**
- * Return a formatter that can clean up the Java annotations added to source
- * code.
- */
- AnnotationEditFormatter getAnnotationEditFormatter();
-
-
- // ********** Java type mappings **********
-
- /**
- * Return the Java type mapping definitions that will be used to build Java
- * type mappings and their corresponding annotations.
- */
- Iterable<JavaTypeMappingDefinition> getJavaTypeMappingDefinitions();
-
-
- // ********** Java attribute mappings **********
-
- /**
- * Return the Java attribute mapping definitions that will be used to build
- * Java attribute mappings and their corresponding annotations.
- */
- Iterable<JavaAttributeMappingDefinition> getSpecifiedJavaAttributeMappingDefinitions();
-
- /**
- * Return the Java attribute mapping definitions that will be used to build
- * default Java attribute mappings.
- */
- Iterable<DefaultJavaAttributeMappingDefinition> getDefaultJavaAttributeMappingDefinitions();
-
-
- // ********** resource types and definitions **********
-
- /**
- * Return whether the platform supports the specified resource type.
- * This method is consistent with {@link #getResourceDefinition(JptResourceType)}.
- */
- boolean supportsResourceType(JptResourceType resourceType);
-
- /**
- * Return the platform's resource definition for the specified resource type.
- * The returned definition describes the platform's corresponding context model.
- * Throw an {@link IllegalArgumentException} if the resource type is not
- * supported by the platform.
- * This method is consistent with {@link #supportsResourceType(JptResourceType)}.
- */
- ResourceDefinition getResourceDefinition(JptResourceType resourceType);
-
- /**
- * Return the most recent supported resource type for the specified content
- * type. Throw an {@link IllegalArgumentException} if the content type is not
- * supported by the platform.
- */
- JptResourceType getMostRecentSupportedResourceType(IContentType contentType);
-
-
- // ********** database **********
-
- /**
- * Return a connection repository that can be used to query the database
- * about database metadata.
- */
- ConnectionProfileFactory getConnectionProfileFactory();
-
- /**
- * Return an entity generator database annotation name builder, which is
- * used by Entity Generation to determine whether and how the entity generator
- * prints the names of various database objects.
- */
- EntityGeneratorDatabaseAnnotationNameBuilder getEntityGeneratorDatabaseAnnotationNameBuilder();
-
-
- // ********** platform variation **********
-
- /**
- * Return a platform variation that is used to determine differences platforms and/or JPA specification versions
- */
- JpaPlatformVariation getJpaVariation();
-
-
- // ********** Hermes integration **********
-
- /**
- * Return the JPQL grammar that will be used to parse JPQL queries.
- * @since 3.2
- */
- JPQLGrammar getJpqlGrammar();
-
-
- interface Version {
-
- Comparator<String> VERSION_COMPARATOR = new DefaultVersionComparator();
-
- /**
- * Return the platform's version.
- */
- String getVersion();
-
- /**
- * Return the highest JPA specification version supported by the platform.
- * @see JpaFacet#VERSION_1_0
- * @see JpaFacet#VERSION_2_0
- */
- String getJpaVersion();
-
- /**
- * Return whether the platform is compatible with the specified JPA
- * specification version.
- * @see JpaFacet#VERSION_1_0
- * @see JpaFacet#VERSION_2_0
- */
- boolean isCompatibleWithJpaVersion(String jpaVersion);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformFactory.java
deleted file mode 100644
index dd1e4b001d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core;
-
-/**
- * This interface is to be implemented by a JPA vendor to extend Dali by
- * building a {@link JpaPlatform}.
- * <p>
- * See the extension point
- * <code>org.eclipse.jpt.jpa.core.jpaPlatforms</code>
- * in
- * <code>org.eclipse.jpt.jpa.core/plugin.xml</code>
- * and
- * <code>org.eclipse.jpt.jpa.core/schema/jpaPlatforms.exsd</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JpaPlatformFactory {
- /**
- * Build the JPA platform with the specified ID.
- */
- JpaPlatform buildJpaPlatform(String id);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformProvider.java
deleted file mode 100644
index a511eda3b7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core;
-
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-
-/**
- * This interface is to be implemented by a JPA vendor to provide extensions to
- * the core JPA model. The core JPA model will provide functionality for JPA
- * spec annotations in java, persistence.xml and mapping (orm.xml) files.
- * The org.eclipse.jpt.jpa.core.generic extension supplies
- * resource models for those file types in GenericJpaPlatformProvider.
- *
- * This JpaPlatformProvider implementation most likely only returns providers
- * that are extensions of other platforms. Then in the GenericJpaPlatform implementation
- * you pass in 1 or more JpaPlatformProviders.
- *
- * See the org.eclipse.jpt.jpa.core.jpaPlatforms extension point
- *
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JpaPlatformProvider
-{
- /**
- * Return the most recent resource type for the given content type supported by this platform
- */
- JptResourceType getMostRecentSupportedResourceType(IContentType contentType);
-
- /**
- * Return the resource model providers that apply to this platform.
- */
- Iterable<JpaResourceModelProvider> getResourceModelProviders();
-
- /**
- * Return the resource definitions supported by this platform.
- */
- Iterable<ResourceDefinition> getResourceDefinitions();
-
- /**
- * Return the platform's Java type mapping definitions.
- */
- Iterable<JavaTypeMappingDefinition> getJavaTypeMappingDefinitions();
-
- /**
- * Return the platform's default Java attribute mapping definitions.
- */
- Iterable<DefaultJavaAttributeMappingDefinition> getDefaultJavaAttributeMappingDefinitions();
-
- /**
- * Return the platform's specified Java attribute mapping definitions.
- */
- Iterable<JavaAttributeMappingDefinition> getSpecifiedJavaAttributeMappingDefinitions();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformVariation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformVariation.java
deleted file mode 100644
index a537fee196..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatformVariation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-
-/**
- * A JpaPlatform contains a JpaPlatformVariation. This is used for various jpa spec
- * items that are either optional or only supported by certain version of the spec.
- * Each platform implementation must determine if it supports these things.
- *
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaPlatformVariation
-{
- /**
- * Return whether table-per-concrete-class is a supported
- * inheritance strategy in the JPA platform.
- * Supported.MAYBE means that it is in the JPA spec, but not portable
- * or might not be supported by a particular provider.
- * @return
- */
- Supported getTablePerConcreteClassInheritanceIsSupported();
-
- /**
- * This is used to determine if a relationship mapping that uses a join table
- * can be overridden with an association override.
- */
- boolean isJoinTableOverridable();
-
- AccessType[] getSupportedAccessTypes(JptResourceType resourceType);
-
- AccessType[] GENERIC_SUPPORTED_ACCESS_TYPES = new AccessType[] {AccessType.FIELD, AccessType.PROPERTY};
-
- public enum Supported {
- /**
- * fully supported by the platform
- */
- YES,
-
- /**
- * not supported by the platform
- */
- NO,
-
- /**
- * in the JPA spec, might not supported be supported by a particular provider
- */
- MAYBE,
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
deleted file mode 100644
index 6b2297c8dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
+++ /dev/null
@@ -1,580 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceTypeCache;
-import org.eclipse.jpt.common.core.utility.command.JobCommand;
-import org.eclipse.jpt.common.utility.ExceptionHandler;
-import org.eclipse.jpt.common.utility.command.ExtendedCommandExecutor;
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.ConnectionProfile;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * A JPA project is associated with an {@link IProject Eclipse project}
- * (and its corresponding {@link IJavaProject Java project}).
- * It holds the <em>resource</em> model that corresponds to the
- * various JPA-related resources (the <code>persistence.xml</code> file, its
- * mapping files [<code>orm.xml</code>], and the Java source files). It also
- * holds the <em>context</em> model that represents
- * the JPA metadata, as derived from spec-defined defaults, Java source code
- * annotations, and XML descriptors.
- * <p>
- * To retrieve the JPA project corresponding to an Eclipse project:
- * <pre>
- * IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Foo Project");
- * JpaProject jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
- * </pre>
- * This is a non-blocking call; and as a result it will return <code>null</code>
- * if the JPA project is currently under construction. Use a {@link
- * Reference JPA project reference} to retrieve a JPA project in a blocking
- * fashion that will return a JPA project once it has been constructed.
- * <p>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- *
- * @see Reference
- * @see org.eclipse.jpt.jpa.core.internal.ProjectAdapterFactory
- */
-public interface JpaProject
- extends JpaNode
-{
-
- // ********** general **********
-
- /**
- * Return the JPA project manager.
- */
- Manager getManager();
-
- /**
- * Return the JPA project's name, which is the same as the associated
- * Eclipse project's name.
- */
- String getName();
-
- /**
- * Return the Eclipse project associated with the JPA project.
- */
- IProject getProject();
-
- /**
- * Return the Java project associated with the JPA project.
- */
- IJavaProject getJavaProject();
-
- /**
- * Return the vendor-specific JPA platform that builds the JPA project
- * and its contents.
- */
- JpaPlatform getJpaPlatform();
-
- /**
- * Return the root of the JPA project's context model.
- */
- JpaRootContextNode getRootContextNode();
-
- /**
- * The JPA project has been removed from the JPA model. Clean up any
- * hooks to external resources etc.
- */
- void dispose();
-
-
- // ********** JPA files **********
-
- /**
- * ID string used when the JPA project's collection of JPA files changes.
- * @see #addCollectionChangeListener(String, org.eclipse.jpt.common.utility.model.listener.CollectionChangeListener)
- */
- String JPA_FILES_COLLECTION = "jpaFiles"; //$NON-NLS-1$
-
- /**
- * Return the JPA project's JPA files.
- */
- Iterable<JpaFile> getJpaFiles();
-
- /**
- * Return the size of the JPA project's JPA files.
- */
- int getJpaFilesSize();
-
- /**
- * Return the JPA file corresponding to the specified file.
- * Return null if there is no JPA file associated with the specified file.
- */
- JpaFile getJpaFile(IFile file);
-
-
- // ********** external Java resource compilation units **********
-
- /**
- * ID string used when the JPA project's collection of external Java
- * resource compilation units changes.
- * @see #addCollectionChangeListener(String, org.eclipse.jpt.common.utility.model.listener.CollectionChangeListener)
- */
- String EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION = "externalJavaResourceCompilationUnits"; //$NON-NLS-1$
-
- /**
- * Return the JPA project's external Java resource compilation units.
- */
- Iterable<JavaResourceCompilationUnit> getExternalJavaResourceCompilationUnits();
-
- /**
- * Return the size of the JPA project's external Java resource compilation units.
- */
- int getExternalJavaResourceCompilationUnitsSize();
-
-
- // ********** external Java resource persistent types **********
-
- /**
- * Return the JPA project's external Java resource type cache.
- */
- JavaResourceTypeCache getExternalJavaResourceTypeCache();
-
-
- // ********** XML resources **********
-
- /**
- * Return the XML resource model corresponding to the file with runtime path
- * <code>META-INF/persistence.xml</code> if that file has the persistence content type
- * (<code>"org.eclipse.jpt.jpa.core.content.persistence"</code>).
- *
- * @see JptJpaCorePlugin#DEFAULT_PERSISTENCE_XML_RUNTIME_PATH
- * @see JptJpaCorePlugin#PERSISTENCE_XML_CONTENT_TYPE
- */
- JpaXmlResource getPersistenceXmlResource();
-
- /**
- * Return the XML resource model corresponding to the file with the specified
- * runtime path if that file has the mapping file content type
- * (<code>"org.eclipse.jpt.jpa.core.content.mappingFile"</code>)
- *
- * @see JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE
- */
- JpaXmlResource getMappingFileXmlResource(IPath runtimePath);
-
- /**
- * Return the XML resource model corresponding to the file
- * <code>META-INF/orm.xml</code> if that file has the mapping file content type.
- *
- * @see JptJpaCorePlugin#DEFAULT_ORM_XML_RUNTIME_PATH
- */
- JpaXmlResource getDefaultOrmXmlResource();
-
-
- // ********** Java resources **********
-
- /**
- * Return the names of the JPA project's annotated Java classes
- * (ignoring classes in JARs referenced in the <code>persistence.xml</code>).
- */
- Iterable<String> getAnnotatedJavaSourceClassNames();
-
- /**
- * Return only the names of those valid <em>mapped</em> (i.e. annotated with
- * <code>@Entity</code>, <code>@Embeddable</code>, etc.) Java resource
- * persistent types that are directly part of the JPA project, ignoring
- * those in JARs referenced in <code>persistence.xml</code>.
- */
- Iterable<String> getMappedJavaSourceClassNames();
-
- Iterable<String> getTypeMappingAnnotationNames();
-
- /**
- * Return the Java resource type for the fully qualified type name.
- * Return null if invalid or absent.
- */
- JavaResourceAbstractType getJavaResourceType(String typeName);
-
- /**
- * Return the {@link JavaResourceAbstractType} with the fully qualified type name and kind.
- * Return null if invalid or absent or if the kind does not match.
- */
- JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.Kind kind);
-
- /**
- * Return the Java resource package for the specified package.
- * Return null if invalid or absent.
- */
- JavaResourcePackage getJavaResourcePackage(String packageName);
-
- /**
- * Return the Java resource packages for the project.
- * Return null if invalid or absent.
- */
- Iterable<JavaResourcePackage> getJavaResourcePackages();
-
- /**
- * Return the Java resource package fragement root for the specified JAR.
- * Return null if absent.
- */
- JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(String jarFileName);
-
- /**
- * Return the JPA project's JPA files for jars.
- */
- Iterable<JpaFile> getJarJpaFiles();
-
-
- // ********** external events **********
-
- /**
- * Synchronize the JPA project with the specified project resource
- * delta, watching for added and removed files in particular.
- */
- void projectChanged(IResourceDelta delta);
-
- /**
- * Synchronize the JPA project with the specified Java change.
- */
- void javaElementChanged(ElementChangedEvent event);
-
-
- // ********** synchronize context model with resource model **********
-
- /**
- * Should only be used by [incorrectly written] tests....
- * [The tests would be more valid if they modified the source code
- * directly allowing resource/Java change events to <em>synchronize</em>
- * the context model....]
- */
- void synchronizeContextModel();
-
-
- // ********** utility **********
-
- /**
- * Return an {@link IFile} that best represents the given runtime location
- */
- IFile getPlatformFile(IPath runtimePath);
-
-
- // ********** validation **********
-
- /**
- * Return JPA project's validation messages.
- */
- Iterable<IMessage> getValidationMessages(IReporter reporter);
-
-
- // ********** database **********
-
- /**
- * Return the data source the JPA project is mapped to.
- */
- JpaDataSource getDataSource();
-
- /**
- * Return the JPA project's connection.
- * The connection profile is null if the JPA project's connection profile
- * name does not match the name of a DTP connection profile.
- */
- ConnectionProfile getConnectionProfile();
-
- /**
- * Return the JPA project's default database schema container;
- * which is either the JPA project's default catalog or the JPA project's
- * database, depending on how the DTP model is implemented.
- */
- SchemaContainer getDefaultDbSchemaContainer();
-
- /**
- * Return the JPA project's default catalog; which is either the user
- * override catalog or the database's default catalog.
- */
- String getDefaultCatalog();
-
- /**
- * Return the JPA project's default database catalog.
- * @see #getDefaultCatalog()
- */
- Catalog getDefaultDbCatalog();
-
- /**
- * Return the JPA project's default schema; which can be one of the
- * following:<ul>
- * <li>the user override schema
- * <li>the default catalog's default schema
- * <li>the database's default schema (if catalogs are not supported)
- * </ul>
- */
- String getDefaultSchema();
-
- /**
- * Return the JPA project's default database schema.
- * @see #getDefaultSchema()
- * @see #getDefaultDbSchemaContainer()
- */
- Schema getDefaultDbSchema();
-
-
- // ********** user override default catalog **********
-
- /**
- * ID string used when the JPA project's user override default catalog changes.
- * @see #addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String USER_OVERRIDE_DEFAULT_CATALOG_PROPERTY = "userOverrideDefaultCatalog"; //$NON-NLS-1$
-
- /**
- * Return the <em>identifier</em> of the catalog to be used as a default
- * for the JPA project instead of the one that is associated by default
- * with the connection profile.
- * @return The catalog identifier. May be null (implying the connection profile
- * default catalog should be used).
- */
- String getUserOverrideDefaultCatalog();
-
- /**
- * Set the <em>identifier</em> of the catalog to be used as a default
- * for the JPA project instead of the one that is associated by default
- * with the connection profile.
- * @parameter catalog The catalog identifier. May be null (implying the connection profile
- * default catalog should be used).
- */
- void setUserOverrideDefaultCatalog(String catalog);
-
-
- // ********** user override default schema **********
-
- /**
- * ID string used when the JPA project's user override default schema changes.
- * @see #addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String USER_OVERRIDE_DEFAULT_SCHEMA_PROPERTY = "userOverrideDefaultSchema"; //$NON-NLS-1$
-
- /**
- * Return the <em>identifier</em> of the schema to be used as a default
- * for the JPA project instead of the one that is associated by default
- * with the connection profile.
- * @return The schema identifier. May be null (implying the connection profile
- * default schema should be used).
- */
- String getUserOverrideDefaultSchema();
-
- /**
- * Set the <em>identifier</em> of the schema to be used as a default
- * for the JPA project instead of the one that is associated by default
- * with the connection profile.
- * @parameter schema The schema identifier. May be null (implying the connection profile
- * default schema should be used).
- */
- void setUserOverrideDefaultSchema(String schema);
-
-
- // ********** discover annotated classes **********
-
- /**
- * ID string used when discoversAnnotatedClasses property is changed.
- * @see #addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String DISCOVERS_ANNOTATED_CLASSES_PROPERTY = "discoversAnnotatedClasses"; //$NON-NLS-1$
-
- /**
- * Return whether the JPA project will not generate error messages for any
- * annotated classes that are not listed in the <code>persistence.xml</code>
- * file or one of its mapping files. If this flag is set to
- * <code>false</code>, error messages will be generated for all of the
- * annotated classes that are not explicitly listed. The JPA project
- * <em>always</em> "discovers" annotated classes and allows the user to
- * reference them throughout the model; this flag simply controls whether
- * the error messages are generated during validation.
- * <p>
- * This is a user-specified preference that is probably
- * only helpful when deploying to a JavaSE environment. The JPA spec
- * says annotated classes are to be discovered automatically in a JavaEE
- * environment; while the managed persistence classes must be explicitly
- * listed in a JavaSE environment: "A list of all named managed persistence
- * classes must be specified in Java SE environments to insure portability".
- * This flag allows Dali to behave consistently with the user's JPA
- * implementation, which may allow "discovery" in a JavaSE environment
- * (e.g. EclipseLink). This setting can also be used when the user wants
- * to explicitly list classes, even when the classes are "discovered"
- * by the JPA implementation.
- */
- boolean discoversAnnotatedClasses();
-
- /**
- * Set whether the JPA project will not generate error messages for any
- * annotated classes that are not listed in the <code>persistence.xml</code>
- * file or one of its mapping files.
- * @see #discoversAnnotatedClasses()
- */
- void setDiscoversAnnotatedClasses(boolean discoversAnnotatedClasses);
-
-
- // ********** manager **********
-
- /**
- * The JPA project manager provides behavior to be used by all the JPA
- * projects
- */
- interface Manager {
-
- // ********** commands **********
-
- /**
- * Execute the specified command, possibly asynchronously, synchronizing
- * with all the other stuff manipulating the JPA projects
- * (e.g. resource change events).
- * If, once the command comes up for execution, the specified JPA project
- * is no longer present, the command will <em>not</em> be executed by the
- * JPA project manager.
- */
- void execute(JobCommand command, String jobName, JpaProject jpaProject);
-
-
- // ********** modifying shared documents **********
-
- /**
- * Return the project-wide implementation of the
- * {@link ExtendedCommandExecutor} interface.
- */
- ExtendedCommandExecutor getModifySharedDocumentCommandExecutor();
-
-
- // ********** logging **********
-
- /**
- * Log the specified message.
- */
- void log(String msg);
-
- /**
- * Log the specified exception/error.
- */
- void log(Throwable throwable);
-
- /**
- * Log the specified message and exception/error.
- */
- void log(String msg, Throwable throwable);
-
- /**
- * Return an exception handler that can be used by the JPA model.
- */
- ExceptionHandler getExceptionHandler();
- }
-
-
- // ********** construction config **********
-
- /**
- * The settings used to construct a JPA project.
- */
- interface Config {
- /**
- * Return the JPA platform to be associated with the new JPA project.
- */
- Manager getJpaProjectManager();
-
- /**
- * Return the Eclipse project to be associated with the new JPA project.
- */
- IProject getProject();
-
- /**
- * Return the JPA platform to be associated with the new JPA project.
- */
- JpaPlatform getJpaPlatform();
-
- /**
- * Return the name of the connection profile to be associated
- * with the new JPA project. (This connection profile wraps a DTP
- * connection profile.)
- */
- String getConnectionProfileName();
-
- /**
- * Return the catalog to use instead of the connection profile's
- * default catalog.
- * May be null.
- */
- String getUserOverrideDefaultCatalog();
-
- /**
- * Return the name of the schema to use instead of the default schema
- * of the connection profile.
- * May be null.
- */
- String getUserOverrideDefaultSchema();
-
- /**
- * Return whether the new JPA project is to "discover" annotated
- * classes.
- */
- boolean discoverAnnotatedClasses();
- }
-
-
- // ********** reference **********
-
- /**
- * Standard adapter for "synchronously" retrieving a
- * {@link JpaProject JPA project}
- * (i.e. if necessary, wait for the JPA project to be constructed;
- * thus the {@link InterruptedException}):
- * <pre>
- * IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Foo Project");
- * JpaProject.Reference jpaProjectRef = (JpaProject.Reference) project.getAdapter(JpaProject.Reference.class);
- * JpaProject jpaProject = jpaProjectRef.getValue();
- * </pre>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- * @see org.eclipse.jpt.jpa.core.internal.ProjectAdapterFactory
- */
- interface Reference {
- /**
- * Return the JPA project corresponding to the reference's Eclipse project.
- * Return <code>null</code> if unable to associate the Eclipse
- * project with a JPA project. This method can be long-running.
- */
- JpaProject getValue() throws InterruptedException;
-
- /**
- * The JPA settings associated with the reference's Eclipse project
- * have changed in such a way as to require the associated
- * JPA project to be completely rebuilt
- * (e.g. when the user changes a project's JPA platform).
- * Return the new JPA project.
- */
- JpaProject rebuild() throws InterruptedException;
-
- /**
- * Build the JPA validation messages for the reference's
- * Eclipse project.
- */
- Iterable<IMessage> buildValidationMessages(IReporter reporter) throws InterruptedException;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java
deleted file mode 100644
index 7928a87b2d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.jpt.common.utility.BooleanReference;
-import org.eclipse.jpt.common.utility.command.Command;
-import org.eclipse.jpt.common.utility.command.ExtendedCommandExecutor;
-import org.eclipse.jpt.common.utility.model.Model;
-
-/**
- * The JPA project manager holds all the JPA projects in the Eclipse workspace
- * and provides support for executing long-running commands that modify the
- * context model.
- * <p>
- * To retrieve the JPA project manager corresponding to an Eclipse workspace:
- * <pre>
- * IWorkspace workspace = ResourcesPlugin.getWorkspace();
- * JpaProjectManager jpaProjectManager = (JpaProjectManager) workspace.getAdapter(JpaProjectManager.class);
- * </pre>
- * <p>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaProjectManager
- extends Model
-{
- /**
- * Return the JPA project manager's workspace.
- */
- IWorkspace getWorkspace();
-
-
- // ********** JPA projects **********
-
- /**
- * Return the JPA project manager's JPA projects. This is a potentially
- * long-running query (note the {@link InterruptedException}) as it will
- * wait for any unbuilt JPA projects to be built or re-built.
- * @see #getJpaProjects()
- */
- Iterable<JpaProject> waitToGetJpaProjects() throws InterruptedException;
-
- /**
- * Return the JPA project manager's JPA projects. The returned collection
- * will not include any unbuilt or currently re-building JPA projects;
- * but the client can listen for the appropriate events to be notified as
- * JPA projects are added and/or removed from the collection.
- * @see #addCollectionChangeListener(String, org.eclipse.jpt.common.utility.model.listener.CollectionChangeListener)
- * @see #JPA_PROJECTS_COLLECTION
- * @see #waitToGetJpaProjects()
- */
- Iterable<JpaProject> getJpaProjects();
- public static final String JPA_PROJECTS_COLLECTION = "jpaProjects"; //$NON-NLS-1$
-
- /**
- * The size returned here corresponds to the collection returned by
- * {@link #getJpaProjects()}.
- */
- int getJpaProjectsSize();
-
-
- // ********** batch commands **********
-
- /**
- * Suspend the current thread until the specified command is
- * executed, configuring the JPA
- * project manager appropriately so all events, JPA project updates, etc.
- * are handled synchronously. The assumption is this method will be called
- * when either the workspace is "headless" (non-UI) or none of the change
- * events are fired from anywhere but the UI thread (e.g. Java Reconciler
- * fires change events in a background thread).
- * @see #execute(Command, ExtendedCommandExecutor)
- */
- void execute(Command batchCommand) throws InterruptedException;
-
- /**
- * Suspend the current thread until the specified command is
- * executed, configuring the JPA
- * project manager appropriately so all events, JPA project updates, etc.
- * are handled synchronously. The assumption is this method will be called
- * from within a job that may execute on a non-UI thread, necessitating a
- * command executor that will modify on the UI thread any documents that are
- * currently open in the UI.
- */
- void execute(Command command, ExtendedCommandExecutor threadLocalModifySharedDocumentCommandExecutor) throws InterruptedException;
-
-
- // ********** async event listener flags **********
-
- /**
- * Add a flag that will be used to determine whether the manager's
- * asynchronous event listeners are active:<ul>
- * <li>If all the flags are <code>true</code>, the listeners
- * are active.
- * <li>If <em>any</em> flag is <code>false</code>, the listeners
- * are <em><b>in</b></em>active
- * </ul>
- * This flag provides a way for clients to modify the context model directly
- * without worrying about collisions caused by asynchronous events.
- * @see #execute(Command, ExtendedCommandExecutor)
- */
- void addAsyncEventListenerFlag(BooleanReference flag);
-
- /**
- * Remove the specified flag.
- * @see #addAsyncEventListenerFlag(BooleanReference)
- */
- void removeAsyncEventListenerFlag(BooleanReference flag);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaResourceModelProvider.java
deleted file mode 100644
index 0b434b8c6d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaResourceModelProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceModel;
-
-/**
- * Map a content type to a JPA resource model.
- *
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JpaResourceModelProvider
-{
- /**
- * Return the file content type the provider is for.
- */
- IContentType getContentType();
-
- /**
- * Build a JPA resource model for the specified JPA project and file.
- * Use the specified factory for creation so extenders can simply override
- * the appropriate creation method instead of building a provider for the
- * same content.
- */
- JptResourceModel buildResourceModel(JpaProject jpaProject, IFile file);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaStructureNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaStructureNode.java
deleted file mode 100644
index 8a62dc7b3c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaStructureNode.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.model.Model;
-
-
-/**
- * Interface implemented by any object to appear in the JPA Structure view
- * and JPA Details View. This interface is also used by the JPA Selection
- * Managers.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JpaStructureNode
- extends Model, IAdaptable
-{
- /**
- * Return the structure node at the specified offset in the structure node's
- * corresponding text file.
- */
- JpaStructureNode getStructureNode(int textOffset);
-
- /**
- * Return the text range to be used to select text in the editor
- * corresponding to the structure node.
- */
- TextRange getSelectionTextRange();
-
- /**
- * Return the structure node's context type.
- * Type used to identify a JPA structure node's type with respect to the
- * structure node's context
- * (i.e. its type in the scope of the JPA platform that created the
- * structure node and the structure node's resource).
- *
- * @see #getJpaPlatform()
- * @see #getResourceType()
- * @see #getType()
- */
- ContextType getContextType();
-
- /**
- * Return the structure node's JPA platform.
- * This is used to find the appropriate UI platform for building the
- * structure node's JPA Details Page.
- */
- JpaPlatform getJpaPlatform();
-
- /**
- * Return the structure node's resource type.
- * This is used to find the appropriate UI provider for building the
- * structure node's JPA Details Page.
- */
- JptResourceType getResourceType();
-
- /**
- * Return the structure node's type.
- * This is used to find the appropriate UI provider for building the
- * structure node's JPA Details Page.
- */
- Class<? extends JpaStructureNode> getType();
-
- /**
- * Dispose the structure node and its children.
- * Typically this would be used to update the structure node's
- * JPA file's root structure nodes.
- */
- void dispose();
-
-
- /**
- * Type used to identify a JPA structure node's type with respect to the
- * structure node's context
- * (i.e. its type in the scope of the JPA platform that created the
- * structure node and the structure node's resource).
- */
- final class ContextType {
- private final JpaStructureNode node;
-
- public ContextType(JpaStructureNode node) {
- super();
- if (node == null) {
- throw new NullPointerException();
- }
- this.node = node;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- }
- if ((obj == null) || (obj.getClass() != this.getClass())) {
- return false;
- }
- ContextType other = (ContextType) obj;
- return this.node.getJpaPlatform().equals(other.node.getJpaPlatform()) &&
- this.node.getResourceType().equals(other.node.getResourceType()) &&
- this.node.getType().equals(other.node.getType());
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int hash = 17;
- hash = hash * prime + this.node.getJpaPlatform().hashCode();
- hash = hash * prime + this.node.getResourceType().hashCode();
- hash = hash * prime + this.node.getType().hashCode();
- return hash;
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.node);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaXmlStructureNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaXmlStructureNode.java
deleted file mode 100644
index 7fdd2b9e60..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaXmlStructureNode.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core;
-
-
-/**
- * Implement this interface for XML objects that appear in the Structure view
- *
- * 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.
- *
- * @version 3.2
- * @since 3.2
- */
-
-public interface JpaXmlStructureNode extends JpaStructureNode {
-
- /**
- * Return the content assist proposals for the specified position
- * in the XML file.
- */
- Iterable<String> getXmlCompletionProposals(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JptJpaCorePlugin.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JptJpaCorePlugin.java
deleted file mode 100644
index c3e4cc68e9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JptJpaCorePlugin.java
+++ /dev/null
@@ -1,581 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core;
-
-import java.util.Hashtable;
-import javax.xml.parsers.SAXParserFactory;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager;
-import org.eclipse.jpt.jpa.core.internal.platform.JpaPlatformManagerImpl;
-import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager;
-import org.eclipse.jpt.jpa.core.platform.GenericPlatform;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformManager;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.prefs.Preferences;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The Dali core plug-in lifecycle implementation.
- * A number of globally-available constants and methods.
- * <p>
- * Provisional API: This class 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.
- *
- * @version 3.0
- * @since 2.0
- */
-// TODO bjv move to internal package and move all public stuff to adapters etc.
-public class JptJpaCorePlugin
- extends Plugin
-{
- /**
- * Flag necessary to handle lazy-initialization appropriately.
- */
- private volatile boolean active = false;
- private final Hashtable<IWorkspace, InternalJpaProjectManager> jpaProjectManagers = new Hashtable<IWorkspace, InternalJpaProjectManager>();
- private volatile ServiceTracker<?, SAXParserFactory> parserTracker;
-
- // ********** public constants **********
-
- /**
- * The plug-in identifier of the persistence support
- * (value <code>"org.eclipse.jpt.jpa.core"</code>).
- */
- public static final String PLUGIN_ID = "org.eclipse.jpt.jpa.core"; //$NON-NLS-1$
- public static final String PLUGIN_ID_ = PLUGIN_ID + '.';
-
- /**
- * The legacy plug-in identifier of the persistence support, used for project preferences
- * (value <code>"org.eclipse.jpt.core"</code>).
- */
- public static final String LEGACY_PLUGIN_ID = "org.eclipse.jpt.core"; //$NON-NLS-1$
- public static final String LEGACY_PLUGIN_ID_ = LEGACY_PLUGIN_ID + '.';
-
- /**
- * The key for storing a JPA project's data source connection profile name
- * in the Eclipse project's persistent properties.
- */
- public static final QualifiedName DATA_SOURCE_CONNECTION_PROFILE_NAME =
- new QualifiedName(PLUGIN_ID, "dataSource.connectionProfileName"); //$NON-NLS-1$
-
- /**
- * The key for storing a JPA project's user overridden default catalog name
- * in the Eclipse project's persistent properties.
- */
- public static final QualifiedName USER_OVERRIDE_DEFAULT_CATALOG =
- new QualifiedName(PLUGIN_ID, "userOverrideDefaultCatalogName"); //$NON-NLS-1$
-
- /**
- * The key for storing a JPA project's user overridden default schema name
- * in the Eclipse project's persistent properties.
- */
- public static final QualifiedName USER_OVERRIDE_DEFAULT_SCHEMA =
- new QualifiedName(PLUGIN_ID, "userOverrideDefaultSchemaName"); //$NON-NLS-1$
-
-
- /**
- * The identifier for the JPA validation marker
- * (value <code>"org.eclipse.jpt.jpa.core.jpaProblemMarker"</code>).
- */
- public static final String VALIDATION_MARKER_ID = PLUGIN_ID + ".jpaProblemMarker"; //$NON-NLS-1$
-
- /**
- * The identifier for the JPA validator
- * (value <code>"org.eclipse.jpt.jpa.core.jpaValidator"</code>).
- */
- public static final String VALIDATOR_ID = PLUGIN_ID_ + "jpaValidator"; //$NON-NLS-1$
-
- /**
- * The content type for <code>persistence.xml</code> files.
- */
- public static final IContentType PERSISTENCE_XML_CONTENT_TYPE = getJpaContentType("persistence"); //$NON-NLS-1$
-
- /**
- * The resource type for <code>persistence.xml</code> version 1.0 files
- */
- public static final JptResourceType PERSISTENCE_XML_1_0_RESOURCE_TYPE =
- new JptResourceType(PERSISTENCE_XML_CONTENT_TYPE, org.eclipse.jpt.jpa.core.resource.persistence.JPA.SCHEMA_VERSION);
-
- /**
- * The resource type for <code>persistence.xml</code> version 2.0 files
- */
- public static final JptResourceType PERSISTENCE_XML_2_0_RESOURCE_TYPE =
- new JptResourceType(PERSISTENCE_XML_CONTENT_TYPE, org.eclipse.jpt.jpa.core.resource.persistence.v2_0.JPA2_0.SCHEMA_VERSION);
-
- /**
- * The base content type for all mapping files.
- */
- public static final IContentType MAPPING_FILE_CONTENT_TYPE = getJpaContentType("mappingFile"); //$NON-NLS-1$
-
- /**
- * The content type for <code>orm.xml</code> mapping files.
- */
- public static final IContentType ORM_XML_CONTENT_TYPE = getJpaContentType("orm"); //$NON-NLS-1$
-
- /**
- * The resource type for <code>orm.xml</code> version 1.0 mapping files
- */
- public static final JptResourceType ORM_XML_1_0_RESOURCE_TYPE =
- new JptResourceType(ORM_XML_CONTENT_TYPE, org.eclipse.jpt.jpa.core.resource.orm.JPA.SCHEMA_VERSION);
-
- /**
- * The resource type for <code>orm.xml</code> version 2.0 mapping files
- */
- public static final JptResourceType ORM_XML_2_0_RESOURCE_TYPE =
- new JptResourceType(ORM_XML_CONTENT_TYPE, org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0.SCHEMA_VERSION);
-
- /**
- * Web projects have some special exceptions.
- */
- public static final IProjectFacet WEB_FACET
- = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE);
-
- public static final IPath DEFAULT_PERSISTENCE_XML_RUNTIME_PATH = new Path("META-INF/persistence.xml"); //$NON-NLS-1$
-
- public static final IPath DEFAULT_ORM_XML_RUNTIME_PATH = new Path("META-INF/orm.xml"); //$NON-NLS-1$
-
- private static IContentType getJpaContentType(String jpaContentType) {
- return getContentType(CONTENT_PREFIX_ + jpaContentType);
- }
-
- public static final String CONTENT_PREFIX = PLUGIN_ID_ + "content"; //$NON-NLS-1$
-
- public static final String CONTENT_PREFIX_ = CONTENT_PREFIX + '.';
-
- private static IContentType getContentType(String contentType) {
- return Platform.getContentTypeManager().getContentType(contentType);
- }
-
- // ********** singleton **********
-
- static JptJpaCorePlugin INSTANCE;
-
- // ********** public static methods **********
-
- /**
- * Return the JPA project manager corresponding to the specified workspace.
- * <p>
- * The preferred way to retrieve the JPA project manager is via the Eclipse
- * adapter framework:
- * <pre>
- * JpaProjectManager manager = (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class)
- * </pre>
- * @deprecated use <code>workspace.getAdapter(JpaProjectManager.class)</code>
- */
- @Deprecated
- public static JpaProjectManager getJpaProjectManager(IWorkspace workspace) {
- return INSTANCE.getJpaProjectManager_(workspace);
- }
-
- public static SAXParserFactory getSAXParserFactory() {
- return INSTANCE.getSAXParserFactory_();
- }
-
- /**
- * Return whether the specified Eclipse project has a Web facet.
- */
- public static boolean projectHasWebFacet(IProject project) {
- return projectHasFacet(project, WEB_FACET);
- }
-
- /**
- * Checked exceptions bite.
- */
- private static boolean projectHasFacet(IProject project, IProjectFacet facet) {
- try {
- return FacetedProjectFramework.hasProjectFacet(project, facet.getId());
- } catch (CoreException ex) {
- log(ex); // problems reading the project metadata - assume facet doesn't exist - return 'false'
- return false;
- }
- }
-
- /**
- * Return the runtime path to which JARs are relatively specified for
- * the given project.
- * (Web projects have a different runtime structure than non-web projects.)
- */
- public static IPath getJarRuntimeRootPath(IProject project) {
- return projectHasWebFacet(project) ?
- new Path("/" + J2EEConstants.WEB_INF) //$NON-NLS-1$
- : new Path("/"); //$NON-NLS-1$
- }
-
- /**
- * Return the default {@link JpaPlatformDescription} for new JPA projects with the given JPA facet version.
- */
- public static JpaPlatformDescription getDefaultJpaPlatform(IProjectFacetVersion jpaFacetVersion) {
- JpaPlatformDescription defaultPlatform = getDefaultJpaPlatform(
- jpaFacetVersion,
- JpaPreferencesManager.getLegacyWorkspacePreferences(),
- JpaPreferencesManager.getLegacyDefaultPreferences(),
- JpaPreferencesManager.getDefaultPreferences());
- if (defaultPlatform == null) {
- // if the platform ID stored in the workspace prefs is invalid (i.e. null), look in the default prefs
- defaultPlatform = getDefaultJpaPlatform(
- jpaFacetVersion,
- JpaPreferencesManager.getLegacyDefaultPreferences());
- }
- return defaultPlatform;
- }
-
- private static JpaPlatformDescription getDefaultJpaPlatform(IProjectFacetVersion jpaFacetVersion, Preferences ... nodes) {
- JpaPlatformDescription defaultDefaultPlatform = getDefaultJpaPlatform(
- jpaFacetVersion,
- JpaPreferencesManager.DEFAULT_JPA_PLATFORM_PREF_KEY,
- null,
- nodes);
- String preferenceKey = null;
- if (jpaFacetVersion.equals(JpaFacet.VERSION_1_0)) {
- if (defaultDefaultPlatform == null) {
- defaultDefaultPlatform = GenericPlatform.VERSION_1_0;
- }
- preferenceKey = JpaPreferencesManager.DEFAULT_JPA_PLATFORM_1_0_PREF_KEY;
- }
- else if (jpaFacetVersion.equals(JpaFacet.VERSION_2_0)) {
- if (defaultDefaultPlatform == null) {
- defaultDefaultPlatform = GenericPlatform.VERSION_2_0;
- }
- preferenceKey = JpaPreferencesManager.DEFAULT_JPA_PLATFORM_2_0_PREF_KEY;
- }
- else {
- throw new IllegalArgumentException("Illegal JPA facet version: " + jpaFacetVersion); //$NON-NLS-1$
- }
- return getDefaultJpaPlatform(jpaFacetVersion, preferenceKey, defaultDefaultPlatform, nodes);
- }
-
- private static JpaPlatformDescription getDefaultJpaPlatform(
- IProjectFacetVersion jpaFacetVersion, String preferenceKey, JpaPlatformDescription defaultDefault, Preferences ... nodes) {
-
- String defaultDefaultId = (defaultDefault == null) ? null : defaultDefault.getId();
- String defaultPlatformId = Platform.getPreferencesService().get(preferenceKey, defaultDefaultId, nodes);
- JpaPlatformDescription defaultPlatform = getJpaPlatformManager().getJpaPlatform(defaultPlatformId);
- if (defaultPlatform != null && defaultPlatform.supportsJpaFacetVersion(jpaFacetVersion)) {
- return defaultPlatform;
- }
- else if (defaultDefault != null && defaultDefault.supportsJpaFacetVersion(jpaFacetVersion)) {
- return defaultDefault;
- }
- return null;
- }
-
- public static JpaPlatformManager getJpaPlatformManager() {
- return JpaPlatformManagerImpl.instance();
- }
-
- /**
- * Set the default JPA platform ID for creating new JPA projects
- */
- public static void setDefaultJpaPlatformId(String jpaFacetVersion, String platformId) {
- String preferenceKey = null;
- if (JpaFacet.VERSION_1_0.getVersionString().equals(jpaFacetVersion)) {
- preferenceKey = JpaPreferencesManager.DEFAULT_JPA_PLATFORM_1_0_PREF_KEY;
- }
- else if (JpaFacet.VERSION_2_0.getVersionString().equals(jpaFacetVersion)) {
- preferenceKey = JpaPreferencesManager.DEFAULT_JPA_PLATFORM_2_0_PREF_KEY;
- }
- else {
- throw new IllegalArgumentException("Illegal JPA facet version: " + jpaFacetVersion); //$NON-NLS-1$
- }
- JpaPreferencesManager.setLegacyWorkspacePreference(preferenceKey, platformId);
- }
-
- /**
- * Return the JPA platform ID associated with the specified Eclipse project.
- */
- public static String getJpaPlatformId(IProject project) {
- return (new JpaPreferencesManager(project)).getJpaPlatformId();
- }
-
- /**
- * Return the JPA platform description associated with the specified Eclipse project.
- */
- public static JpaPlatformDescription getJpaPlatformDescription(IProject project) {
- String jpaPlatformId = getJpaPlatformId(project);
- return getJpaPlatformManager().getJpaPlatform(jpaPlatformId);
- }
-
- /**
- * Set the JPA platform ID associated with the specified Eclipse project.
- */
- public static void setJpaPlatformId(IProject project, String jpaPlatformId) {
- (new JpaPreferencesManager(project)).setJpaPlatformId(jpaPlatformId);
- }
-
- /**
- * Return the JPA "discover" flag associated with the specified
- * Eclipse project.
- */
- public static boolean getDiscoverAnnotatedClasses(IProject project) {
- return (new JpaPreferencesManager(project)).getDiscoverAnnotatedClasses();
- }
-
- /**
- * Set the JPA "discover" flag associated with the specified
- * Eclipse project.
- */
- public static void setDiscoverAnnotatedClasses(IProject project, boolean discoverAnnotatedClasses) {
- (new JpaPreferencesManager(project)).setDiscoverAnnotatedClasses(discoverAnnotatedClasses);
- }
-
- /**
- * Return the name of the metamodel source folder associated with the
- * specified Eclipse project.
- */
- public static String getMetamodelSourceFolderName(IProject project) {
- return (new JpaPreferencesManager(project)).getMetamodelSourceFolderName();
- }
-
- /**
- * Set the name of the metamodel source folder associated with the
- * specified Eclipse project.
- */
- public static void setMetamodelSourceFolderName(IProject project, String metamodelSourceFolderName) {
- (new JpaPreferencesManager(project)).setMetamodelSourceFolderName(metamodelSourceFolderName);
- }
-
- /**
- * Return the name of the connection profile associated with the specified
- * Eclipse project.
- */
- public static String getConnectionProfileName(IProject project) {
- try {
- String connectionProfileName = project.getPersistentProperty(DATA_SOURCE_CONNECTION_PROFILE_NAME);
- // some old connection profile names were stored as empty strings instead of nulls :-(
- // convert them here
- return (StringTools.stringIsEmpty(connectionProfileName)) ? null : connectionProfileName;
- } catch (CoreException ex) {
- log(ex);
- return null;
- }
- }
-
- /**
- * Set the name of the connection profile associated with the specified
- * Eclipse project.
- */
- public static void setConnectionProfileName(IProject project, String connectionProfileName) {
- try {
- project.setPersistentProperty(DATA_SOURCE_CONNECTION_PROFILE_NAME, connectionProfileName);
- } catch (CoreException ex) {
- log(ex);
- }
- }
-
- /**
- * Return the default catalog (identifier) associated with the specified Eclipse project.
- * @see JpaProject#getUserOverrideDefaultCatalog()
- */
- public static String getUserOverrideDefaultCatalog(IProject project) {
- try {
- return project.getPersistentProperty(USER_OVERRIDE_DEFAULT_CATALOG);
- } catch (CoreException ex) {
- log(ex);
- return null;
- }
- }
-
- /**
- * Set the default catalog (identifier) associated with the specified Eclipse project.
- * @see JpaProject#setUserOverrideDefaultCatalog(String)
- */
- public static void setUserOverrideDefaultCatalog(IProject project, String defaultCatalog) {
- try {
- project.setPersistentProperty(USER_OVERRIDE_DEFAULT_CATALOG, defaultCatalog);
- } catch (CoreException ex) {
- log(ex);
- }
- }
-
- /**
- * Return the default schema (identifier) associated with the specified Eclipse project.
- * @see JpaProject#getUserOverrideDefaultSchema()
- */
- public static String getUserOverrideDefaultSchema(IProject project) {
- try {
- return project.getPersistentProperty(USER_OVERRIDE_DEFAULT_SCHEMA);
- } catch (CoreException ex) {
- log(ex);
- return null;
- }
- }
-
- /**
- * Set the default schema (identifier) associated with the specified Eclipse project.
- * @see JpaProject#setUserOverrideDefaultSchema(String)
- */
- public static void setUserOverrideDefaultSchema(IProject project, String defaultSchema) {
- try {
- project.setPersistentProperty(USER_OVERRIDE_DEFAULT_SCHEMA, defaultSchema);
- } catch (CoreException ex) {
- log(ex);
- }
- }
-
- /**
- * Clear the JPA-specific project properties
- */
- public static void clearProjectPersistentProperties(IProject project) {
- try {
- project.setPersistentProperty(DATA_SOURCE_CONNECTION_PROFILE_NAME, null);
- project.setPersistentProperty(USER_OVERRIDE_DEFAULT_CATALOG, null);
- project.setPersistentProperty(USER_OVERRIDE_DEFAULT_SCHEMA, null);
- }
- catch (CoreException ce) {
- log(ce);
- }
- }
-
- public static boolean nodeIsJpa2_0Compatible(JpaNode jpaNode) {
- return jpaNode.getJpaProject().getJpaPlatform().getJpaVersion().isCompatibleWithJpaVersion(JpaFacet.VERSION_2_0.getVersionString());
- }
-
- public static boolean nodeIsXml2_0Compatible(XmlContextNode xmlContextNode) {
- return resourceTypeIsCompatible(xmlContextNode.getResourceType(), org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0.SCHEMA_VERSION);
- }
-
- public static boolean resourceTypeIsCompatible(JptResourceType resourceType, String version) {
- return JpaPlatform.Version.VERSION_COMPARATOR.compare(resourceType.getVersion(), version) >= 0;
- }
-
- /**
- * Log the specified message.
- */
- public static void log(String msg) {
- log(msg, null);
- }
-
- /**
- * Log the specified exception or error.
- */
- public static void log(Throwable throwable) {
- log(throwable.getLocalizedMessage(), throwable);
- }
-
- /**
- * Log the specified message and exception or error.
- */
- public static void log(String msg, Throwable throwable) {
- log(new Status(IStatus.ERROR, PLUGIN_ID, msg, throwable));
- }
-
- /**
- * Log the specified status.
- */
- public static void log(IStatus status) {
- INSTANCE.getLog().log(status);
- }
-
- // ********** plug-in implementation **************************************************
-
- public JptJpaCorePlugin() {
- super();
- if (INSTANCE != null) {
- throw new IllegalStateException();
- }
- // this convention is *wack*... ~bjv
- INSTANCE = this;
- }
-
-
- @Override
- public synchronized void start(BundleContext context) throws Exception {
- super.start(context);
- this.active = true;
- }
-
- @Override
- public synchronized void stop(BundleContext context) throws Exception {
- try {
- for (InternalJpaProjectManager jpaProjectManager : this.jpaProjectManagers.values()) {
- jpaProjectManager.stop();
- }
- this.jpaProjectManagers.clear();
-
- if (this.parserTracker != null) {
- this.parserTracker.close();
- this.parserTracker = null;
- }
- } finally {
- this.active = false;
- super.stop(context);
- }
- }
-
-
- // ********** state **********
-
- /**
- * @see #getJpaProjectManager(IWorkspace)
- */
- private synchronized InternalJpaProjectManager getJpaProjectManager_(IWorkspace workspace) {
- InternalJpaProjectManager jpaProjectManager = this.jpaProjectManagers.get(workspace);
- if (this.active && (jpaProjectManager == null)) {
- jpaProjectManager = this.buildJpaProjectManager(workspace);
- jpaProjectManager.start();
- this.jpaProjectManagers.put(workspace, jpaProjectManager);
- }
- return jpaProjectManager;
- }
-
- private InternalJpaProjectManager buildJpaProjectManager(IWorkspace workspace) {
- return new InternalJpaProjectManager(workspace);
- }
-
- /**
- * @see #getSAXParserFactory()
- */
- private SAXParserFactory getSAXParserFactory_() {
- ServiceTracker<?, SAXParserFactory> tracker = this.getParserTracker();
- if (tracker == null) {
- return null;
- }
- SAXParserFactory factory = tracker.getService();
- if (factory != null) {
- factory.setNamespaceAware(true);
- }
- return factory;
- }
-
- private synchronized ServiceTracker<?, SAXParserFactory> getParserTracker() {
- if (this.active && (this.parserTracker == null)) {
- this.parserTracker = this.buildParserTracker();
- this.parserTracker.open();
- }
- return this.parserTracker;
- }
-
- private ServiceTracker<?, SAXParserFactory> buildParserTracker() {
- return new ServiceTracker<Object, SAXParserFactory>(this.getBundle().getBundleContext(), "javax.xml.parsers.SAXParserFactory", null); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/MappingKeys.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/MappingKeys.java
deleted file mode 100644
index 0a556c8cc8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/MappingKeys.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core;
-
-/**
- *
- *
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-@SuppressWarnings("nls")
-public interface MappingKeys {
-
- String ENTITY_TYPE_MAPPING_KEY = "entity";
- String MAPPED_SUPERCLASS_TYPE_MAPPING_KEY = "mappedSuperclass";
- String EMBEDDABLE_TYPE_MAPPING_KEY = "embeddable";
- String NULL_TYPE_MAPPING_KEY = null;
-
- String BASIC_ATTRIBUTE_MAPPING_KEY = "basic";
- String ID_ATTRIBUTE_MAPPING_KEY = "id";
- String VERSION_ATTRIBUTE_MAPPING_KEY = "version";
- String ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY = "oneToOne";
- String ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY = "oneToMany";
- String MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY = "manyToOne";
- String MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY = "manyToMany";
- String EMBEDDED_ATTRIBUTE_MAPPING_KEY = "embedded";
- String EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY = "embeddedId";
- String TRANSIENT_ATTRIBUTE_MAPPING_KEY = "transient";
- String NULL_ATTRIBUTE_MAPPING_KEY = null;
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/ResourceDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/ResourceDefinition.java
deleted file mode 100644
index 7c73fe07f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/ResourceDefinition.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-
-/**
- * A JPA platform can support multiple resources. Each will
- * have a unique resource type and must be defined with a resource definition.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ResourceDefinition
-{
- /**
- * Return the definition's resource type.
- */
- JptResourceType getResourceType();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java
deleted file mode 100644
index 6f9d148890..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context;
-
-/**
- * Common interface that can be used by clients interested only in a type
- * or attribute's access setting (e.g. a UI composite).
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface AccessHolder
- extends ReadOnlyAccessHolder
-{
- /**
- * Return the specified access type;
- */
- AccessType getSpecifiedAccess();
-
- /**
- * Set the specified access type.
- */
- void setSpecifiedAccess(AccessType newSpecifiedAccess);
-
- /**
- * String constant associated with changes to the specified access type
- */
- String SPECIFIED_ACCESS_PROPERTY = "specifiedAccess"; //$NON-NLS-1$
-
- /**
- * Return the default access type
- */
- AccessType getDefaultAccess();
-
- /**
- * String constant associated with changes to the default access type
- */
- String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java
deleted file mode 100644
index 470aff4b37..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-
-/**
- * Context model corresponding to:<ul>
- * <li>the XML resource model
- * {@link org.eclipse.jpt.jpa.core.resource.orm.AccessType},
- * which corresponds to the <code>access</code> element in the
- * <code>orm.xml</code> file.
- * <li>the Java resource model {@link org.eclipse.jpt.jpa.core.resource.java.AccessType}
- * which corresponds to the <code>javax.persistence.Access</code> annotation.
- * </ul>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public class AccessType {
-
- public static final AccessType FIELD = new AccessType(
- org.eclipse.jpt.jpa.core.resource.java.AccessType.FIELD,
- org.eclipse.jpt.jpa.core.resource.orm.AccessType.FIELD,
- "Field" //$NON-NLS-1$
- );
- public static final AccessType PROPERTY = new AccessType(
- org.eclipse.jpt.jpa.core.resource.java.AccessType.PROPERTY,
- org.eclipse.jpt.jpa.core.resource.orm.AccessType.PROPERTY,
- "Property" //$NON-NLS-1$
- );
-
-
- protected final org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType;
- protected final String ormAccessType;
- protected final String displayString;
-
- public AccessType(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType, String ormAccessType, String displayString) {
- if (ormAccessType == null) {
- throw new NullPointerException();
- }
- this.javaAccessType = javaAccessType;
- this.ormAccessType = ormAccessType;
- this.displayString = displayString;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.AccessType getJavaAccessType() {
- return this.javaAccessType;
- }
-
- public String getOrmAccessType() {
- return this.ormAccessType;
- }
-
- public String getDisplayString() {
- return this.displayString;
- }
-
- // ********** static methods **********
-
- public static AccessType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType, JpaPlatform jpaPlatform, JptResourceType resourceType) {
- return (javaAccessType == null) ? null : fromJavaResourceModel_(javaAccessType, jpaPlatform, resourceType);
- }
-
- private static AccessType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType, JpaPlatform jpaPlatform, JptResourceType resourceType) {
- for (AccessType accessType : jpaPlatform.getJpaVariation().getSupportedAccessTypes(resourceType)) {
- if (accessType.getJavaAccessType() == javaAccessType) {
- return accessType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.AccessType toJavaResourceModel(AccessType accessType) {
- return (accessType == null) ? null : accessType.getJavaAccessType();
- }
-
- public static AccessType fromOrmResourceModel(String ormAccessType, JpaPlatform jpaPlatform, JptResourceType resourceType) {
- return (ormAccessType == null) ? null : fromOrmResourceModel_(ormAccessType, jpaPlatform, resourceType);
- }
-
- private static AccessType fromOrmResourceModel_(String ormAccessType, JpaPlatform jpaPlatform, JptResourceType resourceType) {
- for (AccessType accessType : jpaPlatform.getJpaVariation().getSupportedAccessTypes(resourceType)) {
- if (accessType.getOrmAccessType().equals(ormAccessType)) {
- return accessType;
- }
- }
- return null;
- }
-
- public static String toOrmResourceModel(AccessType accessType) {
- return (accessType == null) ? null : accessType.getOrmAccessType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java
deleted file mode 100644
index b171530b47..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * <em>Specified</em> association override
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface AssociationOverride
- extends Override_, ReadOnlyAssociationOverride
-{
- void initializeFrom(ReadOnlyAssociationOverride oldOverride);
-
- void initializeFromVirtual(ReadOnlyAssociationOverride virtualOverride);
-
- // covariant overrides
- VirtualAssociationOverride convertToVirtual();
-
- OverrideRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java
deleted file mode 100644
index 3c14ddb3c5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Association override container.
- * Used by entities, embedded mappings, and element collection mappings.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface AssociationOverrideContainer
- extends OverrideContainer
-{
- /**
- * Return the relationship mapping for the specified attribute.
- * Return <code>null</code> if it does not exist. This relationship mapping
- * will be found in the mapped superclass or embeddable type whose mapping
- * is being overridden, not in the owning entity
- */
- RelationshipMapping getRelationshipMapping(String attributeName);
-
- /**
- * Return the relationship with the specified attribute name.
- */
- ReadOnlyRelationship resolveOverriddenRelationship(String attributeName);
-
- // covariant overrides
- ListIterable<? extends ReadOnlyAssociationOverride> getOverrides();
- ReadOnlyAssociationOverride getOverrideNamed(String name);
- ListIterable<? extends AssociationOverride> getSpecifiedOverrides();
- AssociationOverride getSpecifiedOverride(int index);
- AssociationOverride getSpecifiedOverrideNamed(String name);
- ListIterable<? extends VirtualAssociationOverride> getVirtualOverrides();
- VirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride);
- AssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** owner **********
-
- interface Owner
- extends OverrideContainer.Owner
- {
- /**
- * @see AssociationOverrideContainer#resolveOverriddenRelationship(String)
- */
- ReadOnlyRelationship resolveOverriddenRelationship(String attributeName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java
deleted file mode 100644
index ff2987debc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * JPA attribute mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface AttributeMapping
- extends JpaContextNode
-{
- /**
- * Return the mapping's attribute (typically its parent node in the
- * containment hierarchy).
- */
- PersistentAttribute getPersistentAttribute();
-
- /**
- * Return the mapping's name, which corresponds to the name of the
- * associated attribute.
- */
- String getName();
-
- /**
- * Return whether the mapping is its attribute's <em>default</em> mapping
- * (as opposed to its <em>specified</em> mapping).
- */
- boolean isDefault();
- String DEFAULT_PROPERTY = "default"; //$NON-NLS-1$
-
- /**
- * Return a unique key for the attribute mapping. If this is defined in
- * an extension they should be equal.
- */
- String getKey();
-
- /**
- * Return whether the "attribute" mapping can be overridden.
- * The mapping must be a {@link ColumnMapping}.
- */
- boolean isOverridableAttributeMapping();
-
- /**
- * Return whether the "association" mapping can be overridden.
- * The mapping must be a {@link RelationshipMapping}.
- */
- boolean isOverridableAssociationMapping();
-
- /**
- * Return the mapping for the type that contains the mapping's attribute.
- */
- TypeMapping getTypeMapping();
-
- /**
- * If the mapping is for a primary key column, return the column's name,
- * otherwise return <code>null</code>.
- */
- String getPrimaryKeyColumnName();
-
- /**
- * Return whether this mapping is the owning side of a relationship.
- * Either this is a unidirectional mapping or it is the owning side of a
- * bidirectional relationship. If bidirectional, the owning side is the
- * side that does <em>not</em> specify a "mapped by" attribute name.
- * The owning side is the side where the join table is to be specified.
- * If this returns <code>true</code> the mapping will be a
- * {@link RelationshipMapping}.
- */
- boolean isRelationshipOwner();
-
- /**
- * Return whether the specified mapping manages a relationship with the
- * mapping.
- */
- boolean isOwnedBy(AttributeMapping mapping);
-
- /**
- * Return whether any database metadata specific validation should occur.
- * (For instance, if the connection is not active, then it should not.)
- */
- boolean validatesAgainstDatabase();
-
- /**
- * Return the relationship for the specified attribute.
- */
- Relationship resolveOverriddenRelationship(String attributeName);
-
- /**
- * Typically only ID mappings have generators.
- */
- Iterable<Generator> getGenerators();
-
-
- // ********** embedded mappings **********
-
- /**
- * This is used for "mapped by" choices in a relationship mapping.
- * Typically this will just be a single element iterator with the mapping's
- * name.
- * <p>
- * In a JPA 2.0 project, an embedded mapping should return its own name as
- * well as the name of its target embeddable's mappings with the embedded
- * mapping name prepended, e.g.:<ul>
- * <li><code>"embedded"</code>
- * <li><code>"embedded.foo"</code>
- * <li><code>"embedded.bar"</code>
- * </ul>
- */
- Iterable<String> getAllMappingNames();
-
- /**
- * This is used to determine the virtual attribute overrides for an
- * embedded mapping or entity. Return the names of all the attributes
- * that can be overridden.
- * <p>
- * In a JPA 2.0 project this will include overridable nested attributes.
- * @see #isOverridableAttributeMapping()
- */
- Iterable<String> getAllOverridableAttributeMappingNames();
-
- /**
- * This is used to determine the virtual association overrides for an
- * embedded mapping or entity. Return the names of all the associations
- * that can be overridden.
- * <p>
- * In a JPA 2.0 project this will include overridable nested associations.
- * @see #isOverridableAssociationMapping()
- */
- Iterable<String> getAllOverridableAssociationMappingNames();
-
- /**
- * Return the mapping itself if its name matches the specified name.
- * <p>
- * In JPA 2.0 this name could use dot-notation for nested mappings.
- * JPA 2.0 embedded mappings will have to parse this name and return the
- * appropriate nested mapping.
- */
- AttributeMapping resolveAttributeMapping(String name);
-
- /**
- * Return the column of the overridable attribute mapping (or attribute
- * override) with the specified attribute name.
- * <p>
- * In JPA 2.0 this name can use dot-notation to designate nested attributes
- * in embedded attribute mapping's embeddable type mapping.
- */
- Column resolveOverriddenColumn(String attributeName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java
deleted file mode 100644
index 4ec7c27029..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * <em>Specified</em> attribute override.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface AttributeOverride
- extends Override_, ReadOnlyAttributeOverride
-{
- void initializeFrom(ReadOnlyAttributeOverride oldOverride);
-
- void initializeFromVirtual(ReadOnlyAttributeOverride oldOverride);
-
- // covariant overrides
- VirtualAttributeOverride convertToVirtual();
-
- Column getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java
deleted file mode 100644
index d45a10d633..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Attribute override container.
- * Used by entities, embedded mappings, and element collection mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface AttributeOverrideContainer
- extends OverrideContainer
-{
- /**
- * Return the column of the mapping or attribute override for the specified
- * attribute. Return <code>null</code> if it does not exist. This
- * column mapping/attribute override will be found in the mapped superclass
- * (or embeddable), not in the owning entity.
- */
- ReadOnlyColumn resolveOverriddenColumn(String attributeName);
-
- // covariant overrides
- ListIterable<? extends ReadOnlyAttributeOverride> getOverrides();
- ReadOnlyAttributeOverride getOverrideNamed(String name);
- ListIterable<? extends AttributeOverride> getSpecifiedOverrides();
- AttributeOverride getSpecifiedOverride(int index);
- AttributeOverride getSpecifiedOverrideNamed(String name);
- ListIterable<? extends VirtualAttributeOverride> getVirtualOverrides();
- VirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride);
- AttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** owner **********
-
- interface Owner
- extends OverrideContainer.Owner
- {
- /**
- * @see AttributeOverrideContainer#resolveOverriddenColumn(String)
- */
- ReadOnlyColumn resolveOverriddenColumn(String attributeName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java
deleted file mode 100644
index 8dc8108294..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * column or join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface BaseColumn
- extends TableColumn, ReadOnlyBaseColumn
-{
- void setSpecifiedUnique(Boolean unique);
- void setSpecifiedNullable(Boolean nullable);
- void setSpecifiedInsertable(Boolean insertable);
- void setSpecifiedUpdatable(Boolean updatable);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java
deleted file mode 100644
index 2e6ddedaf7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * Behavior common to embedded and embedded ID mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface BaseEmbeddedMapping
- extends AttributeMapping
-{
- AttributeOverrideContainer getAttributeOverrideContainer();
-
- /**
- * Return the embeddable the embedded mapping references.
- * Return <code>null</code> if there is none.
- */
- Embeddable getTargetEmbeddable();
-
- /**
- * String associated with property change events for the target embeddable
- */
- String TARGET_EMBEDDABLE_PROPERTY = "targetEmbeddable"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEnumeratedConverter.java
deleted file mode 100644
index 2094fe9588..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEnumeratedConverter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context;
-
-/**
- * JPA enumerated/map key enumerated converter
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.1
- */
-public interface BaseEnumeratedConverter
- extends Converter
-{
- EnumType getEnumType();
-
- EnumType getSpecifiedEnumType();
- void setSpecifiedEnumType(EnumType enumType);
- String SPECIFIED_ENUM_TYPE_PROPERTY = "specifiedEnumType"; //$NON-NLS-1$
-
- EnumType getDefaultEnumType();
- String DEFAULT_ENUM_TYPE_PROPERTY = "defaultEnumType"; //$NON-NLS-1$
- EnumType DEFAULT_ENUM_TYPE = EnumType.ORDINAL;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java
deleted file mode 100644
index 669769cd13..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * Specified
- * <ul>
- * <li>join column
- * <li>primary key join column
- * </ul>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface BaseJoinColumn
- extends NamedColumn, ReadOnlyBaseJoinColumn
-{
- void setSpecifiedReferencedColumnName(String value);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseTemporalConverter.java
deleted file mode 100644
index 90cae64c92..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseTemporalConverter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context;
-
-/**
- * JPA temporal/map key temporal converter
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.1
- */
-public interface BaseTemporalConverter
- extends Converter
-{
- String[] TEMPORAL_MAPPING_SUPPORTED_TYPES = {
- java.util.Date.class.getName(),
- java.util.Calendar.class.getName(),
- java.util.GregorianCalendar.class.getName()
- };
-
- TemporalType getTemporalType();
- void setTemporalType(TemporalType temporalType);
- String TEMPORAL_TYPE_PROPERTY = "temporalType"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java
deleted file mode 100644
index c23cfb6628..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * JPA basic mapping.
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface BasicMapping
- extends ColumnMapping, FetchableMapping, OptionalMapping, ConvertibleMapping
-{
- FetchType DEFAULT_FETCH_TYPE = FetchType.EAGER;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java
deleted file mode 100644
index 4edc0d63f8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * JPA cascade (persist, merge, remove, refresh)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface Cascade
- extends JpaContextNode
-{
- boolean isAll();
- void setAll(boolean value);
- String ALL_PROPERTY = "all"; //$NON-NLS-1$
-
- boolean isPersist();
- void setPersist(boolean value);
- String PERSIST_PROPERTY = "persist"; //$NON-NLS-1$
-
- boolean isMerge();
- void setMerge(boolean value);
- String MERGE_PROPERTY = "merge"; //$NON-NLS-1$
-
- boolean isRemove();
- void setRemove(boolean value);
- String REMOVE_PROPERTY = "remove"; //$NON-NLS-1$
-
- boolean isRefresh();
- void setRefresh(boolean value);
- String REFRESH_PROPERTY = "refresh"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java
deleted file mode 100644
index 268b5fea17..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * JPA collection mapping (e.g. 1:m, m:m, element collection)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface CollectionMapping
- extends FetchableMapping
-{
- FetchType DEFAULT_FETCH_TYPE = FetchType.LAZY;
-
- Orderable getOrderable();
-
- PersistentType getResolvedTargetType();
-
-
- // ********** types **********
-
- Type getValueType();
- String VALUE_TYPE_PROPERTY = "valueType"; //$NON-NLS-1$
-
- Type getKeyType();
- String KEY_TYPE_PROPERTY = "keyType"; //$NON-NLS-1$
-
- public enum Type {
- BASIC_TYPE,
- EMBEDDABLE_TYPE,
- ENTITY_TYPE,
- NO_TYPE
- }
-
-
- // ********** map key **********
-
- String getMapKey();
-
- String getSpecifiedMapKey();
- void setSpecifiedMapKey(String mapKey);
- String SPECIFIED_MAP_KEY_PROPERTY = "specifiedMapKey"; //$NON-NLS-1$
-
- boolean isNoMapKey();
- void setNoMapKey(boolean noMapKey);
- String NO_MAP_KEY_PROPERTY = "noMapKey"; //$NON-NLS-1$
-
- boolean isPkMapKey();
- void setPkMapKey(boolean pkMapKey);
- String PK_MAP_KEY_PROPERTY = "pkMapKey"; //$NON-NLS-1$
-
- boolean isCustomMapKey();
- void setCustomMapKey(boolean customMapKey);
- String CUSTOM_MAP_KEY_PROPERTY = "customMapKey"; //$NON-NLS-1$
-
- Iterable<String> getCandidateMapKeyNames();
-
- String getMetamodelFieldMapKeyTypeName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java
deleted file mode 100644
index 6c1fa9a8be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * Normal column
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface Column
- extends BaseColumn, ReadOnlyColumn
-{
- void initializeFrom(ReadOnlyColumn oldColumn);
-
- void initializeFromVirtual(ReadOnlyColumn oldColumn);
-
- void setSpecifiedLength(Integer length);
-
- void setSpecifiedPrecision(Integer precision);
-
- void setSpecifiedScale(Integer scale);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java
deleted file mode 100644
index a3d40f4940..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * JPA attribute mapping that has a converter (e.g. basic, ID, version).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface ColumnMapping
- extends AttributeMapping, ReadOnlyBaseColumn.Owner
-{
- Column getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
deleted file mode 100644
index deb2a9c932..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context;
-
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-
-/**
- * JPA attribute mapping converter.
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.1
- */
-public interface Converter
- extends JpaContextNode
-{
- AttributeMapping getParent();
-
- /**
- * Return the converter's type.
- */
- Class<? extends Converter> getType();
-
-
- // ********** owner **********
-
- /**
- * Interface allowing converters to be used in multiple places
- * (e.g. basic mappings, collection mappings, etc).
- */
- public interface Owner
- {
- /**
- *
- */
- JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.java
deleted file mode 100644
index db587e8ce9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context;
-
-/**
- * JPA attribute mapping that has a converter (e.g. basic, ID, version).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.1
- */
-public interface ConvertibleMapping
- extends AttributeMapping
-{
- /**
- * Return the mapping's converter. Never <code>null</code>.
- */
- Converter getConverter();
- String CONVERTER_PROPERTY = "converter"; //$NON-NLS-1$
-
- /**
- * Set the converter type, adding the appropriate converter to the resource
- * model and removing any other converters. Clear all converters if the
- * specified type is <code>null</code>.
- */
- void setConverter(Class<? extends Converter> converterType);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java
deleted file mode 100644
index 8a56647d80..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.core.context;
-
-/**
- * discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface DiscriminatorColumn
- extends NamedDiscriminatorColumn
-{
- String DEFAULT_NAME = "DTYPE"; //$NON-NLS-1$
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java
deleted file mode 100644
index ebfd0b93ad..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.jpa.core.context;
-
-/**
- * Discriminator Type
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum DiscriminatorType {
-
- STRING(
- org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.STRING,
- org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType.STRING
- ),
- CHAR(
- org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.CHAR,
- org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType.CHAR
- ),
- INTEGER(
- org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.INTEGER,
- org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType.INTEGER
- );
-
-
- private org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType;
- private org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType;
-
- DiscriminatorType(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType, org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType) {
- if (javaDiscriminatorType == null) {
- throw new NullPointerException();
- }
- if (ormDiscriminatorType == null) {
- throw new NullPointerException();
- }
- this.javaDiscriminatorType = javaDiscriminatorType;
- this.ormDiscriminatorType = ormDiscriminatorType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType getJavaDiscriminatorType() {
- return this.javaDiscriminatorType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType getOrmDiscriminatorType() {
- return this.ormDiscriminatorType;
- }
-
-
- // ********** static methods **********
-
- public static DiscriminatorType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType) {
- return (javaDiscriminatorType == null) ? null : fromJavaResourceModel_(javaDiscriminatorType);
- }
-
- private static DiscriminatorType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType) {
- for (DiscriminatorType discriminatorType : DiscriminatorType.values()) {
- if (discriminatorType.getJavaDiscriminatorType() == javaDiscriminatorType) {
- return discriminatorType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType toJavaResourceModel(DiscriminatorType discriminatorType) {
- return (discriminatorType == null) ? null : discriminatorType.getJavaDiscriminatorType();
- }
-
- public static DiscriminatorType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType) {
- return (ormDiscriminatorType == null) ? null : fromOrmResourceModel_(ormDiscriminatorType);
- }
-
- private static DiscriminatorType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType) {
- for (DiscriminatorType discriminatorType : DiscriminatorType.values()) {
- if (discriminatorType.getOrmDiscriminatorType() == ormDiscriminatorType) {
- return discriminatorType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType toOrmResourceModel(DiscriminatorType discriminatorType) {
- return (discriminatorType == null) ? null : discriminatorType.getOrmDiscriminatorType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java
deleted file mode 100644
index 4c06592dd2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * embeddable type mapping
- * <b>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface Embeddable
- extends TypeMapping
-{
- // nothing yet
-}
-
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java
deleted file mode 100644
index 6bd03dff15..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * JPA embedded ID mapping
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface EmbeddedIdMapping
- extends BaseEmbeddedMapping
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java
deleted file mode 100644
index 4a9f747c34..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * JPA embedded mapping
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface EmbeddedMapping
- extends BaseEmbeddedMapping
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java
deleted file mode 100644
index 6e890cf29e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * entity
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface Entity
- extends IdTypeMapping
-{
- // ********** name **********
-
- String getSpecifiedName();
- String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$
- void setSpecifiedName(String name);
- String getDefaultName();
- String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
-
-
- // ********** table **********
-
- /**
- * Return the table for this entity, either specified or default.
- * This will not be null.
- */
- Table getTable();
-
- /**
- * Return the name of the entity's primary key column.
- * Return null if the entity's primary key is "compound"
- * (i.e. the primary key is composed of multiple columns).
- */
- String getPrimaryKeyColumnName();
-
- /**
- * Return the entity's default table name, which depends on the entity's
- * inheritance hierarchy.
- */
- String getDefaultTableName();
-
- /**
- * Return the entity's default schema, which depends on the entity's
- * inheritance hierarchy.
- */
- String getDefaultSchema();
-
- /**
- * Return the entity's default catalog, which depends on the entity's
- * inheritance hierarchy.
- */
- String getDefaultCatalog();
-
-
- // ********** secondary tables **********
-
- /**
- * Return the secondary tables whether specified or default.
- */
- ListIterable<? extends ReadOnlySecondaryTable> getSecondaryTables();
-
- /**
- * Return the number of secondary tables, both specified and default.
- */
- int getSecondaryTablesSize();
-
- /**
- * Return a list iterator of the specified secondary tables.
- * This will not be null.
- */
- ListIterable<? extends SecondaryTable> getSpecifiedSecondaryTables();
- String SPECIFIED_SECONDARY_TABLES_LIST = "specifiedSecondaryTables"; //$NON-NLS-1$
-
- /**
- * Return the number of specified secondary tables.
- */
- int getSpecifiedSecondaryTablesSize();
-
- /**
- * Add a specified secondary table to the entity return the object
- * representing it.
- */
- SecondaryTable addSpecifiedSecondaryTable();
-
- /**
- * Add a specified secondary table to the entity return the object
- * representing it.
- */
- SecondaryTable addSpecifiedSecondaryTable(int index);
-
- /**
- * Remove the specified secondary table from the entity.
- */
- void removeSpecifiedSecondaryTable(int index);
-
- /**
- * Remove the specified secondary table at the index from the entity.
- */
- void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable);
-
- /**
- * Move the specified secondary table from the source index to the target index.
- */
- void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex);
-
-
- // ********** inheritance strategy **********
-
- /**
- * Return the specified inheritance strategy if present, otherwise return the default
- * inheritance strategy.
- */
- InheritanceType getInheritanceStrategy();
- InheritanceType getSpecifiedInheritanceStrategy();
- void setSpecifiedInheritanceStrategy(InheritanceType inheritanceType);
- String SPECIFIED_INHERITANCE_STRATEGY_PROPERTY = "specifiedInheritanceStrategy"; //$NON-NLS-1$
- InheritanceType getDefaultInheritanceStrategy();
- String DEFAULT_INHERITANCE_STRATEGY_PROPERTY = "defaultInheritanceStrategy"; //$NON-NLS-1$
-
-
- /**
- * The first parent in the class hierarchy that is an entity.
- * This is the parent in the entity (persistent) inheritance hierarchy
- * (vs class inheritance hierarchy). Return null if there is no parent entity.
- */
- Entity getParentEntity();
-
- DiscriminatorColumn getDiscriminatorColumn();
-
- String getDiscriminatorValue();
- String getSpecifiedDiscriminatorValue();
- void setSpecifiedDiscriminatorValue(String value);
- String SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY = "specifiedDiscriminatorValue"; //$NON-NLS-1$
- String getDefaultDiscriminatorValue();
- String DEFAULT_DISCRIMINATOR_VALUE_PROPERTY = "defaultDiscriminatorValue"; //$NON-NLS-1$
-
- /**
- * Return whether a DiscriminatorValue is allowed for this Entity.
- * It is allowed if the entity is not abstract and not part of
- * a table-per-class inheritance hierarchy
- */
- boolean specifiedDiscriminatorValueIsAllowed();
- String SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY = "discriminatorValueIsAllowed"; //$NON-NLS-1$
-
- /**
- * Return whether a DiscriminatorValue is undefined for this Entity.
- * It is undefined if the entity is abstract or if it
- * is part of a table-per-class inheritance hierarchy
- */
- boolean discriminatorValueIsUndefined();
- String DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY = "discriminatorValueIsUndefined"; //$NON-NLS-1$
-
- /**
- * Return whether a DiscriminatorColumn is allowed for this Entity.
- * It is allowed if the entity is the root of the inheritance hierarchy (with descendant entities)
- * and the strategy is not table-per-class
- */
- boolean specifiedDiscriminatorColumnIsAllowed();
- String SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY = "specifiedDiscriminatorColumnIsAllowed"; //$NON-NLS-1$
-
- /**
- * Return whether a DiscriminatorColumn is undefined for this Entity.
- * It is undefined if the inheritance strategy is table-per-class
- */
- boolean discriminatorColumnIsUndefined();
- String DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY = "discriminatorColumnIsUndefined"; //$NON-NLS-1$
-
- /**
- * Return whether a Table is allowed for this Entity.
- * If the inheritance strategy is single-table, Table is allowed only
- * on the root entity.
- * If the inheritance strategy is table-per-class it is allowed only
- * on concrete entities.
- */
- boolean specifiedTableIsAllowed();
- String SPECIFIED_TABLE_IS_ALLOWED_PROPERTY = "specifiedTableIsAllowed"; //$NON-NLS-1$
-
- /**
- * Return whether a Table is undefined for this Entity.
- * If the inheritance strategy is table-per-class and the entity is
- * abstract, then a Table object is undefined
- */
- boolean tableIsUndefined();
- String TABLE_IS_UNDEFINED_PROPERTY = "tableIsUndefined"; //$NON-NLS-1$
-
-
- // ********** primary key join columns **********
-
- ListIterable<? extends ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
-
- int getPrimaryKeyJoinColumnsSize();
-
- ListIterable<? extends PrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- String SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST = "specifiedPrimaryKeyJoinColumns"; //$NON-NLS-1$
-
- int getSpecifiedPrimaryKeyJoinColumnsSize();
-
- PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
-
- PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn();
-
- void removeSpecifiedPrimaryKeyJoinColumn(int index);
-
- void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn);
-
- void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex);
-
-
- // ********** containers **********
-
- AttributeOverrideContainer getAttributeOverrideContainer();
-
- AssociationOverrideContainer getAssociationOverrideContainer();
-
- QueryContainer getQueryContainer();
-
- GeneratorContainer getGeneratorContainer();
-
-
- // ********** entity inheritance **********
-
- /**
- * Return the top of the entity's inheritance hierarchy.
- * This method will never return <code>null</code>. The root
- * is defined as the persistent type in the inheritance hierarchy
- * that has no parent. The root will be an entity.
- * <p>
- * Non-entities in the hierarchy should be ignored; i.e. we skip
- * over them in the search for the root.
- */
- Entity getRootEntity();
- String ROOT_ENTITY_PROPERTY = "rootEntity"; //$NON-NLS-1$
-
- /**
- * If the entity is a root entity, return the entity's descendant entities;
- * if the entity is not a root entity, return an empty collection.
- * <p>
- * <strong>NB:</strong> An entity A is a "descendant" of another root
- * entity B if the <em>name</em> of entity A's root entity's type matches
- * the name of entity B's type. This means entity A can be a "descendant"
- * of multiple root entities (typically both the <code>orm.xml</code>
- * and Java root entities for a particular type); despite entity have only
- * a single "root" entity (typically the <code>orm.xml</code> root entity).
- */
- Iterable<Entity> getDescendants();
- String DESCENDANTS_COLLECTION = "descendants"; //$NON-NLS-1$
-
-
- // ********** misc **********
-
- /**
- * Returns the attribute mapping that matches the name.
- * In 2.0 this name could use dot-notation for nested mappings.
- */
- AttributeMapping resolveAttributeMapping(String name);
-
- /**
- * If an entity has a single id attribute, return that attribute.
- * Else return null.
- */
- PersistentAttribute getIdAttribute();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java
deleted file mode 100644
index 4135ca9b2e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.jpa.core.context;
-
-/**
- * Enum Type
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum EnumType {
-
- ORDINAL(
- org.eclipse.jpt.jpa.core.resource.java.EnumType.ORDINAL,
- org.eclipse.jpt.jpa.core.resource.orm.EnumType.ORDINAL
- ),
- STRING(
- org.eclipse.jpt.jpa.core.resource.java.EnumType.STRING,
- org.eclipse.jpt.jpa.core.resource.orm.EnumType.STRING
- );
-
-
- private org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType;
- private org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType;
-
- EnumType(org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType, org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType) {
- if (javaEnumType == null) {
- throw new NullPointerException();
- }
- if (ormEnumType == null) {
- throw new NullPointerException();
- }
- this.javaEnumType = javaEnumType;
- this.ormEnumType = ormEnumType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.EnumType getJavaEnumType() {
- return this.javaEnumType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.EnumType getOrmEnumType() {
- return this.ormEnumType;
- }
-
-
- // ********** static methods **********
-
- public static EnumType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType) {
- return (javaEnumType == null) ? null : fromJavaResourceModel_(javaEnumType);
- }
-
- private static EnumType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType) {
- for (EnumType enumType : EnumType.values()) {
- if (enumType.getJavaEnumType() == javaEnumType) {
- return enumType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.EnumType toJavaResourceModel(EnumType enumType) {
- return (enumType == null) ? null : enumType.getJavaEnumType();
- }
-
- public static EnumType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType) {
- return (ormEnumType == null) ? null : fromOrmResourceModel_(ormEnumType);
- }
-
- private static EnumType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType) {
- for (EnumType enumType : EnumType.values()) {
- if (enumType.getOrmEnumType() == ormEnumType) {
- return enumType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.EnumType toOrmResourceModel(EnumType enumType) {
- return (enumType == null) ? null : enumType.getOrmEnumType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java
deleted file mode 100644
index 2ae147cf90..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.jpa.core.context;
-
-/**
- * Fetch Type
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum FetchType {
-
- EAGER(
- org.eclipse.jpt.jpa.core.resource.java.FetchType.EAGER,
- org.eclipse.jpt.jpa.core.resource.orm.FetchType.EAGER
- ),
- LAZY(
- org.eclipse.jpt.jpa.core.resource.java.FetchType.LAZY,
- org.eclipse.jpt.jpa.core.resource.orm.FetchType.LAZY
- );
-
-
- private org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType;
- private org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType;
-
- FetchType(org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType, org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType) {
- if (javaFetchType == null) {
- throw new NullPointerException();
- }
- if (ormFetchType == null) {
- throw new NullPointerException();
- }
- this.javaFetchType = javaFetchType;
- this.ormFetchType = ormFetchType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.FetchType getJavaFetchType() {
- return this.javaFetchType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.FetchType getOrmFetchType() {
- return this.ormFetchType;
- }
-
-
- // ********** static methods **********
-
- public static FetchType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType) {
- return (javaFetchType == null) ? null : fromJavaResourceModel_(javaFetchType);
- }
-
- private static FetchType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType) {
- for (FetchType fetchType : FetchType.values()) {
- if (fetchType.getJavaFetchType() == javaFetchType) {
- return fetchType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.FetchType toJavaResourceModel(FetchType fetchType) {
- return (fetchType == null) ? null : fetchType.getJavaFetchType();
- }
-
- public static FetchType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType) {
- return (ormFetchType == null) ? null : fromOrmResourceModel_(ormFetchType);
- }
-
- private static FetchType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType) {
- for (FetchType fetchType : FetchType.values()) {
- if (fetchType.getOrmFetchType() == ormFetchType) {
- return fetchType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.FetchType toOrmResourceModel(FetchType fetchType) {
- return (fetchType == null) ? null : fetchType.getOrmFetchType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java
deleted file mode 100644
index 31dec5ef31..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * JPA attribute mapping that has a fetch type (e.g. basic, relationship).
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface FetchableMapping
- extends AttributeMapping
-{
- FetchType getFetch();
-
- FetchType getSpecifiedFetch();
- void setSpecifiedFetch(FetchType newSpecifiedFetch);
- String SPECIFIED_FETCH_PROPERTY = "specifiedFetch"; //$NON-NLS-1$
-
- FetchType getDefaultFetch();
- String DEFAULT_FETCH_PROPERTY = "defaultFetch"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
deleted file mode 100644
index 934a08f609..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * JPA generated value
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface GeneratedValue
- extends JpaContextNode
-{
- GenerationType getStrategy();
- GenerationType getSpecifiedStrategy();
- void setSpecifiedStrategy(GenerationType strategy);
- String SPECIFIED_STRATEGY_PROPERTY = "specifiedStrategy"; //$NON-NLS-1$
- GenerationType getDefaultStrategy();
- String DEFAULT_STRATEGY_PROPERTY = "defaultStrategy"; //$NON-NLS-1$
- GenerationType DEFAULT_STRATEGY = GenerationType.AUTO;
-
- String getGenerator();
- String getSpecifiedGenerator();
- void setSpecifiedGenerator(String generator);
- String SPECIFIED_GENERATOR_PROPERTY = "specifiedGenerator"; //$NON-NLS-1$
- String getDefaultGenerator();
- String DEFAULT_GENERATOR_PROPERTY = "defaultGenerator"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java
deleted file mode 100644
index 6d87ae32d2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.jpa.core.context;
-
-/**
- * Generation Type
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum GenerationType {
-
- TABLE(
- org.eclipse.jpt.jpa.core.resource.java.GenerationType.TABLE,
- org.eclipse.jpt.jpa.core.resource.orm.GenerationType.TABLE
- ),
- SEQUENCE(
- org.eclipse.jpt.jpa.core.resource.java.GenerationType.SEQUENCE,
- org.eclipse.jpt.jpa.core.resource.orm.GenerationType.SEQUENCE
- ),
- IDENTITY(
- org.eclipse.jpt.jpa.core.resource.java.GenerationType.IDENTITY,
- org.eclipse.jpt.jpa.core.resource.orm.GenerationType.IDENTITY
- ),
- AUTO(
- org.eclipse.jpt.jpa.core.resource.java.GenerationType.AUTO,
- org.eclipse.jpt.jpa.core.resource.orm.GenerationType.AUTO
- );
-
-
- private org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType;
- private org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType;
-
- GenerationType(org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType, org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType) {
- if (javaGenerationType == null) {
- throw new NullPointerException();
- }
- if (ormGenerationType == null) {
- throw new NullPointerException();
- }
- this.javaGenerationType = javaGenerationType;
- this.ormGenerationType = ormGenerationType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.GenerationType getJavaGenerationType() {
- return this.javaGenerationType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.GenerationType getOrmGenerationType() {
- return this.ormGenerationType;
- }
-
-
- // ********** static methods **********
-
- public static GenerationType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType) {
- return (javaGenerationType == null) ? null : fromJavaResourceModel_(javaGenerationType);
- }
-
- private static GenerationType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType) {
- for (GenerationType generationType : GenerationType.values()) {
- if (generationType.getJavaGenerationType() == javaGenerationType) {
- return generationType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.GenerationType toJavaResourceModel(GenerationType generationType) {
- return (generationType == null) ? null : generationType.getJavaGenerationType();
- }
-
- public static GenerationType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType) {
- return (ormGenerationType == null) ? null : fromOrmResourceModel_(ormGenerationType);
- }
-
- private static GenerationType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType) {
- for (GenerationType generationType : GenerationType.values()) {
- if (generationType.getOrmGenerationType() == ormGenerationType) {
- return generationType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.GenerationType toOrmResourceModel(GenerationType generationType) {
- return (generationType == null) ? null : generationType.getOrmGenerationType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
deleted file mode 100644
index 1b60d59325..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-
-/**
- * Sequence and table generators.
- * <p>
- * Sequences can be defined on<ul>
- * <li>Java and <code>orm.xml</code> entities
- * <li>Java and <code>orm.xml</code> ID mappings
- * <li><code>orm.xml</code> entity mappings elements
- * </ul>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface Generator
- extends JpaNamedContextNode
-{
-
- /**
- * Return the generator's type.
- */
- Class<? extends Generator> getType();
- @SuppressWarnings("unchecked")
- Iterable<Class<? extends Generator>> TYPES = new ArrayIterable<Class<? extends Generator>>(
- SequenceGenerator.class,
- TableGenerator.class
- );
-
- // ********** initial value **********
-
- /**
- * Return the specified initial value if present, otherwise return the
- * default initial value.
- */
- int getInitialValue();
- Integer getSpecifiedInitialValue();
- void setSpecifiedInitialValue(Integer value);
- String SPECIFIED_INITIAL_VALUE_PROPERTY = "specifiedInitialValue"; //$NON-NLS-1$
- int getDefaultInitialValue();
- String DEFAULT_INITIAL_VALUE_PROPERTY = "defaultInitialValue"; //$NON-NLS-1$
-
-
- // ********** allocation size **********
-
- /**
- * Return the specified allocation size if present, otherwise return the
- * default allocation size.
- */
- int getAllocationSize();
- Integer getSpecifiedAllocationSize();
- void setSpecifiedAllocationSize(Integer value);
- String SPECIFIED_ALLOCATION_SIZE_PROPERTY = "specifiedAllocationSize"; //$NON-NLS-1$
- int getDefaultAllocationSize();
- String DEFAULT_ALLOCATION_SIZE_PROPERTY = "defaultAllocationSize"; //$NON-NLS-1$
- int DEFAULT_ALLOCATION_SIZE = 50;
-
-
- // ********** database stuff **********
-
- /**
- * Return the schema container that holds the relevant schemata.
- */
- SchemaContainer getDbSchemaContainer();
-
- /**
- * Return the generator's database catalog.
- * Return null if the generator's catalog (name) is invalid.
- */
- Catalog getDbCatalog();
-
- /**
- * Return the generator's database schema.
- * Return null if the generator's schema (name) is invalid.
- */
- Schema getDbSchema();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java
deleted file mode 100644
index fb3a12457c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context;
-
-/**
- * Container for a table generator and/or sequence generator.
- * Used by entities and ID mappings.
- * <p>
- * <strong>NB:</strong> The <code>orm.xml</code> entity mappings element can
- * hold more than a single sequence or table generator, so it does not use this
- * container.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface GeneratorContainer
- extends JpaContextNode
-{
- /**
- * Return the container's sequence and table generators.
- */
- Iterable<Generator> getGenerators();
-
-
- // ********** sequence generator **********
-
- String SEQUENCE_GENERATOR_PROPERTY = "sequenceGenerator"; //$NON-NLS-1$
-
- SequenceGenerator getSequenceGenerator();
-
- SequenceGenerator addSequenceGenerator();
-
- void removeSequenceGenerator();
-
-
- // ********** table generator **********
-
- String TABLE_GENERATOR_PROPERTY = "tableGenerator"; //$NON-NLS-1$
-
- TableGenerator getTableGenerator();
-
- TableGenerator addTableGenerator();
-
- void removeTableGenerator();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java
deleted file mode 100644
index 777c7c6525..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-
-/**
- * ID class reference
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.3
- */
-public interface IdClassReference
- extends PersistentType.Owner
-{
- // ********** id class name **********
-
- /**
- * Return the name of the id class, taking into consideration the default value if applicable
- */
- String getIdClassName();
-
- /**
- * Property string associated with changes to the {@link IdClassHolder}'s specified id class name
- */
- String SPECIFIED_ID_CLASS_NAME_PROPERTY = "specifiedIdClassName"; //$NON-NLS-1$
-
- /**
- * Return the specified name of the id class, null if none is specified in the resource model
- */
- String getSpecifiedIdClassName();
-
- /**
- * Set the specified name of the id class.
- * Use null to remove the id class specification from the resource model
- */
- void setSpecifiedIdClassName(String value);
-
- /**
- * Property string associated with changes to the {@link IdClassHolder}'s default id class name
- */
- String DEFAULT_ID_CLASS_NAME_PROPERTY = "defaultIdClassName"; //$NON-NLS-1$
-
- /**
- * Return the default name of the id class, null if there is none
- */
- String getDefaultIdClassName();
-
- /**
- * Return whether the id class has been specified.
- * Generally, this simply means that the id class name has been set, although if a default
- * applies, this should also return true.
- */
- boolean isSpecified();
-
- /**
- * Return the fully qualified name of the id class, taking into consideration the default value if applicable
- */
- String getFullyQualifiedIdClassName();
- String FULLY_QUALIFIED_ID_CLASS_PROPERTY = "fullyQualifiedIdClass"; //$NON-NLS-1$
-
-
- // ********** id class **********
-
- /**
- * Property string associated with changes to the {@link IdClassHolder}'s id class.
- * This will change (potentially) if the id class name changes, or if other changes result
- * in changes in the id class' resolution.
- */
- String ID_CLASS_PROPERTY = "idClass"; //$NON-NLS-1$
-
- /**
- * Return the {@link JavaPersistentType} that is resolved from the id class name.
- * This will be null if the id class name is null or if the class cannot be resolved from that
- * name.
- */
- JavaPersistentType getIdClass();
-
- /**
- * Return the char to be used for browsing or creating the id class IType.
- * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
- */
- char getIdClassEnclosingTypeSeparator();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java
deleted file mode 100644
index d4f117ff28..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * JPA ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface IdMapping
- extends ColumnMapping, ConvertibleMapping
-{
- GeneratorContainer getGeneratorContainer();
-
- GeneratedValue getGeneratedValue();
- GeneratedValue addGeneratedValue();
- void removeGeneratedValue();
- String GENERATED_VALUE_PROPERTY = "generatedValue"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdTypeMapping.java
deleted file mode 100644
index 3a14d74832..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdTypeMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.context;
-
-/**
- * ID type mapping:<ul>
- * <li>entity
- * <li>mapped superclass
- * </ul>
- * 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.
- */
-public interface IdTypeMapping
- extends TypeMapping
-{
- /**
- * Return the (aggregate) class reference for configuring and validating
- * the type mapping's ID class.
- */
- IdClassReference getIdClassReference();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java
deleted file mode 100644
index a3003bf64c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.jpa.core.context;
-
-/**
- * Inheritance Type
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum InheritanceType {
-
- SINGLE_TABLE(
- org.eclipse.jpt.jpa.core.resource.java.InheritanceType.SINGLE_TABLE,
- org.eclipse.jpt.jpa.core.resource.orm.InheritanceType.SINGLE_TABLE
- ),
- JOINED(
- org.eclipse.jpt.jpa.core.resource.java.InheritanceType.JOINED,
- org.eclipse.jpt.jpa.core.resource.orm.InheritanceType.JOINED
- ),
- TABLE_PER_CLASS(
- org.eclipse.jpt.jpa.core.resource.java.InheritanceType.TABLE_PER_CLASS,
- org.eclipse.jpt.jpa.core.resource.orm.InheritanceType.TABLE_PER_CLASS
- );
-
-
- private org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType;
- private org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType;
-
- InheritanceType(org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType, org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType) {
- if (javaInheritanceType == null) {
- throw new NullPointerException();
- }
- if (ormInheritanceType == null) {
- throw new NullPointerException();
- }
- this.javaInheritanceType = javaInheritanceType;
- this.ormInheritanceType = ormInheritanceType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.InheritanceType getJavaInheritanceType() {
- return this.javaInheritanceType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.InheritanceType getOrmInheritanceType() {
- return this.ormInheritanceType;
- }
-
-
- // ********** static methods **********
-
- public static InheritanceType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType) {
- return (javaInheritanceType == null) ? null : fromJavaResourceModel_(javaInheritanceType);
- }
-
- private static InheritanceType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType) {
- for (InheritanceType inheritanceType : InheritanceType.values()) {
- if (inheritanceType.getJavaInheritanceType() == javaInheritanceType) {
- return inheritanceType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.InheritanceType toJavaResourceModel(InheritanceType inheritanceType) {
- return (inheritanceType == null) ? null : inheritanceType.getJavaInheritanceType();
- }
-
- public static InheritanceType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType) {
- return (ormInheritanceType == null) ? null : fromOrmResourceModel_(ormInheritanceType);
- }
-
- private static InheritanceType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType) {
- for (InheritanceType inheritanceType : InheritanceType.values()) {
- if (inheritanceType.getOrmInheritanceType() == ormInheritanceType) {
- return inheritanceType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.InheritanceType toOrmResourceModel(InheritanceType inheritanceType) {
- return (inheritanceType == null) ? null : inheritanceType.getOrmInheritanceType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java
deleted file mode 100644
index 900dde8078..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * Specified join column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JoinColumn
- extends BaseJoinColumn, BaseColumn, ReadOnlyJoinColumn
-{
- /**
- * Initialize the join column from the specified old join column.
- */
- void initializeFrom(ReadOnlyJoinColumn oldJoinColumn);
-
- /**
- * Initialize the join column from the specified old virtual join column.
- */
- void initializeFromVirtual(ReadOnlyJoinColumn virtualJoinColumn);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java
deleted file mode 100644
index 4a80ae536c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * Join column relationship<ul>
- * <li>1:1
- * <li>1:m
- * <li>m:1
- * <li>association override
- * </ul>
- * <p>
- * 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.
- *
- * @see RelationshipMapping
- * @see Relationship
- * @see JoinColumn
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JoinColumnRelationship
- extends ReadOnlyJoinColumnRelationship, Relationship
-{
- JoinColumnRelationshipStrategy getJoinColumnStrategy();
-
- /**
- * Set the relationship's strategy to the join column strategy.
- */
- void setStrategyToJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java
deleted file mode 100644
index e796fa3791..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Join column relationship strategy.
- * <p>
- * 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.
- *
- * @see RelationshipMapping
- * @see AssociationOverride
- * @see JoinColumnRelationship
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JoinColumnRelationshipStrategy
- extends ReadOnlyJoinColumnRelationshipStrategy, RelationshipStrategy
-{
- void initializeFrom(ReadOnlyJoinColumnRelationshipStrategy oldStrategy);
-
- void initializeFromVirtual(ReadOnlyJoinColumnRelationshipStrategy oldStrategy);
-
-
- // ********** join columns **********
-
- ListIterable<? extends JoinColumn> getJoinColumns();
-
-
- // ********** specified join columns **********
-
- ListIterable<? extends JoinColumn> getSpecifiedJoinColumns();
- JoinColumn getSpecifiedJoinColumn(int index);
-
- /**
- * Add a specified join column to the relationship.
- */
- JoinColumn addSpecifiedJoinColumn();
-
- /**
- * Add a specified join column to the relationship.
- */
- JoinColumn addSpecifiedJoinColumn(int index);
-
- /**
- * Remove the specified join column.
- */
- void removeSpecifiedJoinColumn(int index);
-
- /**
- * Remove the specified join column.
- */
- void removeSpecifiedJoinColumn(JoinColumn joinColumn);
-
- /**
- * Move the specified join column from the source index to the target index.
- */
- void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex);
-
-
- // ********** default join column **********
-
- JoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java
deleted file mode 100644
index f5169be42b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Used by many-to-many and one-to-many mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JoinTable
- extends ReferenceTable, ReadOnlyJoinTable
-{
- JoinTableRelationshipStrategy getParent();
-
- void initializeFrom(ReadOnlyJoinTable oldJoinTable);
-
- void initializeFromVirtual(ReadOnlyJoinTable virtualJoinTable);
-
-
- // ********** inverse join columns **********
-
- /**
- * Convert the join table's default inverse join column to a specified
- * inverse join column.
- */
- void convertDefaultInverseJoinColumnToSpecified();
-
- ListIterable<? extends JoinColumn> getInverseJoinColumns();
-
- ListIterable<? extends JoinColumn> getSpecifiedInverseJoinColumns();
-
- JoinColumn getSpecifiedInverseJoinColumn(int index);
-
- /**
- * Add a specified inverse join column to the join table.
- * Return the newly-created join column.
- */
- JoinColumn addSpecifiedInverseJoinColumn();
-
- /**
- * Add a specified inverse join column to the join table.
- * Return the newly-created join column.
- */
- JoinColumn addSpecifiedInverseJoinColumn(int index);
-
- /**
- * Remove the inverse join column at the specified index from the join table.
- */
- void removeSpecifiedInverseJoinColumn(int index);
-
- /**
- * Remove the specified inverse join column from the join table.
- */
- void removeSpecifiedInverseJoinColumn(JoinColumn joinColumn);
-
- /**
- * Move an inverse join column from the specified source index to the
- * specified target index.
- */
- void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex);
-
- /**
- * Remove all the join table's inverse join columns.
- */
- void clearSpecifiedInverseJoinColumns();
-
- JoinColumn getDefaultInverseJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java
deleted file mode 100644
index 45b60aaf47..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * Join table relationship<ul>
- * <li>1:1 (JPA 2.0)
- * <li>1:m
- * <li>m:1 (JPA 2.0)
- * <li>m:m
- * <li>association override (JPA 2.0)
- * </ul>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JoinTableRelationship
- extends ReadOnlyJoinTableRelationship, Relationship
-{
- JoinTableRelationshipStrategy getJoinTableStrategy();
-
- /**
- * Set the relationship's strategy to the join table strategy.
- */
- void setStrategyToJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java
deleted file mode 100644
index 8aa2e7dc53..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * Join table relationship strategy.
- * <p>
- * 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.
- *
- * @see RelationshipMapping
- * @see AssociationOverride
- * @see JoinTableRelationship
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JoinTableRelationshipStrategy
- extends ReadOnlyJoinTableRelationshipStrategy, RelationshipStrategy
-{
- void initializeFrom(ReadOnlyJoinTableRelationshipStrategy oldStrategy);
-
- void initializeFromVirtual(ReadOnlyJoinTableRelationshipStrategy virtualStrategy);
-
- JoinTable getJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
deleted file mode 100644
index 3de89e27bf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JpaNode;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-
-/**
- * Common protocol for JPA objects that have a context, as opposed to
- * resource objects.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JpaContextNode
- extends JpaNode
-{
- /**
- * Return the resource type of the context node's resource.
- */
- JptResourceType getResourceType();
-
- /**
- * Return the persistence unit if the context node is within a
- * persistence unit. Otherwise throw an exception.
- */
- PersistenceUnit getPersistenceUnit();
-
- /**
- * Return the mapping file root if the context node is within a
- * mapping file. Otherwise throw an exception.
- */
- MappingFileRoot getMappingFileRoot();
-
-
- // ********** database stuff **********
-
- SchemaContainer getContextDefaultDbSchemaContainer();
-
- Catalog getContextDefaultDbCatalog();
-
- Schema getContextDefaultDbSchema();
-
-
- // ********** synchronize/update **********
-
- /**
- * The resource model has changed; synchronize the context model with it.
- * This will probably trigger a call to {@link #update()}.
- */
- void synchronizeWithResourceModel();
-
- /**
- * Some non-trivial state in the JPA project has changed; update the
- * parts of the context node that are dependent on yet other parts of the
- * node's JPA project.
- * If the dependent state changes also, yet another <em>update</em> will be
- * triggered, possibly followed by yet more <em>updates</em>; until the JPA
- * project's state quiesces.
- */
- void update();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java
deleted file mode 100644
index c831f7d68c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context;
-
-import java.io.Serializable;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-
-/**
- * Named context node. Sorta. :-)
- * <p>
- * 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.
- */
-public interface JpaNamedContextNode
- extends JpaContextNode
-{
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
- void setName(String name);
-
- Class<? extends JpaNamedContextNode> getType();
-
- /**
- * Return whether the specified node is <em>not</em> this node and it has
- * the same state. Typically the specified node would be the same type as
- * this node.
- * @see #getType()
- */
- boolean isEquivalentTo(JpaNamedContextNode node);
-
- final class NameTransformer<N extends JpaNamedContextNode>
- implements Transformer<N, String>, Serializable
- {
- @SuppressWarnings("rawtypes")
- public static final NameTransformer INSTANCE = new NameTransformer();
- @SuppressWarnings("unchecked")
- public static <T extends JpaNamedContextNode> Transformer<T, String> instance() {
- return INSTANCE;
- }
- // ensure single instance
- private NameTransformer() {
- super();
- }
- public String transform(N node) {
- return node.getName();
- }
- @Override
- public String toString() {
- return StringTools.buildSingletonToString(this);
- }
- private static final long serialVersionUID = 1L;
- private Object readResolve() {
- // replace this object with the singleton
- return INSTANCE;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
deleted file mode 100644
index 878eb81f4d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Root of the Dali JPA context model.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JpaRootContextNode
- extends JpaContextNode
-{
- // ********** persistence.xml **********
-
- /**
- * String constant associated with changes to the persistence XML property
- * @see #addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String PERSISTENCE_XML_PROPERTY = "persistenceXml"; //$NON-NLS-1$
-
- /**
- * Return the content represented by the <code>persistence.xml</code>
- * file associated with the root context node's JPA project.
- * This may be null.
- */
- PersistenceXml getPersistenceXml();
-
-
- // ********** validation **********
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.java
deleted file mode 100644
index 61066cf693..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context;
-
-/**
- * JPA LOB converter
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.1
- */
-public interface LobConverter
- extends Converter
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java
deleted file mode 100644
index 3b98a83d02..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2011s 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.core.context;
-
-/**
- * JPA m:m mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface ManyToManyMapping
- extends MultiRelationshipMapping
-{
- ManyToManyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.java
deleted file mode 100644
index 2ec18c5fa8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * m:m relationship reference
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface ManyToManyRelationship
- extends MappedByRelationship,
- JoinTableRelationship,
- MappingRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java
deleted file mode 100644
index 41617e286f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * JPA m:1 mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface ManyToOneMapping
- extends SingleRelationshipMapping
-{
- ManyToOneRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java
deleted file mode 100644
index 712f296a33..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * m:1 relationship (join column)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface ManyToOneRelationship
- extends JoinColumnRelationship, MappingRelationship
-{
- // nothing
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java
deleted file mode 100644
index 09f610b7a2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * "Mapped by" relationship<ul>
- * <li>1:1
- * <li>1:m
- * <li>m:m
- * </ul>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface MappedByRelationship
- extends Relationship
-{
- /**
- * Return the (never <code>null</code>) strategy used to configure
- * the relationship's "mapped by" strategy.
- */
- MappedByRelationshipStrategy getMappedByStrategy();
-
- /**
- * Return whether the "mapped by" strategy is the
- * relationship's current strategy.
- */
- boolean strategyIsMappedBy();
-
- /**
- * Set the relationship's strategy to the "mapped by" strategy.
- */
- void setStrategyToMappedBy();
-
- /**
- * Return whether the specified mapping may own the relationship.
- */
- boolean mayBeMappedBy(AttributeMapping mapping);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java
deleted file mode 100644
index 370b25e901..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * "Mapped by" relationship strategy
- * <p>
- * 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.
- *
- * @see RelationshipMapping
- * @see MappedByRelationship
- *
- * @version 2.2
- * @since 2.2
- */
-public interface MappedByRelationshipStrategy
- extends RelationshipStrategy
-{
- void initializeFrom(MappedByRelationshipStrategy oldStrategy);
-
- /**
- * String associated with changes to the attribute property of this object
- */
- String MAPPED_BY_ATTRIBUTE_PROPERTY = "mappedByAttribute"; //$NON-NLS-1$
-
- /**
- * Return the name of the attribute that maps the relationship.
- */
- String getMappedByAttribute();
-
- /**
- * Set the name of the attribute that maps the relationship.
- */
- void setMappedByAttribute(String attribute);
-
- /**
- * Return the possible attribute names the strategy might use.
- */
- Iterable<String> getCandidateMappedByAttributeNames();
-
- /**
- * Return whether this strategy's relationship is owned by the given other
- * relationship mapping
- */
- boolean relationshipIsOwnedBy(RelationshipMapping otherMapping);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java
deleted file mode 100644
index c931411a09..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context;
-
-/**
- * mapped superclass
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface MappedSuperclass
- extends IdTypeMapping
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java
deleted file mode 100644
index 8a89fda524..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * JPA mapping file (typically <code>orm.xml</code>).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.1
- */
-public interface MappingFile
- extends XmlFile, PersistentTypeContainer
-{
- /**
- * Covariant override.
- */
- MappingFileRef getParent();
-
- /**
- * Return the mapping file's root.
- * This can be <code>null</code>.
- */
- MappingFileRoot getRoot();
-
- /**
- * Return whether the mapping file exists in the specified folder.
- */
- boolean isIn(IFolder folder);
-
-
- // ********** queries/generators **********
-
- /**
- * Return the queries defined directly in the mapping file (as opposed to
- * including the queries defined in Java annotations).
- */
- Iterable<Query> getMappingFileQueries();
-
- /**
- * Return the generators defined directly in the mapping file (as opposed to
- * including the generators defined in Java annotations).
- */
- Iterable<Generator> getMappingFileGenerators();
-
-
- // ********** refactoring **********
-
- /**
- * Create DeleteEdits for deleting references (if any) to the type about to be deleted.
- * Return an EmptyIterable if there are not any references to the given type.
- */
- Iterable<DeleteEdit> createDeleteTypeEdits(IType type);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java
deleted file mode 100644
index f32ec18b8d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context;
-
-/**
- * Persistence unit defaults held by a mapping file.
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.1
- */
-public interface MappingFilePersistenceUnitDefaults
- extends XmlContextNode
-{
- /**
- * Covariant override.
- */
- MappingFilePersistenceUnitMetadata getParent();
-
- /**
- * Return the access type for all managed classes in the persistence unit,
- * unless overridden by a local annotation or XML setting.
- */
- AccessType getAccess();
-
- /**
- * Return the catalog for all database objects referenced in the
- * persistence unit, unless overridden by a local annotation or XML setting.
- * <p>
- * Return the specified catalog if present, otherwise return the
- * default catalog as determined by the database connection.
- */
- String getCatalog();
-
- /**
- * Return the schema for all database objects referenced in the
- * persistence unit, unless overridden by a local annotation or XML setting.
- * <p>
- * Return the specified schema if present, otherwise return the
- * default schema as determined by the database connection.
- */
- String getSchema();
-
- /**
- * Return all the relationhips in the persistence unit are to be cascade
- * persist, unless overridden by a local annotation or XML setting.
- */
- boolean isCascadePersist();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java
deleted file mode 100644
index 1313b66fbe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java
+++ /dev/null
@@ -1,47 +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.jpa.core.context;
-
-/**
- * Persistence unit metadata held by a mapping file.
- * <p>
- * 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.
- */
-public interface MappingFilePersistenceUnitMetadata
- extends XmlContextNode
-{
- /**
- * Covariant override.
- */
- MappingFileRoot getParent();
-
- /**
- * Return whether any annotations on the persistent types associated with
- * the mapping file's persistence unit are to be ignored.
- */
- boolean isXmlMappingMetadataComplete();
-
- /**
- * Return the persistence unit defaults held by the mapping file.
- */
- MappingFilePersistenceUnitDefaults getPersistenceUnitDefaults();
-
- /**
- * Return whether the mapping file's underlying resource exists.
- * If there is a node in the <code>orm.xml</code> file for the
- * {@code <persistence-unit-metadata>} element,
- * return <code>true</code>; otherwise <code>false</code>.
- */
- boolean resourceExists();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java
deleted file mode 100644
index 6a4aa3ed59..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context;
-
-import org.eclipse.jpt.jpa.core.JpaXmlStructureNode;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer;
-
-/**
- * The root of a JPA mapping file.
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.1
- */
-public interface MappingFileRoot
- extends XmlContextNode, JpaXmlStructureNode, PersistentTypeContainer
-{
- /**
- * covariant override
- */
- MappingFile getParent();
-
- /**
- * Return the specified access if present, otherwise return the default
- * access.
- */
- AccessType getAccess();
-
- /**
- * Return the specified catalog if present, otherwise return the default
- * catalog.
- */
- String getCatalog();
-
- /**
- * Return the specified schema if present, otherwise return the default
- * schema.
- */
- String getSchema();
-
- /**
- * Return the metadata defined within the mapping file
- * <em>for the persistence unit</em>.
- * Return <code>null</code> if none exists.
- *
- * @see MappingFilePersistenceUnitMetadata#resourceExists()
- */
- MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java
deleted file mode 100644
index b3000326b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Mapping relationship<ul>
- * <li>1:1
- * <li>1:m
- * <li>m:1
- * <li>m:m
- * </ul>
- * <p>
- * 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.
- */
-public interface MappingRelationship
- extends Relationship
-{
- /**
- * Return whether the relationship's mapping is the relationship owner.
- * @see RelationshipMapping#isRelationshipOwner()
- */
- boolean isOwner();
-
- /**
- * Return whether the specified mapping owns the relationship.
- * @see RelationshipMapping#isOwnedBy(AttributeMapping)
- */
- boolean isOwnedBy(RelationshipMapping mapping);
-
- /**
- * Return whether the relationship's mapping is a target foreign key
- * relationship.
- * A one-to-many mapping with a join column will have the foreign key
- * in the target table.
- */
- boolean isTargetForeignKey();
-
- /**
- * Return whether the relationship's mapping can be overridden with an
- * association override.
- */
- boolean isOverridable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java
deleted file mode 100644
index d1b061a319..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * Multi-valued relationship (1:m, m:m) mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface MultiRelationshipMapping
- extends RelationshipMapping, CollectionMapping
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java
deleted file mode 100644
index 5b493c1995..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * Specified
- * <ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * <li>discriminator column
- * <li>order column
- * </ul>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface NamedColumn
- extends ReadOnlyNamedColumn
-{
- void setSpecifiedName(String name);
-
- void setColumnDefinition(String columnDefinition);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedDiscriminatorColumn.java
deleted file mode 100644
index 1b5cb5cab6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.context;
-
-/**
- * common interface for discriminator columns
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface NamedDiscriminatorColumn
- extends NamedColumn, ReadOnlyNamedDiscriminatorColumn
-{
- void setSpecifiedDiscriminatorType(DiscriminatorType newSpecifiedDiscriminatorType);
- void setSpecifiedLength(Integer value);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java
deleted file mode 100644
index 942c1514c6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-/**
- * named native query
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface NamedNativeQuery
- extends Query
-{
- // ********** result class **********
-
- String getResultClass();
- void setResultClass(String value);
- String RESULT_CLASS_PROPERTY = "resultClass"; //$NON-NLS-1$
-
- /**
- * If the result class is specified, this will return it fully qualified. If not
- * specified, then it will return null
- */
- String getFullyQualifiedResultClass();
- String FULLY_QUALIFIED_RESULT_CLASS_PROPERTY = "fullyQualifiedResultClass"; //$NON-NLS-1$
-
- /**
- * Return the character to be used for browsing or
- * creating the result class {@link org.eclipse.jdt.core.IType IType}.
- * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
- */
- char getResultClassEnclosingTypeSeparator();
-
-
- // ********** result set mapping **********
-
- String getResultSetMapping();
- void setResultSetMapping(String value);
- String RESULT_SET_MAPPING_PROPERTY = "resultSetMapping"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java
deleted file mode 100644
index 92ac55e44f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * named query
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface NamedQuery
- extends Query
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java
deleted file mode 100644
index b68338b4bf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * JPA 1:m mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OneToManyMapping
- extends MultiRelationshipMapping
-{
- OneToManyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.java
deleted file mode 100644
index 3d7d40dc43..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * 1:m relationship (mapped by, join table)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OneToManyRelationship
- extends MappedByRelationship,
- JoinTableRelationship,
- MappingRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java
deleted file mode 100644
index a6595c346c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * JPA 1:1 mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OneToOneMapping
- extends SingleRelationshipMapping
-{
- OneToOneRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java
deleted file mode 100644
index a3c5019619..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * 1:1 relationship (mapped by, join column, primary key join column)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OneToOneRelationship
- extends MappedByRelationship,
- JoinColumnRelationship,
- PrimaryKeyJoinColumnRelationship,
- MappingRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.java
deleted file mode 100644
index 0707763858..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context;
-
-/**
- * JPA attribute mapping that is optional (e.g. basic, single relationship).
- * From the JPA spec:
- * <pre>
- * Whether the value of the field or property may be null. This is a hint
- * and is disregarded for primitive types; it may be used in schema generation.
- * </pre>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OptionalMapping
- extends AttributeMapping
-{
- boolean isOptional();
-
- boolean isDefaultOptional();
- String DEFAULT_OPTIONAL_PROPERTY = "defaultOptional"; //$NON-NLS-1$
- boolean DEFAULT_OPTIONAL = true;
-
- Boolean getSpecifiedOptional();
- void setSpecifiedOptional(Boolean newSpecifiedOptional);
- String SPECIFIED_OPTIONAL_PROPERTY = "specifiedOptional"; //$NON-NLS-1$
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java
deleted file mode 100644
index 8f2ab3c07f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * Multi-valued (1:m, m:m) relationship mappings support ordering.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Orderable
- extends JpaContextNode
-{
- AttributeMapping getParent();
-
- String getSpecifiedOrderBy();
- void setSpecifiedOrderBy(String orderBy);
- String SPECIFIED_ORDER_BY_PROPERTY = "specifiedOrderBy"; //$NON-NLS-1$
-
- boolean isNoOrdering();
- void setNoOrdering(boolean noOrdering);
- String NO_ORDERING_PROPERTY = "noOrdering"; //$NON-NLS-1$
-
- boolean isPkOrdering();
- void setPkOrdering(boolean pkOrdering);
- String PK_ORDERING_PROPERTY = "pkOrdering"; //$NON-NLS-1$
-
- boolean isCustomOrdering();
- void setCustomOrdering(boolean customOrdering);
- String CUSTOM_ORDERING_PROPERTY = "customOrdering"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
deleted file mode 100644
index 6823b93d08..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * attribute or association override container
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface OverrideContainer
- extends JpaContextNode
-{
- /**
- * Return the type mapping that contains the override container.
- * For example:<ul>
- * <li>for an entity, this would be the entity itself
- * <li>for an embedded, this would be type mapping where the embedded is
- * declared, as opposed to the type mapping the embedded references
- * </ul>
- */
- TypeMapping getTypeMapping();
-
- /**
- * Return the type mapping that contains the attributes/associations to
- * be overridden; though the type mapping may not <em>directly</em>
- * own them (e.g. they may be owned by a supertype mapping).
- * For example:<ul>
- * <li>for an entity, this would be the entity's supertype mapping
- * <li>for an embedded, this would be the embedded's target type mapping
- * </ul>
- */
- TypeMapping getOverridableTypeMapping();
-
- /**
- * Return the names of all the attributes that can be overridden
- * (i.e. an override must have a name from this list).
- * This is usually just all of the overridable names of the overridable
- * type mapping.
- * @see #getOverridableTypeMapping()
- */
- Iterable<String> getAllOverridableNames();
-
- /**
- * Return whether the specified table cannot be explicitly specified
- * as the table for an override's column or join column.
- */
- boolean tableNameIsInvalid(String tableName);
-
- /**
- * Return the names of tables that are valid for an override's
- * column or join column.
- */
- Iterable<String> getCandidateTableNames();
-
- /**
- * Return the database table for the specified table name.
- */
- Table resolveDbTable(String tableName);
-
- /**
- * Return the name of the default table for an override's column or join column.
- */
- String getDefaultTableName();
-
- JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver);
-
- JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
-
-
- // ********** overrides **********
-
- /**
- * Return the overrides, both <em>specified</em> and <em>virtual</em>.
- */
- ListIterable<? extends ReadOnlyOverride> getOverrides();
-
- /**
- * Return the number of overrides, both <em>specified</em> and <em>virtual</em>.
- */
- int getOverridesSize();
-
- /**
- * Return the override with the specified name,
- * whether <em>specified</em> or <em>virtual</em>.
- */
- // TODO look into getting rid of this;
- // we should probably use #getSpecifiedOverrideNamed(String)
- ReadOnlyOverride getOverrideNamed(String name);
-
-
- // ********** specified overrides **********
-
- /**
- * Return the <em>specified</em> overrides. The container has no API for
- * adding or removing <em>specified</em> overrides. The container's
- * <em>virtual</em> overrides are built according to the list of overridable
- * attribute names returned by the container's parent. <em>Specified</em>
- * overrides can be created via {@link VirtualOverride#convertToSpecified()}.
- * <em>Specified</em> overrides can be remvoed via
- * {@link Override_#convertToVirtual()}.
- */
- ListIterable<? extends Override_> getSpecifiedOverrides();
- String SPECIFIED_OVERRIDES_LIST = "specifiedOverrides"; //$NON-NLS-1$
-
- /**
- * Return the number of <em>specified</em> overrides.
- */
- int getSpecifiedOverridesSize();
-
- /**
- * Return the <em>specified</em> override at the specified index.
- */
- Override_ getSpecifiedOverride(int index);
-
- /**
- * Move the <em>specified</em> override from the source index to the
- * target index.
- */
- void moveSpecifiedOverride(int targetIndex, int sourceIndex);
-
- /**
- * Return the <em>specified</em> override at the specified index.
- */
- Override_ getSpecifiedOverrideNamed(String name);
-
- /**
- * Convert the specified <em>specified</em> override to <em>virtual</em>.
- * Return the new override.
- */
- VirtualOverride convertOverrideToVirtual(Override_ specifiedOverride);
-
-
- // ********** virtual overrides **********
-
- /**
- * Return the <em>virtual</em> overrides (i.e. those not <em>specified</em>).
- */
- // TODO change to a Iterable instead of ListIterable?
- ListIterable<? extends VirtualOverride> getVirtualOverrides();
- String VIRTUAL_OVERRIDES_LIST = "virtualOverrides"; //$NON-NLS-1$
-
- /**
- * Return the number of <em>virtual</em> overrides.
- */
- int getVirtualOverridesSize();
-
- /**
- * Convert the specified <em>virtual</em> override to <em>specified</em>.
- * Return the new override.
- */
- Override_ convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** container owner **********
-
- interface Owner
- {
- /**
- * @see OverrideContainer#getTypeMapping()
- */
- TypeMapping getTypeMapping();
-
- /**
- * @see OverrideContainer#getOverridableTypeMapping()
- */
- TypeMapping getOverridableTypeMapping();
-
- /**
- * @see OverrideContainer#getAllOverridableNames()
- */
- Iterable<String> getAllOverridableNames();
-
- /**
- * @see OverrideContainer#getDefaultTableName()
- */
- String getDefaultTableName();
-
- /**
- * @see OverrideContainer#tableNameIsInvalid(String)
- */
- boolean tableNameIsInvalid(String tableName);
-
- /**
- * @see OverrideContainer#resolveDbTable(String)
- */
- org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName);
-
- /**
- * @see OverrideContainer#getCandidateTableNames()
- */
- Iterable<String> getCandidateTableNames();
-
- JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver);
-
- JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java
deleted file mode 100644
index 83d6803e66..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * Association override relationship
- * <p>
- * 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.
- *
- * @see AssociationOverride
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OverrideRelationship
- extends ReadOnlyOverrideRelationship,
- JoinColumnRelationship
-{
- void initializeFromVirtual(ReadOnlyOverrideRelationship virtualRelationship);
-
- void initializeFromVirtualJoinColumnRelationship(ReadOnlyJoinColumnRelationship virtualRelationship);
-
- void initializeFromVirtualJoinTableRelationship(ReadOnlyJoinTableRelationship virtualRelationship);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java
deleted file mode 100644
index efaeabe78d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * <em>Specified</em><ul>
- * <li>attribute override
- * <li>association override
- * </ul>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-// the class name "Override" is sorta taken: java.lang.Override
-// maybe if it weren't in the java.lang package we would take it on, but... :)
-// very little code will directly refer to this interface, so the underscore
-// isn't *too* evil...
-public interface Override_
- extends ReadOnlyOverride
-{
- void setName(String value);
-
- /**
- * Convert the <em>specified</em> override to a <em>virtual</em> override.
- * Return the new <em>virtual</em> override.
- * @see #isVirtual()
- */
- VirtualOverride convertToVirtual();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java
deleted file mode 100644
index 930aa0142f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * Context persistent <em>attribute</em> (field or property).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface PersistentAttribute
- extends ReadOnlyPersistentAttribute, AccessHolder
-{
- /**
- * Set the attribute's mapping.
- * If the specified key is <code>null</code>, clear the specified mapping,
- * allowing the attribute's mapping to default (if appropriate).
- * Return the new mapping (which may be a <em>null</em> mapping).
- */
- AttributeMapping setMappingKey(String key);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java
deleted file mode 100644
index da5b40ad58..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Context persistent type.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface PersistentType
- extends JpaContextNode, JpaStructureNode, AccessHolder
-{
- // ********** name **********
-
- /**
- * Return the persistent type's [fully-qualified] name.
- * The enclosing type separator is <code>'.'</code>,
- * as opposed to <code>'$'</code>.
- * @see #getSimpleName()
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Return the persistent type's simple name.
- * @see #getName()
- */
- String getSimpleName();
-
-
- // ********** mapping **********
-
- /**
- * Return the persistent type's mapping.
- * Set the mapping via {@link #setMappingKey(String)}.
- */
- TypeMapping getMapping();
- String MAPPING_PROPERTY = "mapping"; //$NON-NLS-1$
-
- String getMappingKey();
-
- void setMappingKey(String key);
-
- boolean isMapped();
-
-
- // ********** attributes **********
-
- /**
- * Return the persistent type's persistent attributes.
- */
- ListIterable<? extends ReadOnlyPersistentAttribute> getAttributes();
-
- /**
- * Return the number of the persistent type's persistent attributes.
- */
- int getAttributesSize();
-
- /**
- * Return the names of the persistent type's persistent attributes.
- */
- Iterable<String> getAttributeNames();
-
- /**
- * Return all the persistent attributes in the persistent type's
- * inheritance hierarchy.
- */
- Iterable<ReadOnlyPersistentAttribute> getAllAttributes();
-
- /**
- * Return the names of all the persistent attributes in the
- * persistent type's hierarchy.
- */
- Iterable<String> getAllAttributeNames();
-
- /**
- * Return the persistent attribute with the specified name,
- * if it exists locally on the persistent type (as opposed to in its
- * inheritance hierarchy).
- */
- ReadOnlyPersistentAttribute getAttributeNamed(String attributeName);
-
- /**
- * Resolve and return the persistent attribute with the specified name, if it
- * is distinct and exists within the context of the persistent type.
- */
- ReadOnlyPersistentAttribute resolveAttribute(String attributeName);
-
-
- // ********** inheritance **********
-
- /**
- * Return the "super" {@link PersistentType} from the "persistence"
- * inheritance hierarchy.
- * If the Java inheritance parent is not a {@link PersistentType}, then continue
- * up the hierarchy (the JPA spec allows non-persistent types to be part of the hierarchy.)
- * Return <code>null</code> if the persistent type is the root persistent type.
- * <p>
- * Example:
- * <pre>
- * &#64;Entity
- * public abstract class Model {}
- *
- * public abstract class Animal extends Model {}
- *
- * &#64;Entity
- * public class Cat extends Animal {}
- * </pre>
- * The "super" persistent type of the <code>Cat</code> persistent type is
- * the <code>Model</code> persistent type. The "super" persistent type can
- * be either a Java annotated class or declared in the XML files.
- */
- PersistentType getSuperPersistentType();
- String SUPER_PERSISTENT_TYPE_PROPERTY = "superPersistentType"; //$NON-NLS-1$
-
- /**
- * Return the persistent type's "persistence" inheritance hierarchy,
- * <em>including</em> the persistent type itself.
- * The returned iterator will return elements infinitely if the hierarchy
- * has a loop.
- */
- Iterable<PersistentType> getInheritanceHierarchy();
-
- /**
- * Return the persistent type's "persistence" inheritance hierarchy,
- * <em>excluding</em> the persistent type itself.
- * The returned iterator will return elements infinitely if the hierarchy
- * has a loop.
- */
- Iterable<PersistentType> getAncestors();
-
-
- // ********** validation **********
-
- /**
- * Add to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter);
-
- /**
- * Return the text range to be used with any validation messages related
- * to the persistent type.
- */
- TextRange getValidationTextRange();
-
-
- // ********** misc **********
-
- /**
- * Return whether the persistent type applies to the
- * specified type name qualified with <code>'.'</code>.
- */
- boolean isFor(String typeName);
-
- /**
- * Return whether the persistent type resolves to a Java class in the
- * specified package fragment.
- */
- boolean isIn(IPackageFragment packageFragment);
-
- /**
- * Return the persistent type the persistent type overrides.
- * Typically this is the Java persistent type overridden by a
- * non-metadata-complete <code>orm.xml</code> persistent type.
- */
- PersistentType getOverriddenPersistentType();
-
-
- // ********** owner **********
-
- /**
- * Return the access type that overrides the client persistent type's
- * access type; <code>null</code> if there is no such access override.
- */
- AccessType getOwnerOverrideAccess();
-
- /**
- * Return the client persistent type's default access type;
- * <code>null</code> if there is no such access default.
- */
- AccessType getOwnerDefaultAccess();
-
-
- // ********** owner interface **********
-
- interface Owner
- extends JpaContextNode
- {
- /**
- * Return the access type that overrides the client persistent type's
- * access type; <code>null</code> if there is no such access override.
- */
- AccessType getOverridePersistentTypeAccess();
-
- /**
- * Return the client persistent type's default access type;
- * <code>null</code> if there is no such access default.
- */
- AccessType getDefaultPersistentTypeAccess();
-
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java
deleted file mode 100644
index a573c26ee5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * primary key join column
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface PrimaryKeyJoinColumn
- extends BaseJoinColumn, ReadOnlyPrimaryKeyJoinColumn
-{
- // combine interfaces
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java
deleted file mode 100644
index 5fbedec03c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * Primary key join column relationship<ul>
- * <li>1:1
- * </ul>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface PrimaryKeyJoinColumnRelationship
- extends Relationship
-{
- /**
- * Return the (never <code>null</code>) strategy used to configure
- * the relationship's primary key join column strategy.
- */
- PrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy();
-
- /**
- * Return whether the primary key join column strategy is the
- * relationship's current strategy.
- */
- boolean strategyIsPrimaryKeyJoinColumn();
-
- /**
- * Set the relationship's strategy to the primary key join column strategy.
- */
- void setStrategyToPrimaryKeyJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 3d450d4dfd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Primary key join column relationship strategy.
- * <p>
- * 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.
- *
- * @see RelationshipMapping
- * @see PrimaryKeyJoinColumnRelationship
- *
- * @version 2.2
- * @since 2.2
- */
-public interface PrimaryKeyJoinColumnRelationshipStrategy
- extends RelationshipStrategy
-{
- /**
- * Change notification identifier for "primaryKeyJoinColumns" list
- */
- String PRIMARY_KEY_JOIN_COLUMNS_LIST = "primaryKeyJoinColumns"; //$NON-NLS-1$
-
- /**
- * Return the strategy's primary key join columns.
- */
- ListIterable<? extends PrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
-
- /**
- * Return the number of primary key join columns.
- */
- int getPrimaryKeyJoinColumnsSize();
-
- /**
- * Return whether the relationship has any primary key join columns.
- * (Equivalent to {@link #getPrimaryKeyJoinColumnsSize()} == 0.)
- */
- boolean hasPrimaryKeyJoinColumns();
-
- /**
- * Return the primary key join column at the specified index.
- */
- PrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index);
-
- /**
- * Add a primary key join column.
- */
- PrimaryKeyJoinColumn addPrimaryKeyJoinColumn();
-
- /**
- * Add a primary key join column.
- */
- PrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
-
- /**
- * Remove the specified primary key join column.
- */
- void removePrimaryKeyJoinColumn(int index);
-
- /**
- * Remove the specified primary key join column.
- */
- void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn);
-
- /**
- * Remove the specified primary key join column.
- */
- void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
deleted file mode 100644
index 57a955034f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Named and named native queries.
- * <p>
- * Queries can be defined on<ul>
- * <li>Java and <code>orm.xml</code> entities
- * <li>Java (<em>only</em>) mapped superclasses
- * <li><code>orm.xml</code> entity mappings elements
- * </ul>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface Query
- extends JpaNamedContextNode
-{
-
- /**
- * Return the generator's type.
- */
- Class<? extends Query> getType();
- @SuppressWarnings("unchecked")
- Iterable<Class<? extends Query>> TYPES = new ArrayIterable<Class<? extends Query>>(
- NamedQuery.class,
- NamedNativeQuery.class
- );
-
- // ********** query **********
-
- String QUERY_PROPERTY = "query"; //$NON-NLS-1$
-
- String getQuery();
-
- void setQuery(String query);
-
-
- // ********** hints **********
-
- String HINTS_LIST = "hints"; //$NON-NLS-1$
-
- /**
- * Return the query's hints.
- */
- ListIterable<? extends QueryHint> getHints();
-
- /**
- * Return the number of hints.
- */
- int getHintsSize();
-
- /**
- * Add a hint to the query and return the object representing it.
- */
- QueryHint addHint();
-
- /**
- * Add a hint to the query and return the object representing it.
- */
- QueryHint addHint(int index);
-
- /**
- * Remove the hint at the index from the query.
- */
- void removeHint(QueryHint queryHint);
-
- /**
- * Remove the hint from the query.
- */
- void removeHint(int index);
-
- /**
- * Move the hint from the source index to the target index.
- */
- void moveHint(int targetIndex, int sourceIndex);
-
- QueryHint getHint(int i);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java
deleted file mode 100644
index cdd41e6e47..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Container for named queries and/or named native queries.
- * Used by entities and the <code>orm.xml</code>
- * </code>entity-mappings</code> element.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface QueryContainer
- extends JpaContextNode
-{
- /**
- * Return the container's named and named native queries.
- */
- Iterable<Query> getQueries();
-
-
- // ********** named queries **********
-
- /**
- * Return the container's named queries.
- */
- ListIterable<? extends NamedQuery> getNamedQueries();
-
- String NAMED_QUERIES_LIST = "namedQueries"; //$NON-NLS-1$
-
- /**
- * Return the number of named queries.
- */
- int getNamedQueriesSize();
-
- /**
- * Add a new named query to the container and return it.
- */
- NamedQuery addNamedQuery();
-
- /**
- * Add a new named query to the container at the specified index
- * and return it.
- */
- NamedQuery addNamedQuery(int index);
-
- /**
- * Remove from the container the named query at the specified index.
- */
- void removeNamedQuery(int index);
-
- /**
- * Remove the specified named query from the container.
- */
- void removeNamedQuery(NamedQuery namedQuery);
-
- /**
- * Move a named query as specified.
- */
- void moveNamedQuery(int targetIndex, int sourceIndex);
-
-
- // ********** named native queries **********
-
- /**
- * Return the container's named native queries.
- */
- ListIterable<? extends NamedNativeQuery> getNamedNativeQueries();
-
- String NAMED_NATIVE_QUERIES_LIST = "namedNativeQueries"; //$NON-NLS-1$
-
- /**
- * Return the number of named native queries.
- */
- int getNamedNativeQueriesSize();
-
- /**
- * Add a new named native query to the container and return it.
- */
- NamedNativeQuery addNamedNativeQuery();
-
- /**
- * Add a new named native query to the container at the specified index
- * and return it.
- */
- NamedNativeQuery addNamedNativeQuery(int index);
-
- /**
- * Remove from the container the named native query at the specified index.
- */
- void removeNamedNativeQuery(int index);
-
- /**
- * Remove the specified named native query from the container.
- */
- void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery);
-
- /**
- * Move a named native query as specified.
- */
- void moveNamedNativeQuery(int targetIndex, int sourceIndex);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java
deleted file mode 100644
index 18dc350c9c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-/**
- * query hint
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface QueryHint
- extends JpaContextNode
-{
- String getName();
- void setName(String name);
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- String getValue();
- void setValue(String value);
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
-
- // ********** validation ***********
-
- /**
- * Return whether this query hint is <em>equivalent</em> to the
- * specified query hint.
- */
- boolean isEquivalentTo(QueryHint queryHint);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java
deleted file mode 100644
index 1165f759c8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context;
-
-/**
- * Common interface that can be used by clients interested only in a type
- * or attribute's access setting (e.g. a UI composite).
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.2
- */
-public interface ReadOnlyAccessHolder
- extends JpaContextNode
-{
- /**
- * Return the access type, whether specified or defaulted.
- * This should never return <code>null</code> since at least the default
- * will be set.
- */
- AccessType getAccess();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java
deleted file mode 100644
index 039065c53e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * Read-only association override
- * <p>
- * 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.
- */
-public interface ReadOnlyAssociationOverride
- extends ReadOnlyOverride
-{
- /**
- * Return the overridden relationship mapping.
- * Return <code>null</code> if it does not exist. This relationship mapping
- * will be found in the mapped superclass or embeddable type, not in the
- * owning entity
- */
- RelationshipMapping getMapping();
-
- ReadOnlyOverrideRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java
deleted file mode 100644
index f3e0078e3f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * Read-only attribute override.
- * <p>
- * 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.
- */
-public interface ReadOnlyAttributeOverride
- extends ReadOnlyOverride
-{
- ReadOnlyColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java
deleted file mode 100644
index 025408135e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-
-/**
- * Read-only
- * <ul>
- * <li>column
- * <li>join column
- * </ul>
- * 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.
- */
-public interface ReadOnlyBaseColumn
- extends ReadOnlyTableColumn
-{
-
- // ********** unique **********
-
- /**
- * Return the specified unique setting if present, otherwise return the
- * default unique setting.
- */
- boolean isUnique();
- Boolean getSpecifiedUnique();
- String SPECIFIED_UNIQUE_PROPERTY = "specifiedUnique"; //$NON-NLS-1$
- boolean isDefaultUnique();
- String DEFAULT_UNIQUE_PROPERTY = "defaultUnique"; //$NON-NLS-1$
- boolean DEFAULT_UNIQUE = false;
-
-
- // ********** nullable **********
-
- /**
- * Return the specified nullable setting if present, otherwise return the
- * default nullable setting.
- */
- boolean isNullable();
- Boolean getSpecifiedNullable();
- String SPECIFIED_NULLABLE_PROPERTY = "specifiedNullable"; //$NON-NLS-1$
- boolean isDefaultNullable();
- String DEFAULT_NULLABLE_PROPERTY = "defaultNullable"; //$NON-NLS-1$
- boolean DEFAULT_NULLABLE = true;
-
-
- // ********** insertable **********
-
- /**
- * Return the specified insertable setting if present, otherwise return the
- * default insertable setting.
- */
- boolean isInsertable();
- Boolean getSpecifiedInsertable();
- String SPECIFIED_INSERTABLE_PROPERTY = "specifiedInsertable"; //$NON-NLS-1$
- boolean isDefaultInsertable();
- String DEFAULT_INSERTABLE_PROPERTY = "defaultInsertable"; //$NON-NLS-1$
- boolean DEFAULT_INSERTABLE = true;
-
-
- // ********** updatable **********
-
- /**
- * Return the specified updatable setting if present, otherwise return the
- * default updatable setting.
- */
- boolean isUpdatable();
- Boolean getSpecifiedUpdatable();
- String SPECIFIED_UPDATABLE_PROPERTY = "specifiedUpdatable"; //$NON-NLS-1$
- boolean isDefaultUpdatable();
- String DEFAULT_UPDATABLE_PROPERTY = "defaultUpdatable"; //$NON-NLS-1$
- boolean DEFAULT_UPDATABLE = true;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
deleted file mode 100644
index 6205b74167..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Read-only
- * <ul>
- * <li>join column
- * <li>primary key join column
- * </ul>
- * 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.
- */
-public interface ReadOnlyBaseJoinColumn
- extends ReadOnlyNamedColumn
-{
- // ********** referenced column name **********
-
- /**
- * Return the specified referenced column name if present,
- * otherwise return the default referenced column name.
- */
- String getReferencedColumnName();
- String getSpecifiedReferencedColumnName();
- String SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY = "specifiedReferencedColumnName"; //$NON-NLS-1$
- String getDefaultReferencedColumnName();
- String DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY = "defaultReferencedColumnName"; //$NON-NLS-1$
-
-
- // ********** misc **********
-
- /**
- * Return the wrapper for the referenced column datasource table
- */
- Table getReferencedColumnDbTable();
-
- boolean referencedColumnIsResolved();
-
-
- // ********** owner **********
-
- /**
- * Interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides).
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the wrapper for the datasource table for the referenced column
- */
- Table getReferencedColumnDbTable();
-
- /**
- * Return the number of join columns in the owner's list the join
- * column belongs to.
- */
- int getJoinColumnsSize();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java
deleted file mode 100644
index 1ea60e1b64..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context;
-
-/**
- * Read-only column
- * <p>
- * 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.
- */
-public interface ReadOnlyColumn
- extends ReadOnlyBaseColumn
-{
- // ********** length **********
-
- /**
- * Return the specified length if present, otherwise return the default length.
- */
- int getLength();
- Integer getSpecifiedLength();
- String SPECIFIED_LENGTH_PROPERTY = "specifiedLength"; //$NON-NLS-1$
- int getDefaultLength();
- String DEFAULT_LENGTH_PROPERTY = "defaultLength"; //$NON-NLS-1$
- int DEFAULT_LENGTH = 255;
-
-
- // ********** precision **********
-
- /**
- * Return the specified precision if present, otherwise return the default precision.
- */
- int getPrecision();
- Integer getSpecifiedPrecision();
- String SPECIFIED_PRECISION_PROPERTY = "specifiedPrecision"; //$NON-NLS-1$
- int getDefaultPrecision();
- String DEFAULT_PRECISION_PROPERTY = "defaultPrecision"; //$NON-NLS-1$
- int DEFAULT_PRECISION = 0;
-
-
- // ********** scale **********
-
- /**
- * Return the specified scale if present, otherwise return the default scale.
- */
- int getScale();
- Integer getSpecifiedScale();
- String SPECIFIED_SCALE_PROPERTY = "specifiedScale"; //$NON-NLS-1$
- int getDefaultScale();
- String DEFAULT_SCALE_PROPERTY = "defaultScale"; //$NON-NLS-1$
- int DEFAULT_SCALE = 0;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java
deleted file mode 100644
index a03dbde4d5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * Read-only join column
- * <p>
- * 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.
- */
-public interface ReadOnlyJoinColumn
- extends ReadOnlyBaseJoinColumn, ReadOnlyBaseColumn
-{
- /**
- * Interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides).
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, ReadOnlyBaseColumn.Owner
- {
- /**
- * The target of the relationship will usually be the target entity.
- * In the case of a target foreign key relationship the source and target
- * are swapped.
- */
- Entity getRelationshipTarget();
-
- /**
- * return the join column's attribute name
- */
- String getAttributeName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java
deleted file mode 100644
index bce23660f0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Join column relationship<ul>
- * <li>1:1
- * <li>1:m
- * <li>m:1
- * <li>association override
- * </ul>
- * <p>
- * 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.
- *
- * @see RelationshipMapping
- * @see Relationship
- * @see JoinColumn
- */
-public interface ReadOnlyJoinColumnRelationship
- extends ReadOnlyRelationship
-{
- /**
- * Return the (never <code>null</code>) strategy used to configure
- * the relationship's join column strategy.
- */
- ReadOnlyJoinColumnRelationshipStrategy getJoinColumnStrategy();
-
- /**
- * Return whether the join column strategy is the
- * relationship's current strategy.
- */
- boolean strategyIsJoinColumn();
-
- /**
- * Return whether this relationship may potentially have a default join
- * column. For example, a 1-1 mapping may have a default join column
- * if it does not specify a "mapped by" attribute or a join table;
- * but a 1-M mapping does not support a default join column in any
- * situation.
- */
- boolean mayHaveDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java
deleted file mode 100644
index c29e1f8e7f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-
-/**
- * Read-only join column relationship strategy.
- * <p>
- * 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.
- *
- * @see ReadOnlyAssociationOverride
- * @see JoinColumnRelationship
- */
-public interface ReadOnlyJoinColumnRelationshipStrategy
- extends ReadOnlyRelationshipStrategy
-{
- /**
- * The source of the relationship is usually the owning type mapping.
- * In the case of a target foreign key relationship the source and target
- * are swapped.
- * @see #isTargetForeignKey()
- */
- TypeMapping getRelationshipSource();
-
- /**
- * The target of the relationship usually is the target entity.
- * In the case of a target foreign key relationship the source and target
- * are swapped.
- * @see #isTargetForeignKey()
- */
- TypeMapping getRelationshipTarget();
-
- /**
- * Return whether this relationship is a target foreign key relationship.
- * A one-to-many mapping with a join column will have the foreign key
- * in the target table.
- */
- boolean isTargetForeignKey();
-
-
- // ********** join columns **********
-
- /**
- * Return the join columns whether specified or default.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getJoinColumns();
-
- /**
- * Return the number of join columns, whether specified and default.
- */
- int getJoinColumnsSize();
-
-
- // ********** specified join columns **********
-
- /**
- * Change notification identifier for "specifiedJoinColumns" list
- */
- String SPECIFIED_JOIN_COLUMNS_LIST = "specifiedJoinColumns"; //$NON-NLS-1$
-
- /**
- * Return the specified join columns.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getSpecifiedJoinColumns();
-
- /**
- * Return the number of specified join columns.
- */
- int getSpecifiedJoinColumnsSize();
-
- /**
- * Return whether the strategy has any specified join columns.
- * (Equivalent to {@link #getSpecifiedJoinColumnsSize()} != 0.)
- */
- boolean hasSpecifiedJoinColumns();
-
- /**
- * Return the specified join column at the specified index.
- */
- ReadOnlyJoinColumn getSpecifiedJoinColumn(int index);
-
-
- // ********** default join column **********
-
- /**
- * Change notification identifier for "defaultJoinColumn" property
- */
- String DEFAULT_JOIN_COLUMN_PROPERTY = "defaultJoinColumn"; //$NON-NLS-1$
-
- /**
- * Return the default join column. If there are specified join
- * columns, there is no default join column. There are also
- * times that there may be no default join column even if there are no
- * specified join columns.
- */
- ReadOnlyJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java
deleted file mode 100644
index b356f98499..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Used by association overrides.
- * <p>
- * 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.
- */
-public interface ReadOnlyJoinTable
- extends ReadOnlyReferenceTable
-{
- ReadOnlyJoinTableRelationshipStrategy getParent();
-
- RelationshipMapping getRelationshipMapping();
-
-
- // ********** inverse join columns **********
-
- /**
- * Return the join table's inverse join columns, whether specified or default.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getInverseJoinColumns();
-
- /**
- * Return the number of inverse join columns, whether specified or default.
- */
- int getInverseJoinColumnsSize();
-
- /**
- * Return the specified inverse join columns.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getSpecifiedInverseJoinColumns();
- String SPECIFIED_INVERSE_JOIN_COLUMNS_LIST = "specifiedInverseJoinColumns"; //$NON-NLS-1$
-
- /**
- * Return the number of specified inverse join columns.
- */
- int getSpecifiedInverseJoinColumnsSize();
-
- /**
- * Return whether the join table has specified inverse join columns.
- */
- boolean hasSpecifiedInverseJoinColumns();
-
- /**
- * Return the specified inverse join column at the specified index.
- */
- ReadOnlyJoinColumn getSpecifiedInverseJoinColumn(int index);
-
- /**
- * Return the default inverse join column or null. A default inverse join column
- * only exists if there are no specified inverse join columns.
- */
- ReadOnlyJoinColumn getDefaultInverseJoinColumn();
- String DEFAULT_INVERSE_JOIN_COLUMN = "defaultInverseJoinColumn"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java
deleted file mode 100644
index 5e09f3e852..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Join table relationship<ul>
- * <li>1:1 (JPA 2.0)
- * <li>1:m
- * <li>m:1 (JPA 2.0)
- * <li>m:m
- * <li>association override (JPA 2.0)
- * </ul>
- * <p>
- * 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.
- */
-public interface ReadOnlyJoinTableRelationship
- extends ReadOnlyRelationship
-{
- /**
- * Return the (never <code>null</code>) strategy used to configure
- * the relationship's join table strategy.
- */
- ReadOnlyJoinTableRelationshipStrategy getJoinTableStrategy();
-
- /**
- * Return whether the join table strategy is the
- * relationship's current strategy.
- */
- boolean strategyIsJoinTable();
-
- /**
- * Return whether this relationship may potentially have a default join
- * table. For example, a M-M mapping may have a default join table
- * if it does not specify a "mapped by" attribute or a join table;
- * but a M-1 mapping does not support a default join table in any
- * situation.
- */
- boolean mayHaveDefaultJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
deleted file mode 100644
index 3a35c3addf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-
-/**
- * Read-only join table relationship strategy.
- * <p>
- * 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.
- *
- * @see ReadOnlyAssociationOverride
- * @see JoinTableRelationship
- */
-public interface ReadOnlyJoinTableRelationshipStrategy
- extends ReadOnlyRelationshipStrategy
-{
- /**
- * Change notification identifier for "joinTable" property
- */
- String JOIN_TABLE_PROPERTY = "joinTable"; //$NON-NLS-1$
-
- /**
- * Return the strategy's join table. This will be the
- * specified or default join table if one is specified or a default
- * join table applies, otherwise <code>null</code>.
- */
- ReadOnlyJoinTable getJoinTable();
-
- /**
- * Return the default name of the strategy's join table
- */
- String getJoinTableDefaultName();
-
- boolean validatesAgainstDatabase();
-
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
deleted file mode 100644
index 936e49c0e0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Read-only
- * <ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * <li>discriminator column
- * <li>order column
- * </ul>
- * 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.
- */
-public interface ReadOnlyNamedColumn
- extends JpaContextNode
-{
- // ********** name **********
-
- /**
- * Return the specified name if present, otherwise return the default
- * name.
- */
- String getName();
- String getSpecifiedName();
- String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$
- String getDefaultName();
- String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
-
-
- // ********** table **********
-
- /**
- * Return the name of the column's table. A column that does not have a
- * <em>specified</em> table still has a table (as determined by
- * the column's owner).
- */
- String getTable();
-
-
- // ********** column definition **********
-
- String getColumnDefinition();
- String COLUMN_DEFINITION_PROPERTY = "columnDefinition"; //$NON-NLS-1$
-
- // ********** database stuff **********
-
- /**
- * Return the column's datasource table.
- */
- Table getDbTable();
-
- /**
- * Return whether the column is found on the datasource.
- */
- boolean isResolved();
-
-
- // ********** misc **********
-
- /**
- * Return whether the column has a textual representation
- * in its underlying resource.
- */
- boolean isVirtual();
-
-
- // ********** owner **********
-
- /**
- * Interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides).
- */
- interface Owner
- {
- /**
- * Return the name of the table which the column belongs to by default.
- */
- String getDefaultTableName();
-
- /**
- * Return the default column name.
- */
- String getDefaultColumnName(ReadOnlyNamedColumn column);
-
- /**
- * Return the database table for the specified table name.
- */
- Table resolveDbTable(String tableName);
-
- JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedDiscriminatorColumn.java
deleted file mode 100644
index 6c6949c4a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.core.context;
-
-/**
- * common interface for discriminator columns
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface ReadOnlyNamedDiscriminatorColumn
- extends ReadOnlyNamedColumn
-{
-
- // ********** discriminator type **********
-
- /**
- * Return the specified discriminator type if present,
- * otherwise return the default discriminator type.
- */
- DiscriminatorType getDiscriminatorType();
- DiscriminatorType getSpecifiedDiscriminatorType();
- String SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY = "specifiedDiscriminatorType"; //$NON-NLS-1$
- DiscriminatorType getDefaultDiscriminatorType();
- String DEFAULT_DISCRIMINATOR_TYPE_PROPERTY = "defaultDiscriminatorType"; //$NON-NLS-1$
- DiscriminatorType DEFAULT_DISCRIMINATOR_TYPE = DiscriminatorType.STRING;
-
-
- // ********** length **********
-
- /**
- * Return the specified length if present,
- * otherwise return the default length.
- */
- int getLength();
- Integer getSpecifiedLength();
- String SPECIFIED_LENGTH_PROPERTY = "specifiedLength"; //$NON-NLS-1$
- int getDefaultLength();
- String DEFAULT_LENGTH_PROPERTY = "defaultLength"; //$NON-NLS-1$
- int DEFAULT_LENGTH = 31;
-
-
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the default discriminator column length
- */
- int getDefaultLength();
-
- /**
- * Return the default discriminator column type
- */
- DiscriminatorType getDefaultDiscriminatorType();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
deleted file mode 100644
index 4e027a83c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Read-only (<em>specified</em> or <em>virtual</em>)<ul>
- * <li>attribute override
- * <li>association override
- * </ul>
- * 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.
- */
-public interface ReadOnlyOverride
- extends JpaContextNode
-{
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Return <code>true</code> if the override is not explicitly specified on
- * the override's parent (i.e. it occurs by default); return <code>false</code>
- * if the override is explicitly specified on the override's parent.
- *
- * @see Override_#convertToVirtual()
- * @see VirtualOverride#convertToSpecified()
- */
- // TODO bjv rename?
- boolean isVirtual();
-
- /**
- * @see OverrideContainer#getTypeMapping()
- */
- TypeMapping getTypeMapping();
-
- /**
- * Return whether the specified table cannot be explicitly specified
- * as the table for the override's column or join column.
- */
- boolean tableNameIsInvalid(String tableName);
-
- /**
- * Return the names of tables that are valid for the override's
- * column or join column.
- */
- Iterable<String> getCandidateTableNames();
-
- /**
- * Return the database table for the specified table name.
- */
- Table resolveDbTable(String tableName);
-
- /**
- * Return the name of the default table for the override's column or join column.
- */
- String getDefaultTableName();
-
- JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
deleted file mode 100644
index 079b3a282f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Read-only association override relationship
- * <p>
- * 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.
- *
- * @see AssociationOverride
- */
-public interface ReadOnlyOverrideRelationship
- extends ReadOnlyJoinColumnRelationship
-{
- String getAttributeName();
-
- /**
- * @see ReadOnlyOverride#getTypeMapping()
- */
- TypeMapping getTypeMapping();
-
- /**
- * Return whether the specified table cannot be explicitly specified
- * as the table for the relationship's join column.
- */
- boolean tableNameIsInvalid(String tableName);
-
- /**
- * Return the names of tables that are valid for the relationship's
- * join column.
- */
- Iterable<String> getCandidateTableNames();
-
- /**
- * Return the database table for the specified table name.
- */
- Table resolveDbTable(String tableName);
-
- String getDefaultTableName();
-
- JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
-
- void initializeOnSpecified(OverrideRelationship specifiedRelationship);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java
deleted file mode 100644
index 2ea0af3151..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java
+++ /dev/null
@@ -1,96 +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.jpa.core.context;
-
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-
-/**
- * Read-only context persistent <em>attribute</em> (field or property).
- * <p>
- * 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.
- */
-public interface ReadOnlyPersistentAttribute
- extends JpaContextNode, JpaStructureNode, ReadOnlyAccessHolder
-{
- // ********** name **********
-
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
-
- // ********** mapping **********
-
- /**
- * Return the attribute's mapping. This is never <code>null</code>
- * (although, it may be a <em>null</em> mapping).
- * Set the mapping via {@link PersistentAttribute#setMappingKey(String)}.
- */
- AttributeMapping getMapping();
- String MAPPING_PROPERTY = "mapping"; //$NON-NLS-1$
-
- /**
- * Return the attribute's mapping key.
- */
- String getMappingKey();
-
- /**
- * Return the key for the attribute's default mapping.
- * This can be <code>null</code> (e.g. for <em>specified</em>
- * <code>orm.xml</code> attributes).
- * @see AttributeMapping#isDefault()
- */
- String getDefaultMappingKey();
- String DEFAULT_MAPPING_KEY_PROPERTY = "defaultMappingKey"; //$NON-NLS-1$
-
-
- // ********** misc **********
-
- /**
- * Return the persistent type that owns (declares) the attribute.
- */
- PersistentType getOwningPersistentType();
-
- /**
- * Return the attribute's owning persistent type's mapping (as opposed to
- * the attribute's target type's mapping).
- */
- TypeMapping getOwningTypeMapping();
-
- /**
- * Return the resolved, qualified name of the attribute's type
- * (e.g. <code>"java.util.Collection"</code> or <code>"byte</code>[]").
- * Return <code>null</code> if the attribute's type can not be resolved.
- * If the type is an array, this name will include the appropriate number
- * of bracket pairs.
- * This name will not include the type's generic type arguments
- * (e.g. <code>"java.util.Collection<java.lang.String>"</code> will only return
- * <code>"java.util.Collection"</code>).
- */
- String getTypeName();
-
- /**
- * If the attribute is mapped to a primary key column, return the
- * column's name, otherwise return <code>null</code>.
- */
- String getPrimaryKeyColumnName();
-
- /**
- * Return whether the attribute has a textual representation
- * in its underlying resource.
- */
- boolean isVirtual();
-
- JavaPersistentAttribute getJavaPersistentAttribute();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java
deleted file mode 100644
index 4f41aa63b7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * Read-only primary key join column
- * <p>
- * 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.
- */
-public interface ReadOnlyPrimaryKeyJoinColumn
- extends ReadOnlyBaseJoinColumn
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java
deleted file mode 100644
index 23e0917bb2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Read-only reference table (i.e. a table that joins with one other table,
- * as opposed to a "join table" that joins with two other tables)<ul>
- * <li>join table
- * <li>collection table
- * </ul>
- * 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.
- */
-public interface ReadOnlyReferenceTable
- extends ReadOnlyTable
-{
- // TODO is this method necessary?
- PersistentAttribute getPersistentAttribute();
-
-
- // ********** join columns **********
-
- /**
- * Return the reference table's join columns, whether specified or default.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getJoinColumns();
-
- /**
- * Return the number of join columns, whether specified or default.
- */
- int getJoinColumnsSize();
-
- /**
- * Return the reference table's specified join columns.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getSpecifiedJoinColumns();
- String SPECIFIED_JOIN_COLUMNS_LIST = "specifiedJoinColumns"; //$NON-NLS-1$
-
- /**
- * Return the number of specified join columns.
- */
- int getSpecifiedJoinColumnsSize();
-
- /**
- * Return whether the reference table has specified join columns.
- */
- boolean hasSpecifiedJoinColumns();
-
- /**
- * Return the specified join column at the specified index.
- */
- ReadOnlyJoinColumn getSpecifiedJoinColumn(int index);
-
- /**
- * Return the default join column or <code>null</code>.
- * A default join column only exists if there are no specified join columns.
- */
- ReadOnlyJoinColumn getDefaultJoinColumn();
- String DEFAULT_JOIN_COLUMN_PROPERTY = "defaultJoinColumn"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java
deleted file mode 100644
index aa7b27f25b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * A relationship contains the settings describing how entities are related
- * in a {@link RelationshipMapping} or {@link AssociationOverride}:<ul>
- * <li>join column
- * <li>join table
- * <li>"mapped by"
- * <li>primary key join column
- * </ul>
- * Supported mappings:<ul>
- * <li>1:1
- * <li>1:m
- * <li>m:1
- * <li>m:m
- * </ul>
- * 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.
- *
- * @see RelationshipMapping
- * @see AssociationOverride
- */
-public interface ReadOnlyRelationship
- extends JpaContextNode
-{
- /**
- * Return the relationship's mapping; which for a mapping relationship is
- * the relationship's parent, but in the case of an override is the
- * overridden mapping (from a superclass or embeddable type).
- */
- RelationshipMapping getMapping();
-
- /**
- * Return the type mapping that contains the relationship's mapping or
- * override.
- */
- TypeMapping getTypeMapping();
-
- /**
- * Return the entity that contains the relationship's mapping or override.
- * This is just a convenience method that calls {@link #getTypeMapping()}
- * and returns <code>null</code> if the result is not an {@link Entity}.
- */
- Entity getEntity();
-
- /**
- * String associated with changes to the predominant strategy property
- */
- final static String STRATEGY_PROPERTY = "strategy"; //$NON-NLS-1$
-
- /**
- * Return the current strategy, this is never <code>null</code>.
- */
- ReadOnlyRelationshipStrategy getStrategy();
-
- /**
- * Return whether the the relationship is virtual.
- */
- boolean isVirtual();
-
- void initializeOn(Relationship newRelationship);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java
deleted file mode 100644
index 39b22c7e01..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Strategy describing how two entities are related, either for a
- * {@link RelationshipMapping} or an {@link AssociationOverride}:<ul>
- * <li>join column
- * <li>join table
- * <li>"mapped by"
- * <li>primary key join column
- * </ul>
- * 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.
- *
- * @see RelationshipMapping
- * @see ReadOnlyAssociationOverride
- * @see ReadOnlyRelationship
- */
-public interface ReadOnlyRelationshipStrategy
- extends JpaContextNode
-{
- /**
- * Return the strategy's relationship.
- */
- ReadOnlyRelationship getRelationship();
-
- /**
- * Return the table name associated with the strategy's columns.
- * The join table name, for instance, or in the case of a bi-directional
- * relationship, the table of the owning relationship.
- */
- String getTableName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java
deleted file mode 100644
index b491f4ac37..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Read-only entity secondary table
- * <p>
- * 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.
- */
-public interface ReadOnlySecondaryTable
- extends ReadOnlyTable
-{
- public Entity getParent();
-
- /**
- * Return whether the secondary table is part of an <code>orm.xml</code>
- * entity but is specified only in the entity's Java annotations (as
- * opposed to explicitly in the <code>orm.xml</code>).
- */
- boolean isVirtual();
-
-
- // ********** primary key join columns **********
-
- /**
- * Return the secondary table's primary key join columns,
- * whether specified or default.
- */
- ListIterable<? extends ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
-
- /**
- * Return the number of primary key join columns,
- * whether specified or default.
- */
- int getPrimaryKeyJoinColumnsSize();
-
-
- // ********** specified primary key join columns **********
-
- /**
- * Return the specified primary key join columns.
- */
- ListIterable<? extends ReadOnlyPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- String SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST = "specifiedPrimaryKeyJoinColumns"; //$NON-NLS-1$
-
- /**
- * Return the number of specified primary key join columns.
- */
- int getSpecifiedPrimaryKeyJoinColumnsSize();
-
-
- // ********** default primary key join columns **********
-
- /**
- * Return the default primary key join column or null. A default primary
- * key join column only exists if there are no specified primary key join
- * columns.
- */
- ReadOnlyPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
- String DEFAULT_PRIMARY_KEY_JOIN_COLUMN = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
deleted file mode 100644
index 43a793961a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-
-/**
- * Read-only table
- * <p>
- * 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.
- */
-public interface ReadOnlyTable
- extends JpaContextNode
-{
- // ********** name **********
-
- /**
- * Return the specified name if present, otherwise return the default
- * name.
- */
- String getName();
- String getSpecifiedName();
- String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$
- String getDefaultName();
- String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
-
- /**
- * Return whether the table can be resolved to a table on the database.
- */
- boolean isResolved();
-
- /**
- * Return the corresponding database table.
- */
- org.eclipse.jpt.jpa.db.Table getDbTable();
-
-
- // ********** schema **********
-
- /**
- * Return the specified schema if present, otherwise return the default
- * schema.
- */
- String getSchema();
- String getSpecifiedSchema();
- String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
- String getDefaultSchema();
- String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
-
- /**
- * Return whether the table's schema can be resolved to a schema on the
- * database.
- */
- boolean schemaIsResolved();
-
- /**
- * Return the corresponding database schema.
- */
- Schema getDbSchema();
-
-
- // ********** catalog **********
-
- /**
- * Return the specified catalog if present, otherwise return the default
- * catalog.
- */
- String getCatalog();
- String getSpecifiedCatalog();
- String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
- String getDefaultCatalog();
- String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
-
- /**
- * Return whether the table has a catalog and it can be resolved to a
- * catalog on the database.
- */
- boolean catalogIsResolved();
-
- /**
- * Return the corresponding database catalog.
- */
- Catalog getDbCatalog();
-
-
- // ********** unique constraints **********
-
- ListIterable<? extends ReadOnlyUniqueConstraint> getUniqueConstraints();
- String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
- int getUniqueConstraintsSize();
- ReadOnlyUniqueConstraint getUniqueConstraint(int index);
-
-
- // ********** misc **********
-
- /**
- * Return the corresponding database schema container (catalog or database).
- */
- SchemaContainer getDbSchemaContainer();
-
- /**
- * Return whether the table is validated against a live database connection.
- */
- boolean validatesAgainstDatabase();
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner {
- JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
deleted file mode 100644
index 9f7fc03f48..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-
-/**
- * Read-only
- * <ul>
- * <li>column
- * <li>join column
- * </ul>
- * 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.
- */
-public interface ReadOnlyTableColumn
- extends ReadOnlyNamedColumn
-{
- // ********** table **********
-
- String getSpecifiedTable();
- String SPECIFIED_TABLE_PROPERTY = "specifiedTable"; //$NON-NLS-1$
- String getDefaultTable();
- String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$
-
-
- // ********** misc **********
-
- boolean tableNameIsInvalid();
-
- /**
- * Return a list of table names that are valid for this column
- */
- Iterable<String> getCandidateTableNames();
-
-
- // ********** owner **********
-
- /**
- * Interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides).
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * return whether the given table cannot be explicitly specified
- * in the column's 'table' element
- */
- boolean tableNameIsInvalid(String tableName);
-
- /**
- * Return a list of table names that are valid for this column
- */
- Iterable<String> getCandidateTableNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java
deleted file mode 100644
index 74e130a620..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context;
-
-/**
- * Read-only database unique constraint
- * <p>
- * 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.
- */
-public interface ReadOnlyUniqueConstraint
- extends JpaContextNode
-{
- /**
- * Return the unique constraint's column names.
- */
- Iterable<String> getColumnNames();
- String COLUMN_NAMES_LIST = "columnNames"; //$NON-NLS-1$
-
- /**
- * Return the number of column names in the unique constraint.
- */
- int getColumnNamesSize();
-
- /**
- * Return the column name at the specified index.
- */
- String getColumnName(int index);
-
-
- // ********** owner **********
-
- /**
- * All containers must implement this interface.
- */
- interface Owner {
- Iterable<String> getCandidateUniqueConstraintColumnNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java
deleted file mode 100644
index ebda45d015..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Reference table (i.e. a table that joins with one other table,
- * as opposed to a "join table" that joins with two other tables)<ul>
- * <li>join table
- * <li>collection table
- * </ul>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ReferenceTable
- extends Table, ReadOnlyReferenceTable
-{
- // ********** join columns **********
-
- /**
- * Convert the reference table's default join column to a specified join column.
- */
- void convertDefaultJoinColumnToSpecified();
-
- ListIterable<? extends JoinColumn> getJoinColumns();
-
- ListIterable<? extends JoinColumn> getSpecifiedJoinColumns();
-
- JoinColumn getSpecifiedJoinColumn(int index);
-
- /**
- * Add and return a specified join column to the reference table.
- */
- JoinColumn addSpecifiedJoinColumn();
-
- /**
- * Add and return a specified join column to the reference table.
- */
- JoinColumn addSpecifiedJoinColumn(int index);
-
- /**
- * Remove the join column at the specified index from the reference table.
- */
- void removeSpecifiedJoinColumn(int index);
-
- /**
- * Remove the specified join column from the reference table.
- */
- void removeSpecifiedJoinColumn(JoinColumn joinColumn);
-
- /**
- * Move the join column at the specified source index to the
- * specified target index.
- */
- void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex);
-
- JoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java
deleted file mode 100644
index 53b2c5b4d9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-/**
- * 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.
- *
- * @see RelationshipMapping
- * @see AssociationOverride
- *
- * @version 2.3
- * @since 2.2
- */
-public interface Relationship
- extends ReadOnlyRelationship
-{
- RelationshipStrategy getStrategy();
-
-
- // ********** conversions **********
-
- void initializeFrom(ReadOnlyRelationship oldRelationship);
-
- void initializeFromMappedByRelationship(MappedByRelationship oldRelationship);
-
- void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship);
-
- void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship);
-
- // we only have a single "client" of the primary key relationship (1:1 mapping)
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java
deleted file mode 100644
index 91af97e6f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context;
-
-/**
- * JPA relationship (1:1, 1:m, m:1, m:m) mapping.
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface RelationshipMapping
- extends FetchableMapping
-{
- /**
- * Return the meta-information used to populate the entities of the
- * relationship
- */
- MappingRelationship getRelationship();
-
- /**
- * Return the relationship owner or null if this is the owning side
- * or it is a unidirectional mapping.
- */
- RelationshipMapping getRelationshipOwner();
-
-
- // **************** target entity **************************************
-
- String getTargetEntity();
-
- String getSpecifiedTargetEntity();
- void setSpecifiedTargetEntity(String value);
- String SPECIFIED_TARGET_ENTITY_PROPERTY = "specifiedTargetEntity"; //$NON-NLS-1$
-
- String getDefaultTargetEntity();
- String DEFAULT_TARGET_ENTITY_PROPERTY = "defaultTargetEntity"; //$NON-NLS-1$
-
- Entity getResolvedTargetEntity();
-
- /**
- * Return all attribute names on the target entity, provided target entity
- * resolves
- */
- Iterable<String> getAllTargetEntityAttributeNames();
-
- /**
- * Return the names of non-transient attribute mappings on the target entity,
- * provided target entity resolves
- */
- Iterable<String> getTargetEntityNonTransientAttributeNames();
-
- /**
- * Return the char to be used for browsing or creating the target entity IType.
- * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
- */
- char getTargetEntityEnclosingTypeSeparator();
-
- /**
- * If the target entity is specified, this will return it fully qualified.
- * If not specified, it returns the default target entity, which is always
- * fully qualified
- */
- String getFullyQualifiedTargetEntity();
- String FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY = "fullyQualifiedTargetEntity"; //$NON-NLS-1$
-
-
- // **************** cascade **************************************
-
- Cascade getCascade();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.java
deleted file mode 100644
index de6411800c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context;
-
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Strategy describing how two entities are joined, either for a
- * {@link RelationshipMapping} or an {@link AssociationOverride}:<ul>
- * <li>join column
- * <li>join table
- * <li>"mapped by"
- * <li>primary key join column
- * </ul>
- * 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.
- *
- * @see RelationshipMapping
- * @see AssociationOverride
- * @see Relationship
- *
- * @version 2.3
- * @since 2.2
- */
-public interface RelationshipStrategy
- extends ReadOnlyRelationshipStrategy
-{
- Relationship getRelationship();
-
- /**
- * Add this strategy to the relationship.
- */
- void addStrategy();
-
- /**
- * Remove this strategy from the relationship.
- */
- void removeStrategy();
-
- /**
- * Return whether the relationship's mapping can be overridden with an
- * association override.
- */
- boolean isOverridable();
-
- /**
- * Return the database table for the specified table name.
- */
- Table resolveDbTable(String tableName);
-
- /**
- * Return whether the specified table cannot be explicitly specified
- * in the column's <code>table</code> element.
- */
- boolean tableNameIsInvalid(String tableName);
-
- /**
- * Return a message description used when the column's table is not valid
- * in this context. This will be passed in as a parameter to a validation
- * message. Here is an example where the description is what is returned
- * by the implementation:
- * <p>location:
- * Table "table name" for map key column "column name"
- * <p>description:
- * does not match join table
- */
- String getColumnTableNotValidDescription();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java
deleted file mode 100644
index 9c91492b04..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * entity secondary table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface SecondaryTable
- extends Table, ReadOnlySecondaryTable
-{
- ListIterable<? extends PrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<? extends PrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- PrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
-
- /**
- * Add a specified primary key join column to the secondary table.
- * Return the newly-created primary key join column.
- */
- PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn();
-
- /**
- * Add a specified primary key join column to the secondary table.
- * Return the newly-created primary key join column.
- */
- PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
-
- /**
- * Remove the specified primary key join column at the specified index from
- * the secondary table.
- */
- void removeSpecifiedPrimaryKeyJoinColumn(int index);
-
- /**
- * Remove the specified primary key join column from the secondary table.
- */
- void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn pkJoinColumn);
-
- /**
- * Move the specified primary key join column from the specified source
- * index to the specified target index.
- */
- void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java
deleted file mode 100644
index fd164b1e86..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * sequence generator
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface SequenceGenerator
- extends Generator
-{
- int DEFAULT_INITIAL_VALUE = 1;
-
-
- // ********** sequence name **********
-
- /**
- * Return the specified sequence name if present, otherwise return the
- * default sequence name.
- */
- String getSequenceName();
- String getSpecifiedSequenceName();
- void setSpecifiedSequenceName(String value);
- String SPECIFIED_SEQUENCE_NAME_PROPERTY = "specifiedSequenceName"; //$NON-NLS-1$
- String getDefaultSequenceName();
- String DEFAULT_SEQUENCE_NAME_PROPERTY = "defaultSequenceName"; //$NON-NLS-1$
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java
deleted file mode 100644
index cc2323fdcd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * JPA single relationship (m:1, 1:1) mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface SingleRelationshipMapping
- extends RelationshipMapping, OptionalMapping
-{
- FetchType DEFAULT_FETCH_TYPE = FetchType.EAGER;
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java
deleted file mode 100644
index f25f804419..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * <ul>
- * <li>table
- * <li>secondary table
- * <li>join table
- * <li>collection table
- * </ul>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface Table
- extends ReadOnlyTable
-{
- void setSpecifiedName(String value);
-
- void setSpecifiedSchema(String value);
-
- void setSpecifiedCatalog(String value);
-
- ListIterable<? extends UniqueConstraint> getUniqueConstraints();
- UniqueConstraint getUniqueConstraint(int index);
- UniqueConstraint addUniqueConstraint();
- UniqueConstraint addUniqueConstraint(int index);
- void removeUniqueConstraint(int index);
- void removeUniqueConstraint(UniqueConstraint uniqueConstraint);
- void moveUniqueConstraint(int targetIndex, int sourceIndex);
-
- /**
- * Return whether the table is specified in the
- * (Java or XML) resource.
- */
- boolean isSpecifiedInResource();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableColumn.java
deleted file mode 100644
index 5623f09971..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableColumn.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-/**
- * column or join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface TableColumn
- extends NamedColumn, ReadOnlyTableColumn
-{
- void setSpecifiedTable(String table);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java
deleted file mode 100644
index 7b7de4fc34..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context;
-
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * table generator
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface TableGenerator
- extends Generator
-{
- int DEFAULT_INITIAL_VALUE = 0;
-
-
- // ********** table **********
-
- /**
- * Return the specified table if present, otherwise return the default
- * table.
- */
- String getTable();
- String getSpecifiedTable();
- void setSpecifiedTable(String value);
- String SPECIFIED_TABLE_PROPERTY = "specifiedTable"; //$NON-NLS-1$
- String getDefaultTable();
- String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$
-
-
- // ********** schema **********
-
- /**
- * Return the specified schema if present, otherwise return the default
- * schema.
- */
- String getSchema();
- String getSpecifiedSchema();
- void setSpecifiedSchema(String value);
- String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
- String getDefaultSchema();
- String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
-
-
- // ********** catalog **********
-
- /**
- * Return the specified catalog if present, otherwise return the default
- * catalog.
- */
- String getCatalog();
- String getSpecifiedCatalog();
- void setSpecifiedCatalog(String value);
- String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
- String getDefaultCatalog();
- String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
-
-
- // ********** primary key column name **********
-
- /**
- * Return the specified primary key colum name if present, otherwise return
- * the default primary key colum name.
- */
- String getPkColumnName();
- String getSpecifiedPkColumnName();
- void setSpecifiedPkColumnName(String value);
- String SPECIFIED_PK_COLUMN_NAME_PROPERTY = "specifiedPkColumnName"; //$NON-NLS-1$
- String getDefaultPkColumnName();
- String DEFAULT_PK_COLUMN_NAME_PROPERTY = "defaultPkColumnName"; //$NON-NLS-1$
-
-
- // ********** value column name **********
-
- /**
- * Return the specified value colum name if present, otherwise return
- * the default value colum name.
- */
- String getValueColumnName();
- String getSpecifiedValueColumnName();
- void setSpecifiedValueColumnName(String value);
- String SPECIFIED_VALUE_COLUMN_NAME_PROPERTY = "specifiedValueColumnName"; //$NON-NLS-1$
- String getDefaultValueColumnName();
- String DEFAULT_VALUE_COLUMN_NAME_PROPERTY = "defaultValueColumnName"; //$NON-NLS-1$
-
-
- // ********** primary key column value **********
-
- /**
- * Return the specified primary key colum value if present, otherwise return
- * the default primary key colum value.
- */
- String getPkColumnValue();
- String getSpecifiedPkColumnValue();
- void setSpecifiedPkColumnValue(String value);
- String SPECIFIED_PK_COLUMN_VALUE_PROPERTY = "specifiedPkColummValue"; //$NON-NLS-1$
- String getDefaultPkColumnValue();
- String DEFAULT_PK_COLUMN_VALUE_PROPERTY = "defaultPkColummValue"; //$NON-NLS-1$
-
-
- // ********** unique constraints **********
-
- <T extends UniqueConstraint> Iterable<T> getUniqueConstraints();
- int getUniqueConstraintsSize();
- UniqueConstraint getUniqueConstraint(int index);
- UniqueConstraint addUniqueConstraint();
- UniqueConstraint addUniqueConstraint(int index);
- void removeUniqueConstraint(int index);
- void removeUniqueConstraint(UniqueConstraint uniqueConstraint);
- void moveUniqueConstraint(int targetIndex, int sourceIndex);
- String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
-
-
- // ********** database stuff **********
-
- /**
- * Return the generator's database table.
- * Return null if the generator's table (name) is invalid.
- */
- Table getDbTable();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java
deleted file mode 100644
index 63b0fd27a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.jpa.core.context;
-
-/**
- * Temporal Type
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum TemporalType {
-
- DATE(
- org.eclipse.jpt.jpa.core.resource.java.TemporalType.DATE,
- org.eclipse.jpt.jpa.core.resource.orm.TemporalType.DATE
- ),
- TIME(
- org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIME,
- org.eclipse.jpt.jpa.core.resource.orm.TemporalType.TIME
- ),
- TIMESTAMP(
- org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIMESTAMP,
- org.eclipse.jpt.jpa.core.resource.orm.TemporalType.TIMESTAMP
- );
-
-
- private org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType;
- private org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType;
-
- TemporalType(org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType, org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType) {
- if (javaTemporalType == null) {
- throw new NullPointerException();
- }
- if (ormTemporalType == null) {
- throw new NullPointerException();
- }
- this.javaTemporalType = javaTemporalType;
- this.ormTemporalType = ormTemporalType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.java.TemporalType getJavaTemporalType() {
- return this.javaTemporalType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.TemporalType getOrmTemporalType() {
- return this.ormTemporalType;
- }
-
-
- // ********** static methods **********
-
- public static TemporalType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType) {
- return (javaTemporalType == null) ? null : fromJavaResourceModel_(javaTemporalType);
- }
-
- private static TemporalType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType) {
- for (TemporalType temporalType : TemporalType.values()) {
- if (temporalType.getJavaTemporalType() == javaTemporalType) {
- return temporalType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.java.TemporalType toJavaResourceModel(TemporalType temporalType) {
- return (temporalType == null) ? null : temporalType.getJavaTemporalType();
- }
-
- public static TemporalType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType) {
- return (ormTemporalType == null) ? null : fromOrmResourceModel_(ormTemporalType);
- }
-
- private static TemporalType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType) {
- for (TemporalType temporalType : TemporalType.values()) {
- if (temporalType.getOrmTemporalType() == ormTemporalType) {
- return temporalType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.TemporalType toOrmResourceModel(TemporalType temporalType) {
- return (temporalType == null) ? null : temporalType.getOrmTemporalType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java
deleted file mode 100644
index b6d759493d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context;
-
-/**
- * JPA transient "mapping". Because of default mappings, attributes must be
- * explicitly marked "transient" if they are not to be mapped to the database.
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface TransientMapping
- extends AttributeMapping
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java
deleted file mode 100644
index 3cae9b1db6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.db.Schema;
-
-/**
- * type mapping:<ul>
- * <li>entity
- * <li>mapped superclass
- * <li>embeddable
- * </ul>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface TypeMapping
- extends JpaContextNode
-{
- PersistentType getPersistentType();
-
- /**
- * Return the corresponding java resource type, this can be null
- */
- JavaResourceType getJavaResourceType();
-
-
- /**
- * Return a unique key for the type mapping. If this is defined in an
- * extension they should be equal.
- */
- String getKey();
-
- /**
- * Return the name, specified or default if not specified.
- */
- String getName();
-
- boolean isMapped();
-
- /**
- * Return the resolved id class specified on this type mapping, null otherwise
- */
- JavaPersistentType getIdClass();
-
- Iterable<Query> getQueries();
-
- Iterable<Generator> getGenerators();
-
-
- // ********** inheritance **********
-
- /**
- * Return the type mapping of this type mapping's super type.
- * Return null if this is the root.
- */
- TypeMapping getSuperTypeMapping();
-
- /**
- * Return the type mapping's "persistence" inheritance hierarchy,
- * <em>including</em> the type mapping itself.
- * The returned iterator will return elements infinitely if the hierarchy
- * has a loop.
- */
- Iterable<TypeMapping> getInheritanceHierarchy();
-
- /**
- * Return the inheritance strategy or null
- */
- InheritanceType getInheritanceStrategy();
-
- /**
- * Return whether this type mapping is a root entity in an inheritance hierarchy.
- */
- boolean isRootEntity();
-
- /**
- * Return the root entity of the inheritance hierarchy or null.
- */
- Entity getRootEntity();
-
- // ********** tables **********
-
- /**
- * Return the type mapping's primary table name.
- * Return null if a primary table is not applicable.
- */
- String getPrimaryTableName();
-
- /**
- * Return the type mapping's primary database table.
- * Return null if a primary table is not applicable.
- */
- org.eclipse.jpt.jpa.db.Table getPrimaryDbTable();
-
- Schema getDbSchema();
-
- /**
- * Return the type mapping's "associated" tables, which includes the primary
- * table and the collection of secondary tables.
- */
- Iterable<ReadOnlyTable> getAssociatedTables();
-
- /**
- * Return the type mapping's "associated" tables, which includes the primary
- * table and the collection of secondary tables, as well as all inherited
- * "associated" tables.
- */
- Iterable<ReadOnlyTable> getAllAssociatedTables();
-
- /**
- * Return the names of the type mapping's "associated" tables, which
- * includes the primary table and the collection of secondary tables, as
- * well as all the inherited "associated" tables.
- */
- Iterable<String> getAllAssociatedTableNames();
-
- /**
- * Return the resolved <em>associated</em> db table with the specified name;
- * i.e. the specified table must be among those associated with the type
- * mapping otherwise return <code>null</code>.
- * <p>
- * <strong>NB:</strong> The spec does allow for columns or join columns to
- * specify a schema and/or catalog; so the results can be unpredictable....
- */
- org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName);
-
- /**
- * Return whether the specified table is invalid for any annotations
- * associated with the type mapping. The table name is case-
- * <em>sensitive</em> when the database connection is missing or inactive;
- * when the database connection is active, case-sensitivity is determined
- * by the database.
- */
- boolean tableNameIsInvalid(String tableName);
-
-
- // ********** attribute mappings **********
-
- /**
- * A convenience method for getting the attribute mappings from PersistentType.attributes()
- */
- <T extends AttributeMapping> Iterable<T> getAttributeMappings();
-
- /**
- * Return attribute mappings of a particular mapping type that are declared on this type mapping
- */
- <T extends AttributeMapping> Iterable<T> getAttributeMappings(String mappingKey);
-
- /**
- * Return all the attribute mappings in the type mapping's
- * inheritance hierarchy.
- */
- Iterable<AttributeMapping> getAllAttributeMappings();
-
- /**
- * Return all the non-transient attribute mappings in the type mapping's
- * inheritance hierarchy
- */
- Iterable<AttributeMapping> getNonTransientAttributeMappings();
-
- /**
- * Return attribute mappings of a particular mapping type that are declared anywhere on this
- * type mapping's hierarchy
- */
- <T extends AttributeMapping> Iterable<T> getAllAttributeMappings(String mappingKey);
-
- /**
- * Return whether the given attribute mapping key is valid for this
- * particular type mapping (for example, id's are not valid for an
- * embeddable type mapping)
- */
- boolean attributeMappingKeyAllowed(String attributeMappingKey);
-
- /**
- * Return whether the attribute with the specified name is a derived ID.
- */
- boolean attributeIsDerivedId(String attributeName);
-
-
- // ********** attribute overrides **********
-
- /**
- * Return an Iterator of attribute names that can be overridden by a
- * sub type mapping.
- */
- Iterable<String> getOverridableAttributeNames();
-
- /**
- * Return an Iterator of all attribute names that can be overridden in this
- * type mapping.
- */
- Iterable<String> getAllOverridableAttributeNames();
-
- /**
- * Return the column of the overridable attribute mapping (or attribute
- * override) with the specified attribute name.
- * <p>
- * In JPA 2.0 this name can use dot-notation to designate nested attributes
- * in embedded attribute mapping's embeddable type mapping.
- */
- Column resolveOverriddenColumn(String attributeName);
-
-
- // ********** association overrides **********
-
- /**
- * Return an Iterator of associations names that can be overridden in this
- * type mapping.
- */
- Iterable<String> getOverridableAssociationNames();
-
- /**
- * Return an Iterator of all associations names that can be overridden in this
- * type mapping.
- */
- Iterable<String> getAllOverridableAssociationNames();
-
- Relationship resolveOverriddenRelationship(String attributeName);
-
-
- // ********** validation **********
-
- /**
- * Return whether any database metadata specific validation should occur.
- * (For instance, if the connection is not active, then it should not.)
- */
- boolean validatesAgainstDatabase();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java
deleted file mode 100644
index db77d78d0d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context;
-
-/**
- * database unique constraint
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface UniqueConstraint
- extends ReadOnlyUniqueConstraint
-{
- void initializeFrom(ReadOnlyUniqueConstraint oldUniqueConstraint);
-
-
- // ********** column names **********
-
- /**
- * Add the specified column name to the end of the
- * unique constraint's list of column names.
- */
- void addColumnName(String columnName);
-
- /**
- * Add the specified column name to the
- * unique constraint's list of column names
- * at the specified index.
- */
- void addColumnName(int index, String columnName);
-
- /**
- * Remove the specified column name from the
- * unique constraint's list of column names.
- */
- void removeColumnName(String columnName);
-
- /**
- * Remove the column name at the specified index from the
- * unique constraint's list of column names.
- */
- void removeColumnName(int index);
-
- /**
- * Move the column name at the specified source index
- * to the specified target index in the
- * unique constraint's list of column names.
- */
- void moveColumnName(int targetIndex, int sourceIndex);
-
-
- // ********** validation ***********
-
- /**
- * Return whether this unique constraint is <em>equivalent</em> to the
- * specified unique constraint.
- */
- boolean isEquivalentTo(UniqueConstraint uniqueConstraint);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java
deleted file mode 100644
index eb47be8fb8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context;
-
-/**
- * JPA version mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface VersionMapping
- extends ColumnMapping, ConvertibleMapping
-{
- String[] SUPPORTED_TYPE_NAMES = {
- int.class.getName(),
- java.lang.Integer.class.getName(),
- short.class.getName(),
- java.lang.Short.class.getName(),
- long.class.getName(),
- java.lang.Long.class.getName(),
- java.sql.Timestamp.class.getName()
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.java
deleted file mode 100644
index e6de19472f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * <em>Virtual</em> association override
- * <p>
- * 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.
- */
-public interface VirtualAssociationOverride
- extends VirtualOverride, ReadOnlyAssociationOverride
-{
- ReadOnlyRelationship resolveOverriddenRelationship();
-
- // covariant overrides
- AssociationOverride convertToSpecified();
-
- VirtualOverrideRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.java
deleted file mode 100644
index 1436e77340..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * <em>Virtual</em> attribute override
- * <p>
- * 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.
- */
-public interface VirtualAttributeOverride
- extends VirtualOverride, ReadOnlyAttributeOverride
-{
- // covariant overrides
- AttributeOverride convertToSpecified();
-
- VirtualColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.java
deleted file mode 100644
index e7c68b2790..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual
- * <ul>
- * <li>column
- * <li>join column
- * </ul>
- * 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.
- */
-public interface VirtualBaseColumn
- extends VirtualTableColumn, ReadOnlyBaseColumn
-{
- ReadOnlyBaseColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java
deleted file mode 100644
index 494dda70a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual join column (no virtual primary key join columns yet)
- * <p>
- * 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.
- */
-public interface VirtualBaseJoinColumn
- extends VirtualNamedColumn, ReadOnlyBaseJoinColumn
-{
- ReadOnlyBaseJoinColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java
deleted file mode 100644
index 29dac38adb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual column
- * <p>
- * 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.
- */
-public interface VirtualColumn
- extends VirtualBaseColumn, ReadOnlyColumn
-{
- ReadOnlyColumn getOverriddenColumn();
-
-
- // ********** owner **********
-
- /**
- * Interface allowing the virtual column to be get the column it overrides.
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner
- {
- /**
- * Return the column overridden by the virtual column.
- */
- ReadOnlyColumn resolveOverriddenColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java
deleted file mode 100644
index 73ab8e8335..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual join column
- * <p>
- * 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.
- */
-public interface VirtualJoinColumn
- extends VirtualBaseJoinColumn, VirtualBaseColumn, ReadOnlyJoinColumn
-{
- ReadOnlyJoinColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java
deleted file mode 100644
index eb9019d98c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual join column relationship
- * <p>
- * 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.
- */
-public interface VirtualJoinColumnRelationship
- extends ReadOnlyJoinColumnRelationship,
- VirtualRelationship
-{
- VirtualJoinColumnRelationshipStrategy getJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 0905e56be0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Virtual join column relationship strategy.
- * <p>
- * 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.
- */
-public interface VirtualJoinColumnRelationshipStrategy
- extends ReadOnlyJoinColumnRelationshipStrategy, VirtualRelationshipStrategy
-{
- ListIterable<? extends VirtualJoinColumn> getJoinColumns();
- ListIterable<? extends VirtualJoinColumn> getSpecifiedJoinColumns();
- VirtualJoinColumn getSpecifiedJoinColumn(int index);
- VirtualJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.java
deleted file mode 100644
index 263988cd70..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Used by association overrides.
- * <p>
- * 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.
- */
-public interface VirtualJoinTable
- extends VirtualReferenceTable, ReadOnlyJoinTable
-{
- VirtualJoinTableRelationshipStrategy getParent();
-
- ListIterable<? extends VirtualJoinColumn> getInverseJoinColumns();
- ListIterable<? extends VirtualJoinColumn> getSpecifiedInverseJoinColumns();
- VirtualJoinColumn getSpecifiedInverseJoinColumn(int index);
- VirtualJoinColumn getDefaultInverseJoinColumn();
-
- ReadOnlyJoinTable getOverriddenTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java
deleted file mode 100644
index 8f322197d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual join table relationship
- * <p>
- * 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.
- */
-public interface VirtualJoinTableRelationship
- extends ReadOnlyJoinTableRelationship,
- VirtualRelationship
-{
- VirtualJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java
deleted file mode 100644
index 94c9901b64..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,25 +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.jpa.core.context;
-
-/**
- * Virtual join table relationship strategy.
- * <p>
- * 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.
- */
-public interface VirtualJoinTableRelationshipStrategy
- extends ReadOnlyJoinTableRelationshipStrategy, VirtualRelationshipStrategy
-{
- VirtualJoinTable getJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.java
deleted file mode 100644
index 7a7316315a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * <em>Virtual</em><ul>
- * <li>column
- * <li>join column
- * </ul>
- * 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.
- */
-public interface VirtualNamedColumn
- extends ReadOnlyNamedColumn
-{
- /**
- * Return the virtual column's wrapped column.
- */
- ReadOnlyNamedColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedDiscriminatorColumn.java
deleted file mode 100644
index b592ec39bc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.core.context;
-
-
-/**
- * Virtual named discriminator column
- * <p>
- * 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.
- */
-public interface VirtualNamedDiscriminatorColumn
- extends VirtualNamedColumn, ReadOnlyNamedDiscriminatorColumn
-{
- ReadOnlyNamedDiscriminatorColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java
deleted file mode 100644
index 3aac4c73e1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * <em>Virtual</em><ul>
- * <li>attribute override
- * <li>association override
- * </ul>
- * 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.
- */
-public interface VirtualOverride
- extends ReadOnlyOverride
-{
- /**
- * Convert the <em>virtual</em> override to a <em>specified</em> override.
- * Return the new <em>specified</em> override.
- * @see #isVirtual()
- */
- Override_ convertToSpecified();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.java
deleted file mode 100644
index 693897dc7b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual association override relationship
- * <p>
- * 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.
- *
- * @see AssociationOverride
- */
-public interface VirtualOverrideRelationship
- extends ReadOnlyOverrideRelationship,
- VirtualJoinColumnRelationship
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java
deleted file mode 100644
index 92af7bf637..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual primary key join column. There are only <em>orm.xml</em> virtual
- * primary key join columns; used to represent the default columns taken from
- * the Java entity. Therefore, it's arguable whether we need this interface; but
- * it makes the inheritance hierarchies a bit more consistent....
- * <p>
- * 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.
- */
-public interface VirtualPrimaryKeyJoinColumn
- extends VirtualBaseJoinColumn, ReadOnlyPrimaryKeyJoinColumn
-{
- /**
- * This is not the best method name; we are simply overloading the meaning
- * of the inherited method.
- */
- PrimaryKeyJoinColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java
deleted file mode 100644
index 21a4ec56c7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Virtual reference table
- * <p>
- * 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.
- */
-public interface VirtualReferenceTable
- extends VirtualTable, ReadOnlyReferenceTable
-{
- ListIterable<? extends VirtualJoinColumn> getJoinColumns();
- ListIterable<? extends VirtualJoinColumn> getSpecifiedJoinColumns();
- VirtualJoinColumn getSpecifiedJoinColumn(int index);
- VirtualJoinColumn getDefaultJoinColumn();
-
- ReadOnlyReferenceTable getOverriddenTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java
deleted file mode 100644
index e7bf4c856a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual relationship
- * <p>
- * 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.
- */
-public interface VirtualRelationship
- extends ReadOnlyRelationship
-{
- VirtualRelationshipStrategy getStrategy();
-
- ReadOnlyRelationship resolveOverriddenRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java
deleted file mode 100644
index 0d9570d197..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual strategy
- * <p>
- * 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.
- */
-public interface VirtualRelationshipStrategy
- extends ReadOnlyRelationshipStrategy
-{
- VirtualRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.java
deleted file mode 100644
index f9275f56f9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Virtual secondary table
- * <p>
- * 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.
- */
-public interface VirtualSecondaryTable
- extends VirtualTable, ReadOnlySecondaryTable
-{
- ListIterable<? extends VirtualPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<? extends VirtualPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- VirtualPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
-
- SecondaryTable getOverriddenTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.java
deleted file mode 100644
index 2f5a64bd31..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Virtual table
- * <p>
- * 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.
- */
-public interface VirtualTable
- extends ReadOnlyTable
-{
- ReadOnlyTable getOverriddenTable();
-
- ListIterable<? extends VirtualUniqueConstraint> getUniqueConstraints();
- VirtualUniqueConstraint getUniqueConstraint(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTableColumn.java
deleted file mode 100644
index e4d7cf9579..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTableColumn.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.context;
-
-
-/**
- * Virtual table column
- * <p>
- * 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.
- */
-public interface VirtualTableColumn
- extends VirtualNamedColumn, ReadOnlyTableColumn
-{
-
- ReadOnlyTableColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.java
deleted file mode 100644
index 1ae02a89bc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context;
-
-/**
- * Virtual database unique constraint. <em>Virtual</em> unique constraints
- * are held by <em>virtual</em> join tables (which are held by <em>virtual</em>
- * association overrides) and, in the case or <code>orm.xml</code>,
- * <em>virtual</em> secondary tables.
- * <p>
- * 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.
- */
-public interface VirtualUniqueConstraint
- extends ReadOnlyUniqueConstraint
-{
- /**
- * Return the wrapped unique constraint.
- */
- ReadOnlyUniqueConstraint getOverriddenUniqueConstraint();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
deleted file mode 100644
index 0291d113ed..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context;
-
-import java.util.List;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * XML JPA context node
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.1
- */
-public interface XmlContextNode
- extends JpaContextNode
-{
-// TODO bjv rename to XmlJpaContextNode
-
- /**
- * Return the content assist proposals for the specified position
- * in the XML file.
- */
- Iterable<String> getXmlCompletionProposals(int pos);
- /**
- * Add to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter);
-
- TextRange getValidationTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java
deleted file mode 100644
index 5f42cc33c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.context;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * Context representation of any JPA XML file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface XmlFile
- extends XmlContextNode, JpaStructureNode
-{
- /**
- * Return the resource model object
- */
- JpaXmlResource getXmlResource();
-
- /**
- * Return whether the XML file's version is the latest supported by its
- * JPA platform.
- */
- boolean isLatestSupportedVersion();
-
-
- /**
- * Common implementations.
- */
- class XmlFile_ {
-
- /**
- * @see #isLatestSupportedVersion()
- */
- public static boolean isLatestSupportedVersion(XmlFile xmlFile) {
- String xmlFileVersion = xmlFile.getXmlResource().getVersion();
- String latestVersion = xmlFile.getJpaProject().getJpaPlatform().getMostRecentSupportedResourceType(xmlFile.getXmlResource().getContentType()).getVersion();
- return Tools.valuesAreEqual(xmlFileVersion, latestVersion);
- }
-
- private XmlFile_() {
- super();
- throw new UnsupportedOperationException();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
deleted file mode 100644
index d483ec56ad..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-
-/**
- * Represents a JPA accessor (field/property).
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface Accessor extends JpaContextNode
-{
- /**
- * Return the <em>resource</em> attribute(field/method) that is to be annotated.
- */
- JavaResourceAttribute getResourceAttribute();
-
- boolean isFor(JavaResourceField resourceField);
-
- boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter);
-
- /**
- * Build a Java persistent attribute that wraps the original Java resource
- * attributes and behaves as though it has no annotations. This will cause
- * all the settings in the Java <em>context</em> attribute to default.
- */
- JavaPersistentAttribute buildUnannotatedJavaAttribute(PersistentType parent);
-
- AccessType getDefaultAccess();
-
- JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java
deleted file mode 100644
index 94676c16d0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java
+++ /dev/null
@@ -1,20 +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.jpa.core.context.java;
-
-public interface DefaultJavaAttributeMappingDefinition
- extends JavaAttributeMappingDefinition
-{
- /**
- * Return whether the definition's mapping is the "default" mapping for the
- * specified persistent attribute.
- */
- boolean isDefault(JavaPersistentAttribute persistentAttribute);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java
deleted file mode 100644
index e71862f8e3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import java.util.List;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * A JAR file identified by a <code>persistence.xml</code> <code>jar-file</code> element.
- * This holds persistent types corresponding to all the "persistable" types
- * discovered in the JAR.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JarFile
- extends JpaContextNode, JpaStructureNode, PersistentTypeContainer
-{
- JavaResourcePackageFragmentRoot getJarResourcePackageFragmentRoot();
-
-
- // ********** Java persistent types **********
-
- /**
- * Return the JAR file's Java persistent types.
- * Return only the types that are annotated with JPA annotations.
- */
- Iterable<JavaPersistentType> getJavaPersistentTypes();
- String JAVA_PERSISTENT_TYPES_COLLECTION = "javaPersistentTypes"; //$NON-NLS-1$
-
- /**
- * Return the size of the JAR file's Java persistent types.
- */
- int getJavaPersistentTypesSize();
-
-
- // ********** validation **********
-
- /**
- * Add to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter);
-
- /**
- * Return true if this jar file exists in the given folder
- */
- boolean isIn(IFolder folder);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java
deleted file mode 100644
index 07f9c95e90..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-
-/**
- * <em>Specified</em> Java association override
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaAssociationOverride
- extends JavaReadOnlyAssociationOverride, AssociationOverride, JavaOverride
-{
- JavaVirtualAssociationOverride convertToVirtual();
-
- AssociationOverrideAnnotation getOverrideAnnotation();
-
- JavaOverrideRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java
deleted file mode 100644
index 9677de19a6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-
-/**
- * Java association override container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaAssociationOverrideContainer
- extends AssociationOverrideContainer, JavaOverrideContainer
-{
- /**
- * Return the specified override's relationship.
- * This is used by the <code>orm.xml</code> association override container
- * when it is also using the Java container's override names.
- * @see #getOverrideNames()
- */
- ReadOnlyOverrideRelationship getOverrideRelationship(String overrideName);
-
- // covariant overrides
- ListIterable<JavaReadOnlyAssociationOverride> getOverrides();
- JavaReadOnlyAssociationOverride getOverrideNamed(String name);
- ListIterable<JavaAssociationOverride> getSpecifiedOverrides();
- JavaAssociationOverride getSpecifiedOverride(int index);
- JavaAssociationOverride getSpecifiedOverrideNamed(String name);
- ListIterable<JavaVirtualAssociationOverride> getVirtualOverrides();
- JavaVirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride);
- JavaAssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** owner **********
-
- interface Owner
- extends AssociationOverrideContainer.Owner, JavaOverrideContainer.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java
deleted file mode 100644
index 5a585114d1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-
-/**
- * Java attribute mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaAttributeMapping
- extends AttributeMapping, JavaJpaContextNode
-{
- JavaPersistentAttribute getParent();
-
- JavaPersistentAttribute getPersistentAttribute();
-
- JavaResourceAttribute getResourceAttribute();
-
- Annotation getMappingAnnotation();
-
- Annotation getAnnotationForUpdate();
-
- void updateDefault();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java
deleted file mode 100644
index f435b729ba..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.JpaFactory;
-
-/**
- * Map a string key to an attribute mapping and its corresponding
- * Java annotations.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaAttributeMappingDefinition
-{
- /**
- * Return the attribute mapping's key.
- */
- String getKey();
-
- /**
- * Return the name of the attribute mapping's annotation.
- */
- String getAnnotationName();
-
- /**
- * Return the names of the attribute mapping's "supporting" annotations.
- */
- Iterable<String> getSupportingAnnotationNames();
-
- /**
- * Return whether the definition's mapping is
- * the "specified" mapping for the specified persistent attribute.
- * <p>
- * <strong>NB:</strong> A mapping is not necessarily "specified" if its
- * annotation is present
- * (see {@link org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaIdMappingDefinition2_0#isSpecified(JavaPersistentAttribute)})
- */
- boolean isSpecified(JavaPersistentAttribute persistentAttribute);
-
- /**
- * Build a Java attribute mapping for the specified persistent attribute.
- * Use the specified factory for creation so extenders can simply override
- * the appropriate factory method instead of building a definition for the
- * same key.
- */
- JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java
deleted file mode 100644
index 5b992d9ed7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-
-/**
- * <em>Specified</em> Java attribute override
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaAttributeOverride
- extends JavaReadOnlyAttributeOverride, AttributeOverride, JavaOverride
-{
- JavaVirtualAttributeOverride convertToVirtual();
-
- AttributeOverrideAnnotation getOverrideAnnotation();
-
- JavaColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java
deleted file mode 100644
index 039cfd4a2d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-
-/**
- * Java attribute override container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaAttributeOverrideContainer
- extends AttributeOverrideContainer, JavaOverrideContainer
-{
- /**
- * Return the specified override's column.
- * This is used by the <code>orm.xml</code> attribute override container
- * when it is also using the Java container's override names.
- * @see #getOverrideNames()
- */
- ReadOnlyColumn getOverrideColumn(String overrideName);
-
- // covariant overrides
- ListIterable<JavaReadOnlyAttributeOverride> getOverrides();
- JavaReadOnlyAttributeOverride getOverrideNamed(String name);
- ListIterable<JavaAttributeOverride> getSpecifiedOverrides();
- JavaAttributeOverride getSpecifiedOverride(int index);
- JavaAttributeOverride getSpecifiedOverrideNamed(String name);
- ListIterable<JavaVirtualAttributeOverride> getVirtualOverrides();
- JavaVirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride);
- JavaAttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** Java owner **********
-
- interface Owner
- extends AttributeOverrideContainer.Owner, JavaOverrideContainer.Owner
- {
- // combine two interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java
deleted file mode 100644
index bca2d1b354..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseColumn;
-import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
-
-/**
- * Java column or join column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaBaseColumn
- extends BaseColumn, JavaNamedColumn, JavaReadOnlyBaseColumn
-{
- BaseColumnAnnotation getColumnAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java
deleted file mode 100644
index ab5405f5d5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping;
-
-/**
- * Behavior common to Java embedded and embedded ID mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaBaseEmbeddedMapping
- extends BaseEmbeddedMapping, JavaAttributeMapping
-{
- JavaAttributeOverrideContainer getAttributeOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEnumeratedConverter.java
deleted file mode 100644
index 6a2cfad22b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEnumeratedConverter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-
-/**
- * Java enumerated/map key enumerated converter
- * <p>
- * 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.
- */
-public interface JavaBaseEnumeratedConverter
- extends BaseEnumeratedConverter, JavaConverter
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java
deleted file mode 100644
index 043eeae1f1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
-
-/**
- * Java join column or primary key join column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaBaseJoinColumn
- extends BaseJoinColumn, JavaNamedColumn, JavaReadOnlyBaseJoinColumn
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseTemporalConverter.java
deleted file mode 100644
index e0b9be5cae..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseTemporalConverter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-
-/**
- * Java temporal/map key temporal converter
- * <p>
- * 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.
- */
-public interface JavaBaseTemporalConverter
- extends BaseTemporalConverter, JavaConverter
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java
deleted file mode 100644
index b5d8038928..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BasicMapping;
-import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
-
-/**
- * Java basic mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaBasicMapping
- extends BasicMapping, JavaColumnMapping, JavaConvertibleMapping
-{
- BasicAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java
deleted file mode 100644
index 9f0562919b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Cascade;
-
-/**
- * Java cascade (persist, merge, remove, refresh)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaCascade
- extends Cascade, JavaJpaContextNode
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java
deleted file mode 100644
index 3c0a4fb3eb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java
+++ /dev/null
@@ -1,27 +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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.CollectionMapping;
-
-/**
- * JPA Java collection mapping (e.g. 1:m, m:m, element collection)
- * <p>
- * 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.
- */
-public interface JavaCollectionMapping
- extends CollectionMapping, JavaAttributeMapping
-{
- JavaOrderable getOrderable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
deleted file mode 100644
index 786fc76b2d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-
-/**
- * Java column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaColumn
- extends Column, JavaBaseColumn
-{
- CompleteColumnAnnotation getColumnAnnotation();
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends JavaReadOnlyBaseColumn.Owner
- {
- CompleteColumnAnnotation getColumnAnnotation();
- void removeColumnAnnotation();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java
deleted file mode 100644
index 1d4f3fd5fa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ColumnMapping;
-
-/**
- * Java column mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaColumnMapping
- extends ColumnMapping, JavaAttributeMapping, JavaColumn.Owner
-{
- JavaColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
deleted file mode 100644
index 6ba7353ab2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-
-/**
- * Java converter
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.1
- */
-public interface JavaConverter
- extends Converter, JavaJpaContextNode
-{
- JavaAttributeMapping getParent();
-
- Annotation getConverterAnnotation();
-
- /**
- * Allow the converter to clean up any related annotations before it is
- * removed itself.
- */
- void dispose();
-
-
- // ********** adapter **********
-
- /**
- * This interface allows a convertible mapping to interact with various
- * Java converters via the same protocol.
- */
- public interface Adapter
- {
- /**
- * Return the type of converter handled by the adapter.
- */
- Class<? extends Converter> getConverterType();
-
- /**
- * Build a converter corresponding to the specified mapping
- * if the mapping's resource attribute is modified by the adapter's
- * converter annotation. Return <code>null</code> otherwise.
- * This is used to build a converter during construction of the
- * converter's mapping.
- */
- JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory);
-
- /**
- * Return the adapter's converter annotation for the specified Java
- * resource persistent member.
- * Return <code>null</code> if the adapter's converter annotation is
- * missing.
- * The returned converter annotation is compared to the parent's
- * converter's converter annotation while the context model is synchronized
- * with the resource model. If it has changed, the parent will build
- * a new converter (via the adapter).
- *
- * @see #buildConverter(Annotation, JavaAttributeMapping, JpaFactory)
- */
- Annotation getConverterAnnotation(JavaResourceAttribute javaResourceAttribute);
-
- /**
- * Build a converter using the specified converter annotation.
- * This is used when the context model is synchronized with the
- * resource model (and the resource model has changed).
- *
- * @see #getConverterAnnotation(JavaResourcePersistentAttribute)
- */
- JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory);
-
- /**
- * Build a new converter and, if necessary, its corresponding converter
- * annotation.
- */
- JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory);
-
- /**
- * Remove the adapter's converter annotation from the specified
- * Java resource persistent member.
- */
- void removeConverterAnnotation(JavaResourceAttribute javaResourcePersistentAttribute);
- }
-
-
- // ********** abstract adapter **********
-
- public abstract static class AbstractAdapter
- implements JavaConverter.Adapter
- {
- public JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory) {
- Annotation annotation = this.getConverterAnnotation(parent.getResourceAttribute());
- return (annotation == null) ? null : this.buildConverter(annotation, parent, factory);
- }
-
- protected abstract String getAnnotationName();
-
- public Annotation getConverterAnnotation(JavaResourceAttribute attribute) {
- return attribute.getAnnotation(this.getAnnotationName());
- }
-
- public JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory) {
- return this.buildConverter(this.buildConverterAnnotationIfNecessary(parent.getResourceAttribute()), parent, factory);
- }
-
- protected Annotation buildConverterAnnotationIfNecessary(JavaResourceAttribute attribute) {
- // the annotation may already be present, after we remove the other converter annotations
- Annotation annotation = this.getConverterAnnotation(attribute);
- return (annotation != null) ? annotation : this.buildConverterAnnotation(attribute);
- }
-
- protected Annotation buildConverterAnnotation(JavaResourceAttribute attribute) {
- return attribute.addAnnotation(this.getAnnotationName());
- }
-
- public void removeConverterAnnotation(JavaResourceAttribute attribute) {
- attribute.removeAnnotation(this.getAnnotationName());
- }
-
- protected Owner buildOwner() {
- return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
- };
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, ClassName.getSimpleName(this.getAnnotationName()));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java
deleted file mode 100644
index a6f9bd607f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java
+++ /dev/null
@@ -1,27 +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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ConvertibleMapping;
-
-/**
- * Java attribute mapping that has a converter (e.g. basic, ID, version).
- * <p>
- * 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.
- */
-public interface JavaConvertibleMapping
- extends ConvertibleMapping, JavaAttributeMapping
-{
- JavaConverter getConverter();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
deleted file mode 100644
index 995f0fc681..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-
-/**
- * Java discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface JavaDiscriminatorColumn
- extends DiscriminatorColumn, JavaNamedDiscriminatorColumn
-{
- DiscriminatorColumnAnnotation getColumnAnnotation();
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- */
- interface Owner
- extends JavaReadOnlyNamedDiscriminatorColumn.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java
deleted file mode 100644
index f00fca6d49..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * Java embeddable type mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaEmbeddable
- extends Embeddable, JavaTypeMapping
-{
- EmbeddableAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java
deleted file mode 100644
index 8f066b4392..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
-
-/**
- * Java embedded ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaEmbeddedIdMapping
- extends EmbeddedIdMapping, JavaBaseEmbeddedMapping
-{
- EmbeddedIdAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java
deleted file mode 100644
index ff6631c380..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.EmbeddedMapping;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
-
-/**
- * Java embedded mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaEmbeddedMapping
- extends EmbeddedMapping, JavaBaseEmbeddedMapping
-{
- EmbeddedAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java
deleted file mode 100644
index 74eea2c80b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-
-/**
- * Java entity
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaEntity
- extends Entity, JavaIdTypeMapping
-{
- EntityAnnotation getMappingAnnotation();
-
- JavaTable getTable();
-
- JavaDiscriminatorColumn getDiscriminatorColumn();
-
-
- // ********** secondary tables **********
-
- ListIterable<JavaSecondaryTable> getSecondaryTables();
- ListIterable<JavaSecondaryTable> getSpecifiedSecondaryTables();
- JavaSecondaryTable addSpecifiedSecondaryTable();
- JavaSecondaryTable addSpecifiedSecondaryTable(int index);
-
-
- // ********** primary key join columns **********
-
- ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<JavaPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
-
- JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
- String DEFAULT_PRIMARY_KEY_JOIN_COLUMN_PROPERTY = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$
-
-
- // ********** containers **********
-
- JavaAttributeOverrideContainer getAttributeOverrideContainer();
- JavaAssociationOverrideContainer getAssociationOverrideContainer();
- JavaQueryContainer getQueryContainer();
- JavaGeneratorContainer getGeneratorContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java
deleted file mode 100644
index f456ab8787..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-
-/**
- * Java enumerated converter
- * <p>
- * 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.
- */
-public interface JavaEnumeratedConverter
- extends JavaBaseEnumeratedConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- extends JavaConverter.AbstractAdapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseEnumeratedConverter.class;
- }
-
- @Override
- protected String getAnnotationName() {
- return EnumeratedAnnotation.ANNOTATION_NAME;
- }
-
- public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
- return factory.buildJavaBaseEnumeratedConverter(parent, (EnumeratedAnnotation) converterAnnotation, this.buildOwner());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
deleted file mode 100644
index d93495dd04..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.GeneratedValue;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-
-/**
- * Java generated value
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface JavaGeneratedValue
- extends GeneratedValue, JavaJpaContextNode
-{
- GeneratedValueAnnotation getGeneratedValueAnnotation();
-
- /**
- * Return the (best guess) text location of the generator.
- */
- TextRange getGeneratorTextRange(CompilationUnit astRoot);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
deleted file mode 100644
index 0d6b8abbce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
-
-/**
- * Java sequence and table generators
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface JavaGenerator
- extends Generator, JavaJpaContextNode
-{
- GeneratorAnnotation getGeneratorAnnotation();
-
- TextRange getNameTextRange(CompilationUnit astRoot);
-
- //********* metadata conversion *********
-
- /**
- * Add the appropriate mapping file generator to the specified entity
- * mappings and convert it from this generator.
- */
- void convertTo(EntityMappings entityMappings);
-
- /**
- * Remove the generator from its parent.
- */
- void delete();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java
deleted file mode 100644
index 5e37020ae3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.context.GeneratorContainer;
-
-/**
- * Java generator container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaGeneratorContainer
- extends GeneratorContainer, JavaJpaContextNode
-{
- // ********** sequence generator **********
-
- JavaSequenceGenerator getSequenceGenerator();
-
- JavaSequenceGenerator addSequenceGenerator();
-
-
- // ********** table generator **********
-
- JavaTableGenerator getTableGenerator();
-
- JavaTableGenerator addTableGenerator();
-
-
- /**
- * Parent adapter
- */
- interface ParentAdapter {
- /**
- * Return the container's parent.
- */
- JavaJpaContextNode getGeneratorContainerParent();
-
- /**
- * Return the element that is annotated with generators.
- */
- JavaResourceAnnotatedElement getResourceAnnotatedElement();
-
- /**
- * Return whether the container's parent supports generators.
- * (Virtual attributes do not support generators.)
- */
- boolean parentSupportsGenerators();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java
deleted file mode 100644
index 69ec7bf5b1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
-
-/**
- * Java ID class reference
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaIdClassReference
- extends IdClassReference, JavaJpaContextNode
-{
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java
deleted file mode 100644
index db9520b119..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.IdMapping;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-
-/**
- * Java ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaIdMapping
- extends IdMapping, JavaColumnMapping, JavaConvertibleMapping, JavaGeneratorContainer.ParentAdapter
-{
- IdAnnotation getMappingAnnotation();
-
- JavaGeneratorContainer getGeneratorContainer();
-
- JavaGeneratedValue getGeneratedValue();
- JavaGeneratedValue addGeneratedValue();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdTypeMapping.java
deleted file mode 100644
index 5a5e64f2a6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdTypeMapping.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.IdTypeMapping;
-
-/**
- * Java ID type mapping
- * <p>
- * 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.
- */
-public interface JavaIdTypeMapping
- extends JavaTypeMapping, IdTypeMapping
-{
- JavaIdClassReference getIdClassReference();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java
deleted file mode 100644
index 2055eae120..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteJoinColumnAnnotation;
-
-/**
- * Java join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface JavaJoinColumn
- extends JoinColumn, JavaReadOnlyJoinColumn, JavaBaseJoinColumn, JavaBaseColumn
-{
- CompleteJoinColumnAnnotation getColumnAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java
deleted file mode 100644
index b42bc14b39..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship;
-
-/**
- * Java join column relationship (1:1, 1:m, m:1, and association override)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaJoinColumnRelationship
- extends JoinColumnRelationship, JavaRelationship
-{
- JavaJoinColumnRelationshipStrategy getJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java
deleted file mode 100644
index cf5e5dc3af..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinColumnRelationshipStrategy;
-
-/**
- * Java join column relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaJoinColumnRelationshipStrategy
- extends JoinColumnRelationshipStrategy, JavaRelationshipStrategy
-{
- ListIterable<JavaJoinColumn> getJoinColumns();
-
- ListIterable<JavaJoinColumn> getSpecifiedJoinColumns();
- JavaJoinColumn getSpecifiedJoinColumn(int index);
- JavaJoinColumn addSpecifiedJoinColumn();
- JavaJoinColumn addSpecifiedJoinColumn(int index);
-
- JavaJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java
deleted file mode 100644
index 38644bad90..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinTable;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * Java join table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaJoinTable
- extends JoinTable, JavaReferenceTable
-{
- JavaJoinTableRelationshipStrategy getParent();
-
- JoinTableAnnotation getTableAnnotation();
-
-
- // ********** inverse join columns **********
-
- ListIterable<JavaJoinColumn> getInverseJoinColumns();
-
- ListIterable<JavaJoinColumn> getSpecifiedInverseJoinColumns();
- JavaJoinColumn getSpecifiedInverseJoinColumn(int index);
- JavaJoinColumn addSpecifiedInverseJoinColumn();
- JavaJoinColumn addSpecifiedInverseJoinColumn(int index);
-
- JavaJoinColumn getDefaultInverseJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java
deleted file mode 100644
index 2418a7d02e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationship;
-
-/**
- * Java join table relationship (1:1, 1:m, m:1, m:m)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaJoinTableRelationship
- extends JoinTableRelationship, JavaRelationship
-{
- JavaJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java
deleted file mode 100644
index c6c912fa07..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * Java join table relationship strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JavaJoinTableRelationshipStrategy
- extends JoinTableRelationshipStrategy, JavaRelationshipStrategy
-{
- JavaJoinTable getJoinTable();
-
- /**
- * Return the join table annotation, use a null object instead of returning null
- * if the join table annotation does not exist.
- */
- JoinTableAnnotation getJoinTableAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
deleted file mode 100644
index 068f576114..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java JPA context node.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JavaJpaContextNode
- extends JpaContextNode
-{
- /**
- * Return the Java code-completion proposals for the specified position
- * in the source code.
- */
- Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
-
-
- // ********** validation **********
-
- /**
- * Adds to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- TextRange getValidationTextRange(CompilationUnit astRoot);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java
deleted file mode 100644
index f78c21c8d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.LobConverter;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-
-/**
- * Java LOB converter
- * <p>
- * 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.
- */
-public interface JavaLobConverter
- extends LobConverter, JavaConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- extends JavaConverter.AbstractAdapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return LobConverter.class;
- }
-
- @Override
- protected String getAnnotationName() {
- return LobAnnotation.ANNOTATION_NAME;
- }
-
- public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
- return factory.buildJavaLobConverter(parent, (LobAnnotation) converterAnnotation, this.buildOwner());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java
deleted file mode 100644
index 9e2544dc8f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ManyToManyMapping;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation;
-
-/**
- * Java m:m mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JavaManyToManyMapping
- extends ManyToManyMapping, JavaMultiRelationshipMapping
-{
- ManyToManyAnnotation getMappingAnnotation();
-
- ManyToManyAnnotation getAnnotationForUpdate();
-
- JavaManyToManyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java
deleted file mode 100644
index 0ecaef922d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ManyToManyRelationship;
-
-/**
- * Java m:m relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaManyToManyRelationship
- extends ManyToManyRelationship,
- JavaMappedByRelationship,
- JavaMappingJoinTableRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java
deleted file mode 100644
index 6c7db3b15d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ManyToOneMapping;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation;
-
-/**
- * Java m:1 mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JavaManyToOneMapping
- extends ManyToOneMapping, JavaSingleRelationshipMapping
-{
- ManyToOneAnnotation getMappingAnnotation();
-
- JavaManyToOneRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java
deleted file mode 100644
index c146adb25a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship;
-
-/**
- * Java m:1 relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaManyToOneRelationship
- extends ManyToOneRelationship,
- JavaMappingJoinColumnRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java
deleted file mode 100644
index 4a7fec62be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.resource.java.OwnableRelationshipMappingAnnotation;
-
-/**
- * Java "mapped by" relationship (1:1, 1:m, m:m)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaMappedByRelationship
- extends MappedByRelationship, JavaRelationship
-{
- JavaMappedByRelationshipStrategy getMappedByStrategy();
-
- OwnableRelationshipMappingAnnotation getMappingAnnotation();
-
- OwnableRelationshipMappingAnnotation getMappingAnnotationForUpdate();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java
deleted file mode 100644
index 77b3356adb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy;
-
-/**
- * Java "mapped by" relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaMappedByRelationshipStrategy
- extends JavaRelationshipStrategy, MappedByRelationshipStrategy
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java
deleted file mode 100644
index 9e0180153f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-
-/**
- * Java mapped superclass
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaMappedSuperclass
- extends MappedSuperclass, JavaIdTypeMapping
-{
- MappedSuperclassAnnotation getMappingAnnotation();
-
- /**
- * According to the spec,
- * only <em>Java</em> mapped superclasses can have queries.
- * The <code>orm.xml</code> mapped superclasses cannot.
- */
- JavaQueryContainer getQueryContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java
deleted file mode 100644
index 8dfcbb3dd6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-/**
- * Java mapping join column relationship (1:1, 1:m, m:1)
- * <p>
- * 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.
- */
-public interface JavaMappingJoinColumnRelationship
- extends JavaJoinColumnRelationship,
- JavaMappingRelationship
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java
deleted file mode 100644
index 7ee0f2b173..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-/**
- * Java mapping join table relationship (1:1, 1:m, m:1, m:m)
- * <p>
- * 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.
- */
-public interface JavaMappingJoinTableRelationship
- extends JavaJoinTableRelationship,
- JavaMappingRelationship
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java
deleted file mode 100644
index e47c8299b1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.MappingRelationship;
-
-/**
- * Java mapping relationship (1:1, 1:m, m:1, m:m)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaMappingRelationship
- extends MappingRelationship, JavaRelationship
-{
- JavaRelationshipMapping getMapping();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java
deleted file mode 100644
index d0ceb37255..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.MultiRelationshipMapping;
-
-/**
- * Java multi-valued relationship (1:m, m:m) mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaMultiRelationshipMapping
- extends MultiRelationshipMapping, JavaRelationshipMapping, JavaCollectionMapping
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java
deleted file mode 100644
index 6fbca4a8f3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.NamedColumn;
-import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
-
-/**
- * Java
- * <ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * <li>discriminator column
- * <li>order column
- * </ul>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaNamedColumn
- extends NamedColumn, JavaReadOnlyNamedColumn
-{
- NamedColumnAnnotation getColumnAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedDiscriminatorColumn.java
deleted file mode 100644
index ebbfe73a6e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.NamedDiscriminatorColumn;
-
-/**
- * Java named discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface JavaNamedDiscriminatorColumn
- extends NamedDiscriminatorColumn, JavaNamedColumn
-{
- //combining interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java
deleted file mode 100644
index 5c3ef01478..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-
-/**
- * Java named native query
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface JavaNamedNativeQuery
- extends NamedNativeQuery, JavaQuery
-{
- NamedNativeQueryAnnotation getQueryAnnotation();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java
deleted file mode 100644
index d20b49c229..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-
-/**
- * Java named query
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface JavaNamedQuery
- extends NamedQuery, JavaQuery
-{
- NamedQueryAnnotation getQueryAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java
deleted file mode 100644
index dc6461010b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.OneToManyMapping;
-import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
-
-/**
- * Java 1:m mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JavaOneToManyMapping
- extends OneToManyMapping, JavaMultiRelationshipMapping
-{
- OneToManyAnnotation getMappingAnnotation();
-
- OneToManyAnnotation getAnnotationForUpdate();
-
- JavaOneToManyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java
deleted file mode 100644
index dab064d031..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.OneToManyRelationship;
-
-/**
- * Java 1:m relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaOneToManyRelationship
- extends OneToManyRelationship,
- JavaMappedByRelationship,
- JavaMappingJoinTableRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java
deleted file mode 100644
index b98d965be9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.OneToOneMapping;
-import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation;
-
-/**
- * Java 1:1 mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JavaOneToOneMapping
- extends OneToOneMapping, JavaSingleRelationshipMapping
-{
- OneToOneAnnotation getMappingAnnotation();
-
- OneToOneAnnotation getAnnotationForUpdate();
-
- JavaOneToOneRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java
deleted file mode 100644
index 3715ccf9e2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.OneToOneRelationship;
-
-/**
- * Java 1:1 relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaOneToOneRelationship
- extends OneToOneRelationship,
- JavaMappedByRelationship,
- JavaPrimaryKeyJoinColumnRelationship,
- JavaMappingJoinColumnRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java
deleted file mode 100644
index 2a5c042baf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Orderable;
-
-/**
- * Multi-valued (1:m, m:m) relationship mappings support ordering.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOrderable
- extends Orderable, JavaJpaContextNode
-{
- JavaAttributeMapping getParent();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java
deleted file mode 100644
index d7ccd3b444..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
-
-/**
- * <em>Specified</em> Java override
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface JavaOverride
- extends Override_, JavaReadOnlyOverride
-{
- OverrideAnnotation getOverrideAnnotation();
-
- // covariant overrides
- JavaVirtualOverride convertToVirtual();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
deleted file mode 100644
index b300c2b616..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-
-/**
- * Java attribute or association override container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOverrideContainer
- extends OverrideContainer, JavaJpaContextNode
-{
- /**
- * Return the names of all the container's overrides, specified and virtual.
- * This is used by the <code>orm.xml</code> override container so any
- * invalid Java overrides (i.e. overrides for a non-existent or
- * non-overridable attributes) are included among the <code>orm.xml</code>
- * virtual overrides.
- * @see org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEntity.OverrideContainerOwner#getJavaOverrideNames()
- */
- Iterable<String> getOverrideNames();
-
- // covariant overrides
- ListIterable<? extends JavaReadOnlyOverride> getOverrides();
- JavaReadOnlyOverride getOverrideNamed(String name);
- ListIterable<? extends JavaOverride> getSpecifiedOverrides();
- JavaOverride getSpecifiedOverride(int index);
- JavaOverride getSpecifiedOverrideNamed(String name);
- ListIterable<? extends JavaVirtualOverride> getVirtualOverrides();
- JavaVirtualOverride convertOverrideToVirtual(Override_ specifiedOverride);
- JavaOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** owner **********
-
- interface Owner
- extends OverrideContainer.Owner
- {
- JavaResourceMember getResourceMember();
-
- TextRange getValidationTextRange(CompilationUnit astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java
deleted file mode 100644
index 486182aeca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-
-/**
- * Java association override relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOverrideRelationship
- extends OverrideRelationship,
- JavaJoinColumnRelationship
-{
- AssociationOverrideAnnotation getOverrideAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
deleted file mode 100644
index 3afdf461f6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.jpa.core.context.CollectionMapping;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * Context Java persistent <em>attribute</em> (field or property).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaPersistentAttribute
- extends PersistentAttribute, JavaJpaContextNode
-{
- // ********** covariant overrides **********
-
- JavaAttributeMapping getMapping();
-
- JavaAttributeMapping setMappingKey(String key);
-
-
- // ********** misc **********
-
- /**
- * Return the accessor(field/property) for the attribute
- */
- Accessor getAccessor();
-
- /**
- * Return the corresponding <em>resource</em> attribute.
- * This is the attribute (field/method) that is annotated.
- * @see Accessor#getResourceAttribute()
- */
- JavaResourceAttribute getResourceAttribute();
-
- /**
- * @see Accessor#isFor(JavaResourceField)
- */
- boolean isFor(JavaResourceField resourceField);
-
- /**
- * @see Accessor#isFor(JavaResourceMethod, JavaResourceMethod)
- */
- boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter);
-
- /**
- * Return whether the attribute contains the given offset into its Java
- * source code file.
- */
- boolean contains(int offset, CompilationUnit astRoot);
-
-
- // ********** type **********
-
- /**
- * Return whether the attribute's type is valid for a default basic mapping.
- */
- boolean typeIsBasic();
-
- /**
- * Return the attribute's type name if it is valid as a target type
- * (i.e. the type is neither an array nor a "container").
- */
- String getSingleReferenceTargetTypeName();
-
- /**
- * If the attribute's type is an appropriate "container" type,
- * return the type parameter that can be used as a target type.
- * Return null if the attribute is not a container or if the type
- * parameter is not valid as a target type (i.e. it is either
- * an array or a "container").
- */
- String getMultiReferenceTargetTypeName();
-
- /**
- * If the attribute's type is a map type,
- * return the type parameter that can be used as a key type.
- * Return null if the attribute is not a map or if the type
- * parameter is not valid as a key type (i.e. it is either
- * an array or a "container").
- */
- String getMultiReferenceMapKeyTypeName();
-
- /**
- * Return the JpaContainer that corresponds to this attribute's type.
- * Return a null implementation if the type is not a container (map or collection)
- */
- JpaContainerDefinition getJpaContainerDefinition();
-
-
- // ********** JPA container **********
-
- /**
- * JPA container definition interface (and null implementation)
- */
- interface JpaContainerDefinition {
- boolean isAssignableFrom(String typeName);
- boolean isContainer();
- boolean isMap();
- String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute);
- String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute);
- String getMetamodelContainerFieldTypeName();
- String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping);
-
- final class Null implements JpaContainerDefinition {
- public static final JpaContainerDefinition INSTANCE = new Null();
- public static JpaContainerDefinition instance() {
- return INSTANCE;
- }
- // ensure single instance
- private Null() {
- super();
- }
- public boolean isAssignableFrom(String typeName) {
- return false;
- }
- public boolean isContainer() {
- return false;
- }
- public boolean isMap() {
- return false;
- }
- public String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute) {
- return null;
- }
- public String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute) {
- return null;
- }
- public String getMetamodelContainerFieldTypeName() {
- return JPA2_0.COLLECTION_ATTRIBUTE;
- }
- public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
- return null;
- }
- @Override
- public String toString() {
- return JpaContainerDefinition.class.getSimpleName() + ".Null"; //$NON-NLS-1$
- }
- }
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java
deleted file mode 100644
index d6e3c4184f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-
-/**
- * Context Java persistent type.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaPersistentType
- extends PersistentType, JavaJpaContextNode
-{
- // ********** covariant overrides **********
-
- JavaTypeMapping getMapping();
-
- ListIterable<JavaPersistentAttribute> getAttributes();
- String ATTRIBUTES_LIST = "attributes"; //$NON-NLS-1$
-
- JavaPersistentAttribute getAttributeNamed(String attributeName);
-
-
- // ********** Java **********
-
- /**
- * Return whether any attribute in this persistent type is annotated
- */
- boolean hasAnyAnnotatedAttributes();
-
- /**
- * Return the Java resource persistent type.
- */
- JavaResourceType getJavaResourceType();
-
- JavaPersistentAttribute getAttributeFor(JavaResourceAttribute javaResourceAttribute);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java
deleted file mode 100644
index 6c047186b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-
-/**
- * Java primary key join column
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface JavaPrimaryKeyJoinColumn
- extends PrimaryKeyJoinColumn, JavaBaseJoinColumn
-{
- PrimaryKeyJoinColumnAnnotation getColumnAnnotation();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java
deleted file mode 100644
index 6c47161927..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationship;
-
-/**
- * Java primary key join column relationship (1:1)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaPrimaryKeyJoinColumnRelationship
- extends PrimaryKeyJoinColumnRelationship,
- JavaMappingRelationship
-{
- JavaPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 6c5dfea50d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationshipStrategy;
-
-/**
- * Java primary key join column relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaPrimaryKeyJoinColumnRelationshipStrategy
- extends JavaRelationshipStrategy, PrimaryKeyJoinColumnRelationshipStrategy
-{
- ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- JavaPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index);
- JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn();
- JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
deleted file mode 100644
index 500c90e4ee..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.java.QueryAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java named and named native queries
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface JavaQuery
- extends Query, JavaJpaContextNode
-{
- QueryAnnotation getQueryAnnotation();
-
-
- // ********** hints **********
-
- ListIterable<JavaQueryHint> getHints();
-
- JavaQueryHint addHint();
-
- JavaQueryHint addHint(int index);
-
-
- // ********** validation **********
-
- void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- TextRange getNameTextRange(CompilationUnit astRoot);
-
- // ********** metadata conversion *********
-
- /**
- * Add the appropriate mapping file query to the specified query
- * container and convert it from this query.
- */
- void convertTo(OrmQueryContainer queryContainer);
-
- /**
- * Remove the query from its parent.
- */
- void delete();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java
deleted file mode 100644
index 162bc8bd9d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.QueryContainer;
-
-/**
- * Java query container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaQueryContainer
- extends QueryContainer, JavaJpaContextNode
-{
- // ********** named queries **********
-
- ListIterable<JavaNamedQuery> getNamedQueries();
-
- JavaNamedQuery addNamedQuery();
-
- JavaNamedQuery addNamedQuery(int index);
-
-
- // ********** named native queries **********
-
- ListIterable<JavaNamedNativeQuery> getNamedNativeQueries();
-
- JavaNamedNativeQuery addNamedNativeQuery();
-
- JavaNamedNativeQuery addNamedNativeQuery(int index);
-
- interface Owner
- {
- JavaResourceAnnotatedElement getResourceAnnotatedElement();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java
deleted file mode 100644
index a36c24dc19..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * Java query hint
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface JavaQueryHint
- extends QueryHint, JavaJpaContextNode
-{
- QueryHintAnnotation getQueryHintAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java
deleted file mode 100644
index 72aca913ba..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-
-/**
- * Java read-only association override
- * <p>
- * 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.
- */
-public interface JavaReadOnlyAssociationOverride
- extends ReadOnlyAssociationOverride, JavaReadOnlyOverride
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java
deleted file mode 100644
index 151b828022..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-
-/**
- * Read-only Java attribute override
- * <p>
- * 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.
- */
-public interface JavaReadOnlyAttributeOverride
- extends ReadOnlyAttributeOverride, JavaReadOnlyOverride
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
deleted file mode 100644
index 530065b728..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-
-/**
- * Java read-only column or join column
- * <p>
- * 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.
- */
-public interface JavaReadOnlyBaseColumn
- extends ReadOnlyBaseColumn, JavaReadOnlyTableColumn
-{
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner, JavaReadOnlyTableColumn.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
deleted file mode 100644
index e391b7f967..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-
-/**
- * Java read-only join column or primary key join column
- * <p>
- * 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.
- */
-public interface JavaReadOnlyBaseJoinColumn
- extends ReadOnlyBaseJoinColumn, JavaReadOnlyNamedColumn
-{
- /**
- * Return the (best guess) text location of the join column's
- * referenced column name.
- */
- TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
-
-
- // ********** owner **********
-
- /**
- * interface allowing join columns to be used in multiple places
- * (e.g. 1:1 mappings and join tables)
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
deleted file mode 100644
index 8e7a5b4840..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-
-/**
- * Java read-only join column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaReadOnlyJoinColumn
- extends ReadOnlyJoinColumn, JavaReadOnlyBaseJoinColumn, JavaReadOnlyBaseColumn
-{
- // ********** owner **********
-
- interface Owner
- extends ReadOnlyJoinColumn.Owner, JavaReadOnlyBaseJoinColumn.Owner, JavaReadOnlyBaseColumn.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
deleted file mode 100644
index bd3002ad18..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-
-/**
- * Java read-only
- * <ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * <li>discriminator column
- * <li>order column
- * </ul>
- * 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.
- */
-public interface JavaReadOnlyNamedColumn
- extends ReadOnlyNamedColumn, JavaJpaContextNode
-{
- /**
- * Return the (best guess) text location of the column's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the column owner's text range. This can be returned by the
- * column when its annotation is not present.
- */
- TextRange getValidationTextRange(CompilationUnit astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
deleted file mode 100644
index 7c0b582651..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
-
-
-/**
- * Java base discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface JavaReadOnlyNamedDiscriminatorColumn
- extends ReadOnlyNamedDiscriminatorColumn, JavaReadOnlyNamedColumn
-{
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedDiscriminatorColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- //combining interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
deleted file mode 100644
index 651e56ff29..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-
-/**
- * Read-only Java override
- * <p>
- * 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.
- */
-public interface JavaReadOnlyOverride
- extends ReadOnlyOverride, JavaJpaContextNode
-{
- /**
- * Return the (best guess) text location of the override's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java
deleted file mode 100644
index 59aae9e166..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-
-/**
- * Java relationship (join column, join table, mapped by, primary key join
- * column, mapping)
- * <p>
- * 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.
- */
-public interface JavaReadOnlyRelationship
- extends ReadOnlyRelationship, JavaJpaContextNode
-{
- JavaReadOnlyRelationshipStrategy getStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java
deleted file mode 100644
index 196563f5ce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-
-/**
- * Java read-only relationship strategy
- * <p>
- * 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.
- */
-public interface JavaReadOnlyRelationshipStrategy
- extends ReadOnlyRelationshipStrategy, JavaJpaContextNode
-{
- JavaReadOnlyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
deleted file mode 100644
index b2b2d342d7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-
-/**
- * Java read-only table
- * <p>
- * 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.
- */
-public interface JavaReadOnlyTable
- extends ReadOnlyTable, JavaJpaContextNode
-{
- TextRange getNameTextRange(CompilationUnit astRoot);
- TextRange getSchemaTextRange(CompilationUnit astRoot);
- TextRange getCatalogTextRange(CompilationUnit astRoot);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
deleted file mode 100644
index f878635d69..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.core.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
-
-/**
- * Java read-only column or join column
- * <p>
- * 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.
- */
-public interface JavaReadOnlyTableColumn
- extends ReadOnlyTableColumn, JavaReadOnlyNamedColumn
-{
- /**
- * Return the (best guess) text location of the column's table.
- */
- TextRange getTableTextRange(CompilationUnit astRoot);
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyTableColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java
deleted file mode 100644
index f0d2546f07..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java
+++ /dev/null
@@ -1,27 +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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-
-/**
- * Java read-only unique constraint
- * <p>
- * 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.
- */
-public interface JavaReadOnlyUniqueConstraint
- extends ReadOnlyUniqueConstraint, JavaJpaContextNode
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java
deleted file mode 100644
index b93abfeda9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReferenceTable;
-import org.eclipse.jpt.jpa.core.resource.java.ReferenceTableAnnotation;
-
-/**
- * Java reference table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaReferenceTable
- extends ReferenceTable, JavaTable
-{
- ReferenceTableAnnotation getTableAnnotation();
-
-
- // ********** join columns **********
-
- ListIterable<JavaJoinColumn> getJoinColumns();
-
- ListIterable<JavaJoinColumn> getSpecifiedJoinColumns();
- JavaJoinColumn getSpecifiedJoinColumn(int index);
- JavaJoinColumn addSpecifiedJoinColumn();
- JavaJoinColumn addSpecifiedJoinColumn(int index);
-
- JavaJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java
deleted file mode 100644
index 088cd7bd3a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Relationship;
-
-/**
- * Java relationship (join column, join table, mapped by, primary key join
- * column, mapping)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JavaRelationship
- extends Relationship, JavaReadOnlyRelationship
-{
- JavaRelationshipStrategy getStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java
deleted file mode 100644
index a2a85098ac..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation;
-
-/**
- * Java relationship (1:1, 1:m, m:1, m:m) mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaRelationshipMapping
- extends RelationshipMapping, JavaAttributeMapping
-{
- RelationshipMappingAnnotation getMappingAnnotation();
-
- RelationshipMappingAnnotation getAnnotationForUpdate();
-
- JavaCascade getCascade();
-
- JavaMappingRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java
deleted file mode 100644
index f658507620..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-
-/**
- * Java relationship strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JavaRelationshipStrategy
- extends RelationshipStrategy, JavaReadOnlyRelationshipStrategy
-{
- JavaRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java
deleted file mode 100644
index f36f708557..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.SecondaryTable;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-
-/**
- * Java secondary table
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface JavaSecondaryTable
- extends SecondaryTable, JavaTable
-{
- JavaEntity getParent();
-
- SecondaryTableAnnotation getTableAnnotation();
-
-
- // ********** primary key join columns **********
-
- ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<JavaPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn();
- JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
- JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java
deleted file mode 100644
index f00727d412..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * Java sequence generator
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface JavaSequenceGenerator
- extends JavaGenerator, SequenceGenerator
-{
- SequenceGeneratorAnnotation getGeneratorAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java
deleted file mode 100644
index fc688ddfff..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.SingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.java.SingleRelationshipMappingAnnotation;
-
-/**
- * Java single (m:1, 1:1) mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface JavaSingleRelationshipMapping
- extends SingleRelationshipMapping, JavaRelationshipMapping
-{
- SingleRelationshipMappingAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java
deleted file mode 100644
index b34de68cad..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
-
-/**
- * Java table
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface JavaTable
- extends Table, JavaReadOnlyTable
-{
- BaseTableAnnotation getTableAnnotation();
-
- ListIterable<JavaUniqueConstraint> getUniqueConstraints();
- JavaUniqueConstraint getUniqueConstraint(int index);
- JavaUniqueConstraint addUniqueConstraint();
- JavaUniqueConstraint addUniqueConstraint(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableColumn.java
deleted file mode 100644
index 7c0b8625f4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.TableColumn;
-
-/**
- * Java column or join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface JavaTableColumn
- extends TableColumn, JavaReadOnlyTableColumn
-{
- //combining interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java
deleted file mode 100644
index ee8dba64e9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.TableGenerator;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-
-/**
- * Java table generator
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface JavaTableGenerator
- extends JavaGenerator, TableGenerator
-{
- TableGeneratorAnnotation getGeneratorAnnotation();
-
- @SuppressWarnings("unchecked")
- Iterable<JavaUniqueConstraint> getUniqueConstraints();
-
- JavaUniqueConstraint addUniqueConstraint(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
deleted file mode 100644
index 6e4311933d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.JavaElementCollectionTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.JavaTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-/**
- * Java temporal converter
- * <p>
- * 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.
- */
-public interface JavaTemporalConverter
- extends JavaBaseTemporalConverter
-{
- // ********** adapter **********
-
- abstract static class AbstractAdapter
- extends JavaConverter.AbstractAdapter
- {
-
- AbstractAdapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseTemporalConverter.class;
- }
-
- @Override
- protected String getAnnotationName() {
- return TemporalAnnotation.ANNOTATION_NAME;
- }
-
- public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
- return factory.buildJavaBaseTemporalConverter(parent, (TemporalAnnotation) converterAnnotation, this.buildOwner());
- }
- }
-
- public static class BasicAdapter
- extends AbstractAdapter
- {
- private static final Adapter INSTANCE = new BasicAdapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private BasicAdapter() {
- super();
- }
-
- @Override
- protected Owner buildOwner() {
- return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
- }
- };
- }
- }
-
- public static class ElementCollectionAdapter
- extends AbstractAdapter
- {
- private static final Adapter INSTANCE = new ElementCollectionAdapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private ElementCollectionAdapter() {
- super();
- }
-
- @Override
- protected Owner buildOwner() {
- return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
- }
- };
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java
deleted file mode 100644
index eed007e2aa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.TransientMapping;
-import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
-
-/**
- * Java transient "mapping"
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface JavaTransientMapping
- extends JavaAttributeMapping, TransientMapping
-{
- TransientAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java
deleted file mode 100644
index 63e7a91a40..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-
-/**
- * Java type mapping
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface JavaTypeMapping
- extends TypeMapping, JavaJpaContextNode
-{
- Annotation getMappingAnnotation();
-
-
- // ********** covariant overrides **********
-
- JavaPersistentType getPersistentType();
-
- @SuppressWarnings("unchecked")
- Iterable<JavaAttributeMapping> getAttributeMappings();
-
- @SuppressWarnings("unchecked")
- Iterable<JavaAttributeMapping> getAttributeMappings(String mappingKey);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java
deleted file mode 100644
index 27ccf16bb5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-
-/**
- * Map a string key to a type mapping and its corresponding
- * Java annotations.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaTypeMappingDefinition
-{
- /**
- * Return the type mapping's key.
- */
- String getKey();
-
- /**
- * Return the name of the type mapping's annotation.
- */
- String getAnnotationName();
-
- /**
- * Return the names of the type mapping's "supporting" annotations.
- */
- Iterable<String> getSupportingAnnotationNames();
-
- /**
- * Build a Java type mapping for the specified persistent type and
- * annotation.
- * Use the specified factory for creation so extenders can simply override
- * the appropriate factory method instead of building a definition for the
- * same key.
- */
- JavaTypeMapping buildMapping(JavaPersistentType persistentType, Annotation annotation, JpaFactory factory);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java
deleted file mode 100644
index 1c0b10f7cb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * Java unique constraint
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface JavaUniqueConstraint
- extends UniqueConstraint, JavaReadOnlyUniqueConstraint
-{
- UniqueConstraintAnnotation getUniqueConstraintAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java
deleted file mode 100644
index d74d02a75b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VersionMapping;
-import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
-
-/**
- * Java version mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JavaVersionMapping
- extends VersionMapping, JavaColumnMapping, JavaConvertibleMapping
-{
- VersionAnnotation getMappingAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java
deleted file mode 100644
index fd15ebd5b8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualAssociationOverride;
-
-/**
- * Java <em>virtual</em> association override
- * <p>
- * 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.
- */
-public interface JavaVirtualAssociationOverride
- extends VirtualAssociationOverride,
- JavaVirtualOverride,
- JavaReadOnlyAssociationOverride
-{
- JavaVirtualOverrideRelationship getRelationship();
-
- JavaAssociationOverride convertToSpecified();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java
deleted file mode 100644
index 3791994e37..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualAttributeOverride;
-
-/**
- * Java <em>virtual</em> attribute override
- * <p>
- * 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.
- */
-public interface JavaVirtualAttributeOverride
- extends VirtualAttributeOverride,
- JavaVirtualOverride,
- JavaReadOnlyAttributeOverride
-{
- JavaAttributeOverride convertToSpecified();
-
- JavaVirtualColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
deleted file mode 100644
index 0841b9ccfe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualColumn;
-
-/**
- * Java virtual column
- * <p>
- * 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.
- */
-public interface JavaVirtualColumn
- extends VirtualColumn, JavaReadOnlyBaseColumn
-{
- /**
- * The overridden column can be either a Java join column or an
- * <code>orm.xml</code> join column; so we don't change the return type
- * here.
- */
- ReadOnlyColumn getOverriddenColumn();
-
-
- // ********** owner **********
-
- interface Owner
- extends VirtualColumn.Owner, JavaReadOnlyBaseColumn.Owner
- {
- /**
- * The overridden column can be either a Java column or an
- * <code>orm.xml</code> column; so we don't change the return type here.
- */
- ReadOnlyColumn resolveOverriddenColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java
deleted file mode 100644
index f223e2f187..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualJoinColumn;
-
-/**
- * Java virtual join column
- * <p>
- * 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.
- */
-public interface JavaVirtualJoinColumn
- extends VirtualJoinColumn, JavaReadOnlyJoinColumn
-{
- /**
- * The overridden join column can be either a Java join column or an
- * <code>orm.xml</code> join column; so we don't change the return type
- * here.
- */
- ReadOnlyJoinColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java
deleted file mode 100644
index dfb9d21642..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationship;
-
-/**
- * Java virtual join column relationship
- * <p>
- * 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.
- */
-public interface JavaVirtualJoinColumnRelationship
- extends VirtualJoinColumnRelationship,
- JavaVirtualRelationship
-{
- JavaVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 2e0262d863..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationshipStrategy;
-
-/**
- * Java virtual join column relationship strategy.
- * <p>
- * 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.
- */
-public interface JavaVirtualJoinColumnRelationshipStrategy
- extends VirtualJoinColumnRelationshipStrategy, JavaVirtualRelationshipStrategy
-{
- ListIterable<JavaVirtualJoinColumn> getJoinColumns();
- ListIterable<JavaVirtualJoinColumn> getSpecifiedJoinColumns();
- JavaVirtualJoinColumn getSpecifiedJoinColumn(int index);
- JavaVirtualJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java
deleted file mode 100644
index a70f5dbbbe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTable;
-
-/**
- * Java virtual join table
- * <p>
- * 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.
- */
-public interface JavaVirtualJoinTable
- extends VirtualJoinTable, JavaReadOnlyTable
-{
- JavaVirtualJoinTableRelationshipStrategy getParent();
-
- ListIterable<JavaVirtualUniqueConstraint> getUniqueConstraints();
- JavaVirtualUniqueConstraint getUniqueConstraint(int index);
-
- ListIterable<JavaVirtualJoinColumn> getJoinColumns();
- ListIterable<JavaVirtualJoinColumn> getSpecifiedJoinColumns();
- JavaVirtualJoinColumn getSpecifiedJoinColumn(int index);
- JavaVirtualJoinColumn getDefaultJoinColumn();
-
- ListIterable<JavaVirtualJoinColumn> getInverseJoinColumns();
- ListIterable<JavaVirtualJoinColumn> getSpecifiedInverseJoinColumns();
- JavaVirtualJoinColumn getSpecifiedInverseJoinColumn(int index);
- JavaVirtualJoinColumn getDefaultInverseJoinColumn();
-
- /**
- * The overridden table can be either a Java table
- * or an <code>orm.xml</code> table; so we don't change the
- * return type here.
- */
- public ReadOnlyJoinTable getOverriddenTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java
deleted file mode 100644
index 5f2963c8b2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationship;
-
-/**
- * Java virtual join table relationship
- * <p>
- * 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.
- */
-public interface JavaVirtualJoinTableRelationship
- extends VirtualJoinTableRelationship,
- JavaVirtualRelationship
-{
- JavaVirtualJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java
deleted file mode 100644
index 7c8ea38e78..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,27 +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.jpa.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationshipStrategy;
-
-/**
- * Java virtual join table relationship strategy.
- * <p>
- * 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.
- */
-public interface JavaVirtualJoinTableRelationshipStrategy
- extends VirtualJoinTableRelationshipStrategy, JavaVirtualRelationshipStrategy
-{
- JavaVirtualJoinTable getJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java
deleted file mode 100644
index c8427e4766..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-
-/**
- * Java <em>virtual</em><ul>
- * <li>attribute override
- * <li>association override
- * </ul>
- * 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.
- */
-public interface JavaVirtualOverride
- extends VirtualOverride, JavaReadOnlyOverride
-{
- JavaOverride convertToSpecified();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java
deleted file mode 100644
index 5a63e37edc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualOverrideRelationship;
-
-/**
- * Java virtual association override relationship
- * <p>
- * 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.
- */
-public interface JavaVirtualOverrideRelationship
- extends VirtualOverrideRelationship,
- JavaVirtualJoinColumnRelationship
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java
deleted file mode 100644
index fb03325c31..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualRelationship;
-
-/**
- * Java virtual relationship
- * <p>
- * 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.
- */
-public interface JavaVirtualRelationship
- extends VirtualRelationship, JavaReadOnlyRelationship
-{
- JavaVirtualRelationshipStrategy getStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java
deleted file mode 100644
index 850754310e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.VirtualRelationshipStrategy;
-
-/**
- * Java virtual strategy
- * <p>
- * 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.
- */
-public interface JavaVirtualRelationshipStrategy
- extends VirtualRelationshipStrategy, JavaReadOnlyRelationshipStrategy
-{
- JavaVirtualRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java
deleted file mode 100644
index e3429579fb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.VirtualUniqueConstraint;
-
-/**
- * Java virtual database unique constraint
- * <p>
- * 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.
- */
-public interface JavaVirtualUniqueConstraint
- extends VirtualUniqueConstraint, JavaReadOnlyUniqueConstraint
-{
- /**
- * The overridden unique constraint can be either a Java unique constraint
- * or an <code>orm.xml</code> unique constraint; so we don't change the
- * return type here.
- */
- ReadOnlyUniqueConstraint getOverriddenUniqueConstraint();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java
deleted file mode 100644
index 50987a1c60..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.orm;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AccessHolder;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.MappingFileRoot;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Context model corresponding to the
- * XML resource model {@link XmlEntityMappings},
- * which corresponds to the <code>entity-mappings</code> element
- * in the <code>orm.xml</code> file.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
-*/
-public interface EntityMappings
- extends MappingFileRoot, PersistentType.Owner, AccessHolder
-{
- /**
- * Covariant override.
- */
- OrmXml getParent();
-
- XmlEntityMappings getXmlEntityMappings();
-
- // TODO bjv add version constants
- String getVersion();
-
- String getDescription();
- void setDescription(String description);
- String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$
-
- /**
- * "The <code>package</code> subelement specifies the package of the
- * classes listed within the subelements and attributes of the same mapping
- * file only. The <code>package</code> subelement is overridden if the fully
- * qualified class name is specified for a class and the two disagree."
- * <p>
- * Partial packages are not supported. The package element should only be used
- * if a class is not qualified (does not have a '.')
- *
- * <strong>NB:</strong> No mention of how to resolve duplicates in the
- * "default" package:<ul>
- * <li><code>Bar</code> (in "default" package) vs. <code>foo.Bar</code>
- * </ul>
- * when package is specified as <code>foo</code>.
- */
- String getPackage();
- void setPackage(String package_);
- String PACKAGE_PROPERTY = "package"; //$NON-NLS-1$
-
- /**
- * Return the database schema container, which can be either a catalog or,
- * if the database does not support catalogs, the database itself.
- */
- SchemaContainer getDbSchemaContainer();
-
- String getSpecifiedCatalog();
- void setSpecifiedCatalog(String catalog);
- String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
- String getDefaultCatalog();
- String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
- Catalog getDbCatalog();
-
- String getSpecifiedSchema();
- void setSpecifiedSchema(String schema);
- String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
- String getDefaultSchema();
- String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
- Schema getDbSchema();
-
- /**
- * Covariant override.
- */
- OrmPersistenceUnitMetadata getPersistenceUnitMetadata();
-
- /**
- * Covariant override.
- */
- ListIterable<OrmPersistentType> getPersistentTypes();
- OrmPersistentType getPersistentType(String className);
- int getPersistentTypesSize();
- OrmPersistentType addPersistentType(String mappingKey, String className);
- void removePersistentType(int index);
- void removePersistentType(OrmPersistentType persistentType);
- //void movePersistentType(int targetIndex, int sourceIndex);
- boolean containsPersistentType(String className);
- String PERSISTENT_TYPES_LIST = "persistentTypes"; //$NON-NLS-1$
-
- ListIterable<OrmSequenceGenerator> getSequenceGenerators();
- int getSequenceGeneratorsSize();
- OrmSequenceGenerator addSequenceGenerator();
- OrmSequenceGenerator addSequenceGenerator(int index);
- void removeSequenceGenerator(int index);
- void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator);
- void moveSequenceGenerator(int targetIndex, int sourceIndex);
- String SEQUENCE_GENERATORS_LIST = "sequenceGenerators"; //$NON-NLS-1$
-
- ListIterable<OrmTableGenerator> getTableGenerators();
- int getTableGeneratorsSize();
- OrmTableGenerator addTableGenerator();
- OrmTableGenerator addTableGenerator(int index);
- void removeTableGenerator(int index);
- void removeTableGenerator(OrmTableGenerator tableGenerator);
- void moveTableGenerator(int targetIndex, int sourceIndex);
- String TABLE_GENERATORS_LIST = "tableGenerators"; //$NON-NLS-1$
-
- OrmQueryContainer getQueryContainer();
-
- /**
- * Return all the queries defined in both the entity mappings and its
- * entities (but <em>not</em> in any associated Java annotations).
- */
- Iterable<Query> getMappingFileQueries();
-
- /**
- * Return all the generators defined in both the entity mappings and its
- * type mappings (but <em>not</em> in any associated Java annotations).
- */
- Iterable<Generator> getMappingFileGenerators();
-
- /**
- * Return the default package to be used for persistent types in this
- * context.
- */
- String getDefaultPersistentTypePackage();
-
- void changeMapping(OrmPersistentType ormPersistentType, OrmTypeMapping oldMapping, OrmTypeMapping newMapping);
-
- boolean containsOffset(int textOffset);
-
- /**
- * Return the Java resource type for the specified class name
- * found in the JPA project. Prepend the default package name
- * if the class name is not fully qualified (does not contain a '.').
- *
- * @see #getPackage()
- */
- JavaResourceAbstractType resolveJavaResourceType(String className);
-
- /**
- * Return the Java resource type for the specified class name and kind
- * found in the JPA project. Prepend the default package name
- * if the class name is not fully qualified (does not contain a '.').
- *
- * Return null if invalid or absent or if the kind does not match.
- *
- * @see #getPackage()
- */
- JavaResourceAbstractType resolveJavaResourceType(String className, JavaResourceAbstractType.Kind kind);
-
- /**
- * Return the persistent type for the specified class name
- * found in the persistence unit. Prepend the default package name
- * if the class name is not fully qualified (does not contain a '.').
- *
- * @see #getPackage()
- */
- PersistentType resolvePersistentType(String className);
-
- /**
- * Return the JDT IType resource type for the specified class name
- * found in the Java project. Prepend the default package name
- * if the class name is not fully qualified (does not contain a '.').
- *
- * @see #getPackage()
- */
- IType resolveJdtType(String className);
-
- /**
- * If the specified class name is not qualified (does not contain a '.')
- * then prepend the default package name. Inner classes must
- * be specified with a '$' for this to work.
- *
- * @see #getPackage()
- */
- String getFullyQualifiedName(String className);
-
-
- // ********** refactoring **********
-
- /**
- * Create DeleteEdits for deleting references (if any) to the type about to be deleted.
- * Return an EmptyIterable if there are not any references to the given type.
- */
- Iterable<DeleteEdit> createDeleteTypeEdits(IType type);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java
deleted file mode 100644
index fa9ef11e5b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.ResourceDefinition;
-
-/**
- * A JPA platform can support multiple mapping files. Each will
- * have a unique resource type and must be defined with a mapping file definition.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MappingFileDefinition
- extends ResourceDefinition
-{
- // nothing yet
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java
deleted file mode 100644
index fa21aa9a48..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public class NullOrmAttributeMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new NullOrmAttributeMappingDefinition();
-
-
- /**
- * Return the singleton.
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private NullOrmAttributeMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- throw new UnsupportedOperationException();
- }
-
- public OrmAttributeMapping buildContextMapping(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping, OrmXmlContextNodeFactory factory) {
- return factory.buildOrmNullAttributeMapping(parent, (XmlNullAttributeMapping) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java
deleted file mode 100644
index f3ee4a768b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-
-/**
- * <em>Specified</em> <code>orm.xml</code> association override
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmAssociationOverride
- extends OrmReadOnlyAssociationOverride, AssociationOverride, OrmOverride
-{
- OrmVirtualAssociationOverride convertToVirtual();
-
- XmlAssociationOverride getXmlOverride();
-
- OrmOverrideRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java
deleted file mode 100644
index 8241f04350..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-
-/**
- * <code>orm.xml</code> association override container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmAssociationOverrideContainer
- extends AssociationOverrideContainer, OrmOverrideContainer
-{
- // covariant overrides
- ListIterable<OrmReadOnlyAssociationOverride> getOverrides();
- OrmReadOnlyAssociationOverride getOverrideNamed(String name);
- ListIterable<OrmAssociationOverride> getSpecifiedOverrides();
- OrmAssociationOverride getSpecifiedOverride(int index);
- OrmAssociationOverride getSpecifiedOverrideNamed(String name);
- ListIterable<OrmVirtualAssociationOverride> getVirtualOverrides();
- OrmVirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride);
- OrmAssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** owner **********
-
- interface Owner
- extends AssociationOverrideContainer.Owner, OrmOverrideContainer.Owner
- {
- @SuppressWarnings("unchecked")
- EList<XmlAssociationOverride> getXmlOverrides();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java
deleted file mode 100644
index ca9ec5bfae..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * <code>orm.xml</code> attribute mapping
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface OrmAttributeMapping
- extends AttributeMapping, XmlContextNode
-{
- OrmPersistentAttribute getParent();
-
- OrmPersistentAttribute getPersistentAttribute();
-
- XmlAttributeMapping getXmlAttributeMapping();
-
- OrmTypeMapping getTypeMapping();
-
- void setName(String name);
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- String getAttributeType();
-
- String getFullyQualifiedAttributeType();
- String FULLY_QUALIFIED_ATTRIBUTE_TYPE_PROPERTY = "fullyQualifiedAttributeType"; //$NON-NLS-1$
-
- String getSpecifiedAttributeType();
- void setSpecifiedAttributeType(String attributeType);
- String SPECIFIED_ATTRIBUTE_TYPE_PROPERTY = "specifiedAttributeType"; //$NON-NLS-1$
-
- String getDefaultAttributeType();
- String DEFAULT_ATTRIBUTE_TYPE_PROPERTY = "defaultAttributeType"; //$NON-NLS-1$
-
- /**
- * Attributes are a sequence in the <code>orm.xml</code> schema. We must keep
- * the list of attributes in the appropriate order so the WTP XML
- * translators will write them to the XML document in that order and they
- * will adhere to the schema.
- * <p>
- * Each implementation must implement this
- * method and return a number that matches its order in the schema.
- */
- int getXmlSequence();
-
- void addXmlAttributeMappingTo(Attributes resourceAttributes);
-
- void removeXmlAttributeMappingFrom(Attributes resourceAttributes);
-
- boolean contains(int textOffset);
-
- TextRange getSelectionTextRange();
-
- TextRange getNameTextRange();
-
-
- // ********** morphing mappings **********
-
- void initializeOn(OrmAttributeMapping newMapping);
-
- void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping);
-
- void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping);
-
- void initializeFromOrmIdMapping(OrmIdMapping oldMapping);
-
- void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping);
-
- void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping);
-
- void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping);
-
- void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping);
-
- void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping);
-
- void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping);
-
- void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping);
-
- void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping);
-
-
- // ********** refactoring **********
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java
deleted file mode 100644
index d6f5e55b84..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-
-/**
- * Part of mechanism to extend the types of <code>orm.xml</code> attribute
- * mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmAttributeMappingDefinition
-{
- /**
- * Return the definition's mapping key.
- */
- String getKey();
-
- /**
- * Build a resource mapping.
- */
- XmlAttributeMapping buildResourceMapping(EFactory factory);
-
- /**
- * Build a context mapping.
- */
- OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java
deleted file mode 100644
index b42c1826ce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-
-/**
- * <em>Specified</em> <code>orm.xml</code> attribute override
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmAttributeOverride
- extends OrmReadOnlyAttributeOverride, AttributeOverride, OrmOverride
-{
- OrmVirtualAttributeOverride convertToVirtual();
-
- XmlAttributeOverride getXmlOverride();
-
- OrmColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java
deleted file mode 100644
index cd0d995573..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-
-/**
- * <code>orm.xml</code> attribute override container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmAttributeOverrideContainer
- extends AttributeOverrideContainer, OrmOverrideContainer
-{
- void initializeFrom(OrmAttributeOverrideContainer oldContainer);
-
- // covariant overrides
- ListIterable<OrmReadOnlyAttributeOverride> getOverrides();
- OrmReadOnlyAttributeOverride getOverrideNamed(String name);
- ListIterable<OrmAttributeOverride> getSpecifiedOverrides();
- OrmAttributeOverride getSpecifiedOverride(int index);
- OrmAttributeOverride getSpecifiedOverrideNamed(String name);
- ListIterable<OrmVirtualAttributeOverride> getVirtualOverrides();
- OrmVirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride);
- OrmAttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- // ********** owner **********
-
- interface Owner
- extends AttributeOverrideContainer.Owner, OrmOverrideContainer.Owner
- {
- @SuppressWarnings("unchecked")
- EList<XmlAttributeOverride> getXmlOverrides();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java
deleted file mode 100644
index be168e0445..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BaseColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn;
-
-/**
- * <code>orm.xml</code> column or join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface OrmBaseColumn
- extends BaseColumn, OrmNamedColumn, OrmReadOnlyBaseColumn
-{
- XmlBaseColumn getXmlColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java
deleted file mode 100644
index 17d8d1d110..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded;
-
-/**
- * Behavior common to <code>orm.xml</code> embedded and embedded ID mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmBaseEmbeddedMapping
- extends BaseEmbeddedMapping, OrmAttributeMapping
-{
- AbstractXmlEmbedded getXmlAttributeMapping();
-
- OrmAttributeOverrideContainer getAttributeOverrideContainer();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEnumeratedConverter.java
deleted file mode 100644
index dfc91de0c9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEnumeratedConverter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
-
-/**
- * <code>orm.xml</code> enumerated/map key enumerated converter
- * <p>
- * 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.
- */
-public interface OrmBaseEnumeratedConverter
- extends BaseEnumeratedConverter, OrmConverter
-{
- // ********** owner **********
-
- /**
- *
- */
- public interface Owner
- extends OrmConverter.Owner
- {
- EnumType getXmlEnumType();
-
- void setXmlEnumType(EnumType enumType);
-
- TextRange getEnumTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.java
deleted file mode 100644
index 975c621acc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn;
-
-/**
- * <code>orm.xml</code> join column or primary key join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface OrmBaseJoinColumn
- extends BaseJoinColumn, OrmNamedColumn, OrmReadOnlyBaseJoinColumn
-{
- XmlBaseJoinColumn getXmlColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseTemporalConverter.java
deleted file mode 100644
index 483de64253..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseTemporalConverter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
-
-/**
- * <code>orm.xml</code> temporal/map key temporal converter
- * <p>
- * 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.
- */
-public interface OrmBaseTemporalConverter
- extends BaseTemporalConverter, OrmConverter
-{
- // ********** owner **********
-
- /**
- *
- */
- public interface Owner
- extends OrmConverter.Owner
- {
- TemporalType getXmlTemporalType();
-
- void setXmlTemporalType(TemporalType temporalType);
-
- TextRange getTemporalTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.java
deleted file mode 100644
index f691894c99..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BasicMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic;
-
-/**
- * <code>orm.xml</code> basic mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmBasicMapping
- extends BasicMapping, OrmColumnMapping, OrmConvertibleMapping
-{
- XmlBasic getXmlAttributeMapping();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java
deleted file mode 100644
index f8333ad944..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Cascade;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> cascade (persist, merge, remove, refresh)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmCascade
- extends Cascade, XmlContextNode
-{
- void initializeFrom(Cascade oldCascade);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.java
deleted file mode 100644
index aae5833bcf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.java
+++ /dev/null
@@ -1,27 +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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.CollectionMapping;
-
-/**
- * JPA <code>orm.xml</code> collection mapping (e.g. 1:m, m:m, element collection)
- * <p>
- * 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.
- */
-public interface OrmCollectionMapping
- extends CollectionMapping, OrmAttributeMapping
-{
- OrmOrderable getOrderable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
deleted file mode 100644
index 313fac9dd4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-
-/**
- * <code>orm.xml</code> column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmColumn
- extends Column, OrmBaseColumn
-{
- XmlColumn getXmlColumn();
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends OrmReadOnlyBaseColumn.Owner
- {
- XmlColumn getXmlColumn();
- XmlColumn buildXmlColumn();
- void removeXmlColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java
deleted file mode 100644
index 0f8f85695f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ColumnMapping;
-
-/**
- * <code>orm.xml</code> column mapping
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface OrmColumnMapping
- extends ColumnMapping, OrmAttributeMapping, OrmColumn.Owner
-{
- OrmColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java
deleted file mode 100644
index c355e68f87..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
-
-/**
- * <code>orm.xml</code> converter
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.1
- */
-public interface OrmConverter
- extends Converter, XmlContextNode
-{
- OrmAttributeMapping getParent();
-
- /**
- * We need this "hack" because we can't build the resource converter before
- * we build the context converter. There is no resource "converter", just a
- * simple setting on the mapping. (Maybe "converter" is not the best way to
- * model what is going on here....)
- */
- void initialize();
-
-
- // ********** adapter **********
-
- /**
- * This interface allows a convertible mapping to interact with various
- * <code>orm.xml</code> converters via the same protocol.
- */
- public interface Adapter
- {
- /**
- * Return the type of converter handled by the adapter.
- */
- Class<? extends Converter> getConverterType();
-
- /**
- * Build a converter for specified mapping
- * if the mapping's XML has the adapter's value set.
- * Return <code>null</code> otherwise.
- * This is used to build a converter during construction of the
- * converter's mapping.
- */
- OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory);
-
- /**
- * Return whether the specified XML mapping has the
- * adapter's value set. If the adapter is active and the context
- * mapping's converter does not match the adapter, the mapping will
- * build a new converter (via the adapter).
- *
- * @see #buildNewConverter(OrmAttributeMapping, OrmXmlContextNodeFactory)
- */
- boolean isActive(XmlAttributeMapping xmlMapping);
-
- /**
- * Build a converter for specified mapping.
- * This is used when the context model is synchronized with the
- * resource model (and the resource model has changed) or when a client
- * changes a mapping's converter.
- * The appropriate setting in the XML mapping will be configured once
- * the context converter has been added to the context model (see {@link
- * OrmConverter#initialize()}.
- *
- * @see #isActive(XmlConvertibleMapping)
- */
- OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory);
-
- /**
- * Clear the adapter's XML value from the specified XML mapping.
- */
- void clearXmlValue(XmlAttributeMapping xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java
deleted file mode 100644
index ebfdafbd42..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java
+++ /dev/null
@@ -1,28 +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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ConvertibleMapping;
-
-/**
- * <code>orm.xml</code> attribute mapping that has a
- * converter (e.g. basic, ID, version).
- * <p>
- * 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.
- */
-public interface OrmConvertibleMapping
- extends ConvertibleMapping, OrmAttributeMapping
-{
- OrmConverter getConverter();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
deleted file mode 100644
index a376a1da88..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
-
-/**
- * <code>orm.xml</code> discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface OrmDiscriminatorColumn
- extends DiscriminatorColumn, OrmNamedDiscriminatorColumn
-{
- XmlDiscriminatorColumn getXmlColumn();
-
-
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- */
- interface Owner
- extends OrmReadOnlyNamedDiscriminatorColumn.Owner
- {
- XmlDiscriminatorColumn getXmlColumn();
- XmlDiscriminatorColumn buildXmlColumn();
- void removeXmlColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java
deleted file mode 100644
index 03861f395b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-
-/**
- * <code>orm.xml</code> embeddable type mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmEmbeddable
- extends Embeddable, OrmTypeMapping
-{
- XmlEmbeddable getXmlTypeMapping();
-
- JavaEmbeddable getJavaTypeMapping();
-
- JavaEmbeddable getJavaTypeMappingForDefaults();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.java
deleted file mode 100644
index 84ec06f7da..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId;
-
-/**
- * <code>orm.xml</code> embedded ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmEmbeddedIdMapping
- extends EmbeddedIdMapping, OrmBaseEmbeddedMapping
-{
- XmlEmbeddedId getXmlAttributeMapping();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.java
deleted file mode 100644
index 4587e93bae..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.EmbeddedMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded;
-
-/**
- * <code>orm.xml</code> embedded mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmEmbeddedMapping
- extends EmbeddedMapping, OrmBaseEmbeddedMapping
-{
- XmlEmbedded getXmlAttributeMapping();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java
deleted file mode 100644
index 0a2231800d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-
-/**
- * <code>orm.xml</code> entity
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmEntity
- extends Entity, OrmIdTypeMapping
-{
- XmlEntity getXmlTypeMapping();
-
- JavaEntity getJavaTypeMapping();
-
- JavaEntity getJavaTypeMappingForDefaults();
-
- OrmTable getTable();
-
- OrmDiscriminatorColumn getDiscriminatorColumn();
-
-
- // ********** secondary tables **********
-
- ListIterable<ReadOnlySecondaryTable> getSecondaryTables();
- ListIterable<OrmSecondaryTable> getSpecifiedSecondaryTables();
- OrmSecondaryTable addSpecifiedSecondaryTable();
- OrmSecondaryTable addSpecifiedSecondaryTable(int index);
-
- /**
- * Return the virtual (not specified) secondary tables.
- */
- ListIterable<OrmVirtualSecondaryTable> getVirtualSecondaryTables();
- String VIRTUAL_SECONDARY_TABLES_LIST = "virtualSecondaryTables"; //$NON-NLS-1$
-
- /**
- * Return the number of virtual secondary tables.
- */
- int getVirtualSecondaryTablesSize();
-
- /**
- * Return true if there are no virtual secondary tables on the orm entity.
- * This is used to determine whether you can add specified secondary tables.
- * You must first make sure all virtual secondary tables have been specified
- * in xml before adding more. This is because adding one secondary table to xml
- * will override all the secondary tables specified in the java entity
- */
- boolean secondaryTablesAreDefinedInXml();
-
- /**
- * If true, then all virtual secondary tables are added in as specified secondary tables to the xml.
- * If false, then all the specified secondary tables are remvoed from the xml.
- */
- void setSecondaryTablesAreDefinedInXml(boolean defineInXml);
-
-
- // ********** primary key join columns **********
-
- ListIterable<ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<OrmPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn();
- OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
-
- ListIterable<ReadOnlyPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns();
- int getDefaultPrimaryKeyJoinColumnsSize();
- String DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST = "defaultPrimaryKeyJoinColumns"; //$NON-NLS-1$
-
-
- // ********** containers **********
-
- OrmAttributeOverrideContainer getAttributeOverrideContainer();
- OrmAssociationOverrideContainer getAssociationOverrideContainer();
- OrmQueryContainer getQueryContainer();
- OrmGeneratorContainer getGeneratorContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
deleted file mode 100644
index 0a0f4875be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
-
-/**
- * <code>orm.xml</code> enumerated converter
- * <p>
- * 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.
- */
-public interface OrmEnumeratedConverter
- extends OrmBaseEnumeratedConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- implements OrmConverter.Adapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseEnumeratedConverter.class;
- }
-
- public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- XmlConvertibleMapping xmlMapping = (XmlConvertibleMapping) parent.getXmlAttributeMapping();
- return (xmlMapping.getEnumerated() == null) ? null : factory.buildOrmBaseEnumeratedConverter(parent, this.buildOwner(xmlMapping));
- }
-
- protected OrmBaseEnumeratedConverter.Owner buildOwner(final XmlConvertibleMapping mapping) {
- return new OrmBaseEnumeratedConverter.Owner() {
- public void setXmlEnumType(EnumType enumType) {
- mapping.setEnumerated(enumType);
- }
- public EnumType getXmlEnumType() {
- return mapping.getEnumerated();
- }
- public TextRange getEnumTextRange() {
- return mapping.getEnumeratedTextRange();
- }
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
- };
- }
-
- public boolean isActive(XmlAttributeMapping xmlMapping) {
- return ((XmlConvertibleMapping) xmlMapping).getEnumerated() != null;
- }
-
- public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- return factory.buildOrmBaseEnumeratedConverter(parent, this.buildOwner((XmlConvertibleMapping) parent.getXmlAttributeMapping()));
- }
-
- public void clearXmlValue(XmlAttributeMapping xmlMapping) {
- ((XmlConvertibleMapping) xmlMapping).setEnumerated(null);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
deleted file mode 100644
index f42e8c098b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.GeneratedValue;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
-
-/**
- * <code>orm.xml</code> generated value
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmGeneratedValue
- extends GeneratedValue, XmlContextNode
-{
- XmlGeneratedValue getXmlGeneratedValue();
-
- /**
- * Return the (best guess) text location of the generator.
- */
- TextRange getGeneratorTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
deleted file mode 100644
index cd1791fd1f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator;
-
-/**
- * <code>orm.xml</code> sequence and table generators
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public interface OrmGenerator
- extends Generator, XmlContextNode
-{
- XmlGenerator getXmlGenerator();
-
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java
deleted file mode 100644
index b858c265f0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.GeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> generator container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmGeneratorContainer
- extends GeneratorContainer, XmlContextNode
-{
- // ********** sequence generator **********
-
- OrmSequenceGenerator getSequenceGenerator();
-
- OrmSequenceGenerator addSequenceGenerator();
-
-
- // ********** table generator **********
-
- OrmTableGenerator getTableGenerator();
-
- OrmTableGenerator addTableGenerator();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java
deleted file mode 100644
index c27612bedc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java
+++ /dev/null
@@ -1,62 +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.jpa.core.context.orm;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * <code>orm.xml</code> ID class reference
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface OrmIdClassReference
- extends IdClassReference, XmlContextNode
-{
- // ********** refactoring **********
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-
-
- // ********** owner **********
-
- interface Owner {
- XmlIdClassContainer getXmlIdClassContainer();
- JavaIdClassReference getJavaIdClassReferenceForDefaults();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java
deleted file mode 100644
index 1b6be0b6dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.IdMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlId;
-
-/**
- * <code>orm.xml</code> ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmIdMapping
- extends IdMapping, OrmColumnMapping, OrmConvertibleMapping
-{
- XmlId getXmlAttributeMapping();
-
- OrmGeneratorContainer getGeneratorContainer();
-
- OrmGeneratedValue getGeneratedValue();
- OrmGeneratedValue addGeneratedValue();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdTypeMapping.java
deleted file mode 100644
index fa247bc878..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdTypeMapping.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.IdTypeMapping;
-
-/**
- * <code>orm.xml</code> ID type mapping
- * <p>
- * 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.
- */
-public interface OrmIdTypeMapping
- extends OrmTypeMapping, IdTypeMapping
-{
- OrmIdClassReference getIdClassReference();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java
deleted file mode 100644
index b2c7f54120..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-
-/**
- * <code>orm.xml</code> join column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmJoinColumn
- extends JoinColumn, OrmReadOnlyJoinColumn, OrmBaseJoinColumn, OrmBaseColumn
-{
- XmlJoinColumn getXmlColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java
deleted file mode 100644
index e99324dbd7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer;
-
-/**
- * <code>orm.xml</code> join column relationship
- * (1:1, 1:m, m:1, and association override)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmJoinColumnRelationship
- extends JoinColumnRelationship, OrmRelationship
-{
- XmlJoinColumnContainer getXmlContainer();
-
- OrmJoinColumnRelationshipStrategy getJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java
deleted file mode 100644
index d6af886c1b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinColumnRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> join column relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmJoinColumnRelationshipStrategy
- extends JoinColumnRelationshipStrategy, OrmRelationshipStrategy
-{
- ListIterable<OrmJoinColumn> getJoinColumns();
-
- ListIterable<OrmJoinColumn> getSpecifiedJoinColumns();
- OrmJoinColumn getSpecifiedJoinColumn(int index);
- OrmJoinColumn addSpecifiedJoinColumn();
- OrmJoinColumn addSpecifiedJoinColumn(int index);
-
- OrmJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java
deleted file mode 100644
index c7ec6c1230..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinTable;
-
-/**
- * <code>orm.xml</code> join table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmJoinTable
- extends JoinTable, OrmReferenceTable
-{
- OrmJoinTableRelationshipStrategy getParent();
-
- // ********** inverse join columns **********
-
- ListIterable<OrmJoinColumn> getInverseJoinColumns();
-
- ListIterable<OrmJoinColumn> getSpecifiedInverseJoinColumns();
- OrmJoinColumn getSpecifiedInverseJoinColumn(int index);
- OrmJoinColumn addSpecifiedInverseJoinColumn();
- OrmJoinColumn addSpecifiedInverseJoinColumn(int index);
-
- OrmJoinColumn getDefaultInverseJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java
deleted file mode 100644
index 8d15df3467..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer;
-
-/**
- * <code>orm.xml</code> join table relationship (1:1, 1:m, m:1, m:m)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmJoinTableRelationship
- extends JoinTableRelationship, OrmRelationship
-{
- XmlJoinTableContainer getXmlContainer();
-
- OrmJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java
deleted file mode 100644
index f35384d08e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable;
-
-/**
- * <code>orm.xml</code> join table relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmJoinTableRelationshipStrategy
- extends JoinTableRelationshipStrategy, OrmRelationshipStrategy
-{
- OrmJoinTable getJoinTable();
-
- XmlJoinTable getXmlJoinTable();
-
- XmlJoinTable buildXmlJoinTable();
-
- void removeXmlJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
deleted file mode 100644
index 75a4744fd1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.LobConverter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
-
-/**
- * <code>orm.xml</code> LOB converter
- * <p>
- * 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.
- */
-public interface OrmLobConverter
- extends LobConverter, OrmConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- implements OrmConverter.Adapter, OrmConverter.Owner
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return LobConverter.class;
- }
-
- public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- XmlConvertibleMapping xmlMapping = (XmlConvertibleMapping) parent.getXmlAttributeMapping();
- return xmlMapping.isLob() ? factory.buildOrmLobConverter(parent, this) : null;
- }
-
- public boolean isActive(XmlAttributeMapping xmlMapping) {
- return ((XmlConvertibleMapping) xmlMapping).isLob();
- }
-
- public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- return factory.buildOrmLobConverter(parent, this);
- }
-
- public void clearXmlValue(XmlAttributeMapping xmlMapping) {
- ((XmlConvertibleMapping) xmlMapping).setLob(false);
- }
-
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.java
deleted file mode 100644
index de5e5ecb0b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ManyToManyMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-
-/**
- * <code>orm.xml</code> m:m mapping
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OrmManyToManyMapping
- extends ManyToManyMapping, OrmMultiRelationshipMapping
-{
- XmlManyToMany getXmlAttributeMapping();
-
- OrmManyToManyRelationship getRelationship();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java
deleted file mode 100644
index f2f2d7edc0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ManyToManyRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-
-/**
- * <code>orm.xml</code> m:m relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmManyToManyRelationship
- extends ManyToManyRelationship,
- OrmMappedByRelationship,
- OrmMappingJoinTableRelationship
-{
- XmlManyToMany getXmlContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.java
deleted file mode 100644
index 1bd07cf10a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ManyToOneMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-
-/**
- * <code>orm.xml</code> m:1 mapping.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OrmManyToOneMapping
- extends ManyToOneMapping, OrmSingleRelationshipMapping
-{
- XmlManyToOne getXmlAttributeMapping();
-
- OrmManyToOneRelationship getRelationship();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java
deleted file mode 100644
index c7b47fd010..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-
-/**
- * <code>orm.xml</code> m:1 relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmManyToOneRelationship
- extends ManyToOneRelationship, OrmMappingJoinColumnRelationship
-{
- XmlManyToOne getXmlContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java
deleted file mode 100644
index 2ac19206a8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping;
-
-/**
- * <code>orm.xml</code> "mapped by" relationship (1:1, 1:m, m:m)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmMappedByRelationship
- extends MappedByRelationship, OrmRelationship
-{
- XmlMappedByMapping getXmlContainer();
-
- OrmMappedByRelationshipStrategy getMappedByStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.java
deleted file mode 100644
index cc250f2d6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> "mapped by" relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmMappedByRelationshipStrategy
- extends OrmRelationshipStrategy, MappedByRelationshipStrategy
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.java
deleted file mode 100644
index 5c74a5156f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass;
-
-/**
- * <code>orm.xml</code> mapped superclass
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmMappedSuperclass
- extends MappedSuperclass, OrmIdTypeMapping
-{
- XmlMappedSuperclass getXmlTypeMapping();
-
- JavaMappedSuperclass getJavaTypeMapping();
-
- JavaMappedSuperclass getJavaTypeMappingForDefaults();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java
deleted file mode 100644
index 504846fb08..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-/**
- * <code>orm.xml</code> mapping join column relationship (1:1, 1:m, m:1)
- * <p>
- * 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.
- */
-public interface OrmMappingJoinColumnRelationship
- extends OrmJoinColumnRelationship, OrmMappingRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java
deleted file mode 100644
index 72403bbef2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-/**
- * <code>orm.xml</code> mapping join table relationship (1:1, 1:m, m:1, m:m)
- * <p>
- * 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.
- */
-public interface OrmMappingJoinTableRelationship
- extends OrmJoinTableRelationship,
- OrmMappingRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.java
deleted file mode 100644
index d366671163..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MappingRelationship;
-
-/**
- * <code>orm.xml</code> mapping relationship (1:1, 1:m, m:1, m:m)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface OrmMappingRelationship
- extends MappingRelationship, OrmRelationship
-{
- OrmRelationshipMapping getMapping();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java
deleted file mode 100644
index f7b62096f1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MultiRelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping;
-
-/**
- * <code>orm.xml</code> multi-valued relationship (1:m, m:m) mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmMultiRelationshipMapping
- extends MultiRelationshipMapping, OrmRelationshipMapping, OrmCollectionMapping
-{
- AbstractXmlMultiRelationshipMapping getXmlAttributeMapping();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java
deleted file mode 100644
index db034bcc01..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.NamedColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn;
-
-/**
- * <code>orm.xml</code>
- * <ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * <li>discriminator column
- * <li>order column
- * </ul>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface OrmNamedColumn
- extends NamedColumn, OrmReadOnlyNamedColumn
-{
- XmlNamedColumn getXmlColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedDiscriminatorColumn.java
deleted file mode 100644
index d20bc2cf6b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.NamedDiscriminatorColumn;
-
-/**
- * Orm base discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface OrmNamedDiscriminatorColumn
- extends NamedDiscriminatorColumn, OrmNamedColumn
-{
- //combining interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java
deleted file mode 100644
index cd406bee6b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery;
-
-/**
- * <code>orm.xml</code> named native query
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmNamedNativeQuery
- extends OrmQuery, NamedNativeQuery
-{
- XmlNamedNativeQuery getXmlQuery();
-
- // ********** metadata conversion *********
-
- /**
- * Build up a mapping file query from
- * the given Java query
- */
- void convertFrom(JavaNamedNativeQuery javaQuery);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.java
deleted file mode 100644
index 4db4ee9183..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-
-/**
- * <code>orm.xml</code> named query
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmNamedQuery
- extends OrmQuery, NamedQuery
-{
- XmlNamedQuery getXmlQuery();
-
- // ********** metadata conversion *********
-
- /**
- * Build up a mapping file query from
- * the given Java query
- */
- void convertFrom(JavaNamedQuery javaQuery);
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.java
deleted file mode 100644
index c984cb9004..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.OneToManyMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-
-/**
- * <code>orm.xml</code> 1:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmOneToManyMapping
- extends OneToManyMapping, OrmMultiRelationshipMapping
-{
- XmlOneToMany getXmlAttributeMapping();
-
- OrmOneToManyRelationship getRelationship();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java
deleted file mode 100644
index a37d64d5de..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.OneToManyRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-
-/**
- * <code>orm.xml</code> 1:m relationship reference
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmOneToManyRelationship
- extends OneToManyRelationship,
- OrmMappedByRelationship,
- OrmMappingJoinTableRelationship
-{
- XmlOneToMany getXmlContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.java
deleted file mode 100644
index 51bfe95b55..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.OneToOneMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-
-/**
- * <code>orm.xml</code> 1:1 mapping.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OrmOneToOneMapping
- extends OneToOneMapping, OrmSingleRelationshipMapping
-{
- XmlOneToOne getXmlAttributeMapping();
-
- OrmOneToOneRelationship getRelationship();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java
deleted file mode 100644
index 2947aadeb6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.OneToOneRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-
-/**
- * <code>orm.xml</code> 1:1 relationship
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmOneToOneRelationship
- extends OneToOneRelationship,
- OrmMappedByRelationship,
- OrmPrimaryKeyJoinColumnRelationship,
- OrmMappingJoinColumnRelationship
-{
- XmlOneToOne getXmlContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java
deleted file mode 100644
index 96c78052cf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Orderable;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * Multi-valued (1:m, m:m) relationship mappings support ordering.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOrderable
- extends Orderable, XmlContextNode
-{
- OrmAttributeMapping getParent();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.java
deleted file mode 100644
index bd14dd1ee4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
-
-/**
- * <em>Specified</em> <code>orm.xml</code> override
- * <p>
- * 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.
- */
-public interface OrmOverride
- extends Override_, OrmReadOnlyOverride
-{
- XmlOverride getXmlOverride();
-
- // covariant overrides
- OrmVirtualOverride convertToVirtual();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
deleted file mode 100644
index 07357527d4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
-
-/**
- * <code>orm.xml</code> attribute or association override container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOverrideContainer
- extends OverrideContainer, XmlContextNode
-{
- // covariant overrides
- /**
- * We need this covariant override because there is no override
- * <em>container</em> element in the <code>orm.xml</code> file;
- * there is simply a list of overrides.
- */
- XmlContextNode getParent();
- ListIterable<? extends OrmReadOnlyOverride> getOverrides();
- OrmReadOnlyOverride getOverrideNamed(String name);
- ListIterable<? extends OrmOverride> getSpecifiedOverrides();
- OrmOverride getSpecifiedOverride(int index);
- OrmOverride getSpecifiedOverrideNamed(String name);
- ListIterable<? extends OrmVirtualOverride> getVirtualOverrides();
- OrmVirtualOverride convertOverrideToVirtual(Override_ specifiedOverride);
- OrmOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
-
-
- interface Owner
- extends OverrideContainer.Owner
- {
- <T extends XmlOverride> EList<T> getXmlOverrides();
-
- /**
- * Return the names of all the corresponding Java overrides, specified and
- * virtual. Return <code>null</code> if the Java overrides are not relevant
- * (i.e. the parent is not an entity, the parent entity has no
- * corresponding Java entity, or the parent entity is <em>metadata
- * complete</em>). Return an empty list if the Java overrides are
- * <em>possible</em> but there are simply none.
- * <p>
- * <strong>NB:</strong> Unlike overrides associated with attribute
- * mappings, the overrides associated with an <code>orm.xml</code>
- * entity are <em>additive</em> to any specified Java overrides. An
- * <code>orm.xml</code> override only overrides the Java override with
- * the same name. [JPA spec 10.1.3.13-14; JPA 2.0 spec 12.2.3.14-15]
- *
- * @see org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer#getOverrideNames()
- */
- Iterable<String> getJavaOverrideNames();
-
- TextRange getValidationTextRange();
-
- OrmTypeMapping getTypeMapping();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.java
deleted file mode 100644
index 8e0a60dc59..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-
-/**
- * <code>orm.xml</code> association override relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOverrideRelationship
- extends OverrideRelationship,
- OrmJoinColumnRelationship
-{
- XmlAssociationOverride getXmlContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java
deleted file mode 100644
index 947ced672e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.AccessHolder;
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-
-/**
- * Context model corresponding to the
- * XML resource model {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults},
- * which corresponds to the <code>persistence-unit-defaults</code> element
- * in the <code>orm.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.1
- */
-public interface OrmPersistenceUnitDefaults
- extends MappingFilePersistenceUnitDefaults, AccessHolder
-{
- /**
- * Covariant override.
- */
- OrmPersistenceUnitMetadata getParent();
-
- // ********** schema container **********
- SchemaContainer getDbSchemaContainer();
-
- // ********** catalog **********
- String getSpecifiedCatalog();
- void setSpecifiedCatalog(String newSpecifiedCatalog);
- String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
- String getDefaultCatalog();
- String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
- Catalog getDbCatalog();
-
- // ********** schema **********
- String getSpecifiedSchema();
- void setSpecifiedSchema(String newSpecifiedSchema);
- String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
- String getDefaultSchema();
- String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
- Schema getDbSchema();
-
- // ********** cascade persist **********
- void setCascadePersist(boolean value);
- String CASCADE_PERSIST_PROPERTY = "cascadePersist"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java
deleted file mode 100644
index ae87ffc6bf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata;
-
-/**
- * Context <code>orm.xml</code> persistence unit metadata.
- * Context model corresponding to the
- * XML resource model {@link XmlPersistenceUnitMetadata},
- * which corresponds to the <code>persistence-unit-metadata</code> element
- * in the <code>orm.xml</code> file.
- * <p>
- * 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.
- */
-public interface OrmPersistenceUnitMetadata
- extends MappingFilePersistenceUnitMetadata
-{
- /**
- * Covariant override.
- */
- EntityMappings getParent();
-
- /**
- * This can be <code>null</code>. The context metadata is always present,
- * even if the XML metadata is missing.
- */
- XmlEntityMappings getXmlEntityMappings();
- void setXmlMappingMetadataComplete(boolean xmlMappingMetadataComplete);
- String XML_MAPPING_METADATA_COMPLETE_PROPERTY = "xmlMappingMetadataComplete"; //$NON-NLS-1$
-
- OrmPersistenceUnitDefaults getPersistenceUnitDefaults();
-
- XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata();
- XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadataForUpdate();
- void removeXmlPersistenceUnitMetadataIfUnset();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java
deleted file mode 100644
index c185a06e26..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.context.orm;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Context <code>orm.xml</code> persistent <em>attribute</em>
- * (field or property).
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface OrmPersistentAttribute
- extends PersistentAttribute, OrmReadOnlyPersistentAttribute
-{
- /**
- * Return an <code>orm.xml</code> mapping since the attribute is
- * <em>specified</em>.
- */
- OrmAttributeMapping getMapping();
-
- /**
- * Remove the attribute from the <code>orm.xml</code> file and the
- * list of specified attributes. The attribute must currently be specified
- * (return false from isVirtual()).
- * Return the new virtual attribute, if it exists.
- * Return <code>null</code> if the attribute does not correspond to an
- * attribute in the Java persistent type.
- * <p>
- * @see #isVirtual()
- * @see #setMappingKey(String)
- */
- OrmReadOnlyPersistentAttribute removeFromXml();
-
- OrmAttributeMapping setMappingKey(String key);
-
- /**
- * Called by the attribute's mapping when it's name changes,
- * effectively changing the attribute's name.
- */
- void nameChanged(String oldName, String newName);
-
-
- // ********** refactoring **********
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java
deleted file mode 100644
index d4bd6093fe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * <code>orm.xml</code> persistent type
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface OrmPersistentType
- extends PersistentType, PersistentType.Owner, XmlContextNode
-{
- // ********** covariant overrides **********
-
- EntityMappings getParent();
-
- OrmTypeMapping getMapping();
-
- /**
- * Return a combination of the persistent type's <em>specified</em> and
- * <em>default</em> attributes. The <em>specified</em> attributes are those
- * explicitly listed in the <code>orm.xml</code> file; while the
- * <em>default</em> attributes are those derived from the corresponding
- * Java persistent type.
- */
- ListIterable<OrmReadOnlyPersistentAttribute> getAttributes();
-
- OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName);
-
-
- // ********** specified attributes **********
-
- String SPECIFIED_ATTRIBUTES_LIST = "specifiedAttributes"; //$NON-NLS-1$
-
- /**
- * Return the persistent type's specified attributes.
- */
- ListIterable<OrmPersistentAttribute> getSpecifiedAttributes();
-
- /**
- * Return the number of the persistent type's specified attributes.
- */
- int getSpecifiedAttributesSize();
-
-
- // ********** default attributes **********
-
- String DEFAULT_ATTRIBUTES_LIST = "defaultAttributes"; //$NON-NLS-1$
-
- /**
- * Return default <code>orm.xml</code> persistent attributes. These
- * are attributes that exist in the corresponding Java class, but are not
- * specified in the <code>orm.xml</code>.
- */
- ListIterable<OrmReadOnlyPersistentAttribute> getDefaultAttributes();
-
- /**
- * Return the number of default <code>orm.xml</code> persistent attributes.
- * @see #getDefaultAttributes()
- */
- int getDefaultAttributesSize();
-
- /**
- * Remove attribute from the type's list of specified attributes
- * and remove it from the <code>orm.xml</code> file.
- * Return the new (virtual) attribute, if it exists.
- * Return <code>null</code> if the specified attribute does not correspond
- * to an attribute in the Java persistent type.
- * <p>
- * Throw an {@link IllegalArgumentException} if the attribute is virtual
- *
- * @see OrmPersistentAttribute#removeFromXml()
- * @see PersistentAttribute#isVirtual()
- */
- OrmReadOnlyPersistentAttribute removeAttributeFromXml(OrmPersistentAttribute specifiedAttribute);
-
- /**
- * Add the specified persistent attribute to the <code>orm.xml</code>.
- * The attribute will be added to the <code>orm.xml</code> and moved
- * from the list of default attributes to the list
- * of specified attributes. It will keep the same mapping it had, either
- * specified in a Java annotation or the default.
- * <p>
- * Throw an {@link IllegalArgumentException} if the attribute is already
- * specified.
- *
- * @see OrmPersistentAttribute#addToXml()
- */
- OrmPersistentAttribute addAttributeToXml(OrmReadOnlyPersistentAttribute virtualAttribute);
-
- /**
- * Add the specified persistent attribute to the <code>orm.xml</code> with
- * the specified mapping. The attribute will be added to the
- * <code>orm.xml</code> and moved from the list of default attributes to
- * the list of specified attributes.
- * <p>
- * Throw an {@link IllegalArgumentException} if the attribute is already
- * specified.
- *
- * @see OrmPersistentAttribute#addToXml(String)
- */
- OrmPersistentAttribute addAttributeToXml(OrmReadOnlyPersistentAttribute virtualAttribute, String mappingKey);
-
-
- // ********** mapping morphing **********
-
- /**
- * This is called whenever the specified persistent attribute's mapping is
- * changed as specified.
- */
- void changeMapping(OrmPersistentAttribute ormPersistentAttribute, OrmAttributeMapping oldMapping, OrmAttributeMapping newMapping);
-
-
- // ********** refactoring **********
-
- /**
- * If this {@link OrmPersistentType#isFor(String)} the given IType, create a text
- * DeleteEdit for deleting the type mapping element and any text that precedes it.
- * Otherwise return an EmptyIterable.
- * Though this will contain 1 or 0 DeleteEdits, using an Iterable
- * for ease of use with other createDeleteEdit API.
- */
- Iterable<DeleteEdit> createDeleteTypeEdits(IType type);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-
-
- // ********** misc **********
-
- boolean contains(int textOffset);
-
- /**
- * Return the Java persistent type that is referred to by the
- * <code>orm.xml</code> persistent type.
- * Return <code>null</code> if it is missing.
- */
- JavaPersistentType getJavaPersistentType();
- String JAVA_PERSISTENT_TYPE_PROPERTY = "javaPersistentType"; //$NON-NLS-1$
-
- /**
- * Return the persistent type's default package, as set in its entity
- * mappings.
- */
- String getDefaultPackage();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java
deleted file mode 100644
index 0b451cc727..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-
-/**
- * <code>orm.xml</code> primary key join column
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmPrimaryKeyJoinColumn
- extends PrimaryKeyJoinColumn, OrmBaseJoinColumn
-{
- XmlPrimaryKeyJoinColumn getXmlColumn();
-
- void initializeFrom(ReadOnlyPrimaryKeyJoinColumn oldColumn);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java
deleted file mode 100644
index c8d304ed52..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer;
-
-/**
- * <code>orm.xml</code> primary key join column relationship (1:1)
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmPrimaryKeyJoinColumnRelationship
- extends PrimaryKeyJoinColumnRelationship, OrmMappingRelationship
-{
- XmlPrimaryKeyJoinColumnContainer getXmlContainer();
-
- OrmPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java
deleted file mode 100644
index a6aef3afef..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> primary key join column relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmPrimaryKeyJoinColumnRelationshipStrategy
- extends OrmRelationshipStrategy, PrimaryKeyJoinColumnRelationshipStrategy
-{
- ListIterable<OrmPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- OrmPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index);
- OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn();
- OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
deleted file mode 100644
index f35bed776a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQuery;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> named and named native queries
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface OrmQuery
- extends Query, XmlContextNode
-{
- XmlQuery getXmlQuery();
-
-
- // ********** hints **********
-
- ListIterable<OrmQueryHint> getHints();
-
- OrmQueryHint addHint();
-
- OrmQueryHint addHint(int index);
-
-
- // ********** validation **********
-
- void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
-
- TextRange getNameTextRange();
-
- TextRange getQueryTextRange();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java
deleted file mode 100644
index 0642006d49..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.QueryContainer;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> query container
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmQueryContainer
- extends QueryContainer, XmlContextNode
-{
- // ********** named queries **********
-
- ListIterable<OrmNamedQuery> getNamedQueries();
-
- OrmNamedQuery addNamedQuery();
-
- OrmNamedQuery addNamedQuery(int index);
-
-
- // ********** named native queries **********
-
- ListIterable<OrmNamedNativeQuery> getNamedNativeQueries();
-
- OrmNamedNativeQuery addNamedNativeQuery();
-
- OrmNamedNativeQuery addNamedNativeQuery(int index);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.java
deleted file mode 100644
index 85298dd025..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint;
-
-/**
- * <code>orm.xml</code> query hint
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmQueryHint
- extends QueryHint, XmlContextNode
-{
- XmlQueryHint getXmlQueryHint();
-
- // ****** metadata conversion ****
- /**
- * Build up a mapping file query hint
- * from the given Java query hint
- */
- void convertFrom(JavaQueryHint javaQueryHint);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java
deleted file mode 100644
index 0d680ecc39..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-
-/**
- * <code>orm.xml</code> association override
- * <p>
- * 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.
- */
-public interface OrmReadOnlyAssociationOverride
- extends ReadOnlyAssociationOverride, OrmReadOnlyOverride
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java
deleted file mode 100644
index 2e446c2455..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-
-/**
- * Read-only <code>orm.xml</code> attribute override
- * <p>
- * 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.
- */
-public interface OrmReadOnlyAttributeOverride
- extends ReadOnlyAttributeOverride, OrmReadOnlyOverride
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
deleted file mode 100644
index 679d9ee1f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-
-/**
- * <code>orm.xml</code> read-only column or join column
- * <p>
- * 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.
- */
-public interface OrmReadOnlyBaseColumn
- extends ReadOnlyBaseColumn, OrmReadOnlyTableColumn
-{
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner, OrmReadOnlyTableColumn.Owner
- {
- // combine two interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
deleted file mode 100644
index e31619f90c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-
-/**
- * <code>orm.xml</code> read-only join column or primary key join column
- * <p>
- * 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.
- */
-public interface OrmReadOnlyBaseJoinColumn
- extends ReadOnlyBaseJoinColumn, OrmReadOnlyNamedColumn
-{
- /**
- * Return the (best guess) text location of the column's
- * referenced column name.
- */
- TextRange getReferencedColumnNameTextRange();
-
-
- // ********** owner **********
-
- /**
- * interface allowing join columns to be used in multiple places
- * (e.g. 1:1 mappings and join tables)
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- // combine two interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
deleted file mode 100644
index 25ab84a48e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-
-/**
- * <code>orm.xml</code> read-only join column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmReadOnlyJoinColumn
- extends ReadOnlyJoinColumn, OrmReadOnlyBaseJoinColumn, OrmReadOnlyBaseColumn
-{
- // ********** owner **********
-
- interface Owner
- extends ReadOnlyJoinColumn.Owner, OrmReadOnlyBaseJoinColumn.Owner, OrmReadOnlyBaseColumn.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
deleted file mode 100644
index 736f6cdb7d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> read-only
- * <ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * <li>discriminator column
- * <li>order column
- * </ul>
- * 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.
- */
-public interface OrmReadOnlyNamedColumn
- extends ReadOnlyNamedColumn, XmlContextNode
-{
- /**
- * Return the (best guess) text location of the column's name.
- */
- TextRange getNameTextRange();
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the column owner's text range. This can be returned by the
- * column when its annotation is not present.
- */
- TextRange getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
deleted file mode 100644
index 1ec9da334d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
-
-
-/**
- * Orm named discriminator column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface OrmReadOnlyNamedDiscriminatorColumn
- extends ReadOnlyNamedDiscriminatorColumn, OrmReadOnlyNamedColumn
-{
-
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedDiscriminatorColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- //combining interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
deleted file mode 100644
index e38c0ac1a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * Read-only <code>orm.xml</code> override
- * <p>
- * 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.
- */
-public interface OrmReadOnlyOverride
- extends ReadOnlyOverride, XmlContextNode
-{
- /**
- * Return the (best guess) text location of the override's name.
- */
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java
deleted file mode 100644
index ce56746731..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-
-/**
- * Read-only context <code>orm.xml</code> persistent <em>attribute</em>
- * (field or property).
- * <p>
- * 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.
- */
-public interface OrmReadOnlyPersistentAttribute
- extends ReadOnlyPersistentAttribute, XmlContextNode
-{
- /**
- * A <em>specified</em> <code>orm.xml</code> attribute will return an
- * <code>orm.xml</code> mapping, while a <em>virtual</em> attribute will
- * return a Java mapping. If the attribute is <em>virtual</em>, the returned
- * (Java) mapping is also <em>virtual</em>; i.e. it is read-only and is not to
- * be modified (nor are any of its parts). The modifiable Java
- * mapping can be retrieved via the modifiable Java attribute:
- * {@link #resolveJavaPersistentAttribute()}.
- */
- AttributeMapping getMapping();
-
- OrmPersistentType getOwningPersistentType();
-
- OrmTypeMapping getOwningTypeMapping();
-
- /**
- * If the <code>orm.xml</code> attribute is <em>virtual</em>, the returned Java
- * attribute is also <em>virtual</em>; i.e. it is read-only and is not to
- * be modified (nor are any of its parts [e.g. column]). The modifiable Java
- * attribute can be retrieved via {@link #resolveJavaPersistentAttribute()}.
- */
- JavaPersistentAttribute getJavaPersistentAttribute();
- String JAVA_PERSISTENT_ATTRIBUTE_PROPERTY = "javaPersistentAttribute"; //$NON-NLS-1$
-
- /**
- * Return the <code>orm.xml</code> attribute's Java attribute; which, in the
- * case of <em>virtual</em> attributes, is not the same Java attribute as
- * returned by {@link #getJavaPersistentAttribute()}.
- * <p>
- * This is probably useful only to tests; since nothing else will want to
- * modify the returned Java attribute.
- */
- JavaPersistentAttribute resolveJavaPersistentAttribute();
-
- JavaResourceAttribute getJavaResourceAttribute();
-
- boolean isFor(JavaResourceField javaResourceField);
-
- boolean isFor(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter);
-
- boolean contains(int textOffset);
-
-
- // ********** virtual -> specified **********
-
- /**
- * Convert the (currently virtual) attribute to a specified
- * attribute. The attribute will be added to the list of specified
- * attributes and added to the <code>orm.xml</code> file. The mapping will
- * remain the same. Return the new attribute.
- * @see #isVirtual()
- * @throw IllegalStateException if the attribute is already specified
- */
- OrmPersistentAttribute addToXml();
-
- /**
- * Convert the (currently virtual) persistent attribute to a specified
- * attribute. The attribute will be added to the list of specified
- * attributes and added to the <code>orm.xml</code> file. The mapping will
- * be changed according to the specified mapping key.
- * Return the new attribute.
- * @see #isVirtual()
- * @throw IllegalStateException if the attribute is already specified
- */
- OrmPersistentAttribute addToXml(String mappingKey);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java
deleted file mode 100644
index 09e3b7ebca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> relationship (join column, join table, mapped by,
- * primary key join column, mapping)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface OrmReadOnlyRelationship
- extends ReadOnlyRelationship, XmlContextNode
-{
- OrmReadOnlyRelationshipStrategy getStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.java
deleted file mode 100644
index 38e20442f6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> read-only relationship strategy
- * <p>
- * 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.
- */
-public interface OrmReadOnlyRelationshipStrategy
- extends ReadOnlyRelationshipStrategy, XmlContextNode
-{
- OrmReadOnlyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
deleted file mode 100644
index d49312a8ac..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> read-only table
- * <p>
- * 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.
- */
-public interface OrmReadOnlyTable
- extends ReadOnlyTable, XmlContextNode
-{
- TextRange getNameTextRange();
- TextRange getSchemaTextRange();
- TextRange getCatalogTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
deleted file mode 100644
index 1dcd63e64b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
-
-/**
- * <code>orm.xml</code> read-only column or join column
- * <p>
- * 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.
- */
-public interface OrmReadOnlyTableColumn
- extends ReadOnlyTableColumn, OrmReadOnlyNamedColumn
-{
- /**
- * Return the (best guess) text location of the column's table.
- */
- TextRange getTableTextRange();
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyTableColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- // combine two interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java
deleted file mode 100644
index c8f8f00c81..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java
+++ /dev/null
@@ -1,31 +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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-
-/**
- * <code>orm.xml</code> read-only unique constraint
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmReadOnlyUniqueConstraint
- extends ReadOnlyUniqueConstraint, XmlContextNode
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java
deleted file mode 100644
index a5118a1231..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReferenceTable;
-
-/**
- * <code>orm.xml</code> join table or collection table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmReferenceTable
- extends ReferenceTable, OrmTable
-{
- // ********** join columns **********
-
- ListIterable<OrmJoinColumn> getJoinColumns();
-
- ListIterable<OrmJoinColumn> getSpecifiedJoinColumns();
- OrmJoinColumn getSpecifiedJoinColumn(int index);
- OrmJoinColumn addSpecifiedJoinColumn();
- OrmJoinColumn addSpecifiedJoinColumn(int index);
-
- OrmJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java
deleted file mode 100644
index 416a61364b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Relationship;
-
-/**
- * <code>orm.xml</code> relationship (join column, join table, mapped by,
- * primary key join column, mapping)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface OrmRelationship
- extends Relationship, OrmReadOnlyRelationship
-{
- OrmRelationshipStrategy getStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java
deleted file mode 100644
index 739d460fc8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping;
-
-/**
- * <code>orm.xml</code> relationship (1:1, 1:m, m:1, m:m) mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmRelationshipMapping
- extends RelationshipMapping, OrmAttributeMapping
-{
- AbstractXmlRelationshipMapping getXmlAttributeMapping();
-
- OrmCascade getCascade();
-
- OrmMappingRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.java
deleted file mode 100644
index 7704ca4aa4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-
-/**
- * <code>orm.xml</code> relationship strategy
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OrmRelationshipStrategy
- extends RelationshipStrategy, OrmReadOnlyRelationshipStrategy
-{
- OrmRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java
deleted file mode 100644
index 93f476b411..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.context.SecondaryTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable;
-
-/**
- * <code>orm.xml</code> secondary table
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmSecondaryTable
- extends SecondaryTable, OrmTable
-{
- OrmEntity getParent();
-
- void initializeFrom(ReadOnlySecondaryTable oldSecondaryTable);
-
- XmlSecondaryTable getXmlTable();
-
-
- // ********** primary key join columns **********
-
- ListIterable<OrmPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<OrmPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn();
- OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
- OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.java
deleted file mode 100644
index 5e36b01615..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-
-/**
- * <code>orm.xml</code> sequence generator
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmSequenceGenerator
- extends SequenceGenerator, OrmGenerator
-{
- XmlSequenceGenerator getXmlGenerator();
-
- //********* metadata conversion *********
-
- /**
- * Build up a mapping file generator from the given Java generator.
- */
- void convertFrom(JavaSequenceGenerator javaGenerator);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.java
deleted file mode 100644
index bfe8774ab9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.SingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping;
-
-/**
- * <code>orm.xml</code> single (1:1, m:1) mapping.
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OrmSingleRelationshipMapping
- extends SingleRelationshipMapping, OrmRelationshipMapping
-{
- AbstractXmlSingleRelationshipMapping getXmlAttributeMapping();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java
deleted file mode 100644
index 89e5d98697..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Table;
-
-/**
- * <code>orm.xml</code> table
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OrmTable
- extends Table, OrmReadOnlyTable
-{
- ListIterable<OrmUniqueConstraint> getUniqueConstraints();
- OrmUniqueConstraint getUniqueConstraint(int index);
- OrmUniqueConstraint addUniqueConstraint();
- OrmUniqueConstraint addUniqueConstraint(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableColumn.java
deleted file mode 100644
index 503cb8da4f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.TableColumn;
-
-/**
- * <code>orm.xml</code> column or join column
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface OrmTableColumn
- extends TableColumn, OrmReadOnlyTableColumn
-{
- //combining interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.java
deleted file mode 100644
index b38d692ccf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.TableGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaTableGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator;
-
-/**
- * <code>orm.xml</code> table generator
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmTableGenerator
- extends TableGenerator, OrmGenerator
-{
- XmlTableGenerator getXmlGenerator();
-
-
- // ********** unique constraints **********
-
- @SuppressWarnings("unchecked")
- Iterable<OrmUniqueConstraint> getUniqueConstraints();
-
- OrmUniqueConstraint addUniqueConstraint();
-
- OrmUniqueConstraint addUniqueConstraint(int index);
-
-
- //********* metadata conversion *********
-
- /**
- * Build up a mapping file generator from the given Java generator.
- */
- void convertFrom(JavaTableGenerator javaGenerator);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
deleted file mode 100644
index 166231a94a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmElementCollectionTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
-
-/**
- * <code>orm.xml</code> temporal converter
- * <p>
- * 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.
- */
-public interface OrmTemporalConverter
- extends OrmBaseTemporalConverter
-{
- // ********** adapter **********
-
- abstract static class AbstractAdapter
- implements OrmConverter.Adapter
- {
- AbstractAdapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseTemporalConverter.class;
- }
-
- public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- XmlConvertibleMapping xmlMapping = (XmlConvertibleMapping) parent.getXmlAttributeMapping();
- return (xmlMapping.getTemporal() == null) ? null : factory.buildOrmBaseTemporalConverter(parent, this.buildOwner(xmlMapping));
- }
-
- protected abstract OrmTemporalConverter.Owner buildOwner(final XmlConvertibleMapping mapping);
-
-
- public boolean isActive(XmlAttributeMapping xmlMapping) {
- return ((XmlConvertibleMapping) xmlMapping).getTemporal() != null;
- }
-
- public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- return factory.buildOrmBaseTemporalConverter(parent, this.buildOwner((XmlConvertibleMapping) parent.getXmlAttributeMapping()));
- }
-
- public void clearXmlValue(XmlAttributeMapping xmlMapping) {
- ((XmlConvertibleMapping) xmlMapping).setTemporal(null);
- }
- }
-
- public static class BasicAdapter
- extends AbstractAdapter
- {
- private static final Adapter INSTANCE = new BasicAdapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private BasicAdapter() {
- super();
- }
-
- @Override
- protected Owner buildOwner(final XmlConvertibleMapping mapping) {
- return new OrmBaseTemporalConverter.Owner() {
- public void setXmlTemporalType(TemporalType temporalType) {
- mapping.setTemporal(temporalType);
- }
- public TemporalType getXmlTemporalType() {
- return mapping.getTemporal();
- }
- public TextRange getTemporalTextRange() {
- return mapping.getTemporalTextRange();
- }
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
- }
- };
- }
- }
-
- public static class ElementCollectionAdapter
- extends AbstractAdapter
- {
- private static final Adapter INSTANCE = new ElementCollectionAdapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private ElementCollectionAdapter() {
- super();
- }
-
- @Override
- protected Owner buildOwner(final XmlConvertibleMapping mapping) {
- return new OrmBaseTemporalConverter.Owner() {
- public void setXmlTemporalType(TemporalType temporalType) {
- mapping.setTemporal(temporalType);
- }
- public TemporalType getXmlTemporalType() {
- return mapping.getTemporal();
- }
- public TextRange getTemporalTextRange() {
- return mapping.getTemporalTextRange();
- }
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
- }
- };
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.java
deleted file mode 100644
index 4ee1e4b385..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.TransientMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient;
-
-/**
- * <code>orm.xml</code> transient "mapping"
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmTransientMapping
- extends TransientMapping, OrmAttributeMapping
-{
- XmlTransient getXmlAttributeMapping();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java
deleted file mode 100644
index 6b4f177fea..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * <code>orm.xml</code> type mapping
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface OrmTypeMapping
- extends TypeMapping, XmlContextNode
-{
- // ********** class **********
-
- /**
- * <strong>NB:</strong> This may be an unqualified name to be prefixed by the
- * entity mappings's package value.
- *
- * @see EntityMappings#getPackage()
- */
- String getClass_();
-
- /**
- * @see #getClass_()
- */
- void setClass(String class_);
- String CLASS_PROPERTY = "class"; //$NON-NLS-1$
-
-
- // ********** metadata complete **********
-
- boolean isMetadataComplete();
- Boolean getSpecifiedMetadataComplete();
- void setSpecifiedMetadataComplete(Boolean metadataComplete);
- String SPECIFIED_METADATA_COMPLETE_PROPERTY = "specifiedMetadataComplete"; //$NON-NLS-1$
-
- /**
- * Override metadata complete is true if the type mapping's persistence
- * unit is marked "XML mapping metadata complete".
- */
- boolean isOverrideMetadataComplete();
- String OVERRIDE_METADATA_COMPLETE_PROPERTY = "overrideMetadataComplete"; //$NON-NLS-1$
-
-
- // ********** parent class **********
-
- /**
- * <strong>NB:</strong> This may be an unqualified name to be prefixed by the
- * entity mappings's package value.
- *
- * @see EntityMappings#getPackage()
- */
- String getParentClass();
-
- String getFullyQualifiedParentClass();
- String FULLY_QUALIFIED_PARENT_CLASS_PROPERTY = "fullyQualifiedParentClass"; //$NON-NLS-1$
-
- String getSpecifiedParentClass();
-
- /**
- * @see #getParentClass()
- */
- void setSpecifiedParentClass(String parentClass);
- String SPECIFIED_PARENT_CLASS_PROPERTY = "specifiedParentClass"; //$NON-NLS-1$
-
- String getDefaultParentClass();
- String DEFAULT_PARENT_CLASS_PROPERTY = "defaultParentClass"; //$NON-NLS-1$
-
-
- // ********** XML **********
-
- /**
- * Type mappings are a sequence in the orm schema. We must keep
- * the list of type mappings in the appropriate order so the wtp xml
- * translators will write them to the xml in that order and they
- * will adhere to the schema.
- * <p>
- * Each concrete implementation must implement this
- * method and return an int that matches its order in the schema.
- */
- int getXmlSequence();
-
- /**
- * Add the type mapping's XML type mapping to the appropriate list
- * in the specified XML entity mappings.
- */
- void addXmlTypeMappingTo(XmlEntityMappings entityMappings);
-
- /**
- * Remove the type mapping's XML type mapping from the appropriate list
- * in the specified XML entity mappings.
- */
- void removeXmlTypeMappingFrom(XmlEntityMappings entityMappings);
-
- XmlTypeMapping getXmlTypeMapping();
-
- TextRange getSelectionTextRange();
-
- TextRange getClassTextRange();
-
- TextRange getAttributesTextRange();
-
- boolean containsOffset(int textOffset);
-
-
- // ********** Java type mapping **********
-
- /**
- * Return the Java type mapping corresponding to the <code>orm.xml</code>
- * type mapping. Return <code>null</code> if there is no such Java type
- * mapping; i.e. it does not exist or it is not the same type of type
- * mapping (entity, mapped superclass, embeddable).
- *
- * @see #getJavaTypeMappingForDefaults()
- */
- JavaTypeMapping getJavaTypeMapping();
-
- /**
- * Check "metadata complete" before returning the Java type mapping.
- * For <code>orm.xml</code> defaults, if "metadata complete" is
- * <code>true</code>, return <code>null</code>.
- *
- * @see #getJavaTypeMapping()
- */
- JavaTypeMapping getJavaTypeMappingForDefaults();
-
-
- // ********** refactoring **********
-
- /**
- * Create a text DeleteEdit for deleting the type mapping element and any text that precedes it
- */
- DeleteEdit createDeleteEdit();
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-
-
- // ********** misc **********
-
- OrmPersistentType getPersistentType();
-
- void initializeFrom(OrmTypeMapping oldMapping);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java
deleted file mode 100644
index fef4b7d092..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-
-/**
- * Part of mechanism to extend the types of <code>orm.xml</code> type mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmTypeMappingDefinition
-{
- /**
- * Return the definition's mapping key.
- * @see MappingKeys
- */
- String getKey();
-
- /**
- * Build a resource mapping using the specifed factory.
- */
- XmlTypeMapping buildResourceMapping(EFactory factory);
-
- /**
- * Build a context mapping for the specified parent and resource mapping,
- * using the specified factory.
- */
- OrmTypeMapping buildContextMapping(
- OrmPersistentType parent,
- XmlTypeMapping resourceMapping,
- OrmXmlContextNodeFactory factory);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.java
deleted file mode 100644
index a71e6b033f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
-
-/**
- * <code>orm.xml</code> unique constraint
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface OrmUniqueConstraint
- extends UniqueConstraint, OrmReadOnlyUniqueConstraint
-{
- XmlUniqueConstraint getXmlUniqueConstraint();
-
- // ****** metadata conversion ****
- /**
- * Build up a mapping file unique constraint
- * from the given Java unique constraint
- */
- void convertFrom(JavaUniqueConstraint javaUniqueConstraint);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.java
deleted file mode 100644
index 4f29cf3fd2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VersionMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
-
-/**
- * <code>orm.xml</code> version mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface OrmVersionMapping
- extends VersionMapping, OrmColumnMapping, OrmConvertibleMapping
-{
- XmlVersion getXmlAttributeMapping();
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.java
deleted file mode 100644
index 4023c5ab17..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualAssociationOverride;
-
-/**
- * <code>orm.xml</code> <em>virtual</em> association override
- * <p>
- * 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.
- */
-public interface OrmVirtualAssociationOverride
- extends VirtualAssociationOverride,
- OrmVirtualOverride,
- OrmReadOnlyAssociationOverride
-{
- OrmVirtualOverrideRelationship getRelationship();
-
- OrmAssociationOverride convertToSpecified();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.java
deleted file mode 100644
index 407053f9cd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualAttributeOverride;
-
-/**
- * Java <em>virtual</em> attribute override
- * <p>
- * 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.
- */
-public interface OrmVirtualAttributeOverride
- extends VirtualAttributeOverride,
- OrmVirtualOverride,
- OrmReadOnlyAttributeOverride
-{
- OrmAttributeOverride convertToSpecified();
-
- OrmVirtualColumn getColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
deleted file mode 100644
index 1deafbb7a2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualColumn;
-
-/**
- * <code>orm.xml</code> virtual column
- * <p>
- * 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.
- */
-public interface OrmVirtualColumn
- extends VirtualColumn, OrmReadOnlyBaseColumn
-{
- /**
- * The overridden column can be either a Java join column or an
- * <code>orm.xml</code> join column; so we don't change the return type
- * here.
- */
- ReadOnlyColumn getOverriddenColumn();
-
-
- // ********** owner **********
-
- interface Owner
- extends VirtualColumn.Owner, OrmReadOnlyBaseColumn.Owner
- {
- /**
- * The overridden column can be either a Java column or an
- * <code>orm.xml</code> column; so we don't change the return type here.
- */
- ReadOnlyColumn resolveOverriddenColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java
deleted file mode 100644
index 3c6f174550..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualJoinColumn;
-
-/**
- * <code>orm.xml</code> virtual join column
- * <p>
- * 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.
- */
-public interface OrmVirtualJoinColumn
- extends VirtualJoinColumn, OrmReadOnlyJoinColumn
-{
- /**
- * The overridden join column can be either a Java join column or an
- * <code>orm.xml</code> join column; so we don't change the return type
- * here.
- */
- ReadOnlyJoinColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.java
deleted file mode 100644
index d2d4154496..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationship;
-
-/**
- * <code>orm.xml</code> virtual join column relationship
- * <p>
- * 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.
- */
-public interface OrmVirtualJoinColumnRelationship
- extends VirtualJoinColumnRelationship,
- OrmVirtualRelationship
-{
- OrmVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.java
deleted file mode 100644
index f938095e33..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> virtual join column relationship strategy.
- * <p>
- * 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.
- */
-public interface OrmVirtualJoinColumnRelationshipStrategy
- extends VirtualJoinColumnRelationshipStrategy, OrmVirtualRelationshipStrategy
-{
- ListIterable<OrmVirtualJoinColumn> getJoinColumns();
- ListIterable<OrmVirtualJoinColumn> getSpecifiedJoinColumns();
- OrmVirtualJoinColumn getSpecifiedJoinColumn(int index);
- OrmVirtualJoinColumn getDefaultJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java
deleted file mode 100644
index 2a200360fb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTable;
-
-/**
- * <code>orm.xml</code> virtual join table
- * <p>
- * 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.
- */
-public interface OrmVirtualJoinTable
- extends VirtualJoinTable, OrmReadOnlyTable
-{
- OrmVirtualJoinTableRelationshipStrategy getParent();
-
- ListIterable<OrmVirtualUniqueConstraint> getUniqueConstraints();
- OrmVirtualUniqueConstraint getUniqueConstraint(int index);
-
- ListIterable<OrmVirtualJoinColumn> getJoinColumns();
- ListIterable<OrmVirtualJoinColumn> getSpecifiedJoinColumns();
- OrmVirtualJoinColumn getSpecifiedJoinColumn(int index);
- OrmVirtualJoinColumn getDefaultJoinColumn();
-
- ListIterable<OrmVirtualJoinColumn> getInverseJoinColumns();
- ListIterable<OrmVirtualJoinColumn> getSpecifiedInverseJoinColumns();
- OrmVirtualJoinColumn getSpecifiedInverseJoinColumn(int index);
- OrmVirtualJoinColumn getDefaultInverseJoinColumn();
-
- /**
- * The overridden table can be either a Java table
- * or an <code>orm.xml</code> table; so we don't change the
- * return type here.
- */
- public ReadOnlyJoinTable getOverriddenTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.java
deleted file mode 100644
index b5b58c4bfc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationship;
-
-/**
- * <code>orm.xml</code> virtual join table relationship
- * <p>
- * 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.
- */
-public interface OrmVirtualJoinTableRelationship
- extends VirtualJoinTableRelationship,
- OrmVirtualRelationship
-{
- OrmVirtualJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.java
deleted file mode 100644
index 2072e72dd5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,27 +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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> virtual join table relationship strategy.
- * <p>
- * 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.
- */
-public interface OrmVirtualJoinTableRelationshipStrategy
- extends VirtualJoinTableRelationshipStrategy, OrmVirtualRelationshipStrategy
-{
- OrmVirtualJoinTable getJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.java
deleted file mode 100644
index 92abbba1d7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-
-/**
- * <code>orm.xml</code> <em>virtual</em><ul>
- * <li>attribute override
- * <li>association override
- * </ul>
- * 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.
- */
-public interface OrmVirtualOverride
- extends VirtualOverride, OrmReadOnlyOverride
-{
- OrmOverride convertToSpecified();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.java
deleted file mode 100644
index aae36353b0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualOverrideRelationship;
-
-/**
- * <code>orm.xml</code> virtual association override relationship
- * <p>
- * 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.
- */
-public interface OrmVirtualOverrideRelationship
- extends VirtualOverrideRelationship,
- OrmVirtualJoinColumnRelationship
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.java
deleted file mode 100644
index 77388244a9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-
-/**
- * <code>orm.xml</code> virtual primary key join column. This represents
- * a default column taken from the Java entity.
- * <p>
- * 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.
- */
-public interface OrmVirtualPrimaryKeyJoinColumn
- extends VirtualPrimaryKeyJoinColumn, OrmReadOnlyBaseJoinColumn
-{
- /**
- * This is not the best method name; we are simply overloading the meaning
- * of the inherited method. A better method name would be something like
- * <code>getJavaColumn()</code>
- */
- JavaPrimaryKeyJoinColumn getOverriddenColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java
deleted file mode 100644
index 7738e2e999..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualRelationship;
-
-/**
- * <code>orm.xml</code> virtual relationship
- * <p>
- * 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.
- */
-public interface OrmVirtualRelationship
- extends VirtualRelationship, OrmReadOnlyRelationship
-{
- OrmVirtualRelationshipStrategy getStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java
deleted file mode 100644
index 08c209b2c3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.VirtualRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> virtual strategy
- * <p>
- * 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.
- */
-public interface OrmVirtualRelationshipStrategy
- extends VirtualRelationshipStrategy, OrmReadOnlyRelationshipStrategy
-{
- OrmVirtualRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java
deleted file mode 100644
index 937913dd5b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.VirtualSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-
-/**
- * <code>orm.xml</code> virtual secondary table
- * <p>
- * 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.
- */
-public interface OrmVirtualSecondaryTable
- extends VirtualSecondaryTable, OrmReadOnlyTable
-{
- ListIterable<OrmVirtualPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
- ListIterable<OrmVirtualPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns();
- OrmVirtualPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
-
- JavaSecondaryTable getOverriddenTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java
deleted file mode 100644
index 2e2c1ad703..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.VirtualUniqueConstraint;
-
-/**
- * <code>orm.xml</code> virtual database unique constraint
- * <p>
- * 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.
- */
-public interface OrmVirtualUniqueConstraint
- extends VirtualUniqueConstraint, OrmReadOnlyUniqueConstraint
-{
- /**
- * The overridden unique constraint can be either a Java unique constraint
- * or an <code>orm.xml</code> unique constraint; so we don't change the
- * return type here.
- */
- ReadOnlyUniqueConstraint getOverriddenUniqueConstraint();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java
deleted file mode 100644
index 0b4a509790..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.MappingFile;
-
-/**
- * JPA <code>orm.xml</code> file.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface OrmXml
- extends MappingFile
-{
- // ********** root **********
-
- /**
- * String constant associated with changes to the
- * <code>entity-mappings</code> property
- */
- String ROOT_PROPERTY = "root"; //$NON-NLS-1$
-
- /**
- * Covariant override.
- */
- EntityMappings getRoot();
-
- OrmPersistentType getPersistentType(String name);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
deleted file mode 100644
index c040b94603..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.orm;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlId;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
-
-/**
- * <code>orm.xml</code> context node factory
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-// TODO bjv we need a factory interface for a 1.0 orm.xml in a 2.0 project...
-// since it must return slightly different objects (e.g. 2.0 attribute mappings)
-// OrmXml1_0ContextNodeFactory2_0 ?
-public interface OrmXmlContextNodeFactory
-{
- EntityMappings buildEntityMappings(OrmXml parent, XmlEntityMappings entityMappings);
-
- OrmPersistenceUnitMetadata buildOrmPersistenceUnitMetadata(EntityMappings parent);
-
- OrmPersistenceUnitDefaults buildOrmPersistenceUnitDefaults(OrmPersistenceUnitMetadata parent);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.PersistentType2_0#getDeclaringTypeName()
- */
- OrmPersistentType buildOrmPersistentType(EntityMappings parent, XmlTypeMapping resourceMapping);
-
- OrmEntity buildOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping);
-
- OrmMappedSuperclass buildOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping);
-
- OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0
- */
- OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentType parent, XmlAttributeMapping xmlMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0
- */
- OrmReadOnlyPersistentAttribute buildVirtualOrmPersistentField(OrmPersistentType parent, JavaResourceField javaResourceField);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0
- */
- OrmReadOnlyPersistentAttribute buildVirtualOrmPersistentProperty(OrmPersistentType parent, JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter);
-
- OrmTable buildOrmTable(OrmEntity parent, Table.Owner owner);
-
- OrmSecondaryTable buildOrmSecondaryTable(OrmEntity parent, Table.Owner owner, XmlSecondaryTable xmlSecondaryTable);
-
- OrmVirtualSecondaryTable buildOrmVirtualSecondaryTable(OrmEntity parent, ReadOnlyTable.Owner owner, JavaSecondaryTable javaSecondaryTable);
-
- OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn);
-
- OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn);
-
- OrmJoinTable buildOrmJoinTable(OrmJoinTableRelationshipStrategy parent, Table.Owner owner);
-
- OrmVirtualJoinTable buildOrmVirtualJoinTable(OrmVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable);
-
- OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn);
-
- OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
-
- OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner);
-
- OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner);
-
- OrmAttributeOverride buildOrmAttributeOverride(OrmAttributeOverrideContainer parent, XmlAttributeOverride xmlOverride);
-
- OrmVirtualAttributeOverride buildOrmVirtualAttributeOverride(OrmAttributeOverrideContainer parent, String name);
-
- OrmAssociationOverride buildOrmAssociationOverride(OrmAssociationOverrideContainer parent, XmlAssociationOverride xmlOverride);
-
- OrmVirtualAssociationOverride buildOrmVirtualAssociationOverride(OrmAssociationOverrideContainer parent, String name);
-
- OrmOverrideRelationship buildOrmOverrideRelationship(OrmAssociationOverride parent);
-
- OrmVirtualOverrideRelationship buildOrmVirtualOverrideRelationship(OrmVirtualAssociationOverride parent);
-
- OrmDiscriminatorColumn buildOrmDiscriminatorColumn(OrmEntity parent, OrmDiscriminatorColumn.Owner owner);
-
- OrmColumn buildOrmColumn(XmlContextNode parent, OrmColumn.Owner owner);
-
- OrmVirtualColumn buildOrmVirtualColumn(XmlContextNode parent, OrmVirtualColumn.Owner owner);
-
- OrmGeneratedValue buildOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue resourceGeneratedValue);
-
- OrmGeneratorContainer buildOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer resourceGeneratorContainer);
-
- OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator);
-
- OrmTableGenerator buildOrmTableGenerator(XmlContextNode parent, XmlTableGenerator resourceTableGenerator);
-
- OrmQueryContainer buildOrmQueryContainer(XmlContextNode parent, XmlQueryContainer resourceQueryContainer);
-
- OrmNamedNativeQuery buildOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery resourceNamedQuery);
-
- OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery);
-
- OrmQueryHint buildOrmQueryHint(OrmQuery parent, XmlQueryHint resourceQueryhint);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmBasicMapping buildOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmManyToManyMapping buildOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmOneToManyMapping buildOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmManyToOneMapping buildOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmOneToOneMapping buildOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmEmbeddedIdMapping buildOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmEmbeddedMapping buildOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmIdMapping buildOrmIdMapping(OrmPersistentAttribute parent, XmlId resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmTransientMapping buildOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmVersionMapping buildOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmAttributeMapping buildOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping);
-
- /**
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmAttributeMapping buildUnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping);
-
- OrmUniqueConstraint buildOrmUniqueConstraint(XmlContextNode parent, UniqueConstraint.Owner owner, XmlUniqueConstraint resourceUniqueConstraint);
-
- OrmVirtualUniqueConstraint buildOrmVirtualUniqueConstraint(XmlContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint);
-
- OrmConverter buildOrmBaseEnumeratedConverter(OrmAttributeMapping parent, OrmBaseEnumeratedConverter.Owner owner);
-
- OrmConverter buildOrmBaseTemporalConverter(OrmAttributeMapping parent, OrmBaseTemporalConverter.Owner owner);
-
- OrmConverter buildOrmLobConverter(OrmAttributeMapping parent, OrmConverter.Owner owner);
-
- /**
- * JPA 1.0 only
- * <p>
- * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project
- * must build objects that implement the appropriate behavior.
- * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0
- */
- OrmOrderable buildOrmOrderable(OrmAttributeMapping parent);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java
deleted file mode 100644
index 7ed177a093..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <code>orm.xml</code> definition
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmXmlDefinition
- extends MappingFileDefinition
-{
- /**
- * Return the factory for building XML resource nodes.
- */
- EFactory getResourceNodeFactory();
-
- /**
- * Return the factory for building XML context nodes.
- */
- OrmXmlContextNodeFactory getContextNodeFactory();
-
-
- // ********** type/attribute mappings **********
-
- /**
- * Return a type mapping definiton for the specified mapping key.
- * @throws IllegalArgumentException if the mapping key is not
- * supported
- */
- OrmTypeMappingDefinition getTypeMappingDefinition(String mappingKey);
-
- /**
- * Return an attribute mapping definiton for the specified mapping key.
- * Never return <code>null</code>.
- */
- OrmAttributeMappingDefinition getAttributeMappingDefinition(String mappingKey);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java
deleted file mode 100644
index 1275887f77..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public class UnsupportedOrmAttributeMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new UnsupportedOrmAttributeMappingDefinition();
-
-
- /**
- * Return the singleton.
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private UnsupportedOrmAttributeMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- throw new UnsupportedOperationException();
- }
-
- public OrmAttributeMapping buildContextMapping(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping, OrmXmlContextNodeFactory factory) {
- return factory.buildUnsupportedOrmAttributeMapping(parent, (XmlNullAttributeMapping) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java
deleted file mode 100644
index 76a81be189..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.persistence;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.AbstractTransformer;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Context model corresponding to the XML resource model
- * {@link XmlJavaClassRef}, which corresponds to the <code>class<code> element
- * in the <code>persistence.xml</code> file.
- * This is also used for "implied" class refs; i.e. class refs that are not
- * explicitly listed in the <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface ClassRef
- extends XmlContextNode, JpaStructureNode, PersistentType.Owner
-{
- /**
- * Return whether the class ref is a reference to the specified type.
- */
- boolean isFor(String typeName);
-
- /**
- * Return <code>true</code> if the mapping file ref is <em>virtual</em>;
- * return <code>false</code> if the mapping file ref is represented by an
- * entry in the <code>persistence.xml</code> file.
- */
- boolean isVirtual();
-
- /**
- * Return the class ref's corresponding resource class ref.
- * This is <code>null</code> for <em>implied</em> class refs.
- */
- XmlJavaClassRef getXmlClassRef();
-
- /**
- * Return whether the text representation of this persistence unit contains
- * the given text offset
- */
- boolean containsOffset(int textOffset);
-
-
- // ********** class name **********
-
- /**
- * String constant associated with changes to the class name
- */
- final static String CLASS_NAME_PROPERTY = "className"; //$NON-NLS-1$
-
- /**
- * Return the class name of the class ref.
- */
- String getClassName();
-
- /**
- * Set the class name of the class ref.
- */
- void setClassName(String className);
-
-
- // ********** java persistent type **********
-
- /**
- * String constant associated with changes to the java persistent type
- */
- final static String JAVA_PERSISTENT_TYPE_PROPERTY = "javaPersistentType"; //$NON-NLS-1$
-
- /**
- * Return the JavaPersistentType that corresponds to this IClassRef.
- * This can be null.
- * This is not settable by users of this API.
- */
- JavaPersistentType getJavaPersistentType();
-
- Transformer<ClassRef, JavaPersistentType> JAVA_PERSISTENT_TYPE_TRANSFORMER = new JavaPersistentTypeTransformer();
-
- class JavaPersistentTypeTransformer
- extends AbstractTransformer<ClassRef, JavaPersistentType>
- {
- @Override
- protected JavaPersistentType transform_(ClassRef ref) {
- return ref.getJavaPersistentType();
- }
- }
-
-
- // ********** refactoring **********
-
- /**
- * If this {@link #isFor(String)} the given IType, create a text
- * DeleteEdit for deleting the class element and any text that precedes it.
- * Otherwise return an EmptyIterable.
- * Though this will contain 1 or 0 DeleteEdits, using an Iterable
- * for ease of use with other createDeleteEdit API.
- */
- Iterable<DeleteEdit> createDeleteTypeEdits(IType type);
-
- /**
- * Create ReplaceEdits for renaming the class element to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- * If this ClassRef does not match the original type, then return an empty Iterable.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming the class's package to the newName.
- * The originalPackage has not yet been renamed.
- * If this class is not a part of the original package, then return an empty Iterable.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java
deleted file mode 100644
index 363d9f6996..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.context.persistence;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.jpt.common.utility.internal.AbstractTransformer;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JarFile;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Context model corresponding to the
- * XML resource model {@link XmlJarFileRef},
- * which corresponds to the <code>jar-file</code>
- * element in the <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface JarFileRef
- extends XmlContextNode, JpaStructureNode, PersistentTypeContainer
-{
- // ********** file name **********
-
- /**
- * String constant associated with changes to the file name.
- */
- String FILE_NAME_PROPERTY = "fileName"; //$NON-NLS-1$
-
- /**
- * Return the file name of the jar file ref.
- */
- String getFileName();
-
- /**
- * Set the file name of the jar file ref.
- */
- void setFileName(String fileName);
-
-
- // ********** JAR file **********
-
- /**
- * String constant associated with changes to the JAR file.
- */
- String JAR_FILE_PROPERTY = "jarFile"; //$NON-NLS-1$
-
- /**
- * Return the JAR file ref's JAR file corresponding to the file name.
- */
- JarFile getJarFile();
-
- Transformer<JarFileRef, JarFile> JAR_FILE_TRANSFORMER = new JarFileTransformer();
-
- class JarFileTransformer
- extends AbstractTransformer<JarFileRef, JarFile>
- {
- @Override
- protected JarFile transform_(JarFileRef ref) {
- return ref.getJarFile();
- }
- }
-
-
- // ********** refactoring **********
-
- /**
- * Create ReplaceEdits for renaming any references to the originalFolder to the newName.
- * The originalFolder has not yet been renamed.
- */
- Iterable<ReplaceEdit> createReplaceFolderEdits(IFolder originalFolder, String newName);
-
-
- // ********** misc **********
-
- XmlJarFileRef getXmlJarFileRef();
-
- /**
- * Return whether the text representation of the JAR file ref contains
- * the specified text offset.
- */
- boolean containsOffset(int textOffset);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java
deleted file mode 100644
index 0c25241a99..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.persistence;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.AbstractTransformer;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.MappingFile;
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Context model corresponding to the
- * XML resource model {@link XmlMappingFileRef},
- * which corresponds to the <code>mapping-file</code> element
- * in the <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.0
- */
-public interface MappingFileRef
- extends XmlContextNode, JpaStructureNode, PersistentTypeContainer
-{
- /**
- * Covariant override.
- */
- PersistenceUnit getParent();
-
-
- // ********** file name **********
-
- /**
- * String constant associated with changes to the file name.
- */
- String FILE_NAME_PROPERTY = "fileName"; //$NON-NLS-1$
-
- /**
- * Return the file name of the mapping file ref.
- */
- String getFileName();
-
- /**
- * Set the file name of the mapping file ref.
- */
- void setFileName(String fileName);
-
- /**
- * Return whether the mapping file ref is a reference to the specified file.
- */
- boolean isFor(IFile file);
-
-
- // ********** mapping file (orm.xml) **********
-
- /**
- * String constant associated with changes to the mapping file.
- */
- String MAPPING_FILE_PROPERTY = "mappingFile"; //$NON-NLS-1$
-
- /**
- * Return mapping file corresponding to the mapping file ref's file name.
- * This can be <code>null</code> if the file name is invalid.
- */
- MappingFile getMappingFile();
-
- Transformer<MappingFileRef, MappingFile> MAPPING_FILE_TRANSFORMER = new MappingFileTransformer();
-
- class MappingFileTransformer
- extends AbstractTransformer<MappingFileRef, MappingFile>
- {
- @Override
- protected MappingFile transform_(MappingFileRef ref) {
- return ref.getMappingFile();
- }
- }
-
-
- // ********** persistence unit metadata **********
-
- /**
- * Return the mapping file's persistence unit metadata.
- */
- MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata();
-
- /**
- * Return whether the mapping file's persistence unit metadata exist.
- */
- boolean persistenceUnitMetadataExists();
-
-
- // ********** misc **********
-
- /**
- * Return the mapping file ref's corresponding XML mapping file ref.
- */
- XmlMappingFileRef getXmlMappingFileRef();
-
- /**
- * Return whether the mapping file ref is "implied" by (as opposed to
- * explicitly specified in) the <code>persistence.xml</code>.
- */
- boolean isImplied();
-
- /**
- * Return whether the specified text offset is within
- * the text representation of the mapping file.
- */
- boolean containsOffset(int textOffset);
-
- /**
- * @see MappingFile#getMappingFileQueries()
- */
- Iterable<Query> getMappingFileQueries();
-
- /**
- * @see MappingFile#getMappingFileGenerators()
- */
- Iterable<Generator> getMappingFileGenerators();
-
-
- // ********** refactoring **********
-
- /**
- * Create DeleteEdits for deleting any references to the given type
- * that is about to be deleted.
- * Return an EmptyIterable if there are not any references to the given type.
- */
- Iterable<DeleteEdit> createDeleteTypeEdits(IType type);
-
- /**
- * If this {@link #isFor(IFile)} the given IFile, create a text
- * DeleteEdit for deleting the mapping file element and any text that precedes it
- * from the persistence.xml.
- * Otherwise return an EmptyIterable.
- * Though this will contain 1 or 0 DeleteEdits, using an Iterable
- * for ease of use with other createDeleteEdit API.
- */
- Iterable<DeleteEdit> createDeleteMappingFileEdits(IFile file);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalFolder to the newName.
- * The originalFolder has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenameFolderEdits(IFolder originalFolder, String newName);
-
- /**
- * If this {@link #isFor(IFile)} the given IFile, create a text
- * ReplaceEdit for renaming the mapping file element to the new name.
- * Otherwise return an EmptyIterable.
- * Though this will contain 1 or 0 ReplaceEdits, using an Iterable
- * for ease of use with other createReplaceMappingFileEdits API.
- */
- Iterable<ReplaceEdit> createRenameMappingFileEdits(IFile originalFile, String newName);
-
- /**
- * If this {@link #isFor(IFile)} the given IFile create a text
- * ReplaceEdit for moving the originalFile to the destination.
- * Otherwise return an EmptyIterable.
- * The originalFile has not been moved yet.
- */
- Iterable<ReplaceEdit> createMoveMappingFileEdits(IFile originalFile, IPath runtineDestination);
-
- /**
- * Create ReplaceEdits for moving any references to the originalFolder to the runtimeDestination.
- * The runtimeDestination already includes the original folder name.
- */
- Iterable<ReplaceEdit> createMoveFolderEdits(IFolder originalFolder, IPath runtimeDestination);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java
deleted file mode 100644
index df47dbee8c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.persistence;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.JpaXmlStructureNode;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-
-/**
- * Context model corresponding to the XML resource model {@link XmlPersistence},
- * which corresponds to the <code>persistence</code> element in the
- * <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface Persistence
- extends XmlContextNode, JpaXmlStructureNode
-{
- /**
- * Return the resource model object associated with this context model object
- */
- XmlPersistence getXmlPersistence();
-
- /**
- * Covariant override.
- */
- PersistenceXml getParent();
-
- PersistenceXml getPersistenceXml();
-
-
- // ********** persistence units **********
-
- /**
- * String constant associated with changes to the persistence units list
- */
- String PERSISTENCE_UNITS_LIST = "persistenceUnits"; //$NON-NLS-1$
-
- /**
- * Return the persistence element's persistence units.
- */
- ListIterable<PersistenceUnit> getPersistenceUnits();
-
- /**
- * Return the number of persistence units.
- */
- int getPersistenceUnitsSize();
-
- /**
- * Return the persistence unit at the specified index.
- */
- PersistenceUnit getPersistenceUnit(int index);
-
- /**
- * Add a persistence unit and return it.
- */
- PersistenceUnit addPersistenceUnit();
-
- /**
- * Add a persistence unit at the specified index and return it.
- */
- PersistenceUnit addPersistenceUnit(int index);
-
- /**
- * Remove the specified persistence unit from the persistence node.
- */
- void removePersistenceUnit(PersistenceUnit persistenceUnit);
-
- /**
- * Remove the persistence unit at the specified index from the persistence node.
- */
- void removePersistenceUnit(int index);
-
-
- // ********** text range **********
-
- /**
- * Return whether the text representation of this persistence contains
- * the specified text offset.
- */
- boolean containsOffset(int textOffset);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java
deleted file mode 100644
index d8560f5714..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java
+++ /dev/null
@@ -1,857 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.context.persistence;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Context model corresponding to the XML resource model {@link XmlPersistenceUnit},
- * which corresponds to the <code>persistence-unit</code> element in the
- * <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.0
- */
-public interface PersistenceUnit
- extends XmlContextNode, JpaStructureNode, PersistentTypeContainer
-{
- /**
- * Covariant override.
- */
- Persistence getParent();
-
-
- // ********** name **********
-
- /**
- * String constant associated with changes to the persistence unit's name.
- */
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's name.
- */
- String getName();
-
- /**
- * Set the persistence unit's name.
- */
- void setName(String name);
-
-
- // ********** transaction type **********
-
- /**
- * Creates a new {@link JpaJpqlQueryHelper} that provides functionality related to JPQL queries.
- */
- JpaJpqlQueryHelper createJpqlQueryHelper();
-
-
- // ********** transaction type **********
-
- /**
- * Return the persistence unit's transaction type,
- * whether specified or defaulted.
- */
- PersistenceUnitTransactionType getTransactionType();
-
- /**
- * String constant associated with changes to the persistence unit's
- * specified transaction type
- */
- String SPECIFIED_TRANSACTION_TYPE_PROPERTY = "specifiedTransactionType"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's specified transaction type.
- */
- PersistenceUnitTransactionType getSpecifiedTransactionType();
-
- /**
- * Set the persistence unit's specified transaction type.
- */
- void setSpecifiedTransactionType(PersistenceUnitTransactionType transactionType);
-
- /**
- * String constant associated with changes to the persistence unit's
- * default transaction type (not typically changed).
- */
- String DEFAULT_TRANSACTION_TYPE_PROPERTY = "defaultTransactionType"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's default transaction type.
- */
- PersistenceUnitTransactionType getDefaultTransactionType();
-
-
- // ********** description **********
-
- /**
- * String constant associated with changes to the persistence unit's description.
- */
- String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's description.
- */
- String getDescription();
-
- /**
- * Set the persistence unit's description.
- */
- void setDescription(String description);
-
-
- // ********** provider **********
-
- /**
- * String constant associated with changes to the persistence unit's provider.
- */
- String PROVIDER_PROPERTY = "provider"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's provider.
- */
- String getProvider();
-
- /**
- * Set the persistence unit's provider.
- */
- void setProvider(String provider);
-
-
- // ********** JTA data source **********
-
- /**
- * String constant associated with changes to the persistence unit's JTA data source
- */
- String JTA_DATA_SOURCE_PROPERTY = "jtaDataSource"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's JTA data source.
- */
- String getJtaDataSource();
-
- /**
- * Set the persistence unit's JTA data source.
- */
- void setJtaDataSource(String jtaDataSource);
-
-
- // ********** non-JTA data source **********
-
- /**
- * String constant associated with changes to the persistence unit's non-JTA data source
- */
- String NON_JTA_DATA_SOURCE_PROPERTY = "nonJtaDataSource"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's non-JTA data source.
- */
- String getNonJtaDataSource();
-
- /**
- * Set the persistence unit's non-JTA data source.
- */
- void setNonJtaDataSource(String nonJtaDataSource);
-
-
- // ********** mapping file refs **********
-
- /**
- * Return the persistence unit's list of mapping file refs,
- * both specified and implied.
- */
- ListIterable<MappingFileRef> getMappingFileRefs();
-
- /**
- * Return the size of the persistence unit's list of mapping file refs,
- * both specified and implied.
- */
- int getMappingFileRefsSize();
-
- /**
- * Return all the mapping file refs, both specified and implied,
- * containing the specified type.
- */
- Iterable<MappingFileRef> getMappingFileRefsContaining(String typeName);
-
-
- // ********** specified mapping file refs **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * specified mapping file refs.
- */
- String SPECIFIED_MAPPING_FILE_REFS_LIST = "specifiedMappingFileRefs"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's list of specified mapping file refs.
- */
- ListIterable<MappingFileRef> getSpecifiedMappingFileRefs();
-
- /**
- * Return the size of the persistence unit's list of specified mapping file refs.
- */
- int getSpecifiedMappingFileRefsSize();
-
- /**
- * Add a new specified mapping file ref to the persistence unit;
- * return the newly-created mapping file ref.
- */
- MappingFileRef addSpecifiedMappingFileRef(String fileName);
-
- /**
- * Add a new specified mapping file ref to the persistence unit at the specified index;
- * return the newly-created mapping file ref.
- */
- MappingFileRef addSpecifiedMappingFileRef(int index, String fileName);
-
- /**
- * Remove the specified mapping file ref from the persistence unit.
- */
- void removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef);
-
- /**
- * Remove the specified mapping file ref at the specified index from the persistence unit.
- */
- void removeSpecifiedMappingFileRef(int index);
-
-
- // ********** implied mapping file ref **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * implied mapping file ref.
- */
- String IMPLIED_MAPPING_FILE_REF_PROPERTY = "impliedMappingFileRef"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's implied mapping file ref.
- */
- MappingFileRef getImpliedMappingFileRef();
-
-
- // ********** jar file refs **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * JAR file refs.
- */
- String JAR_FILE_REFS_LIST = "jarFileRefs"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's list of JAR file refs.
- */
- ListIterable<JarFileRef> getJarFileRefs();
-
- /**
- * Return the size of the persistence unit's list of JAR file refs.
- */
- int getJarFileRefsSize();
-
- /**
- * Add a new JAR file ref to the persistence unit;
- * return the newly-created JAR file ref.
- */
- JarFileRef addJarFileRef(String fileName);
-
- /**
- * Add a new JAR file ref to the persistence unit at the specified index;
- * return the newly-created JAR file ref.
- */
- JarFileRef addJarFileRef(int index, String fileName);
-
- /**
- * Remove the specified JAR file ref from the persistence unit.
- */
- void removeJarFileRef(JarFileRef jarFileRef);
-
- /**
- * Remove the JAR file ref at the specified index from the persistence unit.
- */
- void removeJarFileRef(int index);
-
-
- // ********** class refs **********
-
- /**
- * Return the persistence unit's list of class refs,
- * both specified and implied.
- */
- Iterable<ClassRef> getClassRefs();
-
- /**
- * Return the size of the persistence unit's list of class refs,
- * both specified and implied.
- */
- int getClassRefsSize();
-
-
- // ********** specified class refs **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * specified class refs.
- */
- String SPECIFIED_CLASS_REFS_LIST = "specifiedClassRefs"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's list of specified class refs.
- */
- ListIterable<ClassRef> getSpecifiedClassRefs();
-
- /**
- * Return the size of the persistence unit's list of specified mapping file refs.
- */
- int getSpecifiedClassRefsSize();
-
- /**
- * Add a new specified class ref to the persistence unit;
- * return the newly-created class ref.
- */
- ClassRef addSpecifiedClassRef(String className);
-
- /**
- * Add a new specified class ref to the persistence unit at the specified index;
- * return the newly-created class ref.
- */
- ClassRef addSpecifiedClassRef(int index, String className);
-
- /**
- * Remove the specified class ref from the persistence unit.
- */
- void removeSpecifiedClassRef(ClassRef classRef);
-
- /**
- * Remove the specified class ref at the specified index from the persistence unit.
- */
- void removeSpecifiedClassRef(int index);
-
-
- // ********** implied class refs **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * implied class refs.
- */
- String IMPLIED_CLASS_REFS_COLLECTION = "impliedClassRefs"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's list of implied class refs.
- */
- Iterable<ClassRef> getImpliedClassRefs();
-
- /**
- * Return the size of the persistence unit's list of implied class refs.
- */
- int getImpliedClassRefsSize();
-
-
- // ********** exclude unlisted classes **********
-
- /**
- * Return whether the persistence unit excludes unlisted classes.
- */
- boolean excludesUnlistedClasses();
-
- /**
- * String constant associated with changes to the persistence unit's
- * "exclude unlisted classes" flag.
- */
- String SPECIFIED_EXCLUDE_UNLISTED_CLASSES_PROPERTY = "specifiedExcludeUnlistedClasses"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's specified "exclude unlisted classes" flag.
- */
- Boolean getSpecifiedExcludeUnlistedClasses();
-
- /**
- * Set the persistence unit's specified "exclude unlisted classes" flag.
- */
- void setSpecifiedExcludeUnlistedClasses(Boolean excludeUnlistedClasses);
-
- /**
- * String constant associated with changes to the persistence unit's
- * default "exclude unlisted classes" flag (not typically changed).
- */
- String DEFAULT_EXCLUDE_UNLISTED_CLASSES_PROPERTY = "defaultExcludeUnlistedClasses"; //$NON-NLS-1$
-
- /**
- * Return whether the persistence unit excludes unlisted classes by default.
- */
- boolean getDefaultExcludeUnlistedClasses();
-
-
- // ********** properties **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * properties.
- */
- String PROPERTIES_LIST = "properties"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's list of properties.
- */
- ListIterable<Property> getProperties();
-
- /**
- * Return the size of the persistence unit's list of properties.
- */
- int getPropertiesSize();
-
- /**
- * Return the *first* property in the persistence unit's property list with
- * the specified name. Return null if the list does not contain a property
- * with the specified name.
- */
- Property getProperty(String propertyName);
-
- /**
- * Return all the properties in the persistence unit with the specified
- * name. Return an empty Iterable if the persistence unit does not contain
- * a property with the specified name.
- */
- Iterable<Property> getPropertiesNamed(String propertyName);
-
- /**
- * Return the persistence unit's properties with names beginning with the
- * specified prefix.
- */
- Iterable<Property> getPropertiesWithNamePrefix(String propertyNamePrefix);
-
- /**
- * Add a new property to the persistence unit;
- * return the newly-created property.
- */
- Property addProperty();
-
- /**
- * Add a new property to the persistence unit at the specified index;
- * return the newly-created property.
- */
- Property addProperty(int index);
-
- /**
- * Set the value of the *first* property in the persistence unit's property
- * list with the specified name to the specified value, creating a new
- * property if one does not already exist. If a property exists and the
- * specified value is null, the existing property is removed.
- */
- void setProperty(String propertyName, String value);
-
- /**
- * Set the value of the property with the specified name, creating a new
- * property if one does not exist or if the specified flag indicates
- * duplicate property names are allowed. If a property exists and duplicate
- * values are not allowed and the specified value is null, the existing
- * property is removed.
- */
- void setProperty(String propertyName, String value, boolean duplicatePropertyNamesAllowed);
-
- /**
- * Remove the specified property from the persistence unit.
- */
- void removeProperty(Property property);
-
- /**
- * Remove the *first* property in the persistence unit's property list
- * with the specified name.
- */
- void removeProperty(String propertyName);
-
- /**
- * Remove the *first* property in the persistence unit's property list
- * with the specified name and value, allowing the removal of properties
- * with duplicate property names.
- */
- void removeProperty(String propertyName, String value);
-
- /**
- * Call back method for Property name changing.
- */
- void propertyNameChanged(String oldPropertyName, String newPropertyName, String value);
-
- /**
- * Call back method for Property value changing.
- */
- void propertyValueChanged(String propertyName, String newValue);
-
- /**
- * Simple property interface.
- */
- interface Property
- extends XmlContextNode
- {
- PersistenceUnit getParent();
-
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
- String getName();
- void setName(String name);
-
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
- String getValue();
- void setValue(String value);
-
- XmlProperty getXmlProperty();
-
- /**
- * Create ReplaceEdits for renaming the property value to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- * If this value does not match the original type, then return an empty Iterable.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming the property value package to the newName.
- * The originalPackage has not yet been renamed.
- * If this value is not in the originalPackage, then return an empty Iterable.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
- }
-
-
- // ********** mapping file (orm.xml) persistence unit metadata **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * "XML mapping metadata complete" flag.
- */
- String XML_MAPPING_METADATA_COMPLETE_PROPERTY = "xmlMappingMetadataComplete"; //$NON-NLS-1$
-
- /**
- * Return the default "XML mapping metadata complete" flag from the
- * first persistence unit metadata
- * found in the persistence unit's list of mapping files.
- */
- boolean isXmlMappingMetadataComplete();
-
- /**
- * String constant associated with changes to the persistence unit's
- * default access type.
- */
- String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$
-
- /**
- * Return the default access type from the first persistence unit metadata
- * found in the persistence unit's list of mapping files.
- */
- AccessType getDefaultAccess();
-
- /**
- * String constant associated with changes to the persistence unit's
- * default database catalog.
- */
- String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
-
- /**
- * Return the default database catalog from the first persistence unit metadata
- * found in the persistence unit's list of mapping files.
- */
- String getDefaultCatalog();
-
- /**
- * String constant associated with changes to the persistence unit's
- * default database schema.
- */
- String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
-
- /**
- * Return the default database schema from the first persistence unit metadata
- * found in the persistence unit's list of mapping files.
- */
- String getDefaultSchema();
-
- /**
- * String constant associated with changes to the persistence unit's
- * default "cascade persist" flag.
- */
- String DEFAULT_CASCADE_PERSIST_PROPERTY = "defaultCascadePersist"; //$NON-NLS-1$
-
- /**
- * Return the default "cascade persist" flag from the first persistence unit metadata
- * found in the persistence unit's list of mapping files.
- */
- boolean getDefaultCascadePersist();
-
-
- // ********** generators **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * collection of "global" generators.
- */
- String GENERATORS_COLLECTION = "generators"; //$NON-NLS-1$
-
- /**
- * Return the "active" generators defined within the persistence unit's scope,
- * including generators with duplicate names. "Active" generators are:<ul>
- * <li>any generator defined in mapping files
- * <li>any generator defined via Java annotations that is not "overridden"
- * by a mapping file generator with the same name
- * </ul>
- * <strong>NB:</strong> A Java generator defined on a class or attribute
- * that is overridden in a mapping file is <em>not</em>, as a result,
- * itself overridden. A Java generator can only be overridden by a mapping
- * file generator with the same name.
- * <p>
- * <strong>NB:</strong> A Java generator defined on a class or attribute
- * whose corresponding mapping file mapping (or mapping file) is marked
- * "metadata complete" is ignored.
- */
- Iterable<Generator> getGenerators();
-
- /**
- * Return the number of "active" generators defined within the persistence
- * unit's scope.
- * @see #getGenerators()
- */
- int getGeneratorsSize();
-
- /**
- * Return the names of the "active" generators defined in the persistence
- * unit's scope, with duplicates removed.
- */
- Iterable<String> getUniqueGeneratorNames();
-
- /**
- * Return whether the persistence unit contains any "convertible"
- * generators (i.e. Java generators that are neither overridden nor
- * [erroneously] duplicated).
- * @see #convertJavaGenerators(EntityMappings, IProgressMonitor)
- */
- boolean hasConvertibleJavaGenerators();
-
- /**
- * Convert all "convertible" Java generators to global-level mapping file
- * generators.
- * @see #hasConvertibleJavaGenerators()
- */
- void convertJavaGenerators(EntityMappings entityMappings, IProgressMonitor monitor);
-
-
- // ********** queries **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * collection of "global" queries.
- */
- String QUERIES_COLLECTION = "queries"; //$NON-NLS-1$
-
- /**
- * Return the "active" queries defined within the persistence unit's scope,
- * including queries with duplicate names. These are very similar to
- * generators.
- * @see #getGenerators()
- */
- Iterable<Query> getQueries();
-
- /**
- * Return the number of "active" queries defined within the persistence
- * unit's scope.
- * @see #getQueries()
- */
- int getQueriesSize();
-
- /**
- * Add the specified query (that is defined elsewhere) to the
- * list of queries defined within the persistence unit's scope.
- */
- void addQuery(Query query);
-
- /**
- * Return whether the persistence unit contains any "convertible"
- * queries. (i.e. Java queries that are neither overridden nor
- * [erroneously] duplicated - by default, any Java queries with the same
- * name are "duplicates").
- * @see #convertJavaQueries(EntityMappings, IProgressMonitor)
- */
- boolean hasConvertibleJavaQueries();
-
- /**
- * Convert all "convertible" Java queries to global-level mapping file
- * queries.
- * @see #hasConvertibleJavaQueries()
- */
- void convertJavaQueries(EntityMappings entityMappings, IProgressMonitor monitor);
-
-
- // ********** misc **********
-
- /**
- * Return the XML resource model corresponding to the
- * persistence unit.
- */
- XmlPersistenceUnit getXmlPersistenceUnit();
-
- /**
- * Return whether the persistence unit specifies a persistent type with the
- * specified name (i.e. the type is listed either in the persistence unit's
- * list of specified classes or in one of the persistent unit's mapping files).
- */
- boolean specifiesPersistentType(String typeName);
-
- /**
- * Return the persistence unit's Java persistent types, as specified by
- * the class refs (both specified and implied) and jar files.
- * There can be duplicate types, and any of them may be overridden by a
- * mapping file persistence type.
- * @see #getMappingFilePersistentTypes()
- */
- Iterable<PersistentType> getJavaPersistentTypes();
-
- /**
- * Return the persistence unit's entities.
- */
- Iterable<Entity> getEntities();
-
- /**
- * Return the entity specified in the persistence unit with the
- * specified name. Return null if there is no persistent type
- * with the specified name or if the persistent type is not mapped as an
- * entity.
- * @see org.eclipse.jpt.jpa.core.MappingKeys#ENTITY_TYPE_MAPPING_KEY
- */
- Entity getEntity(String typeName);
-
- /**
- * Return the embeddable specified in the persistence unit with the
- * specified name. Return null if there is no persistent type
- * with the specified name or if the persistent type is not mapped as an
- * embeddable.
- * @see org.eclipse.jpt.jpa.core.MappingKeys#EMBEDDABLE_TYPE_MAPPING_KEY
- */
- Embeddable getEmbeddable(String typeName);
-
- /**
- * Return whether the text representation of this persistence unit contains
- * the given text offset
- */
- boolean containsOffset(int textOffset);
-
- /**
- * Synchronize the persistence unit's list of specified classes with the
- * types in the project currently annotated.
- */
- void synchronizeClasses(IProgressMonitor monitor);
-
- /**
- * Return the names of all the packages valid cross the persistence unit
- * including the ones from jar files
- */
- Iterable<String> getPackageNames();
-
- // ********** validation **********
-
- /**
- * Return whether the persistence unit validates agains database metadata.
- * (For instance, if the connection is not active, then it should not.)
- */
- boolean validatesAgainstDatabase();
-
-
- // ********** refactoring **********
-
- /**
- * Create DeleteEdits for deleting any references to the deleted type.
- * Return an EmptyIterable if there are not any references.
- */
- Iterable<DeleteEdit> createDeleteTypeEdits(IType type);
-
- /**
- * Create DeleteEdits for deleting any references to the deleted file
- * Return an EmptyIterable if there are not any references.
- */
- Iterable<DeleteEdit> createDeleteMappingFileEdits(IFile file);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalPackage to the newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalFolder to the newName.
- * The originalFolder has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenameFolderEdits(IFolder originalFolder, String newName);
-
- /**
- * Create ReplaceEdits for renaming any references to the originalFile to the newName.
- * Return an EmptyIterable if there are not any references.
- * The originalFile has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameMappingFileEdits(IFile originalFile, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalFile to the destination.
- * Return an EmptyIterable if there are not any references.
- * The originalFile has not been moved yet.
- */
- Iterable<ReplaceEdit> createMoveMappingFileEdits(IFile originalFile, IPath runtineDestination);
-
- /**
- * Create ReplaceEdits for moving any references to the originalFolder to the runtimeDestination.
- * The runtimeDestination already includes the original folder name.
- */
- Iterable<ReplaceEdit> createMoveFolderEdits(IFolder originalFolder, IPath runtimeDestination);
-
- /**
- * Return a location relative to the beginning of the persistence.xml for
- * inserting a new mapping-file element. If there are existing mapping files,
- * the location should be after those. If no existing mapping files then make
- * sure the location does not violate the persistence.xml schema.
- */
- int findInsertLocationForMappingFileRef();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java
deleted file mode 100644
index a50723c10b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2007, 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.jpa.core.context.persistence;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.model.Model;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface PersistenceUnitProperties extends Model
-{
- /**
- * Method used for identifying the given property.
- */
- boolean itemIsProperty(PersistenceUnit.Property item);
-
- /**
- * Returns the property name used for change notification of the given property.
- */
- String propertyIdOf(PersistenceUnit.Property property);
-
- /**
- * Return the PersistenceUnit of this Properties.
- */
- PersistenceUnit getPersistenceUnit();
-
- /**
- * Return the JPA project the PersistenceUnit belongs to.
- */
- JpaProject getJpaProject();
-
- /**
- * A Property with the given name had its value changed
- */
- void propertyValueChanged(String propertyName, String newValue);
-
- /**
- * A Property with the given name was removed
- */
- void propertyRemoved(String propertyName);
-
-
- // ************ refactoring **************
-
- /**
- * Create ReplaceEdits for renaming any references to the originalType to the newName.
- * The originalType has not yet been renamed, the newName is the new short name.
- */
- Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName);
-
- /**
- * Create ReplaceEdits for moving any references to the originalType to the newPackage.
- * The originalType has not yet been moved.
- */
- Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage);
-
- /**
- * Create ReplaceEdits for renaming any reference to the originalPackage newName.
- * The originalPackage has not yet been renamed.
- */
- Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName);
-
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java
deleted file mode 100644
index c9478dc229..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.persistence;
-
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType;
-
-/**
- * Context model corresponding to the XML resource model
- * {@link XmlPersistenceUnitTransactionType},
- * which corresponds to the <code>transaction-type</code> element in the
- * <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.0
- * @since 2.0
- */
-public enum PersistenceUnitTransactionType
-{
- /** Corresponds to JTA transaction type */
- JTA,
-
- /** Corresponds to RESOURCE_LOCAL transaction type */
- RESOURCE_LOCAL;
-
- public static PersistenceUnitTransactionType fromXmlResourceModel(XmlPersistenceUnitTransactionType transactionType) {
- if (transactionType == null) {
- return null;
- }
- switch (transactionType) {
- case JTA:
- return JTA;
- case RESOURCE_LOCAL:
- return RESOURCE_LOCAL;
- default:
- throw new IllegalArgumentException("unknown transaction type: " + transactionType); //$NON-NLS-1$
- }
- }
-
- public static XmlPersistenceUnitTransactionType toXmlResourceModel(PersistenceUnitTransactionType transactionType) {
- if (transactionType == null) {
- return null;
- }
- switch (transactionType) {
- case JTA:
- return XmlPersistenceUnitTransactionType.JTA;
- case RESOURCE_LOCAL:
- return XmlPersistenceUnitTransactionType.RESOURCE_LOCAL;
- default:
- throw new IllegalArgumentException("unknown transaction type: " + transactionType); //$NON-NLS-1$
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java
deleted file mode 100644
index ff1c034335..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.XmlFile;
-
-/**
- * JPA <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface PersistenceXml
- extends XmlFile
-{
- // ********** persistence **********
-
- /**
- * String constant associated with changes to the persistence property
- */
- public final static String PERSISTENCE_PROPERTY = "persistence"; //$NON-NLS-1$
-
- /**
- * Return the content represented by the root of the <code>persistence.xml</code> file.
- * This may be null.
- */
- Persistence getPersistence();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java
deleted file mode 100644
index 1ff70d585a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.context.persistence;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.jpa.core.context.java.JarFile;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-
-/**
- * Interface used by persistence unit to gather up persistent types.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistenceXmlContextNodeFactory
-{
- Persistence buildPersistence(PersistenceXml parent, XmlPersistence resourcePersistence);
-
- PersistenceUnit buildPersistenceUnit(Persistence parent, XmlPersistenceUnit resourcePersistenceUnit);
-
- /**
- * Build a "specified" mapping file ref.
- */
- MappingFileRef buildMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef);
-
- /**
- * Build a "implied" mapping file ref.
- */
- MappingFileRef buildImpliedMappingFileRef(PersistenceUnit parent);
-
- /**
- * Build a "specified" class ref.
- */
- ClassRef buildClassRef(PersistenceUnit parent, XmlJavaClassRef xmlClassRef);
-
- /**
- * Build an "implied" class ref.
- */
- ClassRef buildClassRef(PersistenceUnit parent, String className);
-
- JarFileRef buildJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef);
-
- JarFile buildJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot);
-
- PersistenceUnit.Property buildProperty(PersistenceUnit parent, XmlProperty property);
-
- PersistenceUnitProperties buildConnection(PersistenceUnit parent);
-
- PersistenceUnitProperties buildOptions(PersistenceUnit parent);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java
deleted file mode 100644
index 218b88e434..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.context.persistence;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.ResourceDefinition;
-
-/**
- * <code>persistence.xml</code> definition
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistenceXmlDefinition
- extends ResourceDefinition
-{
- EFactory getResourceNodeFactory();
-
- PersistenceXmlContextNodeFactory getContextNodeFactory();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlEnumValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlEnumValue.java
deleted file mode 100644
index bd59e5e6a0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlEnumValue.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.context.persistence;
-
-/**
- * An enum that is used in the persistence.xml properties can implement this interface
- * and take advantage of helper methods in AbstractPersistenceUnitProperties for
- * getting and setting properties.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.2
- */
-public interface PersistenceXmlEnumValue
-{
- /**
- * Return the value to be used in the property key/value pair
- */
- String getPropertyValue();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java
deleted file mode 100644
index 31c9d9c65c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.context.persistence;
-
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-
-/**
- * Interface used by persistence unit to gather up persistent types.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistentTypeContainer {
-
- /**
- * Return the container's persistent types. The returned list may contain
- * multiple persistent types for the same Java class; e.g.<ul>
- * <li>the same type is specified in both the <code>persistence.xml</code> and
- * <code>orm.xml</code> files
- * <Li>the same type is specified multiple times in the same
- * <code>persistence.xml</code> or <code>orm.xml</code> file
- * <li>the same type is in a jar file specified in the
- * <code>persistence.xml</code> file and is specified in the
- * <code>persistence.xml</code> file and/or an <code>orm.xml</code> file
- * </ul>
- */
- Iterable<? extends PersistentType> getPersistentTypes();
-
- /**
- * Return the persistent type with the specified name.
- * Return <code>null</code> if the persistent type is not found.
- * If the persistent unit has more than one persistent type with the
- * specified name, return the first one found, using the following
- * search order:<ul>
- * <li>mapping files
- * <li>classes
- * <li>jar files
- * </ul>
- */
- PersistentType getPersistentType(String typeName);
-
-
- Transformer<PersistentTypeContainer, Iterable<? extends PersistentType>> TRANSFORMER =
- new Transformer<PersistentTypeContainer, Iterable<? extends PersistentType>>() {
- public Iterable<? extends PersistentType> transform(PersistentTypeContainer container) {
- return container.getPersistentTypes();
- }
- @Override
- public String toString() {
- return "PersistentTypeContainer.TRANSFORMER"; //$NON-NLS-1$
- }
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaAnnotationDefinitionProvider.java
deleted file mode 100644
index ab535ed671..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaAnnotationDefinitionProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal;
-
-import java.util.ArrayList;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.JpaAnnotationDefinitionProvider;
-
-public abstract class AbstractJpaAnnotationDefinitionProvider
- implements JpaAnnotationDefinitionProvider
-{
- protected ArrayList<AnnotationDefinition> annotationDefinitions;
-
- protected ArrayList<NestableAnnotationDefinition> nestableAnnotationDefinitions;
-
-
- protected AbstractJpaAnnotationDefinitionProvider() {
- super();
- }
-
-
- // ********** annotation definitions **********
-
- public synchronized Iterable<AnnotationDefinition> getAnnotationDefinitions() {
- if (this.annotationDefinitions == null) {
- this.annotationDefinitions = this.buildAnnotationDefinitions();
- }
- return this.annotationDefinitions;
- }
-
- protected ArrayList<AnnotationDefinition> buildAnnotationDefinitions() {
- ArrayList<AnnotationDefinition> definitions = new ArrayList<AnnotationDefinition>();
- this.addAnnotationDefinitionsTo(definitions);
- return definitions;
- }
-
- protected abstract void addAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions);
-
-
- // ********** nestable annotation definitions **********
-
- public synchronized Iterable<NestableAnnotationDefinition> getNestableAnnotationDefinitions() {
- if (this.nestableAnnotationDefinitions == null) {
- this.nestableAnnotationDefinitions = this.buildNestableAnnotationDefinitions();
- }
- return this.nestableAnnotationDefinitions;
- }
-
- protected ArrayList<NestableAnnotationDefinition> buildNestableAnnotationDefinitions() {
- ArrayList<NestableAnnotationDefinition> definitions = new ArrayList<NestableAnnotationDefinition>();
- this.addNestableAnnotationDefinitionsTo(definitions);
- return definitions;
- }
-
- protected abstract void addNestableAnnotationDefinitionsTo(ArrayList<NestableAnnotationDefinition> definitions);
-
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
deleted file mode 100644
index f062735b68..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
+++ /dev/null
@@ -1,415 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.Accessor;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaBasicMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratedValue;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToOneMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTableGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaTransientMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaVersionMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.context.java.GenericJavaVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaNullTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaDataSource;
-import org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaFile;
-import org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaProject;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaBasicMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaEmbeddable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaEntity;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaGeneratedValue;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaIdMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaJoinTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaLobConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaManyToManyMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaManyToOneMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaNamedQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaNullAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaOneToManyMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaOneToOneMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaOrderable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaQueryHint;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaTableGenerator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaTransientMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVersionMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXml;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * Central class that allows extenders to easily replace implementations of
- * various Dali interfaces.
- */
-public abstract class AbstractJpaFactory
- implements JpaFactory
-{
- protected AbstractJpaFactory() {
- super();
- }
-
-
- // ********** Core Model **********
-
- public JpaProject buildJpaProject(JpaProject.Config config) {
- return new GenericJpaProject(config);
- }
-
- public JpaDataSource buildJpaDataSource(JpaProject jpaProject, String connectionProfileName) {
- return new GenericJpaDataSource(jpaProject, connectionProfileName);
- }
-
- public JpaFile buildJpaFile(JpaProject jpaProject, IFile file, IContentType contentType, JptResourceModel resourceModel) {
- return new GenericJpaFile(jpaProject, file, contentType, resourceModel);
- }
-
-
- // ********** Context Nodes **********
-
- public JpaRootContextNode buildRootContextNode(JpaProject parent) {
- return new GenericRootContextNode(parent);
- }
-
-
- // ********** XML Context Model **********
-
- public PersistenceXml buildPersistenceXml(JpaRootContextNode parent, JpaXmlResource resource) {
- return new GenericPersistenceXml(parent, resource);
- }
-
- public OrmXml buildMappingFile(MappingFileRef parent, JpaXmlResource resource) {
- return new GenericOrmXml(parent, resource);
- }
-
-
- // ********** Java Context Model **********
-
- public JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourceType jrt) {
- return new GenericJavaPersistentType(owner, jrt);
- }
-
- public JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent, Accessor accessor) {
- return new GenericJavaPersistentAttribute(parent, accessor);
- }
-
- public JavaPersistentAttribute buildJavaPersistentField(PersistentType parent, JavaResourceField resourceField) {
- return new GenericJavaPersistentAttribute(parent, resourceField);
- }
-
- public JavaPersistentAttribute buildJavaPersistentProperty(PersistentType parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- return new GenericJavaPersistentAttribute(parent, resourceGetter, resourceSetter);
- }
-
- public JavaTypeMapping buildJavaNullTypeMapping(JavaPersistentType parent) {
- return new JavaNullTypeMapping(parent);
- }
-
- public JavaEntity buildJavaEntity(JavaPersistentType parent, EntityAnnotation entityAnnotation) {
- return new GenericJavaEntity(parent, entityAnnotation);
- }
-
- public JavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent, MappedSuperclassAnnotation mappedSuperclassAnnotation) {
- return new GenericJavaMappedSuperclass(parent, mappedSuperclassAnnotation);
- }
-
- public JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent, EmbeddableAnnotation embeddableAnnotation) {
- return new GenericJavaEmbeddable(parent, embeddableAnnotation);
- }
-
- public JavaTable buildJavaTable(JavaEntity parent, Table.Owner owner) {
- return new GenericJavaTable(parent, owner);
- }
-
- public JavaColumn buildJavaColumn(JavaJpaContextNode parent, JavaColumn.Owner owner) {
- return new GenericJavaColumn(parent, owner);
- }
-
- public JavaVirtualColumn buildJavaVirtualColumn(JavaJpaContextNode parent, JavaVirtualColumn.Owner owner) {
- return new GenericJavaVirtualColumn(parent, owner);
- }
-
- public JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
- return new GenericJavaDiscriminatorColumn(parent, owner);
- }
-
- public JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation) {
- return new GenericJavaJoinColumn(parent, owner, joinColumnAnnotation);
- }
-
- public JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
- return new GenericJavaVirtualJoinColumn(parent, owner, overriddenColumn);
- }
-
- public JavaJoinTable buildJavaJoinTable(JavaJoinTableRelationshipStrategy parent, Table.Owner owner) {
- return new GenericJavaJoinTable(parent, owner);
- }
-
- public JavaVirtualJoinTable buildJavaVirtualJoinTable(JavaVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable) {
- return new GenericJavaVirtualJoinTable(parent, owner, overriddenTable);
- }
-
- public JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent, Table.Owner owner, SecondaryTableAnnotation tableAnnotation) {
- return new GenericJavaSecondaryTable(parent, owner, tableAnnotation);
- }
-
- public JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent) {
- return new GenericJavaBasicMapping(parent);
- }
-
- public JavaEmbeddedIdMapping buildJavaEmbeddedIdMapping(JavaPersistentAttribute parent) {
- return new GenericJavaEmbeddedIdMapping(parent);
- }
-
- public JavaEmbeddedMapping buildJavaEmbeddedMapping(JavaPersistentAttribute parent) {
- return new GenericJavaEmbeddedMapping(parent);
- }
-
- public JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent) {
- return new GenericJavaIdMapping(parent);
- }
-
- public JavaManyToManyMapping buildJavaManyToManyMapping(JavaPersistentAttribute parent) {
- return new GenericJavaManyToManyMapping(parent);
- }
-
- public JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent) {
- return new GenericJavaManyToOneMapping(parent);
- }
-
- public JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent) {
- return new GenericJavaOneToManyMapping(parent);
- }
-
- public JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent) {
- return new GenericJavaOneToOneMapping(parent);
- }
-
- public JavaTransientMapping buildJavaTransientMapping(JavaPersistentAttribute parent) {
- return new GenericJavaTransientMapping(parent);
- }
-
- public JavaVersionMapping buildJavaVersionMapping(JavaPersistentAttribute parent) {
- return new GenericJavaVersionMapping(parent);
- }
-
- public JavaAttributeMapping buildJavaNullAttributeMapping(JavaPersistentAttribute parent) {
- return new GenericJavaNullAttributeMapping(parent);
- }
-
- public JavaGeneratorContainer buildJavaGeneratorContainer(JavaGeneratorContainer.ParentAdapter parentAdapter) {
- return new GenericJavaGeneratorContainer(parentAdapter);
- }
-
- public JavaSequenceGenerator buildJavaSequenceGenerator(JavaGeneratorContainer parent, SequenceGeneratorAnnotation sequenceGeneratorAnnotation) {
- return new GenericJavaSequenceGenerator(parent, sequenceGeneratorAnnotation);
- }
-
- public JavaTableGenerator buildJavaTableGenerator(JavaGeneratorContainer parent, TableGeneratorAnnotation tableGeneratorAnnotation) {
- return new GenericJavaTableGenerator(parent, tableGeneratorAnnotation);
- }
-
- public JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent, GeneratedValueAnnotation generatedValueAnnotation) {
- return new GenericJavaGeneratedValue(parent, generatedValueAnnotation);
- }
-
- public JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation) {
- return new GenericJavaPrimaryKeyJoinColumn(parent, owner, pkJoinColumnAnnotation);
- }
-
- public JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner) {
- return new GenericJavaAttributeOverrideContainer(parent, owner);
- }
-
- public JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner) {
- return new GenericJavaAssociationOverrideContainer(parent, owner);
- }
-
- public JavaAttributeOverride buildJavaAttributeOverride(JavaAttributeOverrideContainer parent, AttributeOverrideAnnotation annotation) {
- return new GenericJavaAttributeOverride(parent, annotation);
- }
-
- public JavaVirtualAttributeOverride buildJavaVirtualAttributeOverride(JavaAttributeOverrideContainer parent, String name) {
- return new GenericJavaVirtualAttributeOverride(parent, name);
- }
-
- public JavaAssociationOverride buildJavaAssociationOverride(JavaAssociationOverrideContainer parent, AssociationOverrideAnnotation annotation) {
- return new GenericJavaAssociationOverride(parent, annotation);
- }
-
- public JavaVirtualAssociationOverride buildJavaVirtualAssociationOverride(JavaAssociationOverrideContainer parent, String name) {
- return new GenericJavaVirtualAssociationOverride(parent, name);
- }
-
- public JavaOverrideRelationship buildJavaOverrideRelationship(JavaAssociationOverride parent) {
- return new GenericJavaOverrideRelationship(parent);
- }
-
- public JavaVirtualOverrideRelationship buildJavaVirtualOverrideRelationship(JavaVirtualAssociationOverride parent) {
- return new GenericJavaVirtualOverrideRelationship(parent);
- }
-
- public JavaQueryContainer buildJavaQueryContainer(JavaJpaContextNode parent, JavaQueryContainer.Owner owner) {
- return new GenericJavaQueryContainer(parent, owner);
- }
-
- public JavaNamedQuery buildJavaNamedQuery(JavaQueryContainer parent, NamedQueryAnnotation namedQueryAnnotation) {
- return new GenericJavaNamedQuery(parent, namedQueryAnnotation);
- }
-
- public JavaNamedNativeQuery buildJavaNamedNativeQuery(JavaQueryContainer parent, NamedNativeQueryAnnotation namedNativeQueryAnnotation) {
- return new GenericJavaNamedNativeQuery(parent, namedNativeQueryAnnotation);
- }
-
- public JavaQueryHint buildJavaQueryHint(JavaQuery parent, QueryHintAnnotation queryHintAnnotation) {
- return new GenericJavaQueryHint(parent, queryHintAnnotation);
- }
-
- public JavaUniqueConstraint buildJavaUniqueConstraint(JavaJpaContextNode parent, UniqueConstraint.Owner owner, UniqueConstraintAnnotation constraintAnnotation) {
- return new GenericJavaUniqueConstraint(parent, owner, constraintAnnotation);
- }
-
- public JavaVirtualUniqueConstraint buildJavaVirtualUniqueConstraint(JavaJpaContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint) {
- return new GenericJavaVirtualUniqueConstraint(parent, overriddenUniqueConstraint);
- }
-
- public JavaBaseEnumeratedConverter buildJavaBaseEnumeratedConverter(JavaAttributeMapping parent, BaseEnumeratedAnnotation annotation, JavaConverter.Owner owner) {
- return new GenericJavaBaseEnumeratedConverter(parent, annotation, owner);
- }
-
- public JavaBaseTemporalConverter buildJavaBaseTemporalConverter(JavaAttributeMapping parent, BaseTemporalAnnotation annotation, JavaConverter.Owner owner) {
- return new GenericJavaBaseTemporalConverter(parent, annotation, owner);
- }
-
- public JavaLobConverter buildJavaLobConverter(JavaAttributeMapping parent, LobAnnotation annotation, JavaConverter.Owner owner) {
- return new GenericJavaLobConverter(parent, annotation, owner);
- }
-
- public JavaOrderable buildJavaOrderable(JavaAttributeMapping parent) {
- return new GenericJavaOrderable(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaNode.java
deleted file mode 100644
index 0a8491bc83..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaNode.java
+++ /dev/null
@@ -1,709 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jpt.common.core.internal.utility.jdt.JDTModifiedDeclaration.Adapter;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterators.CloneIterator;
-import org.eclipse.jpt.common.utility.internal.model.AbstractModel;
-import org.eclipse.jpt.common.utility.internal.model.AspectChangeSupport;
-import org.eclipse.jpt.common.utility.internal.model.ChangeSupport;
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaNode;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaPlatformVariation;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Database;
-
-/**
- * Some common Dali behavior:<ul>
- * <li>containment hierarchy
- * <li>Eclipse adaptable
- * <li>update triggers
- * </ul>
- */
-public abstract class AbstractJpaNode
- extends AbstractModel
- implements JpaNode
-{
- protected final JpaNode parent;
-
-
- // ********** constructor/initialization **********
-
- protected AbstractJpaNode(JpaNode parent) {
- super();
- this.checkParent(parent);
- this.parent = parent;
- }
-
- protected void checkParent(JpaNode p) {
- if (p == null) {
- if (this.requiresParent()) {
- throw new IllegalArgumentException("'parent' cannot be null"); //$NON-NLS-1$
- }
- } else {
- if (this.forbidsParent()) {
- throw new IllegalArgumentException("'parent' must be null"); //$NON-NLS-1$
- }
- }
- }
-
- protected boolean requiresParent() {
- return true;
- }
-
- protected final boolean forbidsParent() {
- return ! this.requiresParent(); // assume 'parent' is not optional
- }
-
- @Override
- protected ChangeSupport buildChangeSupport() {
- return new AspectChangeSupport(this, this.buildChangeSupportListener());
- }
-
- protected AspectChangeSupport.Listener buildChangeSupportListener() {
- return new AspectChangeSupport.Listener() {
- public void aspectChanged(String aspectName) {
- AbstractJpaNode.this.aspectChanged(aspectName);
- }
- };
- }
-
-
- // ********** IAdaptable implementation **********
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public Object getAdapter(Class adapter) {
- return PlatformTools.getAdapter(this, adapter);
- }
-
-
- // ********** JpaNode implementation **********
-
- public JpaNode getParent() {
- return this.parent;
- }
-
- public IResource getResource() {
- return this.parent.getResource();
- }
-
- /**
- * @see AbstractJpaProject#getJpaProject()
- */
- public JpaProject getJpaProject() {
- return this.parent.getJpaProject();
- }
-
- public JpaProject.Manager getJpaProjectManager() {
- return this.getJpaProject().getManager();
- }
-
-
- // ********** convenience methods **********
-
- protected IJavaProject getJavaProject() {
- return this.getJpaProject().getJavaProject();
- }
-
- /**
- * This is <code>public</code> as a convenience because various subclasses
- * implement interfaces that require this method.
- */
- public JpaPlatform getJpaPlatform() {
- return this.getJpaProject().getJpaPlatform();
- }
-
- protected JpaPlatform.Version getJpaPlatformVersion() {
- return this.getJpaPlatform().getJpaVersion();
- }
-
- protected boolean isJpa2_0Compatible() {
- return JptJpaCorePlugin.nodeIsJpa2_0Compatible(this);
- }
-
- /**
- * Call {@link #isJpa2_0Compatible()} before calling this method.
- */
- protected JpaFactory2_0 getJpaFactory2_0() {
- return (JpaFactory2_0) this.getJpaFactory();
- }
-
- protected JpaFactory getJpaFactory() {
- return this.getJpaPlatform().getJpaFactory();
- }
-
- protected JpaPlatformVariation getJpaPlatformVariation() {
- return this.getJpaPlatform().getJpaVariation();
- }
-
- protected JpaFile getJpaFile(IFile file) {
- return this.getJpaProject().getJpaFile(file);
- }
-
- protected JpaDataSource getDataSource() {
- return this.getJpaProject().getDataSource();
- }
-
- protected Database getDatabase() {
- return this.getDataSource().getDatabase();
- }
-
- protected boolean connectionProfileIsActive() {
- return this.getDataSource().connectionProfileIsActive();
- }
-
- /**
- * Pre-condition: specified catalog <em>identifier</em> is not
- * <code>null</code>.
- * <p>
- * <strong>NB:</strong> Do not use the catalog <em>name</em>.
- */
- protected Catalog resolveDbCatalog(String catalog) {
- Database database = this.getDatabase();
- return (database == null) ? null : database.getCatalogForIdentifier(catalog);
- }
-
-
- // ********** logging **********
-
- /**
- * Log the specified message.
- */
- protected void log(String msg) {
- this.getJpaProjectManager().log(msg);
- }
-
- /**
- * Log the specified exception/error.
- */
- protected void log(Throwable throwable) {
- this.getJpaProjectManager().log(throwable);
- }
-
- /**
- * Log the specified message and exception/error.
- */
- protected void log(String msg, Throwable throwable) {
- this.getJpaProjectManager().log(msg, throwable);
- }
-
-
- // ********** AspectChangeSupport.Listener support **********
-
- protected void aspectChanged(String aspectName) {
- if (this.aspectTriggersUpdate(aspectName)) {
-// String msg = Thread.currentThread() + " aspect change: " + this + ": " + aspectName;
-// System.out.println(msg);
-// new Exception(msg).printStackTrace(System.out);
- this.stateChanged();
- }
- }
-
- protected boolean aspectTriggersUpdate(String aspectName) {
- return ! this.aspectDoesNotTriggerUpdate(aspectName);
- }
-
- protected boolean aspectDoesNotTriggerUpdate(String aspectName) {
- // ignore state changes so we don't get a stack overflow :-)
- // (and we don't use state changes except here)
- return (aspectName == null) ||
- this.nonUpdateAspectNames().contains(aspectName);
- }
-
- protected final Set<String> nonUpdateAspectNames() {
- synchronized (NON_UPDATE_ASPECT_NAME_SETS) {
- HashSet<String> nonUpdateAspectNames = NON_UPDATE_ASPECT_NAME_SETS.get(this.getClass());
- if (nonUpdateAspectNames == null) {
- nonUpdateAspectNames = new HashSet<String>();
- this.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
- NON_UPDATE_ASPECT_NAME_SETS.put(this.getClass(), nonUpdateAspectNames);
- }
- return nonUpdateAspectNames;
- }
- }
-
- private static final HashMap<Class<? extends AbstractJpaNode>, HashSet<String>> NON_UPDATE_ASPECT_NAME_SETS = new HashMap<Class<? extends AbstractJpaNode>, HashSet<String>>();
-
- protected void addNonUpdateAspectNamesTo(@SuppressWarnings("unused") Set<String> nonUpdateAspectNames) {
- // when you override this method, don't forget to include:
- // super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
- }
-
- public void stateChanged() {
- this.fireStateChanged();
- if (this.parent != null) {
- this.parent.stateChanged();
- }
- }
-
-
- // ********** convenience stuff **********
-
- /**
- * Useful for building validation messages.
- */
- protected static final String[] EMPTY_STRING_ARRAY = StringTools.EMPTY_STRING_ARRAY;
-
-
- /**
- * Adapter used to synchronize a context collection container with its corresponding
- * resource container.
- * @param <C> the type of context elements
- * @param <R> the type of resource elements
- */
- protected abstract class CollectionContainer<C, R>
- implements Iterable<C>
- {
- protected final Vector<C> contextElements = new Vector<C>();
-
- protected CollectionContainer() {
- super();
- }
-
- /**
- * Return the container's current set of resource elements.
- * These are what the context elements will be synchronized to.
- */
- protected abstract Iterable<R> getResourceElements();
-
- /**
- * Return the resource element corresponding to the specified context
- * element.
- */
- protected abstract R getResourceElement(C contextElement);
-
- /**
- * Build and return a context element for the given resource element
- */
- protected abstract C buildContextElement(R resourceElement);
-
- /**
- * Return the property name for event notification when the collection is changed.
- */
- protected abstract String getContextElementsPropertyName();
-
- /**
- * clients needs to call initialize if necessary
- */
- public void initialize() {
- for (R resourceElement : this.getResourceElements()) {
- this.contextElements.add(this.buildContextElement(resourceElement));
- }
- }
-
- /**
- * Return an Iterable of the context elements
- */
- public Iterable<C> getContextElements() {
- return new LiveCloneIterable<C>(this.contextElements);
- }
-
- public C get(int index) {
- return this.contextElements.get(index);
- }
-
- public Iterator<C> iterator() {
- return new CloneIterator<C>(this.contextElements);
- }
-
- /**
- * Return the size of the context elements collection
- */
- public int getContextElementsSize() {
- return this.contextElements.size();
- }
-
- /**
- * Add a context element for the specified resource element at the
- * specified index.
- */
- public C addContextElement(int index, R resourceElement) {
- return this.addContextElement_(index, this.buildContextElement(resourceElement));
- }
-
- /**
- * Add the specified context element to the container at the specified
- * index.
- */
- protected abstract C addContextElement_(int index, C element);
-
- /**
- * Add context elements for the specified resource elements at the
- * specified index.
- */
- public Iterable<C> addContextElements(int index, Iterable<R> resourceElements) {
- ArrayList<C> newContextElements = new ArrayList<C>();
- for (R resourceElement : resourceElements) {
- newContextElements.add(this.buildContextElement(resourceElement));
- }
- return this.addAll(index, newContextElements);
- }
-
- /**
- * Add the specified context elements to the collection.
- */
- protected abstract Iterable<C> addAll(int index, Iterable<C> elements);
-
- /**
- * Remove the specified context element from the container.
- */
- public abstract void removeContextElement(C element);
-
- /**
- * Remove the specified context elements from the container.
- */
- public abstract void removeAll(Iterable<C> elements);
-
- protected abstract void moveContextElement(int index, C element);
-
- @Override
- public String toString() {
- return this.contextElements.toString();
- }
- }
-
-
- /**
- * Adapter used to synchronize a context collection container with its corresponding
- * resource container.
- * @param <C> the type of context elements
- * @param <R> the type of resource elements
- */
- protected abstract class AbstractContextCollectionContainer<C extends JpaContextNode, R>
- extends CollectionContainer<C, R>
- {
- protected AbstractContextCollectionContainer() {
- super();
- }
-
- /**
- * Using the specified adapter, synchronize a context container with its
- * corresponding resource container: moving, removing, and adding elements
- * as necessary.
- * <p>
- * We can do this because:<ul>
- * <li>the XML translators will <em>move</em> the EMF elements when
- * appropriate (as opposed to simply rebuilding them in place).
- * <li>the Java resource model will re-use existing annotations when
- * appropriate (as opposed to simply rebuilding them in place).
- * </ul>
- */
- public void synchronizeWithResourceModel() {
- sync(true); // true = sync
- }
-
- /**
- * @see #synchronizeWithResourceModel(Adapter)
- */
- public void update() {
- sync(false); // false = update
- }
-
- /**
- * The specified <code>sync</code> flag controls whether any surviving
- * context nodes are either <em>synchronized</em> (<code>true</code>) or
- * <em>updated</em> (<code>false</code>).
- */
- protected void sync(boolean sync) {
- HashSet<C> contextElements = CollectionTools.set(this.getContextElements());
- ArrayList<C> contextElementsToSync = new ArrayList<C>(contextElements.size());
- int resourceIndex = 0;
-
- for (R resourceElement : this.getResourceElements()) {
- boolean match = false;
- for (Iterator<C> stream = contextElements.iterator(); stream.hasNext(); ) {
- C contextElement = stream.next();
- if (Tools.valuesAreEqual(this.getResourceElement(contextElement), resourceElement)) {
- // we don't know the source index because the element has been moved by previously moved elements
- this.moveContextElement(resourceIndex, contextElement);
- stream.remove();
- // TODO perform update here someday...
- contextElementsToSync.add(contextElement);
- match = true;
- break;
- }
- }
- if ( ! match) {
- // added elements are sync'ed during construction or will be
- // updated during the next "update" (which is triggered by
- // their addition to the model)
- this.addContextElement(resourceIndex, resourceElement);
- }
- resourceIndex++;
- }
- // remove any leftover context elements
- for (C contextElement : contextElements) {
- removeContextElement(contextElement);
- }
- // TODO bjv
- // take care of the structural changes before sync'ing the remaining elements;
- // we might be able to do this inline once we get rid of the "list change" events
- // and go with only add, remove, etc. list events
- // (these syncs will trigger "list change" events with list aspect adapters, which
- // trigger refreshes of UI adapters (e.g. TableModelAdapter) which will prematurely
- // discover any structural changes... :( )
- // see ItemAspectListValueModelAdapter.itemAspectChanged(EventObject)
- for (C contextElement : contextElementsToSync) {
- if (sync) {
- contextElement.synchronizeWithResourceModel();
- } else {
- contextElement.update();
- }
- }
- }
- }
-
-
- /**
- * Adapter used to synchronize a context collection container with its corresponding
- * resource container.
- * @param <C> the type of context elements
- * @param <R> the type of resource elements
- */
- protected abstract class ContextCollectionContainer<C extends JpaContextNode, R>
- extends AbstractContextCollectionContainer<C, R>
- {
- protected ContextCollectionContainer() {
- super();
- }
-
- @Override
- protected C addContextElement_(int index, C element) {
- // ignore the index - not a list
- AbstractJpaNode.this.addItemToCollection(element, this.contextElements, this.getContextElementsPropertyName());
- return element;
- }
-
- @Override
- protected Iterable<C> addAll(int index, Iterable<C> elements) {
- // ignore the index - not a list
- AbstractJpaNode.this.addItemsToCollection(elements, this.contextElements, this.getContextElementsPropertyName());
- return elements;
- }
-
- @Override
- public void removeContextElement(C element) {
- AbstractJpaNode.this.removeItemFromCollection(element, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- public void removeAll(Iterable<C> elements) {
- AbstractJpaNode.this.removeItemsFromCollection(elements, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- protected void moveContextElement(int index, C element) {
- // NOP - not a list
- }
- }
-
-
- /**
- * Adapter used to synchronize a context list container with its corresponding
- * resource container.
- * @param <C> the type of context elements
- * @param <R> the type of resource elements
- */
- protected abstract class ContextListContainer<C extends JpaContextNode, R>
- extends AbstractContextCollectionContainer<C, R>
- {
- protected ContextListContainer() {
- super();
- }
-
- @Override
- public ListIterable<C> getContextElements() {
- return new LiveCloneListIterable<C>(this.contextElements);
- }
-
- @Override
- protected abstract ListIterable<R> getResourceElements();
-
- /**
- * Return the index of the specified context element.
- */
- public int indexOfContextElement(C element) {
- return this.contextElements.indexOf(element);
- }
-
- public C getContextElement(int index) {
- return this.contextElements.elementAt(index);
- }
-
- @Override
- protected C addContextElement_(int index, C element) {
- AbstractJpaNode.this.addItemToList(index, element, this.contextElements, this.getContextElementsPropertyName());
- return element;
- }
-
- @Override
- protected Iterable<C> addAll(int index, Iterable<C> elements) {
- AbstractJpaNode.this.addItemsToList(index, elements, this.contextElements, this.getContextElementsPropertyName());
- return elements;
- }
-
- /**
- * Move the context element at the specified target index to the
- * specified source index.
- */
- public void moveContextElement(int targetIndex, int sourceIndex) {
- AbstractJpaNode.this.moveItemInList(targetIndex, sourceIndex, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- public void moveContextElement(int index, C element) {
- AbstractJpaNode.this.moveItemInList(index, element, this.contextElements, this.getContextElementsPropertyName());
- }
-
- /**
- * clear the list of context elements
- */
- public void clearContextList() {
- AbstractJpaNode.this.clearList(this.contextElements, getContextElementsPropertyName());
- }
-
- /**
- * Remove the context element at the specified index from the container.
- */
- public C removeContextElement(int index) {
- return AbstractJpaNode.this.removeItemFromList(index, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- public void removeContextElement(C element) {
- this.removeContextElement(this.indexOfContextElement(element));
- }
-
- @Override
- public void removeAll(Iterable<C> elements) {
- AbstractJpaNode.this.removeItemsFromList(elements, this.contextElements, this.getContextElementsPropertyName());
- }
- }
-
-
- /**
- * Adapter used to synchronize a context list container with its corresponding
- * resource container.
- * @param <C> the type of context elements
- * @param <R> the type of resource elements
- */
- protected abstract class ListContainer<C, R>
- extends CollectionContainer<C, R>
- {
- protected ListContainer() {
- super();
- }
-
- @Override
- public ListIterable<C> getContextElements() {
- return new LiveCloneListIterable<C>(this.contextElements);
- }
-
- @Override
- protected abstract ListIterable<R> getResourceElements();
-
- /**
- * Return the index of the specified context element.
- */
- public int indexOfContextElement(C element) {
- return this.contextElements.indexOf(element);
- }
-
- public C getContextElement(int index) {
- return this.contextElements.get(index);
- }
-
- @Override
- protected C addContextElement_(int index, C element) {
- AbstractJpaNode.this.addItemToList(index, element, this.contextElements, this.getContextElementsPropertyName());
- return element;
- }
-
- @Override
- protected Iterable<C> addAll(int index, Iterable<C> newContextElements) {
- AbstractJpaNode.this.addItemsToList(index, newContextElements, this.contextElements, this.getContextElementsPropertyName());
- return newContextElements;
- }
-
- /**
- * Move the context element at the specified target index to the
- * specified source index.
- */
- public void moveContextElement(int targetIndex, int sourceIndex) {
- AbstractJpaNode.this.moveItemInList(targetIndex, sourceIndex, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- public void moveContextElement(int index, C element) {
- AbstractJpaNode.this.moveItemInList(index, element, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- public void removeContextElement(C element) {
- this.removeContextElement(this.indexOfContextElement(element));
- }
-
- /**
- * Remove the context element at the specified index from the container.
- */
- public void removeContextElement(int index) {
- AbstractJpaNode.this.removeItemFromList(index, this.contextElements, this.getContextElementsPropertyName());
- }
-
- @Override
- public void removeAll(Iterable<C> elements) {
- AbstractJpaNode.this.removeItemsFromList(elements, this.contextElements, this.getContextElementsPropertyName());
- }
-
- public void synchronizeWithResourceModel() {
- ListIterable<R> resourceElements = getResourceElements();
-
- int index = 0;
- for (R resourceElement : resourceElements) {
- if (this.getContextElementsSize() > index) {
- if (this.getContextElement(index) != resourceElement) {
- this.addContextElement(index, resourceElement);
- }
- }
- else {
- this.addContextElement(index, resourceElement);
- }
- index++;
- }
-
- for ( ; index < this.getContextElementsSize(); ) {
- this.removeContextElement(index);
- }
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaPlatformProvider.java
deleted file mode 100644
index 2f25d8bd72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaPlatformProvider.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal;
-
-import java.util.ArrayList;
-import org.eclipse.jpt.jpa.core.JpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.ResourceDefinition;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public abstract class AbstractJpaPlatformProvider
- implements JpaPlatformProvider
-{
- protected ArrayList<JpaResourceModelProvider> resourceModelProviders;
-
- protected ArrayList<JavaTypeMappingDefinition> javaTypeMappingDefinitions;
-
- protected ArrayList<DefaultJavaAttributeMappingDefinition> defaultJavaAttributeMappingDefinitions;
-
- protected ArrayList<JavaAttributeMappingDefinition> specifiedJavaAttributeMappingDefinitions;
-
- protected ArrayList<ResourceDefinition> resourceDefinitions;
-
-
- /**
- * zero-argument constructor
- */
- protected AbstractJpaPlatformProvider() {
- super();
- }
-
-
- // ********** resource models **********
-
- public synchronized Iterable<JpaResourceModelProvider> getResourceModelProviders() {
- if (this.resourceModelProviders == null) {
- this.resourceModelProviders = this.buildResourceModelProviders();
- }
- return this.resourceModelProviders;
- }
-
- protected ArrayList<JpaResourceModelProvider> buildResourceModelProviders() {
- ArrayList<JpaResourceModelProvider> providers = new ArrayList<JpaResourceModelProvider>();
- this.addResourceModelProvidersTo(providers);
- return providers;
- }
-
- protected abstract void addResourceModelProvidersTo(ArrayList<JpaResourceModelProvider> providers);
-
-
- // ********** Java type mappings **********
-
- public synchronized Iterable<JavaTypeMappingDefinition> getJavaTypeMappingDefinitions() {
- if (this.javaTypeMappingDefinitions == null) {
- this.javaTypeMappingDefinitions = this.buildJavaTypeMappingDefinitions();
- }
- return this.javaTypeMappingDefinitions;
- }
-
- protected ArrayList<JavaTypeMappingDefinition> buildJavaTypeMappingDefinitions() {
- ArrayList<JavaTypeMappingDefinition> definitions = new ArrayList<JavaTypeMappingDefinition>();
- this.addJavaTypeMappingDefinitionsTo(definitions);
- return definitions;
- }
-
- /**
- * To the specified list, add mapping definitions to use for analyzing the
- * mapping of a type given all annotations on it. The order is important,
- * as once a mapping definition tests positive for a
- * type, all following mapping definitions are ignored.
- */
- protected abstract void addJavaTypeMappingDefinitionsTo(ArrayList<JavaTypeMappingDefinition> definitions);
-
-
- // ********** Java attribute mappings **********
-
- public synchronized Iterable<DefaultJavaAttributeMappingDefinition> getDefaultJavaAttributeMappingDefinitions() {
- if (this.defaultJavaAttributeMappingDefinitions == null) {
- this.defaultJavaAttributeMappingDefinitions = this.buildDefaultJavaAttributeMappingDefinitions();
- }
- return this.defaultJavaAttributeMappingDefinitions;
- }
-
- protected ArrayList<DefaultJavaAttributeMappingDefinition> buildDefaultJavaAttributeMappingDefinitions() {
- ArrayList<DefaultJavaAttributeMappingDefinition> definitions = new ArrayList<DefaultJavaAttributeMappingDefinition>();
- this.addDefaultJavaAttributeMappingDefinitionsTo(definitions);
- return definitions;
- }
-
- /**
- * To the specified list, add mapping definitions to use for analyzing the
- * default mapping of an attribute. The order is important,
- * as once a mapping definition tests positive for an attribute,
- * all following mapping definitions are ignored.
- */
- protected abstract void addDefaultJavaAttributeMappingDefinitionsTo(ArrayList<DefaultJavaAttributeMappingDefinition> definitions);
-
- public synchronized Iterable<JavaAttributeMappingDefinition> getSpecifiedJavaAttributeMappingDefinitions() {
- if (this.specifiedJavaAttributeMappingDefinitions == null) {
- this.specifiedJavaAttributeMappingDefinitions = this.buildSpecifiedJavaAttributeMappingDefinitions();
- }
- return this.specifiedJavaAttributeMappingDefinitions;
- }
-
- protected ArrayList<JavaAttributeMappingDefinition> buildSpecifiedJavaAttributeMappingDefinitions() {
- ArrayList<JavaAttributeMappingDefinition> definitions = new ArrayList<JavaAttributeMappingDefinition>();
- this.addSpecifiedJavaAttributeMappingDefinitionsTo(definitions);
- return definitions;
- }
-
- /**
- * To the specified list, add mapping definitions to use for analyzing the
- * specified mapping of an attribute given all annotations on it. The order
- * is important, as once a mapping definition tests positive for an
- * attribute, all following mapping definitions are ignored.
- */
- protected abstract void addSpecifiedJavaAttributeMappingDefinitionsTo(ArrayList<JavaAttributeMappingDefinition> definitions);
-
-
- // ********** resource definitions **********
-
- public synchronized Iterable<ResourceDefinition> getResourceDefinitions() {
- if (this.resourceDefinitions == null) {
- this.resourceDefinitions = this.buildResourceDefinitions();
- }
- return this.resourceDefinitions;
- }
-
- protected ArrayList<ResourceDefinition> buildResourceDefinitions() {
- ArrayList<ResourceDefinition> definitions = new ArrayList<ResourceDefinition>();
- this.addResourceDefinitionsTo(definitions);
- return definitions;
- }
-
- protected abstract void addResourceDefinitionsTo(ArrayList<ResourceDefinition> definitions);
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
deleted file mode 100644
index 4d465c107f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
+++ /dev/null
@@ -1,2095 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.JptResourceModelListener;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryTypeCache;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceTypeCompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
-import org.eclipse.jpt.common.core.internal.utility.command.NotifyingRepeatingJobCommandWrapper;
-import org.eclipse.jpt.common.core.internal.utility.command.RepeatingJobCommandWrapper;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageInfoCompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceTypeCache;
-import org.eclipse.jpt.common.core.utility.command.JobCommand;
-import org.eclipse.jpt.common.core.utility.command.JobCommandExecutor;
-import org.eclipse.jpt.common.core.utility.command.NotifyingRepeatingJobCommand;
-import org.eclipse.jpt.common.core.utility.command.RepeatingJobCommand;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.BitTools;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SnapshotCloneIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.JpaRootContextNode2_0;
-import org.eclipse.jpt.jpa.core.libprov.JpaLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.ConnectionProfile;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * JPA project. Holds all the JPA stuff.
- * <p>
- * The JPA platform provides the hooks for vendor-specific stuff.
- * <p>
- * The JPA files are the "resource" model (i.e. objects that correspond directly
- * to Eclipse resources; e.g. Java source code files, XML files, JAR files).
- * <p>
- * The root context node is the "context" model (i.e. objects that attempt to
- * model the JPA spec, using the "resource" model as an adapter to the Eclipse
- * resources).
- * <p>
- * The data source is an adapter to the DTP meta-data model.
- */
-public abstract class AbstractJpaProject
- extends AbstractJpaNode
- implements JpaProject2_0
-{
- /**
- * The JPA project manager.
- */
- protected final Manager manager;
-
- /**
- * The Eclipse project corresponding to the JPA project.
- */
- protected final IProject project;
-
- /**
- * The vendor-specific JPA platform that builds the JPA project
- * and all its contents.
- */
- protected final JpaPlatform jpaPlatform;
-
- /**
- * The JPA files associated with the JPA project:
- * persistence.xml
- * orm.xml
- * java
- */
- protected final Vector<JpaFile> jpaFiles = new Vector<JpaFile>();
-
- /**
- * The "external" Java resource compilation units (source). Populated upon demand.
- */
- protected final Vector<JavaResourceCompilationUnit> externalJavaResourceCompilationUnits = new Vector<JavaResourceCompilationUnit>();
-
- /**
- * The "external" Java resource types (binary). Populated upon demand.
- */
- protected final JavaResourceTypeCache externalJavaResourceTypeCache;
-
- /**
- * Resource models notify this listener when they change. A project update
- * should occur any time a resource model changes.
- */
- protected final JptResourceModelListener resourceModelListener;
-
- /**
- * The root of the model representing the collated resources associated with
- * the JPA project.
- */
- protected final JpaRootContextNode rootContextNode;
-
- /**
- * A repeating command that keeps the JPA project's context model
- * synchronized with its resource model, either synchronously or
- * asynchronously (or not at all), depending on the JPA project manager.
- */
- protected volatile RepeatingJobCommand synchronizeContextModelCommand;
- protected volatile boolean synchronizingContextModel = false;
-
- /**
- * A pluggable synchronizer that "updates" the JPA project, either
- * synchronously or asynchronously (or not at all), depending on the JPA
- * project manager.
- */
- protected volatile NotifyingRepeatingJobCommand updateCommand;
- protected final NotifyingRepeatingJobCommand.Listener updateCommandListener;
-
- /**
- * The data source that wraps the DTP model.
- */
- // TODO move to persistence unit... :-(
- protected final JpaDataSource dataSource;
-
- /**
- * A catalog name used to override the connection's default catalog.
- */
- protected volatile String userOverrideDefaultCatalog;
-
- /**
- * A schema name used to override the connection's default schema.
- */
- protected volatile String userOverrideDefaultSchema;
-
- /**
- * Flag indicating whether the project should "discover" annotated
- * classes automatically, as opposed to requiring the classes to be
- * listed in <code>persistence.xml</code>. Stored as a preference.
- * @see #setDiscoversAnnotatedClasses(boolean)
- */
- protected volatile boolean discoversAnnotatedClasses;
-
- /**
- * The name of the Java project source folder that holds the generated
- * metamodel. If the name is <code>null</code> the metamodel is not
- * generated.
- */
- protected volatile String metamodelSourceFolderName;
-
-
- // ********** constructor/initialization **********
-
- protected AbstractJpaProject(JpaProject.Config config) {
- super(null); // JPA project is the root of the containment tree
- if ((config.getJpaProjectManager() == null) || (config.getProject() == null) || (config.getJpaPlatform() == null)) {
- throw new NullPointerException();
- }
- this.manager = config.getJpaProjectManager();
- this.project = config.getProject();
- this.synchronizeContextModelCommand = this.buildSynchronizeContextModelCommand();
- this.updateCommand = this.buildTempUpdateCommand(); // temporary command
- this.jpaPlatform = config.getJpaPlatform();
- this.dataSource = this.getJpaFactory().buildJpaDataSource(this, config.getConnectionProfileName());
- this.userOverrideDefaultCatalog = config.getUserOverrideDefaultCatalog();
- this.userOverrideDefaultSchema = config.getUserOverrideDefaultSchema();
- this.discoversAnnotatedClasses = config.discoverAnnotatedClasses();
-
- this.resourceModelListener = this.buildResourceModelListener();
- // build the JPA files corresponding to the Eclipse project's files
- InitialResourceProxyVisitor visitor = this.buildInitialResourceProxyVisitor();
- visitor.visitProject(this.project);
-
- this.externalJavaResourceTypeCache = this.buildExternalJavaResourceTypeCache();
-
- if (this.isJpa2_0Compatible()) {
- this.metamodelSourceFolderName = ((JpaProject2_0.Config) config).getMetamodelSourceFolderName();
- if (this.metamodelSoureFolderNameIsInvalid()) {
- this.metamodelSourceFolderName = null;
- }
- }
-
- this.rootContextNode = this.buildRootContextNode();
-
- this.updateCommandListener = this.buildUpdateCommandListener();
- this.initializeContextModel();
-
- // start listening to this cache once the context model has been built
- // and all the external types are faulted in
- this.externalJavaResourceTypeCache.addResourceModelListener(this.resourceModelListener);
- }
-
- @Override
- protected boolean requiresParent() {
- return false;
- }
-
- @Override
- public IResource getResource() {
- return this.project;
- }
-
- protected JavaResourceTypeCache buildExternalJavaResourceTypeCache() {
- return new BinaryTypeCache(this.jpaPlatform.getAnnotationProvider());
- }
-
- protected JpaRootContextNode buildRootContextNode() {
- return this.getJpaFactory().buildRootContextNode(this);
- }
-
- /**
- * Execute a synchronous <em>sync</em> and <em>update</em> before returning
- * from the constructor.
- */
- protected void initializeContextModel() {
- // there *shouldn't* be any changes to the resource model yet...
- this.synchronizeContextModelCommand.start();
-
- // perform a synchronous update...
- this.updateCommand.start();
- this.update();
- try {
- this.updateCommand.stop();
- } catch (InterruptedException ex) {
- // the initial update is synchronous, so this shouldn't happen...
- // but let our thread know it was interrupted during a wait
- Thread.currentThread().interrupt();
- }
-
- // ...then delegate further updates to the JPA project manager
- this.updateCommand = this.buildUpdateCommand();
- this.updateCommand.addListener(this.updateCommandListener);
- this.updateCommand.start();
- }
-
-
- // ********** initial resource proxy visitor **********
-
- protected InitialResourceProxyVisitor buildInitialResourceProxyVisitor() {
- return new InitialResourceProxyVisitor();
- }
-
- protected class InitialResourceProxyVisitor
- implements IResourceProxyVisitor
- {
- protected InitialResourceProxyVisitor() {
- super();
- }
- protected void visitProject(IProject p) {
- try {
- p.accept(this, IResource.NONE);
- } catch (CoreException ex) {
- // shouldn't happen - we don't throw any CoreExceptions
- throw new RuntimeException(ex);
- }
- }
- // add a JPA file for every [appropriate] file encountered by the visitor
- public boolean visit(IResourceProxy resource) {
- switch (resource.getType()) {
- case IResource.ROOT : // shouldn't happen
- return true; // visit children
- case IResource.PROJECT :
- return true; // visit children
- case IResource.FOLDER :
- return true; // visit children
- case IResource.FILE :
- AbstractJpaProject.this.addJpaFile_((IFile) resource.requestResource());
- return false; // no children
- default :
- return false; // no children
- }
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
-
- // ********** misc **********
-
- /**
- * Ignore changes to this collection. Adds can be ignored since they are triggered
- * by requests that will, themselves, trigger updates (typically during the
- * update of an object that calls a setter with the newly-created resource
- * type). Deletes will be accompanied by manual updates.
- */
- @Override
- protected void addNonUpdateAspectNamesTo(Set<String> nonUpdateAspectNames) {
- super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
- nonUpdateAspectNames.add(EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION);
- }
-
-
- // ********** general queries **********
-
- @Override
- public JpaProject getJpaProject() {
- return this;
- }
-
- public Manager getManager() {
- return this.manager;
- }
-
- public String getName() {
- return this.project.getName();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
-
- public IProject getProject() {
- return this.project;
- }
-
- @Override
- public IJavaProject getJavaProject() {
- return JavaCore.create(this.project);
- }
-
- @Override
- public JpaPlatform getJpaPlatform() {
- return this.jpaPlatform;
- }
-
- @SuppressWarnings("unchecked")
- protected Iterable<JavaResourceCompilationUnit> getCombinedJavaResourceCompilationUnits() {
- return new CompositeIterable<JavaResourceCompilationUnit>(
- this.getInternalJavaResourceCompilationUnits(),
- this.getExternalJavaResourceCompilationUnits()
- );
- }
-
-
- // ********** database **********
-
- @Override
- public JpaDataSource getDataSource() {
- return this.dataSource;
- }
-
- public ConnectionProfile getConnectionProfile() {
- return this.dataSource.getConnectionProfile();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDefaultDbCatalog() {
- String catalog = this.getDefaultCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- public String getDefaultCatalog() {
- String catalog = this.getUserOverrideDefaultCatalog();
- return (catalog != null) ? catalog : this.getDatabaseDefaultCatalog();
- }
-
- protected String getDatabaseDefaultCatalog() {
- Database db = this.getDatabase();
- return (db == null ) ? null : db.getDefaultCatalogIdentifier();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDefaultDbSchemaContainer() {
- String catalog = this.getDefaultCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- public Schema getDefaultDbSchema() {
- SchemaContainer sc = this.getDefaultDbSchemaContainer();
- return (sc == null) ? null : sc.getSchemaForIdentifier(this.getDefaultSchema());
- }
-
- public String getDefaultSchema() {
- String schema = this.getUserOverrideDefaultSchema();
- if (schema != null) {
- return schema;
- }
-
- String catalog = this.getDefaultCatalog();
- if (catalog == null) {
- // if there is no default catalog (either user-override or database-determined),
- // the database probably does not support catalogs;
- // return the database's default schema
- return this.getDatabaseDefaultSchema();
- }
-
- Catalog dbCatalog = this.resolveDbCatalog(catalog);
- if (dbCatalog != null) {
- return dbCatalog.getDefaultSchemaIdentifier();
- }
-
- // if we could not find a catalog on the database that matches the default
- // catalog name, return the database's default schema(?) - hmmm
- return this.getDatabaseDefaultSchema();
- }
-
- protected String getDatabaseDefaultSchema() {
- Database db = this.getDatabase();
- return (db == null ) ? null : db.getDefaultSchemaIdentifier();
- }
-
-
- // ********** user override default catalog **********
-
- public String getUserOverrideDefaultCatalog() {
- return this.userOverrideDefaultCatalog;
- }
-
- public void setUserOverrideDefaultCatalog(String catalog) {
- String old = this.userOverrideDefaultCatalog;
- this.userOverrideDefaultCatalog = catalog;
- JptJpaCorePlugin.setUserOverrideDefaultCatalog(this.project, catalog);
- this.firePropertyChanged(USER_OVERRIDE_DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
-
- // ********** user override default schema **********
-
- public String getUserOverrideDefaultSchema() {
- return this.userOverrideDefaultSchema;
- }
-
- public void setUserOverrideDefaultSchema(String schema) {
- String old = this.userOverrideDefaultSchema;
- this.userOverrideDefaultSchema = schema;
- JptJpaCorePlugin.setUserOverrideDefaultSchema(this.project, schema);
- this.firePropertyChanged(USER_OVERRIDE_DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
-
- // ********** discover annotated classes **********
-
- public boolean discoversAnnotatedClasses() {
- return this.discoversAnnotatedClasses;
- }
-
- public void setDiscoversAnnotatedClasses(boolean discoversAnnotatedClasses) {
- boolean old = this.discoversAnnotatedClasses;
- this.discoversAnnotatedClasses = discoversAnnotatedClasses;
- JptJpaCorePlugin.setDiscoverAnnotatedClasses(this.project, discoversAnnotatedClasses);
- this.firePropertyChanged(DISCOVERS_ANNOTATED_CLASSES_PROPERTY, old, discoversAnnotatedClasses);
- }
-
-
- // ********** JPA files **********
-
- public Iterable<JpaFile> getJpaFiles() {
- return new LiveCloneIterable<JpaFile>(this.jpaFiles); // read-only
- }
-
- public int getJpaFilesSize() {
- return this.jpaFiles.size();
- }
-
- protected Iterable<JpaFile> getJpaFiles(final IContentType contentType) {
- return new FilteringIterable<JpaFile>(this.getJpaFiles()) {
- @Override
- protected boolean accept(JpaFile jpaFile) {
- return jpaFile.getContentType().isKindOf(contentType);
- }
- };
- }
-
- @Override
- public JpaFile getJpaFile(IFile file) {
- for (JpaFile jpaFile : this.getJpaFiles()) {
- if (jpaFile.getFile().equals(file)) {
- return jpaFile;
- }
- }
- return null;
- }
-
- /**
- * Add a JPA file for the specified file, if appropriate.
- * Return true if a JPA File was created and added, false otherwise
- */
- protected boolean addJpaFile(IFile file) {
- JpaFile jpaFile = this.addJpaFile_(file);
- if (jpaFile != null) {
- this.fireItemAdded(JPA_FILES_COLLECTION, jpaFile);
- return true;
- }
- return false;
- }
-
- /**
- * Add a JPA file for the specified file, if appropriate, without firing
- * an event; useful during construction.
- * Return the new JPA file, null if it was not created.
- */
- protected JpaFile addJpaFile_(IFile file) {
- if (this.fileIsJavaRelated(file)) {
- if ( ! this.getJavaProject().isOnClasspath(file)) {
- return null; // java-related files must be on the Java classpath
- }
- }
- else if ( ! this.fileResourceLocationIsValid(file)) {
- return null;
- }
-
- JpaFile jpaFile = this.buildJpaFile(file);
- if (jpaFile == null) {
- return null;
- }
- jpaFile.getResourceModel().addResourceModelListener(this.resourceModelListener);
- this.jpaFiles.add(jpaFile);
- return jpaFile;
- }
-
- /**
- * <code>.java</code> or <code>.jar</code>
- */
- protected boolean fileIsJavaRelated(IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
- return (contentType != null) && this.contentTypeIsJavaRelated(contentType);
- }
-
- /**
- * pre-condition: content type is not <code>null</code>
- */
- protected boolean contentTypeIsJavaRelated(IContentType contentType) {
- return contentType.isKindOf(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE) ||
- contentType.isKindOf(JptCommonCorePlugin.JAR_CONTENT_TYPE);
- }
-
- protected boolean fileResourceLocationIsValid(IFile file) {
- return this.getProjectResourceLocator().resourceLocationIsValid(file.getParent());
- }
-
- protected ProjectResourceLocator getProjectResourceLocator() {
- return (ProjectResourceLocator) this.project.getAdapter(ProjectResourceLocator.class);
- }
-
- /**
- * Log any developer exceptions and don't build a JPA file rather
- * than completely failing to build the JPA Project.
- */
- protected JpaFile buildJpaFile(IFile file) {
- try {
- return this.getJpaPlatform().buildJpaFile(this, file);
- } catch (Exception ex) {
- JptJpaCorePlugin.log("Error building JPA file: " + file.getFullPath(), ex); //$NON-NLS-1$
- return null;
- }
- }
-
- /**
- * Remove the JPA file corresponding to the specified IFile, if it exists.
- * Return true if a JPA File was removed, false otherwise
- */
- protected boolean removeJpaFile(IFile file) {
- JpaFile jpaFile = this.getJpaFile(file);
- if (jpaFile != null) { // a JpaFile is not added for every IFile
- this.removeJpaFile(jpaFile);
- return true;
- }
- return false;
- }
-
- /**
- * Stop listening to the JPA file and remove it.
- */
- protected void removeJpaFile(JpaFile jpaFile) {
- jpaFile.getResourceModel().removeResourceModelListener(this.resourceModelListener);
- if ( ! this.removeItemFromCollection(jpaFile, this.jpaFiles, JPA_FILES_COLLECTION)) {
- throw new IllegalArgumentException(jpaFile.toString());
- }
- }
-
-
- // ********** external Java resource types (source or binary) **********
-
- protected JavaResourceAbstractType buildExternalJavaResourceType(String typeName) {
- IType jdtType = this.findType(typeName);
- return (jdtType == null) ? null : this.buildExternalJavaResourceType(jdtType);
- }
-
- protected IType findType(String typeName) {
- try {
- return this.getJavaProject().findType(typeName);
- } catch (JavaModelException ex) {
- return null; // ignore exception?
- }
- }
-
- protected JavaResourceAbstractType buildExternalJavaResourceType(IType jdtType) {
- return jdtType.isBinary() ?
- this.buildBinaryExternalJavaResourceType(jdtType) :
- this.buildSourceExternalJavaResourceType(jdtType);
- }
-
- protected JavaResourceAbstractType buildBinaryExternalJavaResourceType(IType jdtType) {
- return this.externalJavaResourceTypeCache.addType(jdtType);
- }
-
- protected JavaResourceAbstractType buildSourceExternalJavaResourceType(IType jdtType) {
- JavaResourceCompilationUnit jrcu = this.getExternalJavaResourceCompilationUnit(jdtType.getCompilationUnit());
- String jdtTypeName = jdtType.getFullyQualifiedName('.'); // JDT member type names use '$'
- for (JavaResourceAbstractType jrat : jrcu.getTypes()) {
- if (jrat.getQualifiedName().equals(jdtTypeName)) {
- return jrat;
- }
- }
- // we can get here if the project JRE is removed;
- // see SourceCompilationUnit#getPrimaryType(CompilationUnit)
- // bug 225332
- return null;
- }
-
-
- // ********** external Java resource persistent types (binary) **********
-
- public JavaResourceTypeCache getExternalJavaResourceTypeCache() {
- return this.externalJavaResourceTypeCache;
- }
-
-
- // ********** external Java resource compilation units (source) **********
-
- public Iterable<JavaResourceCompilationUnit> getExternalJavaResourceCompilationUnits() {
- return new LiveCloneIterable<JavaResourceCompilationUnit>(this.externalJavaResourceCompilationUnits); // read-only
- }
-
- public int getExternalJavaResourceCompilationUnitsSize() {
- return this.externalJavaResourceCompilationUnits.size();
- }
-
- /**
- * Return the resource model compilation unit corresponding to the specified
- * JDT compilation unit. If it does not exist, build it.
- */
- protected JavaResourceCompilationUnit getExternalJavaResourceCompilationUnit(ICompilationUnit jdtCompilationUnit) {
- for (JavaResourceCompilationUnit jrcu : this.getExternalJavaResourceCompilationUnits()) {
- if (jrcu.getCompilationUnit().equals(jdtCompilationUnit)) {
- // we will get here if the JRCU could not build its persistent type...
- return jrcu;
- }
- }
- return this.addExternalJavaResourceCompilationUnit(jdtCompilationUnit);
- }
-
- /**
- * Add an external Java resource compilation unit.
- */
- protected JavaResourceCompilationUnit addExternalJavaResourceCompilationUnit(ICompilationUnit jdtCompilationUnit) {
- JavaResourceCompilationUnit jrcu = this.buildJavaResourceCompilationUnit(jdtCompilationUnit);
- this.addItemToCollection(jrcu, this.externalJavaResourceCompilationUnits, EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION);
- jrcu.addResourceModelListener(this.resourceModelListener);
- return jrcu;
- }
-
- protected JavaResourceCompilationUnit buildJavaResourceCompilationUnit(ICompilationUnit jdtCompilationUnit) {
- return new SourceTypeCompilationUnit(
- jdtCompilationUnit,
- this.jpaPlatform.getAnnotationProvider(),
- this.jpaPlatform.getAnnotationEditFormatter(),
- this.manager.getModifySharedDocumentCommandExecutor()
- );
- }
-
- protected boolean removeExternalJavaResourceCompilationUnit(IFile file) {
- for (JavaResourceCompilationUnit jrcu : this.getExternalJavaResourceCompilationUnits()) {
- if (jrcu.getFile().equals(file)) {
- this.removeExternalJavaResourceCompilationUnit(jrcu);
- return true;
- }
- }
- return false;
- }
-
- protected void removeExternalJavaResourceCompilationUnit(JavaResourceCompilationUnit jrcu) {
- jrcu.removeResourceModelListener(this.resourceModelListener);
- this.removeItemFromCollection(jrcu, this.externalJavaResourceCompilationUnits, EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION);
- }
-
-
- // ********** context model **********
-
- public JpaRootContextNode getRootContextNode() {
- return this.rootContextNode;
- }
-
-
- // ********** utility **********
-
- public IFile getPlatformFile(IPath runtimePath) {
- return this.getProjectResourceLocator().getPlatformFile(runtimePath);
- }
-
-
- // ********** XML files **********
-
- public JpaXmlResource getPersistenceXmlResource() {
- return (JpaXmlResource) this.getResourceModel(
- JptJpaCorePlugin.DEFAULT_PERSISTENCE_XML_RUNTIME_PATH,
- JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE
- );
- }
-
- public JpaXmlResource getDefaultOrmXmlResource() {
- return this.getMappingFileXmlResource(JptJpaCorePlugin.DEFAULT_ORM_XML_RUNTIME_PATH);
- }
-
- public JpaXmlResource getMappingFileXmlResource(IPath runtimePath) {
- return (JpaXmlResource) this.getResourceModel(runtimePath, JptJpaCorePlugin.MAPPING_FILE_CONTENT_TYPE);
- }
-
- /**
- * If the specified file exists, is significant to the JPA project, and its
- * content is a "kind of" the specified content type, return the JPA
- * resource model corresponding to the file; otherwise, return null.
- */
- protected JptResourceModel getResourceModel(IPath runtimePath, IContentType contentType) {
- IFile file = this.getPlatformFile(runtimePath);
- return ((file != null) && file.exists()) ? this.getResourceModel(file, contentType) : null;
- }
-
- /**
- * If the specified file is significant to the JPA project and its content
- * is a "kind of" the specified content type, return the JPA resource model
- * corresponding to the file; otherwise, return null.
- */
- protected JptResourceModel getResourceModel(IFile file, IContentType contentType) {
- JpaFile jpaFile = this.getJpaFile(file);
- return (jpaFile == null) ? null : jpaFile.getResourceModel(contentType);
- }
-
-
- // ********** annotated Java source classes **********
-
- public Iterable<String> getAnnotatedJavaSourceClassNames() {
- return new TransformationIterable<JavaResourceAbstractType, String>(this.getInternalAnnotatedSourceJavaResourceTypes()) {
- @Override
- protected String transform(JavaResourceAbstractType jraType) {
- return jraType.getQualifiedName();
- }
- };
- }
-
- /**
- * Return only those valid annotated Java resource persistent types that are
- * directly part of the JPA project, ignoring those in JARs referenced in
- * <code>persistence.xml</code>.
- * @see org.eclipse.jpt.common.core.internal.utility.jdt.JPTTools#typeIsPersistable(org.eclipse.jpt.common.core.internal.utility.jdt.JPTTools.TypeAdapter)
- */
- protected Iterable<JavaResourceAbstractType> getInternalAnnotatedSourceJavaResourceTypes() {
- return new FilteringIterable<JavaResourceAbstractType>(this.getInternalSourceJavaResourceTypes()) {
- @Override
- protected boolean accept(JavaResourceAbstractType jraType) {
- return jraType.isAnnotated(); // i.e. the type has a valid type annotation
- }
- };
- }
-
- /**
- * Return only the names of those valid <em>mapped</em> (i.e. annotated with
- * <code>@Entity</code>, <code>@Embeddable</code>, etc.) Java resource
- * persistent types that are directly part of the JPA project, ignoring
- * those in JARs referenced in <code>persistence.xml</code>.
- */
- public Iterable<String> getMappedJavaSourceClassNames() {
- return new TransformationIterable<JavaResourceAbstractType, String>(this.getInternalMappedSourceJavaResourceTypes()) {
- @Override
- protected String transform(JavaResourceAbstractType jraType) {
- return jraType.getQualifiedName();
- }
- };
- }
-
- /**
- * Return only those valid <em>mapped</em> (i.e. annotated with
- * <code>@Entity</code>, <code>@Embeddable</code>, etc.) Java resource
- * persistent types that are directly part of the JPA project, ignoring
- * those in JARs referenced in <code>persistence.xml</code>.
- */
- protected Iterable<JavaResourceAbstractType> getInternalMappedSourceJavaResourceTypes() {
- final Iterable<String> typeMappingAnnotationNames = this.getTypeMappingAnnotationNames();
- return new FilteringIterable<JavaResourceAbstractType>(this.getInternalAnnotatedSourceJavaResourceTypes()) {
- @Override
- protected boolean accept(JavaResourceAbstractType jraType) {
- return jraType.isAnnotatedWithAnyOf(typeMappingAnnotationNames);
- }
- };
- }
-
- public Iterable<String> getTypeMappingAnnotationNames() {
- return new TransformationIterable<JavaTypeMappingDefinition, String>(this.getJpaPlatform().getJavaTypeMappingDefinitions()) {
- @Override
- protected String transform(JavaTypeMappingDefinition o) {
- return o.getAnnotationName();
- }
- };
- }
-
- /**
- * Return only those Java resource persistent types that are directly
- * part of the JPA project, ignoring those in JARs referenced in
- * <code>persistence.xml</code>
- */
- protected Iterable<JavaResourceAbstractType> getInternalSourceJavaResourceTypes() {
- return new CompositeIterable<JavaResourceAbstractType>(this.getInternalSourceJavaResourceTypeLists());
- }
-
- /**
- * Return only those Java resource persistent types that are directly
- * part of the JPA project, ignoring those in JARs referenced in
- * <code>persistence.xml</code>
- */
- protected Iterable<Iterable<JavaResourceAbstractType>> getInternalSourceJavaResourceTypeLists() {
- return new TransformationIterable<JavaResourceCompilationUnit, Iterable<JavaResourceAbstractType>>(this.getInternalJavaResourceCompilationUnits()) {
- @Override
- protected Iterable<JavaResourceAbstractType> transform(final JavaResourceCompilationUnit compilationUnit) {
- return compilationUnit.getTypes(); // *all* the types in the compilation unit
- }
- };
- }
-
- /**
- * Return the JPA project's resource compilation units.
- */
- protected Iterable<JavaResourceCompilationUnit> getInternalJavaResourceCompilationUnits() {
- return new TransformationIterable<JpaFile, JavaResourceCompilationUnit>(this.getJavaSourceJpaFiles()) {
- @Override
- protected JavaResourceCompilationUnit transform(JpaFile jpaFile) {
- return (JavaResourceCompilationUnit) jpaFile.getResourceModel();
- }
- };
- }
-
- /**
- * Return the JPA project's JPA files with Java source <em>content</em>.
- */
- protected Iterable<JpaFile> getJavaSourceJpaFiles() {
- return this.getJpaFiles(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE);
- }
-
-
- // ********** Java resource persistent type look-up **********
-
- public JavaResourceAbstractType getJavaResourceType(String typeName) {
- for (JavaResourceAbstractType jraType : this.getJavaResourceTypes()) {
- if (jraType.getQualifiedName().equals(typeName)) {
- return jraType;
- }
- }
- // if we don't have a type already, try to build new one from the project classpath
- return this.buildExternalJavaResourceType(typeName);
- }
-
- public JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.Kind kind) {
- JavaResourceAbstractType resourceType = this.getJavaResourceType(typeName);
- if ((resourceType == null) || (resourceType.getKind() != kind)) {
- return null;
- }
- return resourceType;
- }
-
-
- /**
- * return *all* the Java resource persistent types, including those in JARs referenced in
- * persistence.xml
- */
- protected Iterable<JavaResourceAbstractType> getJavaResourceTypes() {
- return new CompositeIterable<JavaResourceAbstractType>(this.getJavaResourceTypeSets());
- }
-
- /**
- * return *all* the Java resource persistent types, including those in JARs referenced in
- * persistence.xml
- */
- protected Iterable<Iterable<JavaResourceAbstractType>> getJavaResourceTypeSets() {
- return new TransformationIterable<JavaResourceNode.Root, Iterable<JavaResourceAbstractType>>(this.getJavaResourceNodeRoots()) {
- @Override
- protected Iterable<JavaResourceAbstractType> transform(final JavaResourceNode.Root root) {
- return root.getTypes(); // *all* the types held by the root
- }
- };
- }
-
- @SuppressWarnings("unchecked")
- protected Iterable<JavaResourceNode.Root> getJavaResourceNodeRoots() {
- return new CompositeIterable<JavaResourceNode.Root>(
- this.getInternalJavaResourceCompilationUnits(),
- this.getInternalJavaResourcePackageFragmentRoots(),
- this.getExternalJavaResourceCompilationUnits(),
- Collections.singleton(this.externalJavaResourceTypeCache)
- );
- }
-
-
- // ********** Java resource persistent package look-up **********
-
- public JavaResourcePackage getJavaResourcePackage(String packageName) {
- for (JavaResourcePackage jrp : this.getJavaResourcePackages()) {
- if (jrp.getName().equals(packageName)) {
- return jrp;
- }
- }
- return null;
- }
-
- public Iterable<JavaResourcePackage> getJavaResourcePackages(){
- return new FilteringIterable<JavaResourcePackage>(
- new TransformationIterable<JpaFile, JavaResourcePackage>(this.getPackageInfoSourceJpaFiles()) {
- @Override
- protected JavaResourcePackage transform(JpaFile jpaFile) {
- return ((JavaResourcePackageInfoCompilationUnit) jpaFile.getResourceModel()).getPackage();
- }
- })
- {
- @Override
- protected boolean accept(JavaResourcePackage packageInfo) {
- return packageInfo != null;
- }
- };
- }
-
- /**
- * return JPA files with package-info source "content"
- */
- protected Iterable<JpaFile> getPackageInfoSourceJpaFiles() {
- return this.getJpaFiles(JptCommonCorePlugin.JAVA_SOURCE_PACKAGE_INFO_CONTENT_TYPE);
- }
-
-
- // ********** JARs **********
-
- // TODO
- public JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(String jarFileName) {
-// return this.getJarResourcePackageFragmentRoot(this.convertToPlatformFile(jarFileName));
- return this.getJavaResourcePackageFragmentRoot(this.project.getFile(jarFileName));
- }
-
- protected JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(IFile jarFile) {
- for (JavaResourcePackageFragmentRoot pfr : this.getInternalJavaResourcePackageFragmentRoots()) {
- if (pfr.getFile().equals(jarFile)) {
- return pfr;
- }
- }
- return null;
- }
-
- protected Iterable<JavaResourcePackageFragmentRoot> getInternalJavaResourcePackageFragmentRoots() {
- return new TransformationIterable<JpaFile, JavaResourcePackageFragmentRoot>(this.getJarJpaFiles()) {
- @Override
- protected JavaResourcePackageFragmentRoot transform(JpaFile jpaFile) {
- return (JavaResourcePackageFragmentRoot) jpaFile.getResourceModel();
- }
- };
- }
-
- /**
- * return JPA files with JAR "content"
- */
- public Iterable<JpaFile> getJarJpaFiles() {
- return this.getJpaFiles(JptCommonCorePlugin.JAR_CONTENT_TYPE);
- }
-
-
- // ********** metamodel **********
-
- public Iterable<JavaResourceAbstractType> getGeneratedMetamodelTopLevelTypes() {
- if (this.metamodelSourceFolderName == null) {
- return EmptyIterable.instance();
- }
- final IPackageFragmentRoot genSourceFolder = this.getMetamodelPackageFragmentRoot();
- return new FilteringIterable<JavaResourceAbstractType>(this.getInternalSourceJavaResourceTypes()) {
- @Override
- protected boolean accept(JavaResourceAbstractType jrat) {
- return MetamodelTools.isGeneratedMetamodelTopLevelType(jrat, genSourceFolder);
- }
- };
- }
-
- public JavaResourceAbstractType getGeneratedMetamodelTopLevelType(IFile file) {
- JavaResourceCompilationUnit jrcu = this.getJavaResourceCompilationUnit(file);
- if (jrcu == null) {
- return null; // hmmm...
- }
- JavaResourceAbstractType primaryType = jrcu.getPrimaryType();
- if (primaryType == null) {
- return null; // no types in the file
- }
- return MetamodelTools.isGeneratedMetamodelTopLevelType(primaryType) ? primaryType : null;
- }
-
- protected JavaResourceCompilationUnit getJavaResourceCompilationUnit(IFile file) {
- return (JavaResourceCompilationUnit) this.getResourceModel(file, JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE);
- }
-
- public String getMetamodelSourceFolderName() {
- return this.metamodelSourceFolderName;
- }
-
- public void setMetamodelSourceFolderName(String folderName) {
- if (this.setMetamodelSourceFolderName_(folderName)) {
- JptJpaCorePlugin.setMetamodelSourceFolderName(this.project, folderName);
- if (folderName == null) {
- this.disposeMetamodel();
- } else {
- this.initializeMetamodel();
- }
- }
- }
-
- protected boolean setMetamodelSourceFolderName_(String folderName) {
- String old = this.metamodelSourceFolderName;
- this.metamodelSourceFolderName = folderName;
- return this.firePropertyChanged(METAMODEL_SOURCE_FOLDER_NAME_PROPERTY, old, folderName);
- }
-
- public void initializeMetamodel() {
- if (this.isJpa2_0Compatible()) {
- ((JpaRootContextNode2_0) this.rootContextNode).initializeMetamodel();
- }
- }
-
- /**
- * Synchronize the metamodel for 2.0-compatible JPA projects.
- */
- public IStatus synchronizeMetamodel(IProgressMonitor monitor) {
- if (this.isJpa2_0Compatible()) {
- if (this.metamodelSourceFolderName != null) {
- this.scheduleSynchronizeMetamodelJob();
- }
- }
- return Status.OK_STATUS;
- }
-
- /**
- * We dispatch a job even when the JPA project manager is "synchronous"
- * because we will synchronously execute an update when we receive a
- * resource change event that is fired when a file is changed; and we
- * cannot modify another file in response to a file change because the
- * rules are incompatible. For example, if the <code>persistence.xml</code>
- * file changes, we will receive a resource change event while the
- * <code>persistence.xml</code> file is locked. We will not be able to
- * lock and modify the necessary metamodel source files under this lock.
- */
- protected void scheduleSynchronizeMetamodelJob() {
- this.buildSynchronizeMetamodelJob().schedule();
- }
-
- protected Job buildSynchronizeMetamodelJob() {
- Job job = this.buildSynchronizeMetamodelJob_();
- // lock the project so we are synchronized with the JPA project manager
- job.setRule(this.project);
- return job;
- }
-
- protected Job buildSynchronizeMetamodelJob_() {
- return new SynchronizeMetamodelJob(this.buildSynchronizeMetamodelJobName());
- }
-
- protected String buildSynchronizeMetamodelJobName() {
- return NLS.bind(JptCoreMessages.METAMODEL_SYNC_JOB_NAME, this.getName());
- }
-
- /**
- * Use a {@link WorkspaceJob} to
- * suppress the resource change events until we are finished synchronizing
- * the metamodel.
- */
- protected class SynchronizeMetamodelJob
- extends WorkspaceJob
- {
- protected SynchronizeMetamodelJob(String name) {
- super(name);
- }
- @Override
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- return AbstractJpaProject.this.synchronizeMetamodel_(monitor);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * Called by the {@link SynchronizeMetamodelJob#runInWorkspace(IProgressMonitor)}.
- */
- protected IStatus synchronizeMetamodel_(IProgressMonitor monitor) {
- return ((JpaRootContextNode2_0) this.rootContextNode).synchronizeMetamodel(monitor);
- }
-
- public void disposeMetamodel() {
- if (this.isJpa2_0Compatible()) {
- ((JpaRootContextNode2_0) this.rootContextNode).disposeMetamodel();
- }
- }
-
- public IPackageFragmentRoot getMetamodelPackageFragmentRoot() {
- return this.getJavaProject().getPackageFragmentRoot(this.getMetaModelSourceFolder());
- }
-
- protected IFolder getMetaModelSourceFolder() {
- return this.project.getFolder(this.metamodelSourceFolderName);
- }
-
- /**
- * If the metamodel source folder is no longer a Java project source
- * folder, clear it out.
- */
- protected void checkMetamodelSourceFolderName() {
- if (this.metamodelSoureFolderNameIsInvalid()) {
- this.setMetamodelSourceFolderName(null);
- }
- }
-
- protected boolean metamodelSoureFolderNameIsInvalid() {
- return ! this.metamodelSourceFolderNameIsValid();
- }
-
- protected boolean metamodelSourceFolderNameIsValid() {
- return CollectionTools.contains(this.getJavaSourceFolderNames(), this.metamodelSourceFolderName);
- }
-
-
- // ********** Java source folder names **********
-
- public Iterable<String> getJavaSourceFolderNames() {
- try {
- return this.getJavaSourceFolderNames_();
- } catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- return EmptyIterable.instance();
- }
- }
-
- protected Iterable<String> getJavaSourceFolderNames_() throws JavaModelException {
- return new TransformationIterable<IPackageFragmentRoot, String>(this.getJavaSourceFolders()) {
- @Override
- protected String transform(IPackageFragmentRoot pfr) {
- try {
- return this.transform_(pfr);
- } catch (JavaModelException ex) {
- return "Error: " + pfr.getPath(); //$NON-NLS-1$
- }
- }
- private String transform_(IPackageFragmentRoot pfr) throws JavaModelException {
- return pfr.getUnderlyingResource().getProjectRelativePath().toString();
- }
- };
- }
-
- protected Iterable<IPackageFragmentRoot> getJavaSourceFolders() throws JavaModelException {
- return new FilteringIterable<IPackageFragmentRoot>(
- this.getPackageFragmentRoots(),
- SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER
- );
- }
-
- protected static final Filter<IPackageFragmentRoot> SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER =
- new Filter<IPackageFragmentRoot>() {
- public boolean accept(IPackageFragmentRoot pfr) {
- try {
- return this.accept_(pfr);
- } catch (JavaModelException ex) {
- return false;
- }
- }
- private boolean accept_(IPackageFragmentRoot pfr) throws JavaModelException {
- return pfr.exists() && (pfr.getKind() == IPackageFragmentRoot.K_SOURCE);
- }
- };
-
- protected Iterable<IPackageFragmentRoot> getPackageFragmentRoots() throws JavaModelException {
- return new ArrayIterable<IPackageFragmentRoot>(this.getJavaProject().getPackageFragmentRoots());
- }
-
-
- // ********** Java events **********
-
- // TODO handle changes to external projects
- public void javaElementChanged(ElementChangedEvent event) {
- this.processJavaDelta(event.getDelta());
- }
-
- /**
- * We recurse back here from {@link #processJavaDeltaChildren(IJavaElementDelta)}.
- */
- protected void processJavaDelta(IJavaElementDelta delta) {
- switch (delta.getElement().getElementType()) {
- case IJavaElement.JAVA_MODEL :
- this.processJavaModelDelta(delta);
- break;
- case IJavaElement.JAVA_PROJECT :
- this.processJavaProjectDelta(delta);
- break;
- case IJavaElement.PACKAGE_FRAGMENT_ROOT :
- this.processJavaPackageFragmentRootDelta(delta);
- break;
- case IJavaElement.PACKAGE_FRAGMENT :
- this.processJavaPackageFragmentDelta(delta);
- break;
- case IJavaElement.COMPILATION_UNIT :
- this.processJavaCompilationUnitDelta(delta);
- break;
- default :
- break; // ignore the elements inside a compilation unit
- }
- }
-
- protected void processJavaDeltaChildren(IJavaElementDelta delta) {
- for (IJavaElementDelta child : delta.getAffectedChildren()) {
- this.processJavaDelta(child); // recurse
- }
- }
-
- /**
- * Return whether the specified Java element delta is for a
- * {@link IJavaElementDelta#CHANGED CHANGED}
- * (as opposed to {@link IJavaElementDelta#ADDED ADDED} or
- * {@link IJavaElementDelta#REMOVED REMOVED}) Java element
- * and the specified flag is set.
- * (The delta flags are only significant if the delta
- * {@link IJavaElementDelta#getKind() kind} is
- * {@link IJavaElementDelta#CHANGED CHANGED}.)
- */
- protected boolean deltaFlagIsSet(IJavaElementDelta delta, int flag) {
- return (delta.getKind() == IJavaElementDelta.CHANGED) &&
- BitTools.flagIsSet(delta.getFlags(), flag);
- }
-
- // ***** model
- protected void processJavaModelDelta(IJavaElementDelta delta) {
- // process the Java model's projects
- this.processJavaDeltaChildren(delta);
- }
-
- // ***** project
- protected void processJavaProjectDelta(IJavaElementDelta delta) {
- // process the Java project's package fragment roots
- this.processJavaDeltaChildren(delta);
-
- // a classpath change can have pretty far-reaching effects...
- if (this.classpathHasChanged(delta)) {
- this.rebuild((IJavaProject) delta.getElement());
- }
- }
-
- /**
- * The specified Java project's classpath changed. Rebuild the JPA project
- * as appropriate.
- */
- protected void rebuild(IJavaProject javaProject) {
- // if the classpath has changed, we need to update everything since
- // class references could now be resolved (or not) etc.
- if (javaProject.equals(this.getJavaProject())) {
- this.removeDeadJpaFiles();
- this.checkMetamodelSourceFolderName();
- this.synchronizeWithJavaSource(this.getInternalJavaResourceCompilationUnits());
- } else {
- // TODO see if changed project is on our classpath?
- this.synchronizeWithJavaSource(this.getExternalJavaResourceCompilationUnits());
- }
- }
-
- /**
- * Loop through all our JPA files, remove any that are no longer on the
- * classpath.
- */
- protected void removeDeadJpaFiles() {
- for (JpaFile jpaFile : this.getJpaFiles()) {
- if (this.jpaFileIsDead(jpaFile)) {
- this.removeJpaFile(jpaFile);
- }
- }
- }
-
- protected boolean jpaFileIsDead(JpaFile jpaFile) {
- return ! this.jpaFileIsAlive(jpaFile);
- }
-
- /**
- * Sometimes (e.g. during tests), when a project has been deleted, we get a
- * Java change event that indicates the Java project is CHANGED (as
- * opposed to REMOVED, which is what typically happens). The event's delta
- * indicates that everything in the Java project has been deleted and the
- * classpath has changed. All entries in the classpath have been removed;
- * but single entry for the Java project's root folder has been added. (!)
- * This means any file in the project is on the Java project's classpath.
- * This classpath change is what triggers us to rebuild the JPA project; so
- * we put an extra check here to make sure the JPA file's resource file is
- * still present.
- * <p>
- * This would not be a problem if Dali received the resource change event
- * <em>before</em> JDT and simply removed the JPA project; but JDT receives
- * the resource change event first and converts it into the problematic
- * Java change event....
- */
- protected boolean jpaFileIsAlive(JpaFile jpaFile) {
- IFile file = jpaFile.getFile();
- if ( ! file.exists()) {
- return false;
- }
- if (this.fileIsJavaRelated(file)) {
- return this.getJavaProject().isOnClasspath(file);
- }
- return this.fileResourceLocationIsValid(file);
- }
-
- /**
- * pre-condition:
- * delta.getElement().getElementType() == IJavaElement.JAVA_PROJECT
- */
- protected boolean classpathHasChanged(IJavaElementDelta delta) {
- return this.deltaFlagIsSet(delta, IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED);
- }
-
- protected void synchronizeWithJavaSource(Iterable<JavaResourceCompilationUnit> javaResourceCompilationUnits) {
- for (JavaResourceCompilationUnit javaResourceCompilationUnit : javaResourceCompilationUnits) {
- javaResourceCompilationUnit.synchronizeWithJavaSource();
- }
- }
-
- // ***** package fragment root
- protected void processJavaPackageFragmentRootDelta(IJavaElementDelta delta) {
- // process the Java package fragment root's package fragments
- this.processJavaDeltaChildren(delta);
-
- if (this.classpathEntryHasBeenAdded(delta)) {
- // TODO bug 277218
- } else if (this.classpathEntryHasBeenRemoved(delta)) { // should be mutually-exclusive w/added (?)
- // TODO bug 277218
- }
- }
-
- /**
- * pre-condition:
- * delta.getElement().getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT
- */
- protected boolean classpathEntryHasBeenAdded(IJavaElementDelta delta) {
- return this.deltaFlagIsSet(delta, IJavaElementDelta.F_ADDED_TO_CLASSPATH);
- }
-
- /**
- * pre-condition:
- * delta.getElement().getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT
- */
- protected boolean classpathEntryHasBeenRemoved(IJavaElementDelta delta) {
- return this.deltaFlagIsSet(delta, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH);
- }
-
- // ***** package fragment
- protected void processJavaPackageFragmentDelta(IJavaElementDelta delta) {
- // process the java package fragment's compilation units
- this.processJavaDeltaChildren(delta);
- }
-
- // ***** compilation unit
- protected void processJavaCompilationUnitDelta(IJavaElementDelta delta) {
- if (this.javaCompilationUnitDeltaIsRelevant(delta)) {
- ICompilationUnit compilationUnit = (ICompilationUnit) delta.getElement();
- for (JavaResourceCompilationUnit jrcu : this.getCombinedJavaResourceCompilationUnits()) {
- if (jrcu.getCompilationUnit().equals(compilationUnit)) {
- jrcu.synchronizeWithJavaSource();
- // TODO ? this.resolveJavaTypes(); // might have new member types now...
- break; // there *shouldn't* be any more...
- }
- }
- }
- // ignore the java compilation unit's children
- }
-
- protected boolean javaCompilationUnitDeltaIsRelevant(IJavaElementDelta delta) {
- // ignore Java notification for ADDED or REMOVED;
- // these are handled via resource notification
- if (delta.getKind() != IJavaElementDelta.CHANGED) {
- return false;
- }
-
- // ignore changes to/from primary working copy - no content has changed;
- // and make sure there are no other flags set that indicate *both* a
- // change to/from primary working copy *and* content has changed
- if (BitTools.onlyFlagIsSet(delta.getFlags(), IJavaElementDelta.F_PRIMARY_WORKING_COPY)) {
- return false;
- }
-
- // ignore when the compilation unit's resource is deleted;
- // because the AST parser will log an exception for the missing file
- if (BitTools.onlyFlagIsSet(delta.getFlags(), IJavaElementDelta.F_PRIMARY_RESOURCE)) {
- ICompilationUnit compilationUnit = (ICompilationUnit) delta.getElement();
- if ( ! this.compilationUnitResourceExists(compilationUnit)) {
- return false;
- }
- }
-
- return true;
- }
-
- protected boolean compilationUnitResourceExists(ICompilationUnit compilationUnit) {
- try {
- return compilationUnit.getCorrespondingResource().exists();
- } catch (JavaModelException ex) {
- return false;
- }
- }
-
-
- // ********** validation **********
-
- public Iterable<IMessage> getValidationMessages(IReporter reporter) {
- List<IMessage> messages = new ArrayList<IMessage>();
- this.validate(messages, reporter);
- return new SnapshotCloneIterable<IMessage>(messages);
- }
-
- protected void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- this.validateLibraryProvider(messages);
- this.validateConnection(messages);
- this.rootContextNode.validate(messages, reporter);
- }
-
- protected void validateLibraryProvider(List<IMessage> messages) {
- try {
- this.validateLibraryProvider_(messages);
- } catch (CoreException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- protected void validateLibraryProvider_(List<IMessage> messages) throws CoreException {
- Map<String, Object> enablementVariables = new HashMap<String, Object>();
- enablementVariables.put(JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_ENABLEMENT_EXP, this.getJpaPlatform().getId());
- enablementVariables.put(JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_DESCRIPTION_ENABLEMENT_EXP, this.getJpaPlatform().getDescription());
-
- ILibraryProvider libraryProvider = LibraryProviderFramework.getCurrentProvider(this.project, JpaFacet.FACET);
- IFacetedProject facetedProject = ProjectFacetsManager.create(this.project);
- IProjectFacetVersion facetVersion = facetedProject.getInstalledVersion(JpaFacet.FACET);
- if ( ! libraryProvider.isEnabledFor(facetedProject, facetVersion, enablementVariables)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PROJECT_INVALID_LIBRARY_PROVIDER,
- this
- )
- );
- }
- }
-
- protected void validateConnection(List<IMessage> messages) {
- String cpName = this.dataSource.getConnectionProfileName();
- if (StringTools.stringIsEmpty(cpName)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PROJECT_NO_CONNECTION,
- this
- )
- );
- return;
- }
- ConnectionProfile cp = this.dataSource.getConnectionProfile();
- if (cp == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PROJECT_INVALID_CONNECTION,
- new String[] {cpName},
- this
- )
- );
- return;
- }
- if (cp.isInactive()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PROJECT_INACTIVE_CONNECTION,
- new String[] {cpName},
- this
- )
- );
- }
- }
-
-
- // ********** dispose **********
-
- public void dispose() {
- this.stopCommand(this.synchronizeContextModelCommand);
- this.stopCommand(this.updateCommand);
- this.updateCommand.removeListener(this.updateCommandListener);
- this.dataSource.dispose();
- // the XML resources are held indefinitely by the WTP translator framework,
- // so we better remove our listener or the JPA project will not be GCed
- for (JpaFile jpaFile : this.getJpaFiles()) {
- jpaFile.getResourceModel().removeResourceModelListener(this.resourceModelListener);
- }
- }
-
- protected void stopCommand(RepeatingJobCommand command) {
- try {
- command.stop();
- } catch (InterruptedException ex) {
- // allow the dispose to complete;
- // but let our thread know it was interrupted during a wait
- Thread.currentThread().interrupt();
- }
- }
-
-
- // ********** resource model listener **********
-
- protected JptResourceModelListener buildResourceModelListener() {
- return new ResourceModelListener();
- }
-
- protected class ResourceModelListener
- implements JptResourceModelListener
- {
- protected ResourceModelListener() {
- super();
- }
- public void resourceModelChanged(JptResourceModel jpaResourceModel) {
-// String msg = Thread.currentThread() + " resource model change: " + jpaResourceModel;
-// System.out.println(msg);
-// new Exception(msg).printStackTrace(System.out);
- AbstractJpaProject.this.synchronizeContextModel(jpaResourceModel);
- }
-
- public void resourceModelReverted(JptResourceModel jpaResourceModel) {
- IFile file = WorkbenchResourceHelper.getFile((JpaXmlResource)jpaResourceModel);
- AbstractJpaProject.this.removeJpaFile(file);
- AbstractJpaProject.this.addJpaFile(file);
- }
-
- public void resourceModelUnloaded(JptResourceModel jpaResourceModel) {
- IFile file = WorkbenchResourceHelper.getFile((JpaXmlResource)jpaResourceModel);
- AbstractJpaProject.this.removeJpaFile(file);
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * Called from {@link ResourceModelListener#resourceModelChanged(JptResourceModel)}.
- */
- // TODO pass down the resource model (for a possible optimization?)
- protected void synchronizeContextModel(@SuppressWarnings("unused") JptResourceModel jpaResourceModel) {
- this.synchronizeContextModel();
- }
-
-
- // ********** resource events **********
-
- // TODO need to do the same thing for external projects and compilation units
- public void projectChanged(IResourceDelta delta) {
- if (delta.getResource().equals(this.project)) {
- this.internalProjectChanged(delta);
- } else {
- this.externalProjectChanged(delta);
- }
- }
-
- protected void internalProjectChanged(IResourceDelta delta) {
- ResourceDeltaVisitor resourceDeltaVisitor = this.buildInternalResourceDeltaVisitor();
- resourceDeltaVisitor.visitDelta(delta);
- // at this point, if we have added and/or removed JpaFiles, an "update" will have been triggered;
- // any changes to the resource model during the "resolve" will trigger further "updates";
- // there should be no need to "resolve" external Java types (they can't have references to
- // the internal Java types)
- if (resourceDeltaVisitor.encounteredSignificantChange()) {
- this.resolveInternalJavaTypes();
- }
- }
-
- protected ResourceDeltaVisitor buildInternalResourceDeltaVisitor() {
- return new InternalResourceDeltaVisitor();
- }
-
- protected class InternalResourceDeltaVisitor
- extends ResourceDeltaVisitor
- {
- protected InternalResourceDeltaVisitor() {
- super();
- }
- @Override
- public boolean fileChangeIsSignificant(IFile file, int deltaKind) {
- return AbstractJpaProject.this.synchronizeJpaFiles(file, deltaKind);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * Internal resource delta visitor callback.
- * Return true if a JpaFile was either added or removed.
- */
- protected boolean synchronizeJpaFiles(IFile file, int deltaKind) {
- switch (deltaKind) {
- case IResourceDelta.ADDED :
- return this.addJpaFile(file);
- case IResourceDelta.REMOVED :
- return this.removeJpaFile(file);
- case IResourceDelta.CHANGED :
- return this.checkForChangedFileContent(file);
- case IResourceDelta.ADDED_PHANTOM :
- break; // ignore
- case IResourceDelta.REMOVED_PHANTOM :
- break; // ignore
- default :
- break; // only worried about added/removed/changed files
- }
-
- return false;
- }
-
- protected boolean checkForChangedFileContent(IFile file) {
- JpaFile jpaFile = this.getJpaFile(file);
- if (jpaFile == null) {
- // the file might have changed its content to something significant to Dali
- return this.addJpaFile(file);
- }
-
- if (jpaFile.getContentType().equals(PlatformTools.getContentType(file))) {
- // content has not changed - ignore
- return false;
- }
-
- // the content type changed, we need to remove the old JPA file and build a new one
- // (e.g. the schema of an orm.xml file changed from JPA to EclipseLink)
- this.removeJpaFile(jpaFile);
- this.addJpaFile(file);
- return true; // at the least, we have removed a JPA file
- }
-
- protected void resolveInternalJavaTypes() {
- for (JavaResourceCompilationUnit jrcu : this.getInternalJavaResourceCompilationUnits()) {
- jrcu.resolveTypes();
- }
- }
-
- protected void externalProjectChanged(IResourceDelta delta) {
- if (this.getJavaProject().isOnClasspath(delta.getResource())) {
- ResourceDeltaVisitor resourceDeltaVisitor = this.buildExternalResourceDeltaVisitor();
- resourceDeltaVisitor.visitDelta(delta);
- // force an "update" here since adding and/or removing an external Java type
- // will only trigger an "update" if the "resolve" causes something in the resource model to change
- if (resourceDeltaVisitor.encounteredSignificantChange()) {
- this.update();
- this.resolveExternalJavaTypes();
- this.resolveInternalJavaTypes();
- }
- }
- }
-
- protected ResourceDeltaVisitor buildExternalResourceDeltaVisitor() {
- return new ExternalResourceDeltaVisitor();
- }
-
- protected class ExternalResourceDeltaVisitor
- extends ResourceDeltaVisitor
- {
- protected ExternalResourceDeltaVisitor() {
- super();
- }
- @Override
- public boolean fileChangeIsSignificant(IFile file, int deltaKind) {
- return AbstractJpaProject.this.synchronizeExternalFiles(file, deltaKind);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * external resource delta visitor callback
- * Return true if an "external" Java resource compilation unit
- * was added or removed.
- */
- protected boolean synchronizeExternalFiles(IFile file, int deltaKind) {
- switch (deltaKind) {
- case IResourceDelta.ADDED :
- return this.externalFileAdded(file);
- case IResourceDelta.REMOVED :
- return this.externalFileRemoved(file);
- case IResourceDelta.CHANGED :
- break; // ignore
- case IResourceDelta.ADDED_PHANTOM :
- break; // ignore
- case IResourceDelta.REMOVED_PHANTOM :
- break; // ignore
- default :
- break; // only worried about added/removed/changed files
- }
-
- return false;
- }
-
- protected boolean externalFileAdded(IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
- if (contentType == null) {
- return false;
- }
- if (contentType.equals(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
- return true;
- }
- if (contentType.equals(JptCommonCorePlugin.JAR_CONTENT_TYPE)) {
- return true;
- }
- return false;
- }
-
- protected boolean externalFileRemoved(IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
- if (contentType == null) {
- return false;
- }
- if (contentType.equals(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
- return this.removeExternalJavaResourceCompilationUnit(file);
- }
- if (contentType.equals(JptCommonCorePlugin.JAR_CONTENT_TYPE)) {
- return this.externalJavaResourceTypeCache.removeTypes(file);
- }
- return false;
- }
-
- protected void resolveExternalJavaTypes() {
- for (JavaResourceCompilationUnit jrcu : this.getExternalJavaResourceCompilationUnits()) {
- jrcu.resolveTypes();
- }
- }
-
- // ***** resource delta visitors
- /**
- * add or remove a JPA file for every [appropriate] file encountered by the visitor
- */
- protected abstract class ResourceDeltaVisitor
- implements IResourceDeltaVisitor
- {
- protected boolean encounteredSignificantChange = false;
-
- protected ResourceDeltaVisitor() {
- super();
- }
-
- protected void visitDelta(IResourceDelta delta) {
- try {
- delta.accept(this);
- } catch (CoreException ex) {
- // shouldn't happen - we don't throw any CoreExceptions
- throw new RuntimeException(ex);
- }
- }
-
- public boolean visit(IResourceDelta delta) {
- IResource res = delta.getResource();
- switch (res.getType()) {
- case IResource.ROOT :
- return true; // visit children
- case IResource.PROJECT :
- return true; // visit children
- case IResource.FOLDER :
- return true; // visit children
- case IResource.FILE :
- this.fileChanged((IFile) res, delta.getKind());
- return false; // no children
- default :
- return false; // no children (probably shouldn't get here...)
- }
- }
-
- protected void fileChanged(IFile file, int deltaKind) {
- if (this.fileChangeIsSignificant(file, deltaKind)) {
- this.encounteredSignificantChange = true;
- }
- }
-
- protected abstract boolean fileChangeIsSignificant(IFile file, int deltaKind);
-
- /**
- * Return whether the visitor encountered some sort of "significant"
- * change while traversing the IResourceDelta
- * (e.g. a JPA file was added or removed).
- */
- protected boolean encounteredSignificantChange() {
- return this.encounteredSignificantChange;
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
-
- // ********** synchronize context model with resource model **********
-
- protected RepeatingJobCommand buildSynchronizeContextModelCommand() {
- return new RepeatingJobCommandWrapper(
- this.buildSynchronizeContextModelJobCommand(),
- this.buildStartSynchronizeContextModelJobCommandExecutor(),
- this.manager.getExceptionHandler()
- );
- }
-
- protected JobCommand buildSynchronizeContextModelJobCommand() {
- return new SynchronizeContextModelJobCommand();
- }
-
- protected JobCommandExecutor buildStartSynchronizeContextModelJobCommandExecutor() {
- return new ManagerJobCommandExecutor(this.buildSynchronizeContextModelJobName());
- }
-
- protected String buildSynchronizeContextModelJobName() {
- return NLS.bind(JptCoreMessages.CONTEXT_MODEL_SYNC_JOB_NAME, this.getName());
- }
-
- /**
- * The JPA project's resource model has changed; synchronize the JPA
- * project's context model with it. This method is typically called when the
- * resource model state has changed when it is synchronized with its
- * underlying Eclipse resource as the result of an Eclipse resource change
- * event. This method can also be called when a client (e.g. a JUnit test
- * case) has manipulated the resource model via its API (as opposed to
- * modifying the underlying Eclipse resource directly) and needs the context
- * model to be synchronized accordingly (since manipulating the resource
- * model via its API will not trigger this method). Whether the context
- * model is synchronously (or asynchronously) depends on the JPA project
- * manager.
- */
- public void synchronizeContextModel() {
- try {
- this.synchronizingContextModel = true;
- this.synchronizeContextModelCommand.execute(null); // this progress monitor is ignored
- } finally {
- this.synchronizingContextModel = false;
- }
-
- // There are some changes to the resource model that will not change
- // the existing context model and trigger an update (e.g. adding an
- // @Entity annotation when the JPA project is automatically
- // discovering annotated classes); so we explicitly execute an update
- // here to discover those changes.
- // TODO change sync so it will *always* trigger an update?
- this.update();
- }
-
- protected class SynchronizeContextModelJobCommand
- implements JobCommand
- {
- public IStatus execute(IProgressMonitor monitor) {
- return AbstractJpaProject.this.synchronizeContextModel(monitor);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * Called by the {@link SynchronizeContextModelJobCommand#execute(IProgressMonitor)}.
- */
- // TODO pass the monitor down
- protected IStatus synchronizeContextModel(@SuppressWarnings("unused") IProgressMonitor monitor) {
- this.rootContextNode.synchronizeWithResourceModel();
- return Status.OK_STATUS;
- }
-
-
- // ********** JPA project "update" **********
-
- /**
- * The first update is executed synchronously during construction.
- * Once that is complete, we delegate to the JPA project manager.
- */
- protected NotifyingRepeatingJobCommand buildTempUpdateCommand() {
- return new NotifyingRepeatingJobCommandWrapper(this.buildUpdateJobCommand(), this.manager.getExceptionHandler());
- }
-
- protected NotifyingRepeatingJobCommand buildUpdateCommand() {
- return new NotifyingRepeatingJobCommandWrapper(
- this.buildUpdateJobCommand(),
- this.buildStartUpdateJobCommandExecutor(),
- this.manager.getExceptionHandler()
- );
- }
-
- protected JobCommand buildUpdateJobCommand() {
- return new UpdateJobCommand();
- }
-
- protected JobCommandExecutor buildStartUpdateJobCommandExecutor() {
- return new ManagerJobCommandExecutor(this.buildUpdateJobName());
- }
-
- protected String buildUpdateJobName() {
- return NLS.bind(JptCoreMessages.UPDATE_JOB_NAME, this.getName());
- }
-
- @Override
- public void stateChanged() {
- super.stateChanged();
- this.update();
- }
-
- /**
- * The JPA project's state has changed, "update" those parts of the
- * JPA project that are dependent on other parts of the JPA project.
- * <p>
- * Delegate to the JPA project manager so clients can configure how
- * updates occur.
- * <p>
- * Ignore any <em>updates</em> that occur while we are synchronizing
- * the context model with the resource model because we will <em>update</em>
- * the context model at the completion of the <em>sync</em>. This is really
- * only useful for synchronous <em>syncs</em> and <em>updates</em>; since
- * the job scheduling rules will prevent the <em>sync</em> and
- * <em>update</em> jobs from running concurrently.
- */
- protected void update() {
- if ( ! this.synchronizingContextModel) {
- this.updateCommand.execute(null); // this progress monitor is ignored
- }
- }
-
- protected class UpdateJobCommand
- implements JobCommand
- {
- public IStatus execute(IProgressMonitor monitor) {
- return AbstractJpaProject.this.update(monitor);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * Called by the {@link UpdateJobCommand#execute(IProgressMonitor)}.
- */
- // TODO pass the monitor down
- protected IStatus update(@SuppressWarnings("unused") IProgressMonitor monitor) {
- this.rootContextNode.update();
- return Status.OK_STATUS;
- }
-
-
- // ********** update command listener **********
-
- protected NotifyingRepeatingJobCommand.Listener buildUpdateCommandListener() {
- return new UpdateCommandListener();
- }
-
- protected class UpdateCommandListener
- implements NotifyingRepeatingJobCommand.Listener
- {
- public IStatus executionQuiesced(JobCommand command, IProgressMonitor monitor) {
- return AbstractJpaProject.this.updateQuiesced(monitor);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, AbstractJpaProject.this);
- }
- }
-
- /**
- * This is the callback used by the update command to notify the JPA
- * project that the "update" has quiesced (i.e. the "update" has completed
- * and there are no outstanding requests for further "updates").
- * Called by {@link UpdateCommandListener#executionQuiesced(JobCommand, IProgressMonitor)}.
- */
- protected IStatus updateQuiesced(IProgressMonitor monitor) {
- return this.synchronizeMetamodel(monitor);
- }
-
-
- // ********** job command executor **********
-
- /**
- * Delegate execution to the JPA project manager, which will determine
- * whether commands are executed synchronously or asynchronously.
- *
- * @see #buildStartSynchronizeContextModelJobCommandExecutor()
- * @see #buildStartUpdateJobCommandExecutor()
- */
- protected class ManagerJobCommandExecutor
- implements JobCommandExecutor
- {
- protected final String defaultJobName;
- protected ManagerJobCommandExecutor(String defaultJobName) {
- super();
- if (defaultJobName == null) {
- throw new NullPointerException();
- }
- this.defaultJobName = defaultJobName;
- }
- /**
- * This should be the only method called on this executor....
- */
- public void execute(JobCommand command) {
- this.execute(command, this.defaultJobName);
- }
- public void execute(JobCommand command, String jobName) {
- AbstractJpaProject.this.manager.execute(command, jobName, AbstractJpaProject.this);
- }
- public void execute(JobCommand command, String jobName, ISchedulingRule schedulingRule) {
- // the JPA project manager will supply the scheduling rule
- this.execute(command, jobName);
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.defaultJobName);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/FileAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/FileAdapterFactory.java
deleted file mode 100644
index 30c17dd44e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/FileAdapterFactory.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * Factory to build Dali adapters for an {@link IFile}
- * (The comments for the adapters produced by {@link ProjectAdapterFactory}
- * are applicable here also):<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.JpaFile.Reference JpaFile.Reference}
- * <li>{@link org.eclipse.jpt.jpa.core.JpaFile JpaFile}
- * <li>{@link JpaXmlResource} -
- * Like the JPA file adapter, this adapter will only return a JPA XML
- * resource if it is immediately available.
- * This adapter should be used by any process that can ignore
- * any uncreated JPA XML resources because it is demand-driven and re-queries
- * for the JPA XML resource every time it executes and its results are only
- * temporary (e.g. UI menus).
- * </ul>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- *
- * @see ProjectAdapterFactory
- */
-public class FileAdapterFactory
- implements IAdapterFactory
-{
- private static final Class<?>[] ADAPTER_LIST = new Class[] {
- JpaFile.Reference.class,
- JpaFile.class,
- JpaXmlResource.class
- };
-
- public Class<?>[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
- if (adaptableObject instanceof IFile) {
- return this.getAdapter((IFile) adaptableObject, adapterType);
- }
- return null;
- }
-
- private Object getAdapter(IFile file, Class<?> adapterType) {
- if (adapterType == JpaFile.Reference.class) {
- return this.getJpaFileReference(file);
- }
- if (adapterType == JpaFile.class) {
- return this.getJpaFile(file);
- }
- if (adapterType == JpaXmlResource.class) {
- return this.getJpaXmlResource(file);
- }
- return null;
- }
-
- private JpaFile.Reference getJpaFileReference(IFile file) {
- return new JpaFileReference(file);
- }
-
- private JpaFile getJpaFile(IFile file) {
- JpaProject jpaProject = this.getJpaProject(file.getProject());
- return (jpaProject == null) ? null : jpaProject.getJpaFile(file);
- }
-
- private JpaXmlResource getJpaXmlResource(IFile file) {
- JpaFile jpaFile = this.getJpaFile(file);
- if (jpaFile != null) {
- JptResourceModel resourceModel = jpaFile.getResourceModel();
- if (resourceModel instanceof JpaXmlResource) {
- return (JpaXmlResource) resourceModel;
- }
- }
- return null;
- }
-
- private JpaProject getJpaProject(IProject project) {
- return (JpaProject) project.getAdapter(JpaProject.class);
- }
-
-
- // ********** JPA file reference **********
-
- /**
- * @see ProjectAdapterFactory.JpaProjectReference
- */
- /* CU private */ static class JpaFileReference
- implements JpaFile.Reference
- {
- private final IFile file;
-
- JpaFileReference(IFile file) {
- super();
- this.file = file;
- }
-
- public JpaFile getValue() throws InterruptedException {
- JpaProject jpaProject = this.getJpaProject();
- return (jpaProject == null) ? null : jpaProject.getJpaFile(this.file);
- }
-
- private JpaProject getJpaProject() throws InterruptedException {
- return this.getJpaProjectReference().getValue();
- }
-
- private JpaProject.Reference getJpaProjectReference() {
- return ((JpaProject.Reference) this.file.getProject().getAdapter(JpaProject.Reference.class));
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.file);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java
deleted file mode 100644
index 04560acd6a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal;
-
-import org.eclipse.jpt.jpa.core.EntityGeneratorDatabaseAnnotationNameBuilder;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.ForeignKey;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Singleton that delegates to the db object passed in.
- */
-public final class GenericEntityGeneratorDatabaseAnnotationNameBuilder
- implements EntityGeneratorDatabaseAnnotationNameBuilder
-{
- public static final EntityGeneratorDatabaseAnnotationNameBuilder INSTANCE
- = new GenericEntityGeneratorDatabaseAnnotationNameBuilder();
-
- public static EntityGeneratorDatabaseAnnotationNameBuilder instance() {
- return INSTANCE;
- }
-
- // ensure single instance
- private GenericEntityGeneratorDatabaseAnnotationNameBuilder() {
- super();
- }
-
- public String buildTableAnnotationName(String entityName, Table table) {
- return table.getIdentifier(entityName);
- }
-
- public String buildColumnAnnotationName(String attributeName, Column column) {
- return column.getIdentifier(attributeName);
- }
-
- public String buildJoinColumnAnnotationName(String attributeName, ForeignKey foreignKey) {
- return foreignKey.getJoinColumnAnnotationIdentifier(attributeName);
- }
-
- public String buildJoinColumnAnnotationName(Column column) {
- return column.getIdentifier();
- }
-
- public String buildJoinTableAnnotationName(Table table) {
- return table.getIdentifier();
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaAnnotationDefinitionProvider.java
deleted file mode 100644
index e1193d854a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaAnnotationDefinitionProvider.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal;
-
-import java.util.ArrayList;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AssociationOverrideAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AssociationOverridesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AttributeOverrideAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AttributeOverridesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.BasicAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.ColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.DiscriminatorColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.DiscriminatorValueAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EmbeddableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EmbeddedAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EmbeddedIdAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EntityAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EnumeratedAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.GeneratedValueAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.IdAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.IdClassAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.InheritanceAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.JoinColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.JoinColumnsAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.JoinTableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.LobAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.ManyToManyAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.ManyToOneAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.MapKeyAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.MappedSuperclassAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedNativeQueriesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedNativeQueryAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedQueriesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedQueryAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.OneToManyAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.OneToOneAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.OrderByAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.PrimaryKeyJoinColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.PrimaryKeyJoinColumnsAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.SecondaryTableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.SecondaryTablesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.SequenceGeneratorAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TableGeneratorAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TemporalAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TransientAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.VersionAnnotationDefinition;
-
-public class GenericJpaAnnotationDefinitionProvider
- extends AbstractJpaAnnotationDefinitionProvider
-{
- // singleton
- private static final JpaAnnotationDefinitionProvider INSTANCE = new GenericJpaAnnotationDefinitionProvider();
-
- /**
- * Return the singleton
- */
- public static JpaAnnotationDefinitionProvider instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private GenericJpaAnnotationDefinitionProvider() {
- super();
- }
-
- @Override
- protected void addAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions) {
- CollectionTools.addAll(definitions, ANNOTATION_DEFINITIONS);
- }
-
- protected static final AnnotationDefinition[] ANNOTATION_DEFINITIONS = new AnnotationDefinition[] {
- AssociationOverridesAnnotationDefinition.instance(),
- AttributeOverridesAnnotationDefinition.instance(),
- BasicAnnotationDefinition.instance(),
- ColumnAnnotationDefinition.instance(),
- DiscriminatorColumnAnnotationDefinition.instance(),
- DiscriminatorValueAnnotationDefinition.instance(),
- EmbeddableAnnotationDefinition.instance(),
- EmbeddedAnnotationDefinition.instance(),
- EmbeddedIdAnnotationDefinition.instance(),
- EntityAnnotationDefinition.instance(),
- EnumeratedAnnotationDefinition.instance(),
- GeneratedValueAnnotationDefinition.instance(),
- IdAnnotationDefinition.instance(),
- IdClassAnnotationDefinition.instance(),
- InheritanceAnnotationDefinition.instance(),
- JoinColumnsAnnotationDefinition.instance(),
- JoinTableAnnotationDefinition.instance(),
- LobAnnotationDefinition.instance(),
- ManyToManyAnnotationDefinition.instance(),
- ManyToOneAnnotationDefinition.instance(),
- MapKeyAnnotationDefinition.instance(),
- MappedSuperclassAnnotationDefinition.instance(),
- NamedQueriesAnnotationDefinition.instance(),
- NamedNativeQueriesAnnotationDefinition.instance(),
- OneToManyAnnotationDefinition.instance(),
- OneToOneAnnotationDefinition.instance(),
- OrderByAnnotationDefinition.instance(),
- PrimaryKeyJoinColumnsAnnotationDefinition.instance(),
- SecondaryTablesAnnotationDefinition.instance(),
- SequenceGeneratorAnnotationDefinition.instance(),
- TableAnnotationDefinition.instance(),
- TableGeneratorAnnotationDefinition.instance(),
- TemporalAnnotationDefinition.instance(),
- TransientAnnotationDefinition.instance(),
- VersionAnnotationDefinition.instance()
- };
-
- @Override
- protected void addNestableAnnotationDefinitionsTo(ArrayList<NestableAnnotationDefinition> definitions) {
- CollectionTools.addAll(definitions, NESTABLE_ANNOTATION_DEFINITIONS);
- }
-
- protected static final NestableAnnotationDefinition[] NESTABLE_ANNOTATION_DEFINITIONS = new NestableAnnotationDefinition[] {
- AssociationOverrideAnnotationDefinition.instance(),
- AttributeOverrideAnnotationDefinition.instance(),
- JoinColumnAnnotationDefinition.instance(),
- NamedQueryAnnotationDefinition.instance(),
- NamedNativeQueryAnnotationDefinition.instance(),
- PrimaryKeyJoinColumnAnnotationDefinition.instance(),
- SecondaryTableAnnotationDefinition.instance(),
- };
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaJpqlQueryHelper.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaJpqlQueryHelper.java
deleted file mode 100644
index da1d382742..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaJpqlQueryHelper.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.jpql.spi.GenericMappingBuilder;
-import org.eclipse.jpt.jpa.core.jpql.spi.IManagedTypeBuilder;
-import org.eclipse.jpt.jpa.core.jpql.spi.JpaManagedTypeBuilder;
-import org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor;
-import org.eclipse.persistence.jpa.jpql.AbstractGrammarValidator;
-import org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator;
-import org.eclipse.persistence.jpa.jpql.DefaultContentAssistVisitor;
-import org.eclipse.persistence.jpa.jpql.DefaultGrammarValidator;
-import org.eclipse.persistence.jpa.jpql.DefaultJPQLQueryContext;
-import org.eclipse.persistence.jpa.jpql.DefaultSemanticValidator;
-import org.eclipse.persistence.jpa.jpql.JPQLQueryContext;
-import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-
-/**
- * The default implementation of {@link JpaJpqlQueryHelper} that provides support based on the Java
- * Persistence functional specification (version 1.0 and 2.0).
- *
- * @version 3.2
- * @since 3.1
- * @author Pascal Filion
- */
-public class GenericJpaJpqlQueryHelper extends JpaJpqlQueryHelper {
-
- /**
- * Creates a new <code>AbstractJpaJpqlQueryHelper</code>.
- *
- * @param jpqlGrammar The grammar that defines how to parse a JPQL query
- */
- public GenericJpaJpqlQueryHelper(JPQLGrammar jpqlGrammar) {
- super(jpqlGrammar);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected AbstractContentAssistVisitor buildContentAssistVisitor(JPQLQueryContext queryContext) {
- return new DefaultContentAssistVisitor(queryContext);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected AbstractGrammarValidator buildGrammarValidator(JPQLQueryContext queryContext) {
- return new DefaultGrammarValidator(queryContext);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected JPQLQueryContext buildJPQLQueryContext(JPQLGrammar jpqlGrammar) {
- return new DefaultJPQLQueryContext(jpqlGrammar);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IManagedTypeBuilder buildManagedTypeBuilder() {
- return new JpaManagedTypeBuilder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IMappingBuilder<AttributeMapping> buildMappingBuilder() {
- return new GenericMappingBuilder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected AbstractSemanticValidator buildSemanticValidator(JPQLQueryContext queryContext) {
- return new DefaultSemanticValidator(queryContext);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatform.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatform.java
deleted file mode 100644
index 6a45d503d7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatform.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.AnnotationProvider;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.DefaultAnnotationEditFormatter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationEditFormatter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.EntityGeneratorDatabaseAnnotationNameBuilder;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.JpaPlatformVariation;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.ResourceDefinition;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.db.ConnectionProfileFactory;
-import org.eclipse.jpt.jpa.db.JptJpaDbPlugin;
-import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public class GenericJpaPlatform
- implements JpaPlatform
-{
- private final String id;
-
- private final Version jpaVersion;
-
- private final JpaFactory jpaFactory;
-
- private final AnnotationProvider annotationProvider;
-
- private final JpaPlatformProvider platformProvider;
-
- private final JpaPlatformVariation jpaVariation;
-
- private final JPQLGrammar jpqlGrammar;
-
-
- public GenericJpaPlatform(String id, Version jpaVersion, JpaFactory jpaFactory, AnnotationProvider annotationProvider, JpaPlatformProvider platformProvider, JpaPlatformVariation jpaVariation, JPQLGrammar jpqlGrammar) {
- super();
- this.id = id;
- this.jpaVersion = jpaVersion;
- this.jpaFactory = jpaFactory;
- this.annotationProvider = annotationProvider;
- this.jpaVariation = jpaVariation;
- this.platformProvider = platformProvider;
- this.jpqlGrammar = jpqlGrammar;
- }
-
-
- // ********** meta stuff **********
-
- public String getId() {
- return this.id;
- }
-
- public JpaPlatformDescription getDescription() {
- return JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatform(this.getId());
- }
-
- public Version getJpaVersion() {
- return this.jpaVersion;
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.id);
- }
-
-
- // ********** factory **********
-
- public JpaFactory getJpaFactory() {
- return this.jpaFactory;
- }
-
-
- // ********** platform providers **********
-
- protected JpaPlatformProvider getPlatformProvider() {
- return this.platformProvider;
- }
-
-
- // ********** JPA file/resource models **********
-
- public JpaFile buildJpaFile(JpaProject jpaProject, IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
- return (contentType == null) ? null : this.buildJpaFile(jpaProject, file, contentType);
- }
-
- protected JpaFile buildJpaFile(JpaProject jpaProject, IFile file, IContentType contentType) {
- JptResourceModel resourceModel = this.buildResourceModel(jpaProject, file, contentType);
- return (resourceModel == null) ? null : this.jpaFactory.buildJpaFile(jpaProject, file, contentType, resourceModel);
- }
-
- protected JptResourceModel buildResourceModel(JpaProject jpaProject, IFile file, IContentType contentType) {
- JpaResourceModelProvider provider = this.getResourceModelProvider(contentType);
- return (provider == null) ? null : provider.buildResourceModel(jpaProject, file);
- }
-
- /**
- * Return null if we don't have a provider for the specified content type
- * (since we don't have control over the possible content types).
- */
- protected JpaResourceModelProvider getResourceModelProvider(IContentType contentType) {
- for (JpaResourceModelProvider provider : this.platformProvider.getResourceModelProviders()) {
- if (contentType.equals(provider.getContentType())) {
- return provider;
- }
- }
- return null;
- }
-
-
- // ********** Java annotations **********
-
- public AnnotationProvider getAnnotationProvider() {
- return this.annotationProvider;
- }
-
- public AnnotationEditFormatter getAnnotationEditFormatter() {
- return DefaultAnnotationEditFormatter.instance();
- }
-
-
- // ********** Java type mappings **********
-
- public Iterable<JavaTypeMappingDefinition> getJavaTypeMappingDefinitions() {
- return this.platformProvider.getJavaTypeMappingDefinitions();
- }
-
-
- // ********** Java attribute mappings **********
-
- public Iterable<JavaAttributeMappingDefinition> getSpecifiedJavaAttributeMappingDefinitions() {
- return this.platformProvider.getSpecifiedJavaAttributeMappingDefinitions();
- }
-
- public Iterable<DefaultJavaAttributeMappingDefinition> getDefaultJavaAttributeMappingDefinitions() {
- return this.platformProvider.getDefaultJavaAttributeMappingDefinitions();
- }
-
-
- // ********** resource types and definitions **********
-
- public boolean supportsResourceType(JptResourceType resourceType) {
- for (ResourceDefinition resourceDefinition : this.platformProvider.getResourceDefinitions()) {
- if (resourceDefinition.getResourceType().equals(resourceType)) {
- return true;
- }
- }
- return false;
- }
-
- public ResourceDefinition getResourceDefinition(JptResourceType resourceType) {
- for (ResourceDefinition resourceDefinition : this.platformProvider.getResourceDefinitions()) {
- if (resourceDefinition.getResourceType().equals(resourceType)) {
- return resourceDefinition;
- }
- }
- throw new IllegalArgumentException("Illegal resource type: " + resourceType); //$NON-NLS-1$
- }
-
- public JptResourceType getMostRecentSupportedResourceType(IContentType contentType) {
- return this.platformProvider.getMostRecentSupportedResourceType(contentType);
- }
-
-
- // ********** database **********
-
- public ConnectionProfileFactory getConnectionProfileFactory() {
- return JptJpaDbPlugin.getConnectionProfileFactory();
- }
-
- public EntityGeneratorDatabaseAnnotationNameBuilder getEntityGeneratorDatabaseAnnotationNameBuilder() {
- return GenericEntityGeneratorDatabaseAnnotationNameBuilder.instance();
- }
-
-
- // ********** validation **********
-
- public JpaPlatformVariation getJpaVariation() {
- return this.jpaVariation;
- }
-
-
- // ********** adapter **********
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public Object getAdapter(Class adapter) {
- return PlatformTools.getAdapter(this, adapter);
- }
-
-
- // ********** Hermes integration **********
-
- public JPQLGrammar getJpqlGrammar() {
- return jpqlGrammar;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java
deleted file mode 100644
index 11cc11c2b2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaPlatformFactory;
-import org.eclipse.jpt.jpa.core.JpaPlatformVariation;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaFactory;
-import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar1_0;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public class GenericJpaPlatformFactory
- implements JpaPlatformFactory
-{
- /**
- * zero-argument constructor
- */
- public GenericJpaPlatformFactory() {
- super();
- }
-
- public JpaPlatform buildJpaPlatform(String id) {
- return new GenericJpaPlatform(
- id,
- this.buildJpaVersion(),
- new GenericJpaFactory(),
- new JpaAnnotationProvider(GenericJpaAnnotationDefinitionProvider.instance()),
- GenericJpaPlatformProvider.instance(),
- this.buildJpaPlatformVariation(),
- JPQLGrammar1_0.instance());
- }
-
- private JpaPlatform.Version buildJpaVersion() {
- return new SimpleVersion(JpaFacet.VERSION_1_0.getVersionString());
- }
-
- protected JpaPlatformVariation buildJpaPlatformVariation() {
- return new JpaPlatformVariation() {
- public Supported getTablePerConcreteClassInheritanceIsSupported() {
- return Supported.MAYBE;
- }
- public boolean isJoinTableOverridable() {
- return false;
- }
- public AccessType[] getSupportedAccessTypes(JptResourceType resourceType) {
- return GENERIC_SUPPORTED_ACCESS_TYPES;
- }
- };
- }
-
- public static class SimpleVersion implements JpaPlatform.Version {
- protected final String jpaVersion;
-
- public SimpleVersion(String jpaVersion) {
- super();
- this.jpaVersion = jpaVersion;
- }
-
- /**
- * The generic platform's version is the same as the JPA version.
- */
- public String getVersion() {
- return this.getJpaVersion();
- }
-
- public String getJpaVersion() {
- return this.jpaVersion;
- }
-
- /**
- * For now, generic platforms are backward-compatible.
- */
- public boolean isCompatibleWithJpaVersion(String version) {
- return VERSION_COMPARATOR.compare(this.jpaVersion, version) >= 0;
- }
-
- @Override
- public String toString() {
- return "JPA version: " + this.getJpaVersion(); //$NON-NLS-1$
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformProvider.java
deleted file mode 100644
index e2409e017e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformProvider.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.ResourceDefinition;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaBasicMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddableDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddedIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddedMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEntityDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaManyToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaManyToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaMappedSuperclassDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaOneToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaOneToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTransientMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaVersionMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXmlDefinition;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public class GenericJpaPlatformProvider
- extends AbstractJpaPlatformProvider
-{
- // singleton
- private static final JpaPlatformProvider INSTANCE = new GenericJpaPlatformProvider();
-
- /**
- * Return the singleton.
- */
- public static JpaPlatformProvider instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private GenericJpaPlatformProvider() {
- super();
- }
-
-
- // ********** resource models **********
-
- public JptResourceType getMostRecentSupportedResourceType(IContentType contentType) {
- if (contentType.equals(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
- return JptCommonCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptCommonCorePlugin.JAR_CONTENT_TYPE)) {
- return JptCommonCorePlugin.JAR_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
- return JptJpaCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptJpaCorePlugin.ORM_XML_CONTENT_TYPE)) {
- return JptJpaCorePlugin.ORM_XML_1_0_RESOURCE_TYPE;
- }
- else {
- throw new IllegalArgumentException(contentType.toString());
- }
- }
-
- @Override
- protected void addResourceModelProvidersTo(ArrayList<JpaResourceModelProvider> providers) {
- CollectionTools.addAll(providers, RESOURCE_MODEL_PROVIDERS);
- }
-
- // order should not be important here
- protected static final JpaResourceModelProvider[] RESOURCE_MODEL_PROVIDERS = new JpaResourceModelProvider[] {
- JavaResourceModelProvider.instance(),
- JarResourceModelProvider.instance(),
- PersistenceResourceModelProvider.instance(),
- OrmResourceModelProvider.instance()
- };
-
-
- // ********** Java type mappings **********
-
- @Override
- protected void addJavaTypeMappingDefinitionsTo(ArrayList<JavaTypeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, JAVA_TYPE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by the Reference Implementation (EclipseLink)
- protected static final JavaTypeMappingDefinition[] JAVA_TYPE_MAPPING_DEFINITIONS = new JavaTypeMappingDefinition[] {
- JavaEntityDefinition.instance(),
- JavaEmbeddableDefinition.instance(),
- JavaMappedSuperclassDefinition.instance()
- };
-
-
- // ********** Java attribute mappings **********
-
- @Override
- protected void addDefaultJavaAttributeMappingDefinitionsTo(ArrayList<DefaultJavaAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by the Reference Implementation (EclipseLink)
- protected static final DefaultJavaAttributeMappingDefinition[] DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new DefaultJavaAttributeMappingDefinition[] {
- JavaEmbeddedMappingDefinition.instance(),
- JavaBasicMappingDefinition.instance()
- };
-
- @Override
- protected void addSpecifiedJavaAttributeMappingDefinitionsTo(ArrayList<JavaAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by the Reference Implementation (EclipseLink)
- protected static final JavaAttributeMappingDefinition[] SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new JavaAttributeMappingDefinition[] {
- JavaTransientMappingDefinition.instance(),
- JavaIdMappingDefinition.instance(),
- JavaVersionMappingDefinition.instance(),
- JavaBasicMappingDefinition.instance(),
- JavaEmbeddedMappingDefinition.instance(),
- JavaEmbeddedIdMappingDefinition.instance(),
- JavaManyToManyMappingDefinition.instance(),
- JavaManyToOneMappingDefinition.instance(),
- JavaOneToManyMappingDefinition.instance(),
- JavaOneToOneMappingDefinition.instance()
- };
-
-
- // ********** resource definitions **********
-
- @Override
- protected void addResourceDefinitionsTo(ArrayList<ResourceDefinition> definitions) {
- CollectionTools.addAll(definitions, RESOURCE_DEFINITIONS);
- }
-
- protected static final ResourceDefinition[] RESOURCE_DEFINITIONS = new ResourceDefinition[] {
- GenericPersistenceXmlDefinition.instance(),
- GenericOrmXmlDefinition.instance()
- };
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/InternalJpaProjectManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/InternalJpaProjectManager.java
deleted file mode 100644
index 4196e773ca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/InternalJpaProjectManager.java
+++ /dev/null
@@ -1,1422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Vector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jpt.common.core.internal.JptCommonCoreMessages;
-import org.eclipse.jpt.common.core.internal.utility.command.CommandJobCommandAdapter;
-import org.eclipse.jpt.common.core.internal.utility.command.SimpleJobCommandExecutor;
-import org.eclipse.jpt.common.core.internal.utility.command.SingleUseQueueingExtendedJobCommandExecutor;
-import org.eclipse.jpt.common.core.utility.command.ExtendedJobCommandExecutor;
-import org.eclipse.jpt.common.core.utility.command.JobCommand;
-import org.eclipse.jpt.common.utility.BooleanReference;
-import org.eclipse.jpt.common.utility.ExceptionHandler;
-import org.eclipse.jpt.common.utility.ModifiableObjectReference;
-import org.eclipse.jpt.common.utility.command.Command;
-import org.eclipse.jpt.common.utility.command.ExtendedCommandExecutor;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.command.ThreadLocalExtendedCommandExecutor;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SnapshotCloneIterable;
-import org.eclipse.jpt.common.utility.internal.model.AbstractModel;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * The JPA project manager maintains a list of all the JPA projects in the
- * workspace. It keeps the list (and the state of the JPA projects themselves)
- * synchronized with the workspace by listening for Resource and Java change
- * events.
- * <p>
- * We use Eclipse {@link ISchedulingRule scheduling rules} to synchronize
- * access to the JPA projects when dealing with these events. In an effort to
- * reduce deadlocks, the Resource and Java change events are dispatched to
- * background jobs, allowing us to handle the events outside of the workspace
- * lock held during Resource and Java change notifications. The
- * {@link ISchedulingRule scheduling rules} are also used to synchronize the
- * event handling with the various other asynchronous Dali activities:<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.internal.validation.JpaValidator Validation}
- * <li>JPA Project context model {@link JpaProject#synchronizeContextModel()
- * <em>synchronization</em>} [with the resource model]
- * <li>JPA Project {@link org.eclipse.jpt.jpa.core.internal.AbstractJpaProject#update()
- * <em>update</em>}
- * </ul>
- * Any method that returns a value (e.g. {@link #waitToGetJpaProjects()}) is
- * "synchronized" with the background jobs. This allows any outstanding events
- * to be handled <em>before</em> the value is returned.
- * <p>
- * Various things that cause us to add or remove a JPA project:<ul>
- * <li>The {@link JptJpaCorePlugin} will "lazily" instantiate and
- * {@link #start() start} a JPA project manager as appropriate.
- * This will trigger the manager to find and add all pre-existing
- * JPA projects.
- *
- * <li>Project created and facet installed<p>
- * {@link IResourceChangeEvent#POST_CHANGE}
- * <li>Project facet uninstalled<p>
- * {@link IResourceChangeEvent#POST_CHANGE}
- *
- * <li>Project opened<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#ADDED}<p>
- * facet settings file<p>
- * (<code>.settings/org.eclipse.wst.common.project.facet.core.xml</code>)
- * <li>Project closed<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#REMOVED}
- * <p>facet settings file
- *
- * <li>Pre-existing project imported from directory or archive (created and opened)<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#ADDED}<p>
- * facet settings file
- * <li>Project renamed<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#REMOVED}<p>
- * facet settings file of old project<p>
- * -> {@link IResourceDelta#ADDED}<p>
- * facet settings file of new project
- * <li>Project deleted<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#REMOVED}<p>
- * facet settings file
- *
- * <li>Project facet installed by editing the facets settings file directly<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#CHANGED}<p>
- * facet settings file
- * <li>Project facet uninstalled by editing the facets settings file directly<p>
- * {@link IResourceChangeEvent#POST_CHANGE}<p>
- * -> {@link IResource#FILE}<p>
- * -> {@link IResourceDelta#CHANGED}<p>
- * facet settings file
- * </ul>
- */
-public class InternalJpaProjectManager
- extends AbstractModel
- implements JpaProjectManager, JpaProject.Manager
-{
- /**
- * The workspace the JPA project manager corresponds to.
- */
- private final IWorkspace workspace;
-
- /**
- * Determine how commands (Resource and Java change events etc.) are
- * handled (i.e. synchronously or asynchronously).
- * The default command executor executes commands asynchronously via
- * Eclipse {@link Job jobs}.
- */
- private volatile ExtendedJobCommandExecutor commandExecutor;
-
- /**
- * All the JPA projects in the workspace.
- */
- private final Vector<JpaProject> jpaProjects = new Vector<JpaProject>();
-
- /**
- * Listen for<ul>
- * <li>changes to<ul>
- * <li>projects
- * <li>package fragment roots
- * <li>files
- * </ul>
- * <li>clean builds
- * </ul>
- */
- private final IResourceChangeListener resourceChangeListener = new ResourceChangeListener();
-
- /**
- * The types of resource change events that interest
- * {@link #resourceChangeListener}.
- */
- private static final int RESOURCE_CHANGE_EVENT_TYPES =
- IResourceChangeEvent.POST_CHANGE |
- IResourceChangeEvent.POST_BUILD;
-
- /**
- * Listen for changes to this file to determine when the JPA facet is
- * added to or removed from a "faceted" project.
- */
- private static final String FACETED_PROJECT_FRAMEWORK_SETTINGS_FILE_NAME = FacetedProjectFramework.PLUGIN_ID + ".xml"; //$NON-NLS-1$
-
- /**
- * Listen for Java changes (unless the Dali UI is active).
- * @see #asyncEventListenersAreActive()
- */
- private final JavaElementChangeListener javaElementChangeListener = new JavaElementChangeListener();
-
- /**
- * The types of Java element change events that interest
- * {@link #javaElementChangeListener}.
- */
- private static final int JAVA_CHANGE_EVENT_TYPES =
- ElementChangedEvent.POST_CHANGE |
- ElementChangedEvent.POST_RECONCILE;
-
- /**
- * A set of flags to activate/deactivate the asynchronous event listeners.
- * <p>
- * This set of flags hacks around our problems with bi-directional updates.
- * We must worry about changes to the Java source code that are
- * initiated by the Dali resource model because there is no way to either
- * receive the corresponding Java events <em>synchronously</em> or suppress
- * them. We need <em>not</em> worry about changes initiated by the Java
- * source code since they are handled by the Java resource model in a way
- * that does not return any changes back to the Java source code.
- * <p>
- * We can ignore Java events whenever Dali is manipulating the Java
- * source code via the Dali model. We do this because the 0.5 sec delay
- * between the Java source being changed in the Java Editor and the
- * corresponding event being fired causes us no end of pain....
- * <p>
- * <strong>NB:</strong> The following may not be accurate in Eclipse 4.x....
- * <p>
- * Fortunately we <em>will</em> be active whenever a Java source file is
- * saved, even when <Ctrl+S> is pressed from within a Dali composite. This
- * is because, when the file is saved, the editor, presumably,
- * takes the focus temporarily, activating this listener. Then, while this
- * listener is active, we receive a Java change event for the compilation
- * unit being saved. This allows us to re-cache our resource model text
- * ranges so they are in sync with the Java source before execution of the
- * validation job. Once the Java source file is saved, the Dali composite
- * re-takes the focus and this listener is once again inactive.
- */
- private final HashSet<BooleanReference> asyncEventListenerFlags = new HashSet<BooleanReference>();
-
- /**
- * Support for modifying documents shared with the UI.
- */
- private final ThreadLocalExtendedCommandExecutor modifySharedDocumentCommandExecutor = new ThreadLocalExtendedCommandExecutor();
-
- /**
- * Log any exceptions appropriately.
- */
- private final ExceptionHandler exceptionHandler;
-
- /**
- * See org.eclipse.jpt.jpa.core.tests.JptJpaCoreTestsPlugin#start(org.osgi.framework.BundleContext).
- */
- /* CU private */ volatile boolean test = false;
-
-
- // ********** constructor **********
-
- /**
- * Internal: Called <em>only</em> by the
- * {@link JptJpaCorePlugin#getJpaProjectManager_(IWorkspace) Dali plug-in}.
- */
- public InternalJpaProjectManager(IWorkspace workspace) {
- super();
- this.workspace = workspace;
- this.exceptionHandler = this.buildExceptionHandler();
- }
-
- private ExceptionHandler buildExceptionHandler() {
- return new LocalExceptionHandler();
- }
-
-
- // ********** plug-in controlled life-cycle **********
-
- /**
- * Internal: Called <em>only</em> by the
- * {@link JptJpaCorePlugin#getJpaProjectManager_(IWorkspace) Dali plug-in}.
- * The JPA project manager will not be returned to any clients by the
- * {@link JptJpaCorePlugin Dali plug-in} until <em>after</em>
- * the manager has been started (i.e. this method has been called).
- * As a result, we need not synchronize with the scheduling rule.
- */
- public void start() {
- debug("*** JPA project manager START ***"); //$NON-NLS-1$
- try {
- this.commandExecutor = this.buildAsynchronousCommandExecutor();
- this.buildJpaProjects();
- this.workspace.addResourceChangeListener(this.resourceChangeListener, RESOURCE_CHANGE_EVENT_TYPES);
- JavaCore.addElementChangedListener(this.javaElementChangeListener, JAVA_CHANGE_EVENT_TYPES);
- } catch (RuntimeException ex) {
- this.log(ex);
- this.stop();
- }
- }
-
- /**
- * Internal: Called <em>only</em> by the
- * {@link JptJpaCorePlugin#stop(org.osgi.framework.BundleContext) Dali plug-in}.
- * The JPA project manager will <em>not</em> be restarted.
- */
- public void stop() {
- debug("*** JPA project manager STOP ***"); //$NON-NLS-1$
- JavaCore.removeElementChangedListener(this.javaElementChangeListener);
- this.workspace.removeResourceChangeListener(this.resourceChangeListener);
- this.clearJpaProjects();
- // if the current executor is async, commands can continue to execute
- // after we replace it here, but there will be no JPA projects for them to process...
- this.commandExecutor = ExtendedJobCommandExecutor.Inactive.instance();
- debug("*** JPA project manager DEAD ***"); //$NON-NLS-1$
- }
-
-
- // ********** build JPA projects **********
-
- /**
- * The JPA projects are built asynchronously in a job.
- * Side-effect: {@link #jpaProjects} populated.
- */
- private void buildJpaProjects() {
- debug("dispatch: build JPA projects"); //$NON-NLS-1$
- BuildJpaProjectsCommand command = new BuildJpaProjectsCommand();
- this.execute(command, JptCoreMessages.BUILD_JPA_PROJECTS_JOB_NAME, this.getWorkspaceRoot());
- }
-
- /* CU private */ class BuildJpaProjectsCommand
- implements JobCommand
- {
- public IStatus execute(IProgressMonitor monitor) {
- InternalJpaProjectManager.this.buildJpaProjects_(monitor);
- return Status.OK_STATUS;
- }
- }
-
- /* CU private */ void buildJpaProjects_(IProgressMonitor monitor) {
- debug("execute: build JPA projects"); //$NON-NLS-1$
- try {
- this.getWorkspaceRoot().accept(new ResourceProxyVisitor(monitor), IResource.NONE);
- } catch (Exception ex) {
- // if we have a problem, leave the currently built JPA projects in
- // place and keep executing (should be OK...)
- this.log(ex);
- }
- debug("end: build JPA projects"); //$NON-NLS-1$
- }
-
-
- // ********** clear JPA projects **********
-
- /**
- * <strong>NB:</strong>
- * {@link IJobManager#beginRule(ISchedulingRule, IProgressMonitor)}
- * will jump <em>ahead</em> of any job scheduled with a conflicting rule(!).
- * We should only use this method of synchronization in {@link #stop()}.
- */
- private void clearJpaProjects() {
- try {
- this.getJobManager().beginRule(this.getWorkspaceRoot(), null);
- this.clearJpaProjects_();
- } finally {
- this.getJobManager().endRule(this.getWorkspaceRoot());
- }
- }
-
- private void clearJpaProjects_() {
- debug("execute: clear JPA projects"); //$NON-NLS-1$
- // clone the collection to prevent concurrent modification exception
- for (JpaProject jpaProject : this.getJpaProjects()) {
- this.removeJpaProject(jpaProject);
- }
- debug("end: clear JPA projects"); //$NON-NLS-1$
- }
-
-
- // ********** get JPA projects **********
-
- public Iterable<JpaProject> waitToGetJpaProjects() throws InterruptedException {
- debug("dispatch: get JPA projects"); //$NON-NLS-1$
- GetJpaProjectsCommand command = new GetJpaProjectsCommand();
- this.waitToExecute(command, JptCoreMessages.GET_JPA_PROJECTS_JOB_NAME, this.getWorkspaceRoot());
- return command.result;
- }
-
- /* CU private */ class GetJpaProjectsCommand
- implements Command
- {
- Iterable<JpaProject> result;
- public void execute() {
- this.result = InternalJpaProjectManager.this.getJpaProjects_();
- }
- }
-
- /**
- * Pre-condition: called from {@link GetJpaProjectsCommand#execute()}
- */
- /* CU private */ Iterable<JpaProject> getJpaProjects_() {
- debug("execute: get JPA projects: ", this.jpaProjects); //$NON-NLS-1$
- // clone the JPA projects immediately, while we have the lock
- return this.getJpaProjects();
- }
-
- public Iterable<JpaProject> getJpaProjects() {
- return new SnapshotCloneIterable<JpaProject>(this.jpaProjects);
- }
-
- public int getJpaProjectsSize() {
- return this.jpaProjects.size();
- }
-
-
- // ********** get JPA project **********
-
- /**
- * @see ProjectAdapterFactory.JpaProjectReference#getValue()
- */
- JpaProject waitToGetJpaProject(IProject project) throws InterruptedException {
- debug("dispatch: get JPA project: ", project.getName()); //$NON-NLS-1$
- GetJpaProjectCommand command = new GetJpaProjectCommand(project);
- this.waitToExecute(command, JptCoreMessages.GET_JPA_PROJECT_JOB_NAME, project);
- return command.result;
- }
-
- /**
- * Not needed...?
- * It's nigh pointless to put a time-out on this call, since there are many
- * things that can trigger a time-out (e.g. validation). Either the client
- * wants to wait for the JPA project and uses a
- * {@link org.eclipse.jpt.jpa.core.JpaProject.Reference}
- * or the client can use the event notification mechanism to be notified
- * when the JPA project shows up....
- */
- // @see ProjectAdapterFactory.JpaProjectReference#getValue(ModifiableObjectReference, long)
- @SuppressWarnings("unused")
- private boolean waitToGetJpaProject(ModifiableObjectReference<JpaProject> jpaProjectRef, IProject project, long timeout) throws InterruptedException {
- debug("dispatch: get JPA project (time-out): ", project.getName()); //$NON-NLS-1$
- GetJpaProjectCommand command = new GetJpaProjectCommand(project);
- boolean result = this.waitToExecute(command, JptCoreMessages.GET_JPA_PROJECT_JOB_NAME, project, timeout);
- if (result) {
- jpaProjectRef.setValue(command.result);
- } else {
- debug("time-out: get JPA project: ", project.getName()); //$NON-NLS-1$
- }
- return result;
- }
-
- /* CU private */ class GetJpaProjectCommand
- implements Command
- {
- private final IProject project;
- JpaProject result;
- GetJpaProjectCommand(IProject project) {
- this.project = project;
- }
- public void execute() {
- this.result = InternalJpaProjectManager.this.getJpaProjectUnsafe(this.project);
- }
- }
-
- /**
- * Pre-condition: called from {@link GetJpaProjectCommand#execute()}
- */
- /* CU private */ JpaProject getJpaProjectUnsafe(IProject project) {
- debug("execute: get JPA project: ", project.getName()); //$NON-NLS-1$
- // no need to clone here, since we have the lock
- JpaProject jpaProject = selectJpaProject(this.jpaProjects, project);
- if (jpaProject == null) {
- debug("not found: get JPA project: ", project.getName()); //$NON-NLS-1$
- }
- return jpaProject;
- }
-
- /**
- * Called from {@link ProjectAdapterFactory#getJpaProject(IProject)}.
- */
- JpaProject getJpaProject_(IProject project) {
- return selectJpaProject(this.getJpaProjects(), project);
- }
-
- private static JpaProject selectJpaProject(Iterable<JpaProject> jpaProjects, IProject project) {
- for (JpaProject jpaProject : jpaProjects) {
- if (jpaProject.getProject().equals(project)) {
- return jpaProject;
- }
- }
- return null;
- }
-
-
- // ********** rebuild JPA project **********
-
- /**
- * @see ProjectAdapterFactory.JpaProjectReference#rebuild()
- */
- // e.g. changed JPA platform
- JpaProject rebuildJpaProject(IProject project) throws InterruptedException {
- debug("dispatch: rebuild JPA project: ", project.getName()); //$NON-NLS-1$
- RebuildJpaProjectCommand command = new RebuildJpaProjectCommand(project);
- this.waitToExecute(command, JptCoreMessages.REBUILD_JPA_PROJECT_JOB_NAME, project);
- return command.result;
- }
-
- /* CU private */ class RebuildJpaProjectCommand
- implements JobCommand
- {
- private final IProject project;
- JpaProject result;
- RebuildJpaProjectCommand(IProject project) {
- this.project = project;
- }
- public IStatus execute(IProgressMonitor monitor) {
- this.result = InternalJpaProjectManager.this.rebuildJpaProject_(this.project, monitor);
- return Status.OK_STATUS;
- }
- }
-
- /* CU private */ JpaProject rebuildJpaProject_(IProject project, IProgressMonitor monitor) {
- debug("execute: rebuild JPA project: ", project.getName()); //$NON-NLS-1$
- this.removeJpaProject(this.getJpaProject_(project));
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- return this.addJpaProject(project);
- }
-
-
- // ********** build validation messages **********
-
- /**
- * @see ProjectAdapterFactory.JpaProjectReference#buildValidationMessages(IReporter)
- */
- Iterable<IMessage> buildValidationMessages(IProject project, IReporter reporter) throws InterruptedException {
- debug("dispatch: build validation messages: ", project.getName()); //$NON-NLS-1$
- BuildValidationMessagesCommand command = new BuildValidationMessagesCommand(project, reporter);
- this.waitToExecute(command, JptCoreMessages.BUILD_VALIDATION_MESSAGES_JOB_NAME, project);
- return command.result;
- }
-
- /* CU private */ class BuildValidationMessagesCommand
- implements Command
- {
- private final IProject project;
- private final IReporter reporter;
- Iterable<IMessage> result;
- BuildValidationMessagesCommand(IProject project, IReporter reporter) {
- this.project = project;
- this.reporter = reporter;
- }
- public void execute() {
- this.result = InternalJpaProjectManager.this.buildValidationMessages_(this.project, this.reporter);
- }
- }
-
- /* CU private */ Iterable<IMessage> buildValidationMessages_(IProject project, IReporter reporter) {
- debug("execute: build validation messages: ", project.getName()); //$NON-NLS-1$
- JpaProject jpaProject = this.getJpaProject_(project);
- if (jpaProject == null) {
- return this.buildNoJpaProjectMessages(project);
- }
- try {
- return jpaProject.getValidationMessages(reporter);
- } catch (RuntimeException ex) {
- this.log(ex);
- return EmptyIterable.<IMessage>instance();
- }
- }
-
- private Iterable<IMessage> buildNoJpaProjectMessages(IProject project) {
- return new SingleElementIterable<IMessage>(this.buildNoJpaProjectMessage(project));
- }
-
- private IMessage buildNoJpaProjectMessage(IProject project) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.NO_JPA_PROJECT,
- project
- );
- }
-
-
- // ********** add JPA project **********
-
- /**
- * Pre-condition: The specified project is locked.
- * If there are any problems building the JPA project,
- * log the exception and do not add anything to the manager.
- * Return the newly-created JPA project.
- */
- /* CU private */ JpaProject addJpaProject(IProject project) {
- JpaProject jpaProject = this.buildJpaProject(project);
- // figure out exactly when JPA projects are added
- if (jpaProject == null) {
- dumpStackTrace("add JPA project fail: ", project); //$NON-NLS-1$
- } else {
- dumpStackTrace("add JPA project: ", jpaProject); //$NON-NLS-1$
- }
- // the JPA project will be null if we have any problems building it...
- // (e.g. if we have problems getting the JPA platform)
- if (jpaProject != null) {
- this.addItemToCollection(jpaProject, this.jpaProjects, JPA_PROJECTS_COLLECTION);
- }
- return jpaProject;
- }
-
- /**
- * Return <code>null</code> if we have any problems....
- */
- private JpaProject buildJpaProject(IProject project) {
- return this.buildJpaProject(this.buildJpaProjectConfig(project));
- }
-
- /**
- * Return <code>null</code> if we have any problems....
- */
- private JpaProject buildJpaProject(JpaProject.Config config) {
- return this.buildJpaProject(config.getJpaPlatform(), config);
- }
-
- /**
- * Return <code>null</code> if we have any problems....
- */
- private JpaProject buildJpaProject(JpaPlatform jpaPlatform, JpaProject.Config config) {
- try {
- return (jpaPlatform == null) ? null : jpaPlatform.getJpaFactory().buildJpaProject(config);
- } catch (RuntimeException ex) {
- this.log(ex);
- return null;
- }
- }
-
- private JpaProject.Config buildJpaProjectConfig(IProject project) {
- SimpleJpaProjectConfig config = new SimpleJpaProjectConfig();
- config.setJpaProjectManager(this);
- config.setProject(project);
- config.setJpaPlatform(JptJpaCorePlugin.getJpaPlatformManager().buildJpaPlatformImplementation(project));
- config.setConnectionProfileName(JptJpaCorePlugin.getConnectionProfileName(project));
- config.setUserOverrideDefaultCatalog(JptJpaCorePlugin.getUserOverrideDefaultCatalog(project));
- config.setUserOverrideDefaultSchema(JptJpaCorePlugin.getUserOverrideDefaultSchema(project));
- config.setDiscoverAnnotatedClasses(JptJpaCorePlugin.getDiscoverAnnotatedClasses(project));
- config.setMetamodelSourceFolderName(JptJpaCorePlugin.getMetamodelSourceFolderName(project));
- return config;
- }
-
-
- // ********** remove JPA project **********
-
- /**
- * Pre-condition: The specified JPA project's project is locked.
- */
- private void removeJpaProject(JpaProject jpaProject) {
- // figure out exactly when JPA projects are removed
- dumpStackTrace("remove JPA project: ", jpaProject); //$NON-NLS-1$
- this.removeItemFromCollection(jpaProject, this.jpaProjects, JPA_PROJECTS_COLLECTION);
- try {
- jpaProject.dispose();
- } catch (RuntimeException ex) {
- this.log(ex);
- }
- }
-
-
- // ********** Project POST_CHANGE **********
-
- /* CU private */ void projectChanged(IResourceDelta delta) {
- debug("dispatch: project changed: ", delta.getResource()); //$NON-NLS-1$
- ProjectChangeEventHandlerCommand command = new ProjectChangeEventHandlerCommand(delta);
- this.execute(command, JptCoreMessages.PROJECT_CHANGE_EVENT_HANDLER_JOB_NAME, this.getWorkspaceRoot());
- }
-
- /* CU private */ class ProjectChangeEventHandlerCommand
- implements JobCommand
- {
- private final IResourceDelta delta;
- ProjectChangeEventHandlerCommand(IResourceDelta delta) {
- this.delta = delta;
- }
- public IStatus execute(IProgressMonitor monitor) {
- InternalJpaProjectManager.this.projectChanged_(this.delta, monitor);
- return Status.OK_STATUS;
- }
- }
-
- /**
- * Forward the specified resource delta to <em>all</em> the JPA projects;
- * they will each determine whether the event is significant.
- */
- /* CU private */ void projectChanged_(IResourceDelta delta, IProgressMonitor monitor) {
- debug("execute: project changed: ", delta.getResource()); //$NON-NLS-1$
-// debug("execute: project changed: ", ((org.eclipse.core.internal.events.ResourceDelta) delta).toDeepDebugString()); //$NON-NLS-1$
- for (JpaProject jpaProject : this.jpaProjects) {
- try {
- jpaProject.projectChanged(delta);
- } catch (RuntimeException ex) {
- this.log(ex);
- }
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
- }
-
-
- // ********** Project POST_BUILD (CLEAN_BUILD) **********
-
- /* CU private */ void projectPostCleanBuild(IProject project) {
- debug("dispatch: post clean build: ", project.getName()); //$NON-NLS-1$
- ProjectPostCleanBuildEventHandlerCommand command = new ProjectPostCleanBuildEventHandlerCommand(project);
- this.execute(command, JptCoreMessages.PROJECT_POST_CLEAN_BUILD_EVENT_HANDLER_JOB_NAME, project);
- }
-
- /* CU private */ class ProjectPostCleanBuildEventHandlerCommand
- implements JobCommand
- {
- private final IProject project;
- ProjectPostCleanBuildEventHandlerCommand(IProject project) {
- this.project = project;
- }
- public IStatus execute(IProgressMonitor monitor) {
- InternalJpaProjectManager.this.projectPostCleanBuild_(this.project, monitor);
- return Status.OK_STATUS;
- }
- }
-
- /* CU private */ void projectPostCleanBuild_(IProject project, IProgressMonitor monitor) {
- debug("execute: post clean build: ", project.getName()); //$NON-NLS-1$
- JpaProject jpaProject = this.getJpaProject_(project);
- if (jpaProject != null) {
- this.removeJpaProject(jpaProject);
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addJpaProject(project);
- }
- }
-
-
- // ********** File POST_CHANGE **********
-
- /**
- * The Faceted Project settings file has changed in some fashion, check
- * whether the JPA facet has been added to or removed from the specified
- * project.
- */
- /* CU private */ void checkForJpaFacetTransition(IProject project) {
- debug("dispatch: project facet file changed: ", project.getName()); //$NON-NLS-1$
- FacetFileChangeEventHandlerCommand command = new FacetFileChangeEventHandlerCommand(project);
- this.execute(command, JptCoreMessages.FACET_FILE_CHANGE_EVENT_HANDLER_JOB_NAME, project);
- }
-
- /* CU private */ class FacetFileChangeEventHandlerCommand
- implements Command
- {
- private final IProject project;
- FacetFileChangeEventHandlerCommand(IProject project) {
- this.project = project;
- }
- public void execute() {
- InternalJpaProjectManager.this.checkForJpaFacetTransition_(this.project);
- }
- }
-
- /* CU private */ void checkForJpaFacetTransition_(IProject project) {
- debug("execute: project facet file changed: ", project.getName()); //$NON-NLS-1$
- JpaProject jpaProject = this.getJpaProject_(project);
-
- if (JpaFacet.isInstalled(project)) {
- if (jpaProject == null) { // JPA facet added
- this.addJpaProject(project);
- }
- } else {
- if (jpaProject != null) { // JPA facet removed
- this.removeJpaProject(jpaProject);
- }
- }
- }
-
-
- // ********** Java element changed **********
-
- /* CU private */ void javaElementChanged(ElementChangedEvent event) {
- debug("dispatch: Java element changed: ", event.getDelta()); //$NON-NLS-1$
- JavaChangeEventHandlerCommand command = new JavaChangeEventHandlerCommand(event);
- this.execute(command, JptCoreMessages.JAVA_CHANGE_EVENT_HANDLER_JOB_NAME, this.getWorkspaceRoot());
- }
-
- /* CU private */ class JavaChangeEventHandlerCommand
- implements JobCommand
- {
- private final ElementChangedEvent event;
- JavaChangeEventHandlerCommand(ElementChangedEvent event) {
- this.event = event;
- }
- public IStatus execute(IProgressMonitor monitor) {
- InternalJpaProjectManager.this.javaElementChanged_(this.event, monitor);
- return Status.OK_STATUS;
- }
- }
-
- /**
- * Forward the Java element changed event to <em>all</em> the JPA projects
- * as the event could affect multiple projects.
- */
- /* CU private */ void javaElementChanged_(ElementChangedEvent event, IProgressMonitor monitor) {
- debug("execute: Java element changed: ", event.getDelta()); //$NON-NLS-1$
- for (JpaProject jpaProject : this.jpaProjects) {
- try {
- jpaProject.javaElementChanged(event);
- } catch (RuntimeException ex) {
- this.log(ex);
- }
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
- }
-
-
- // ********** support for modifying documents shared with the UI **********
-
- public ExtendedCommandExecutor getModifySharedDocumentCommandExecutor() {
- return this.modifySharedDocumentCommandExecutor;
- }
-
- private void setThreadLocalModifySharedDocumentCommandExecutor(ExtendedCommandExecutor commandExecutor) {
- this.modifySharedDocumentCommandExecutor.set(commandExecutor);
- }
-
-
- // ********** logging **********
-
- public void log(String msg) {
- JptJpaCorePlugin.log(msg);
- }
-
- public void log(Throwable throwable) {
- JptJpaCorePlugin.log(throwable);
- }
-
- public void log(String msg, Throwable throwable) {
- JptJpaCorePlugin.log(msg, throwable);
- }
-
- public ExceptionHandler getExceptionHandler() {
- return this.exceptionHandler;
- }
-
- /* CU private */ class LocalExceptionHandler
- implements ExceptionHandler
- {
- public void handleException(Throwable t) {
- InternalJpaProjectManager.this.log(t);
- if (InternalJpaProjectManager.this.test) {
- t.printStackTrace();
- }
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this);
- }
- }
-
-
- // ********** misc **********
-
- public IWorkspace getWorkspace() {
- return this.workspace;
- }
-
- private IWorkspaceRoot getWorkspaceRoot() {
- return this.workspace.getRoot();
- }
-
- private ISchedulingRule getCurrentRule() {
- return this.getJobManager().currentRule();
- }
-
- private IJobManager getJobManager() {
- return Job.getJobManager();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getJpaProjects());
- }
-
-
- // ********** command execution **********
-
- /**
- * Make sure the JPA project is still around when the command reaches the
- * front of the command queue.
- * <p>
- * Called by JPA project <em>synchronizes</em> and <em>updates</em>:
- * @see org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.ManagerJobCommandExecutor#execute(JobCommand, String)
- */
- public void execute(JobCommand command, String jobName, JpaProject jpaProject) {
- debug("dispatch: client command: ", command); //$NON-NLS-1$
- this.execute(new ClientJobCommandWrapper(command, jpaProject), jobName, jpaProject.getProject());
- }
-
- private void execute(Command command, String jobName, ISchedulingRule schedulingRule) {
- this.execute(new CommandJobCommandAdapter(command), jobName, schedulingRule);
- }
-
- private void execute(JobCommand command, String jobName, ISchedulingRule schedulingRule) {
- this.commandExecutor.execute(command, jobName, schedulingRule);
- }
-
- private void waitToExecute(Command command, String jobName, ISchedulingRule schedulingRule) throws InterruptedException {
- this.waitToExecute(new CommandJobCommandAdapter(command), jobName, schedulingRule);
- }
-
- private void waitToExecute(JobCommand command, String jobName, ISchedulingRule schedulingRule) throws InterruptedException {
- this.waitToExecute(command, jobName, schedulingRule, 0);
- }
-
- private boolean waitToExecute(Command command, String jobName, ISchedulingRule schedulingRule, long timeout) throws InterruptedException {
- return this.waitToExecute(new CommandJobCommandAdapter(command), jobName, schedulingRule, timeout);
- }
-
- /**
- * Check whether the specified scheduling rule
- * {@link ISchedulingRule#isConflicting(ISchedulingRule) conflicts} with the
- * {@link IJobManager#currentRule() current rule}. If the rules conflict,
- * execute the specified command directly (i.e. synchronously) to prevent a
- * deadlock. This should not cause a problem because if the current rule
- * conflicts with the specified rule, the current rule will also prevent any
- * other, conflicting, JPA project manager commands from executing.
- */
- private boolean waitToExecute(JobCommand command, String jobName, ISchedulingRule schedulingRule, long timeout) throws InterruptedException {
- ISchedulingRule currentRule = this.getCurrentRule();
- if ((currentRule != null) && schedulingRule.isConflicting(currentRule)) {
- dumpStackTrace("scheduling rule conflict: ", schedulingRule, currentRule); //$NON-NLS-1$
- command.execute(new NullProgressMonitor());
- return true;
- }
- return this.commandExecutor.waitToExecute(command, jobName, schedulingRule, timeout);
- }
-
- public void execute(Command command) throws InterruptedException {
- this.execute(command, null);
- }
-
- public void execute(Command command, ExtendedCommandExecutor threadLocalModifySharedDocumentCommandExecutor) throws InterruptedException {
- this.setThreadLocalModifySharedDocumentCommandExecutor(threadLocalModifySharedDocumentCommandExecutor);
- this.executeCommandsSynchronously();
- try {
- command.execute();
- } finally {
- this.executeCommandsAsynchronously();
- }
- // not really necessary - thread locals are GCed
- this.setThreadLocalModifySharedDocumentCommandExecutor(null);
- }
-
- /**
- * <strong>NB:</strong>
- * This method is called (via reflection) when the test plug-in is loaded.
- * This is only useful during tests because none of the files are open in
- * the UI, so all the Java events come to us synchronously (i.e. without the
- * 0.5 second delay).
- * <p>
- * See org.eclipse.jpt.jpa.core.tests.JptJpaCoreTestsPlugin#start(org.osgi.framework.BundleContext).
- *
- * @see #executeCommandsAsynchronously()
- */
- private synchronized void executeCommandsSynchronously() throws InterruptedException {
- if ( ! (this.commandExecutor instanceof SimpleJobCommandExecutor)) {
- throw new IllegalStateException();
- }
-
- // de-activate async (Java) events
- this.addAsyncEventListenerFlag(BooleanReference.False.instance());
- // save the current executor
- SimpleJobCommandExecutor old = (SimpleJobCommandExecutor) this.commandExecutor;
- // install a new (not-yet-started) executor
- SingleUseQueueingExtendedJobCommandExecutor newCE = this.buildSynchronousCommandExecutor();
- this.commandExecutor = newCE;
- // wait for all the outstanding commands to finish
- old.waitToExecute(Command.Null.instance());
- // start up the new executor (it will now execute any commands that
- // arrived while we were waiting on the outstanding commands)
- newCE.start();
- }
-
- private SingleUseQueueingExtendedJobCommandExecutor buildSynchronousCommandExecutor() {
- return new SingleUseQueueingExtendedJobCommandExecutor();
- }
-
- private synchronized void executeCommandsAsynchronously() {
- if ( ! (this.commandExecutor instanceof SingleUseQueueingExtendedJobCommandExecutor)) {
- throw new IllegalStateException();
- }
-
- // no need to wait on a synchronous executor...
- this.commandExecutor = this.buildAsynchronousCommandExecutor();
- // re-activate async (Java) events
- this.removeAsyncEventListenerFlag(BooleanReference.False.instance());
- }
-
- private SimpleJobCommandExecutor buildAsynchronousCommandExecutor() {
- return new SimpleJobCommandExecutor(JptCommonCoreMessages.DALI_JOB_NAME);
- }
-
-
- // ********** job command wrapper **********
-
- /* CU private */ class ClientJobCommandWrapper
- implements JobCommand
- {
- private final JobCommand jobCommand;
- private final JpaProject jpaProject;
-
- ClientJobCommandWrapper(JobCommand jobCommand, JpaProject jpaProject) {
- super();
- if ((jobCommand == null) || (jpaProject == null)) {
- throw new NullPointerException();
- }
- this.jobCommand = jobCommand;
- this.jpaProject = jpaProject;
- }
-
- public IStatus execute(IProgressMonitor monitor) {
- InternalJpaProjectManager.this.execute_(this.jobCommand, monitor, this.jpaProject);
- return Status.OK_STATUS;
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.jobCommand);
- }
- }
-
- /**
- * Execute the specified command only if the specified JPA project is still
- * around. (i.e. The JPA project may have been removed between the time the
- * client requested the JPA project manager to execute the command and the
- * time the command reached the front of the execution queue.)
- * Called by {@link ClientJobCommandWrapper#execute(IProgressMonitor)}.
- */
- /* CU private */ void execute_(JobCommand command, IProgressMonitor monitor, JpaProject jpaProject) {
- if (this.jpaProjects.contains(jpaProject)) {
- debug("execute: client command: ", command); //$NON-NLS-1$
- command.execute(monitor);
- } else {
- debug("ignore: client command: ", command); //$NON-NLS-1$
- }
- }
-
-
- // ********** resource proxy visitor **********
-
- /**
- * Visit the workspace resource tree, adding a JPA project to the
- * JPA project manager for each open Eclipse project that has a JPA facet.
- */
- /* CU private */ class ResourceProxyVisitor
- implements IResourceProxyVisitor
- {
- private final IProgressMonitor monitor;
-
- ResourceProxyVisitor(IProgressMonitor monitor) {
- super();
- this.monitor = monitor;
- }
-
- public boolean visit(IResourceProxy resourceProxy) {
- switch (resourceProxy.getType()) {
- case IResource.ROOT :
- return true; // all projects are in the "root"
- case IResource.PROJECT :
- this.processProject(resourceProxy);
- return false; // no nested projects
- case IResource.FOLDER :
- return false; // ignore
- case IResource.FILE :
- return false; // ignore
- default :
- return false;
- }
- }
-
- private void processProject(IResourceProxy resourceProxy) {
- if (resourceProxy.isAccessible()) { // the project exists and is open
- IProject project = (IProject) resourceProxy.requestResource();
- if (JpaFacet.isInstalled(project)) {
- InternalJpaProjectManager.this.addJpaProject(project);
- }
- }
- if (this.monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this);
- }
- }
-
-
- // ********** resource change listener **********
-
- /* CU private */ class ResourceChangeListener
- implements IResourceChangeListener
- {
- /**
- * PRE_UNINSTALL is the only facet event we use for
- * removing JPA projects. These are the cases where we listen for resource events.
- * <p>
- * Check for:<ul>
- * <li>facet settings file added/removed/changed
- * (<code>/.settings/org.eclipse.wst.common.project.facet.core.xml</code>)
- * <li>file add/remove - forwarded to the individual JPA projects
- * <li>project clean
- * </ul>
- */
- public void resourceChanged(IResourceChangeEvent event) {
- switch (event.getType()) {
- case IResourceChangeEvent.POST_CHANGE :
- this.processPostChangeEvent(event);
- break;
-
- // workspace or project events
- case IResourceChangeEvent.PRE_REFRESH :
- break; // ignore
- case IResourceChangeEvent.PRE_BUILD :
- break; // ignore
- case IResourceChangeEvent.POST_BUILD :
- this.processPostBuildEvent(event);
- break;
-
- // project-only events
- case IResourceChangeEvent.PRE_CLOSE :
- break; // ignore
- case IResourceChangeEvent.PRE_DELETE :
- break; // ignore
- default :
- break;
- }
- }
-
- private void processPostChangeEvent(IResourceChangeEvent event) {
- debug("Resource POST_CHANGE event: ", event.getResource()); //$NON-NLS-1$
- this.processPostChangeDelta(event.getDelta());
- }
-
- private void processPostChangeDelta(IResourceDelta delta) {
- IResource resource = delta.getResource();
- switch (resource.getType()) {
- case IResource.ROOT :
- this.processPostChangeRootDelta(delta);
- break;
- case IResource.PROJECT :
- this.processPostChangeProjectDelta(delta);
- break;
- case IResource.FOLDER :
- this.processPostChangeFolderDelta((IFolder) resource, delta);
- break;
- case IResource.FILE :
- this.processPostChangeFileDelta((IFile) resource, delta);
- break;
- default :
- break;
- }
- }
-
- // ***** POST_CHANGE ROOT
- private void processPostChangeRootDelta(IResourceDelta delta) {
- this.processPostChangeDeltaChildren(delta);
- }
-
- // ***** POST_CHANGE PROJECT
- /**
- * Process the project <em>first</em> for the "opening" project case; so
- * the JPA project will not be built until the children are processed
- * and we see that the facet metadata file is added.
- * Otherwise the JPA project would be built and <em>then</em> we would
- * process the <code>ADDED</code> deltas for all the files in
- * the project we would've discovered during JPA project construction
- * (i.e. we would throw an exception because we would try to add a file
- * to the JPA project that it already contained).
- */
- private void processPostChangeProjectDelta(IResourceDelta delta) {
- InternalJpaProjectManager.this.projectChanged(delta);
- this.processPostChangeDeltaChildren(delta);
- }
-
- // ***** POST_CHANGE FOLDER
- private void processPostChangeFolderDelta(IFolder folder, IResourceDelta delta) {
- if (folder.getName().equals(".settings")) { //$NON-NLS-1$
- this.processPostChangeDeltaChildren(delta);
- }
- }
-
- // ***** POST_CHANGE FILE
- private void processPostChangeFileDelta(IFile file, IResourceDelta delta) {
- if (file.getName().equals(FACETED_PROJECT_FRAMEWORK_SETTINGS_FILE_NAME)) {
- this.checkForFacetFileChanges(file, delta);
- }
- }
-
- private void checkForFacetFileChanges(IFile file, IResourceDelta delta) {
- switch (delta.getKind()) {
- case IResourceDelta.ADDED :
- case IResourceDelta.REMOVED :
- case IResourceDelta.CHANGED :
- InternalJpaProjectManager.this.checkForJpaFacetTransition(file.getProject());
- break;
- case IResourceDelta.ADDED_PHANTOM :
- break; // ignore
- case IResourceDelta.REMOVED_PHANTOM :
- break; // ignore
- default :
- break;
- }
- }
-
- private void processPostChangeDeltaChildren(IResourceDelta delta) {
- for (IResourceDelta child : delta.getAffectedChildren()) {
- this.processPostChangeDelta(child); // recurse
- }
- }
-
- /**
- * A post build event has occurred.
- * Check for whether the build was a "clean" build and completely
- * rebuild the appropriate JPA project.
- */
- // ***** POST_BUILD
- private void processPostBuildEvent(IResourceChangeEvent event) {
- debug("Resource POST_BUILD event: ", event.getDelta().getResource()); //$NON-NLS-1$
- if (event.getBuildKind() == IncrementalProjectBuilder.CLEAN_BUILD) {
- this.processPostCleanBuildDelta(event.getDelta());
- }
- }
-
- private void processPostCleanBuildDelta(IResourceDelta delta) {
- IResource resource = delta.getResource();
- switch (resource.getType()) {
- case IResource.ROOT :
- this.processPostCleanBuildDeltaChildren(delta);
- break;
- case IResource.PROJECT :
- this.processProjectPostCleanBuild((IProject) resource);
- break;
- case IResource.FOLDER :
- break; // ignore
- case IResource.FILE :
- break; // ignore
- default :
- break;
- }
- }
-
- private void processPostCleanBuildDeltaChildren(IResourceDelta delta) {
- for (IResourceDelta child : delta.getAffectedChildren()) {
- this.processPostCleanBuildDelta(child); // recurse
- }
- }
-
- private void processProjectPostCleanBuild(IProject project) {
- debug("\tProject CLEAN event: ", project.getName()); //$NON-NLS-1$
- InternalJpaProjectManager.this.projectPostCleanBuild(project);
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this);
- }
- }
-
-
- // ********** Java element change listener **********
-
- /**
- * Forward the Java element change event back to the JPA project manager.
- */
- /* CU private */ class JavaElementChangeListener
- implements IElementChangedListener
- {
- public void elementChanged(ElementChangedEvent event) {
- if (this.isActive()) {
- InternalJpaProjectManager.this.javaElementChanged(event);
- }
- }
-
- private boolean isActive() {
- return InternalJpaProjectManager.this.asyncEventListenersAreActive();
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.isActive() ? "active" : "inactive"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
-
- // ********** async events **********
-
- boolean asyncEventListenersAreActive() {
- synchronized (this.asyncEventListenerFlags) {
- return this.asyncEventListenersAreActive_();
- }
- }
-
- /**
- * All the flags must be <code>true</code>.
- */
- private boolean asyncEventListenersAreActive_() {
- for (BooleanReference flag : this.asyncEventListenerFlags) {
- if (flag.isFalse()) {
- return false;
- }
- }
- return true;
- }
-
- public void addAsyncEventListenerFlag(BooleanReference flag) {
- synchronized (this.asyncEventListenerFlags) {
- this.addAsyncEventListenerFlag_(flag);
- }
- }
-
- private void addAsyncEventListenerFlag_(BooleanReference flag) {
- if ( ! this.asyncEventListenerFlags.add(flag)) {
- throw new IllegalArgumentException("duplicate flag: " + flag); //$NON-NLS-1$
- }
- }
-
- public void removeAsyncEventListenerFlag(BooleanReference flag) {
- synchronized (this.asyncEventListenerFlags) {
- this.removeAsyncEventListenerFlag_(flag);
- }
- }
-
- private void removeAsyncEventListenerFlag_(BooleanReference flag) {
- if ( ! this.asyncEventListenerFlags.remove(flag)) {
- throw new IllegalArgumentException("missing flag: " + flag); //$NON-NLS-1$
- }
- }
-
-
- // ********** DEBUG **********
-
- // see JpaProjectManagerTests.testDEBUG()
- private static final boolean DEBUG = false;
-
- /* CU private */ static void debug(String message) {
- debug(message, null);
- }
-
- /* CU private */ static void debug(String message, Object object) {
- debug(message, object, null);
- }
-
- /* CU private */ static void debug(String message, Object object, Object additionalInfo) {
- if (DEBUG) {
- // lock System.out so the strings are printed out contiguously
- synchronized (System.out) {
- debug_(message, object, additionalInfo);
- }
- }
- }
-
- private static void debug_(String message, Object object, Object additionalInfo) {
- System.out.print(buildTimestamp());
- System.out.print(" "); //$NON-NLS-1$
- System.out.print(Thread.currentThread().getName());
- System.out.print(": "); //$NON-NLS-1$
- System.out.print(message);
- if (object != null) {
- System.out.print(object);
- if (additionalInfo != null) {
- System.out.print(" ("); //$NON-NLS-1$
- System.out.print(additionalInfo);
- System.out.print(")"); //$NON-NLS-1$
- }
- }
- System.out.println();
- }
-
- private static synchronized String buildTimestamp() {
- return DATE_FORMAT.format(new Date());
- }
- private static final String DATE_FORMAT_PATTERN = "yyyy.MM.dd HH:mm:ss.SSS"; //$NON-NLS-1$
- private static final DateFormat DATE_FORMAT = new SimpleDateFormat(DATE_FORMAT_PATTERN);
-
- /* CU private */ static void dumpStackTrace() {
- dumpStackTrace(null);
- }
-
- /* CU private */ static void dumpStackTrace(String message) {
- dumpStackTrace(message, null);
- }
-
- /* CU private */ static void dumpStackTrace(String message, Object object) {
- dumpStackTrace(message, object, null);
- }
-
- /* CU private */ static void dumpStackTrace(String message, Object object, Object additionalInfo) {
- if (DEBUG) {
- // lock System.out so the stack elements are printed out contiguously
- synchronized (System.out) {
- dumpStackTrace_(message, object, additionalInfo);
- }
- }
- }
-
- private static final boolean DEBUG_STACK_TRACE = false;
- private static void dumpStackTrace_(String message, Object object, Object additionalInfo) {
- if (message != null) {
- debug_(message, object, additionalInfo);
- }
- if (DEBUG_STACK_TRACE) {
- StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
- // skip the first 3 elements - those are this method and 2 methods in Thread
- for (int i = 3; i < stackTrace.length; i++) {
- StackTraceElement element = stackTrace[i];
- if (element.getMethodName().equals("invoke0")) { //$NON-NLS-1$
- break; // skip all elements outside of the JUnit test
- }
- System.out.print('\t');
- System.out.println(element);
- }
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JarResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JarResourceModelProvider.java
deleted file mode 100644
index e79e3d5b0c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JarResourceModelProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryPackageFragmentRoot;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-
-/**
- * JAR files
- */
-public class JarResourceModelProvider
- implements JpaResourceModelProvider
-{
- // singleton
- private static final JpaResourceModelProvider INSTANCE = new JarResourceModelProvider();
-
- /**
- * Return the singleton.
- */
- public static JpaResourceModelProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private JarResourceModelProvider() {
- super();
- }
-
- public IContentType getContentType() {
- return JptCommonCorePlugin.JAR_CONTENT_TYPE;
- }
-
- /**
- * NB: Despite the check in GenericJpaProject.addJpaFile_(IFile),
- * we can get here and
- * the PFR will be null if the JAR is underneath a directory on the
- * classpath but the JAR itself is not on the classpath.
- * Returning null should be OK.
- */
- public JptResourceModel buildResourceModel(JpaProject jpaProject, IFile file) {
- IPackageFragmentRoot pfr = JavaCore.createJarPackageFragmentRootFrom(file);
- return (pfr ==null) ? null : new BinaryPackageFragmentRoot(pfr, jpaProject.getJpaPlatform().getAnnotationProvider());
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaPackageInfoResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaPackageInfoResourceModelProvider.java
deleted file mode 100644
index f4132f0dff..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaPackageInfoResourceModelProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourcePackageInfoCompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-
-/**
- * Java package-info.java source code
- */
-public class JavaPackageInfoResourceModelProvider
- implements JpaResourceModelProvider
-{
- // singleton
- private static final JpaResourceModelProvider INSTANCE = new JavaPackageInfoResourceModelProvider();
-
- /**
- * Return the singleton.
- */
- public static JpaResourceModelProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private JavaPackageInfoResourceModelProvider() {
- super();
- }
-
- public IContentType getContentType() {
- return JptCommonCorePlugin.JAVA_SOURCE_PACKAGE_INFO_CONTENT_TYPE;
- }
-
- public JavaResourceCompilationUnit buildResourceModel(JpaProject jpaProject, IFile file) {
- ICompilationUnit compilationUnit = JavaCore.createCompilationUnitFrom(file);
- try {
- if (compilationUnit.getPackageDeclarations().length == 0){
- //ignore package-info placed in default package as
- //it doesn't have package declaration and can't hold annotations
- return null;
- }
- } catch (JavaModelException ex) {
- jpaProject.getManager().log(ex);
- // Ignore -- project is in a bad state. This will get recalled if necessary
- return null;
- }
- return new SourcePackageInfoCompilationUnit(
- compilationUnit,
- jpaProject.getJpaPlatform().getAnnotationProvider(),
- jpaProject.getJpaPlatform().getAnnotationEditFormatter(),
- jpaProject.getManager().getModifySharedDocumentCommandExecutor()
- );
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaResourceModelProvider.java
deleted file mode 100644
index d523f11c86..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JavaResourceModelProvider.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceTypeCompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-
-/**
- * Java source code
- */
-public class JavaResourceModelProvider
- implements JpaResourceModelProvider
-{
- // singleton
- private static final JpaResourceModelProvider INSTANCE = new JavaResourceModelProvider();
-
- /**
- * Return the singleton.
- */
- public static JpaResourceModelProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private JavaResourceModelProvider() {
- super();
- }
-
- public IContentType getContentType() {
- return JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE;
- }
-
- public JavaResourceCompilationUnit buildResourceModel(JpaProject jpaProject, IFile file) {
- return new SourceTypeCompilationUnit(
- JavaCore.createCompilationUnitFrom(file),
- jpaProject.getJpaPlatform().getAnnotationProvider(),
- jpaProject.getJpaPlatform().getAnnotationEditFormatter(),
- jpaProject.getManager().getModifySharedDocumentCommandExecutor()
- );
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaAnnotationProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaAnnotationProvider.java
deleted file mode 100644
index 2bcbb2c023..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaAnnotationProvider.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.AnnotationProvider;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaAnnotationDefinitionProvider;
-
-/**
- * Delegate to annotation definition providers.
- * The platform factory will build an instance of this annotation provider,
- * passing in the appropriate array of annotation definition providers necessary
- * to build the annotations for the platform (vendor and/or version).
- */
-public class JpaAnnotationProvider
- implements AnnotationProvider
-{
- private final Iterable<JpaAnnotationDefinitionProvider> annotationDefinitionProviders;
-
-
- public JpaAnnotationProvider(JpaAnnotationDefinitionProvider... annotationDefinitionProviders) {
- super();
- this.annotationDefinitionProviders = new ArrayIterable<JpaAnnotationDefinitionProvider>(annotationDefinitionProviders);
- }
-
-
- // ********** type annotations **********
-
-
- public Iterable<String> getAnnotationNames() {
- return new TransformationIterable<AnnotationDefinition, String>(getAnnotationDefinitions()) {
- @Override
- protected String transform(AnnotationDefinition annotationDefinition) {
- return annotationDefinition.getAnnotationName();
- }
- };
- }
-
- public Iterable<String> getContainerAnnotationNames() {
- return new TransformationIterable<NestableAnnotationDefinition, String>(getNestableAnnotationDefinitions()) {
- @Override
- protected String transform(NestableAnnotationDefinition annotationDefinition) {
- return annotationDefinition.getContainerAnnotationName();
- }
- };
- }
-
- public Iterable<String> getNestableAnnotationNames() {
- return new TransformationIterable<NestableAnnotationDefinition, String>(getNestableAnnotationDefinitions()) {
- @Override
- protected String transform(NestableAnnotationDefinition annotationDefinition) {
- return annotationDefinition.getNestableAnnotationName();
- }
- };
- }
-
- protected Iterable<AnnotationDefinition> getAnnotationDefinitions() {
- return new CompositeIterable<AnnotationDefinition> (
- new TransformationIterable<JpaAnnotationDefinitionProvider, Iterable<AnnotationDefinition>>(this.annotationDefinitionProviders) {
- @Override
- protected Iterable<AnnotationDefinition> transform(JpaAnnotationDefinitionProvider annotationDefinitionProvider) {
- return annotationDefinitionProvider.getAnnotationDefinitions();
- }
- }
- );
- }
-
- protected Iterable<NestableAnnotationDefinition> getNestableAnnotationDefinitions() {
- return new CompositeIterable<NestableAnnotationDefinition> (
- new TransformationIterable<JpaAnnotationDefinitionProvider, Iterable<NestableAnnotationDefinition>>(this.annotationDefinitionProviders) {
- @Override
- protected Iterable<NestableAnnotationDefinition> transform(JpaAnnotationDefinitionProvider annotationDefinitionProvider) {
- return annotationDefinitionProvider.getNestableAnnotationDefinitions();
- }
- }
- );
- }
-
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, String annotationName) {
- return this.getAnnotationDefinition(annotationName).buildAnnotation(parent, element);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent, String annotationName) {
- return this.getAnnotationDefinition(annotationName).buildNullAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return this.getAnnotationDefinition(jdtAnnotation.getElementName()).buildAnnotation(parent, jdtAnnotation);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return this.getNestableAnnotationDefinition(jdtAnnotation.getElementName()).buildAnnotation(parent, jdtAnnotation, index);
- }
-
- protected AnnotationDefinition getAnnotationDefinition(String annotationName) {
- AnnotationDefinition annotationDefinition = this.selectAnnotationDefinition(this.getAnnotationDefinitions(), annotationName);
- if (annotationDefinition == null) {
- throw new IllegalArgumentException("unsupported annotation: " + annotationName); //$NON-NLS-1$
- }
- return annotationDefinition;
- }
-
-
- protected NestableAnnotationDefinition getNestableAnnotationDefinition(String annotationName) {
- NestableAnnotationDefinition annotationDefinition = this.selectNestableAnnotationDefinition(this.getNestableAnnotationDefinitions(), annotationName);
- if (annotationDefinition == null) {
- throw new IllegalArgumentException("unsupported nsetable annotation: " + annotationName); //$NON-NLS-1$
- }
- return annotationDefinition;
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, String annotationName, int index) {
- return this.getNestableAnnotationDefinition(annotationName).buildAnnotation(parent, element, index);
- }
-
- public String getNestableAnnotationName(String containerAnnotationName) {
- return getNestableAnnotationDefinitionForContainer(containerAnnotationName).getNestableAnnotationName();
- }
-
- public String getContainerAnnotationName(String nestableAnnotationName) {
- return getNestableAnnotationDefinition(nestableAnnotationName).getContainerAnnotationName();
- }
-
- public String getNestableElementName(String nestableAnnotationName) {
- return getNestableAnnotationDefinition(nestableAnnotationName).getElementName();
- }
-
- private NestableAnnotationDefinition getNestableAnnotationDefinitionForContainer(String containerAnnotationName) {
- for (NestableAnnotationDefinition nestableAnnotationDefinition : getNestableAnnotationDefinitions()) {
- if (nestableAnnotationDefinition.getContainerAnnotationName().equals(containerAnnotationName)) {
- return nestableAnnotationDefinition;
- }
- }
- return null;
- }
-
-
- // ********** convenience methods **********
-
- protected AnnotationDefinition selectAnnotationDefinition(Iterable<AnnotationDefinition> annotationDefinitions, String annotationName) {
- for (AnnotationDefinition annotationDefinition : annotationDefinitions) {
- if (annotationDefinition.getAnnotationName().equals(annotationName)) {
- return annotationDefinition;
- }
- }
- return null;
- }
-
- protected NestableAnnotationDefinition selectNestableAnnotationDefinition(Iterable<NestableAnnotationDefinition> annotationDefinitions, String annotationName) {
- for (NestableAnnotationDefinition annotationDefinition : annotationDefinitions) {
- if (annotationDefinition.getNestableAnnotationName().equals(annotationName)) {
- return annotationDefinition;
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaContextNodePropertyTester.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaContextNodePropertyTester.java
deleted file mode 100644
index f8b5be3f2c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JpaContextNodePropertyTester.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * Property tester for {@link JpaContextNode}.
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>
- */
-public class JpaContextNodePropertyTester
- extends PropertyTester
-{
- public static final String IS_COMPATIBLE_VERSION = "isCompatibleVersion"; //$NON-NLS-1$
-
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof JpaContextNode) {
- return this.test((JpaContextNode) receiver, property, expectedValue);
- }
- return false;
- }
-
- private boolean test(JpaContextNode contextNode, String property, Object expectedValue) {
- if (property.equals(IS_COMPATIBLE_VERSION)) {
- return JptJpaCorePlugin.resourceTypeIsCompatible(contextNode.getResourceType(), (String) expectedValue);
- }
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptCoreMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptCoreMessages.java
deleted file mode 100644
index b05cf8e435..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptCoreMessages.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Localized messages used by Dali core.
- */
-// TODO bjv rename...
-public class JptCoreMessages {
-
- public static String NONE;
-
- public static String BUILD_JPA_PROJECTS_JOB_NAME;
- public static String GET_JPA_PROJECTS_JOB_NAME;
- public static String GET_JPA_PROJECT_JOB_NAME;
- public static String REBUILD_JPA_PROJECT_JOB_NAME;
- public static String BUILD_VALIDATION_MESSAGES_JOB_NAME;
- public static String PROJECT_CHANGE_EVENT_HANDLER_JOB_NAME;
- public static String PROJECT_POST_CLEAN_BUILD_EVENT_HANDLER_JOB_NAME;
- public static String FACET_FILE_CHANGE_EVENT_HANDLER_JOB_NAME;
- public static String JAVA_CHANGE_EVENT_HANDLER_JOB_NAME;
-
- public static String VALIDATE_JOB;
- public static String VALIDATE_PROJECT_NOT_JPA;
- public static String VALIDATE_PROJECT_IMPROPER_PLATFORM;
- public static String VALIDATE_CONTAINER_QUESTIONABLE;
- public static String VALIDATE_FILE_VERSION_NOT_SUPPORTED;
- public static String VALIDATE_FILE_VERSION_NOT_SUPPORTED_FOR_FACET_VERSION;
- public static String VALIDATE_PERSISTENCE_UNIT_DOES_NOT_SPECIFIED;
- public static String VALIDATE_PERSISTENCE_UNIT_NOT_IN_PROJECT;
- public static String VALIDATE_PLATFORM_NOT_SPECIFIED;
- public static String VALIDATE_PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION;
- public static String VALIDATE_LIBRARY_PROVIDER_INVALID;
- public static String VALIDATE_CONNECTION_NOT_SPECIFIED;
- public static String VALIDATE_CONNECTION_INVALID;
- public static String VALIDATE_CONNECTION_NOT_CONNECTED;
- public static String VALIDATE_DEFAULT_CATALOG_NOT_SPECIFIED;
- public static String VALIDATE_CONNECTION_DOESNT_CONTAIN_CATALOG;
- public static String VALIDATE_DEFAULT_SCHEMA_NOT_SPECIFIED;
- public static String VALIDATE_CONNECTION_DOESNT_CONTAIN_SCHEMA;
- public static String VALIDATE_RUNTIME_NOT_SPECIFIED;
- public static String VALIDATE_RUNTIME_DOES_NOT_SUPPORT_EJB_30;
- public static String VALIDATE_LIBRARY_NOT_SPECIFIED;
- public static String INVALID_PERSISTENCE_XML_CONTENT;
- public static String ERROR_SYNCHRONIZING_CLASSES_COULD_NOT_VALIDATE;
- public static String ERROR_WRITING_FILE;
- public static String REGISTRY_MISSING_ATTRIBUTE;
- public static String REGISTRY_INVALID_VALUE;
- public static String REGISTRY_DUPLICATE;
- public static String REGISTRY_FAILED_CLASS_LOAD;
- public static String REGISTRY_FAILED_INTERFACE_ASSIGNMENT;
- public static String REGISTRY_FAILED_INSTANTIATION;
- public static String CONTEXT_MODEL_SYNC_JOB_NAME;
- public static String UPDATE_JOB_NAME;
- public static String METAMODEL_SYNC_JOB_NAME;
- public static String PLATFORM_ID_DOES_NOT_EXIST;
- public static String PREFERENCES_FLUSH_JOB_NAME;
- public static String OSGI_BUNDLES_LIBRARY_VALIDATOR__BUNDLE_NOT_FOUND;
- public static String OSGI_BUNDLES_LIBRARY_VALIDATOR__IMPROPER_BUNDLE_VERSION;
- public static String JPA_METADATA_CONVERSION_CONVERTING;
- public static String JPA_METADATA_CONVERSION_CONVERT_GENERATOR;
- public static String JPA_METADATA_CONVERSION_CONVERT_QUERY;
- public static String JPA_METADATA_CONVERSION_OPERATION_CANCELED;
- public static String JPA_METADATA_CONVERSION_OPERATION_COMPLETE;
-
- private static final String BUNDLE_NAME = "jpa_core"; //$NON-NLS-1$
- private static final Class<?> BUNDLE_CLASS = JptCoreMessages.class;
- static {
- NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
- }
-
- private JptCoreMessages() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptResourceModelPropertyTester.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptResourceModelPropertyTester.java
deleted file mode 100644
index 714baa5afe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/JptResourceModelPropertyTester.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.JpaProject;
-
-/**
- * Property tester for {@link JptResourceModel}.
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>
- */
-public class JptResourceModelPropertyTester
- extends PropertyTester
-{
- public static final String IS_LATEST_SUPPORTED_VERSION = "isLatestSupportedVersion"; //$NON-NLS-1$
- public static final String IS_NOT_LATEST_SUPPORTED_VERSION = "isNotLatestSupportedVersion"; //$NON-NLS-1$
-
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof JptResourceModel) {
- return this.test((JptResourceModel) receiver, property, expectedValue);
- }
- return false;
- }
-
- private boolean test(JptResourceModel resourceModel, String property, Object expectedValue) {
- if (property.equals(IS_NOT_LATEST_SUPPORTED_VERSION)) {
- return ! this.test(resourceModel, IS_LATEST_SUPPORTED_VERSION, expectedValue);
- }
- if (property.equals(IS_LATEST_SUPPORTED_VERSION)) {
- boolean expected = (expectedValue == null) ? true : ((Boolean) expectedValue).booleanValue();
- boolean actual = this.isLatestSupportedVersion(resourceModel);
- return actual == expected;
- }
- return false;
- }
-
- private boolean isLatestSupportedVersion(JptResourceModel resourceModel) {
- JpaProject jpaProject = this.getJpaProject(resourceModel.getFile().getProject());
- if (jpaProject == null) {
- // if we get to this tester, the JPA project should be there;
- // so this will probably never happen
- return true; // effectively disable "upgrade"
- }
- JptResourceType resourceType = resourceModel.getResourceType();
- String latestVersion = jpaProject.getJpaPlatform().getMostRecentSupportedResourceType(resourceType.getContentType()).getVersion();
- return Tools.valuesAreEqual(resourceType.getVersion(), latestVersion);
- }
-
- private JpaProject getJpaProject(IProject project) {
- return (JpaProject) project.getAdapter(JpaProject.class);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/OrmResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/OrmResourceModelProvider.java
deleted file mode 100644
index 95503b18d9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/OrmResourceModelProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.resource.orm.OrmXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * orm.xml
- */
-public class OrmResourceModelProvider
- implements JpaResourceModelProvider
-{
- // singleton
- private static final JpaResourceModelProvider INSTANCE = new OrmResourceModelProvider();
-
- /**
- * Return the singleton.
- */
- public static JpaResourceModelProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private OrmResourceModelProvider() {
- super();
- }
-
- public IContentType getContentType() {
- return JptJpaCorePlugin.ORM_XML_CONTENT_TYPE;
- }
-
- public JpaXmlResource buildResourceModel(JpaProject jpaProject, IFile file) {
- return OrmXmlResourceProvider.getXmlResourceProvider(file).getXmlResource();
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/PersistenceResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/PersistenceResourceModelProvider.java
deleted file mode 100644
index b4b9904fb1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/PersistenceResourceModelProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.resource.persistence.PersistenceXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * persistence.xml
- */
-public class PersistenceResourceModelProvider
- implements JpaResourceModelProvider
-{
- // singleton
- private static final JpaResourceModelProvider INSTANCE = new PersistenceResourceModelProvider();
-
- /**
- * Return the singleton.
- */
- public static JpaResourceModelProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private PersistenceResourceModelProvider() {
- super();
- }
-
- public IContentType getContentType() {
- return JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE;
- }
-
- public JpaXmlResource buildResourceModel(JpaProject jpaProject, IFile file) {
- return PersistenceXmlResourceProvider.getXmlResourceProvider(file).getXmlResource();
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/ProjectAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/ProjectAdapterFactory.java
deleted file mode 100644
index ebdb307bf9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/ProjectAdapterFactory.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Factory to build Dali adapters for an {@link IProject}:<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.JpaProject.Reference JpaProject.Reference} -
- * This adapter will always return a JPA project if it is available;
- * even if it must wait for the JPA project to be created (note the
- * {@link InterruptedException}).
- * This adapter should be used by any process that cannot ignore any
- * potential JPA projects (e.g. refactoring operations).
- * <li>{@link org.eclipse.jpt.jpa.core.JpaProject JpaProject} -
- * This adapter will only return a JPA project if it is immediately
- * available.
- * This adapter should be used by any process that can ignore
- * any uncreated JPA projects because it is demand-driven and re-queries
- * for the JPA project every time it executes and its results are only
- * temporary (e.g. UI menus).
- * </ul>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- */
-public class ProjectAdapterFactory
- implements IAdapterFactory
-{
- private static final Class<?>[] ADAPTER_LIST = new Class[] {
- JpaProject.Reference.class,
- JpaProject.class,
- };
-
- public Class<?>[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
- if (adaptableObject instanceof IProject) {
- return this.getAdapter((IProject) adaptableObject, adapterType);
- }
- return null;
- }
-
- private Object getAdapter(IProject project, Class<?> adapterType) {
- if (adapterType == JpaProject.Reference.class) {
- return this.getJpaProjectReference(project);
- }
- if (adapterType == JpaProject.class) {
- return this.getJpaProject(project);
- }
- return null;
- }
-
- private JpaProject.Reference getJpaProjectReference(IProject project) {
- return new JpaProjectReference(this.getJpaProjectManager(project.getWorkspace()), project);
- }
-
- private JpaProject getJpaProject(IProject project) {
- for (JpaProject jpaProject : this.getJpaProjectManager(project.getWorkspace()).getJpaProjects_()) {
- if (jpaProject.getProject().equals(project)) {
- return jpaProject;
- }
- }
- return null;
- }
-
- private InternalJpaProjectManager getJpaProjectManager(IWorkspace workspace) {
- return (InternalJpaProjectManager) workspace.getAdapter(JpaProjectManager.class);
- }
-
-
- // ********** JPA project reference **********
-
- /**
- * @see InternalJpaProjectManager
- */
- /* CU private */ static class JpaProjectReference
- implements JpaProject.Reference
- {
- private InternalJpaProjectManager jpaProjectManager;
- private final IProject project;
-
- JpaProjectReference(InternalJpaProjectManager jpaProjectManager, IProject project) {
- super();
- this.jpaProjectManager = jpaProjectManager;
- this.project = project;
- }
-
- public JpaProject getValue() throws InterruptedException {
- return this.jpaProjectManager.waitToGetJpaProject(this.project);
- }
-
- public JpaProject rebuild() throws InterruptedException {
- return this.jpaProjectManager.rebuildJpaProject(this.project);
- }
-
- public Iterable<IMessage> buildValidationMessages(IReporter reporter) throws InterruptedException {
- return this.jpaProjectManager.buildValidationMessages(this.project, reporter);
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.project);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/SimpleJpaProjectConfig.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/SimpleJpaProjectConfig.java
deleted file mode 100644
index 705e78bfce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/SimpleJpaProjectConfig.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
-
-/**
- * Straightforward implementation of the JPA project config.
- */
-public class SimpleJpaProjectConfig
- implements JpaProject2_0.Config
-{
- protected JpaProject.Manager jpaProjectManager;
- protected IProject project;
- protected JpaPlatform jpaPlatform;
- protected String connectionProfileName;
- protected String userOverrideDefaultCatalog;
- protected String userOverrideDefaultSchema;
- protected boolean discoverAnnotatedClasses;
- protected String metamodelSourceFolderName;
-
-
- public SimpleJpaProjectConfig() {
- super();
- }
-
- public JpaProject.Manager getJpaProjectManager() {
- return this.jpaProjectManager;
- }
-
- public void setJpaProjectManager(JpaProject.Manager jpaProjectManager) {
- this.jpaProjectManager = jpaProjectManager;
- }
-
- public IProject getProject() {
- return this.project;
- }
-
- public void setProject(IProject project) {
- this.project = project;
- }
-
- public JpaPlatform getJpaPlatform() {
- return this.jpaPlatform;
- }
-
- public void setJpaPlatform(JpaPlatform jpaPlatform) {
- this.jpaPlatform = jpaPlatform;
- }
-
- public String getConnectionProfileName() {
- return this.connectionProfileName;
- }
-
- public void setConnectionProfileName(String connectionProfileName) {
- this.connectionProfileName = connectionProfileName;
- }
-
- public String getUserOverrideDefaultSchema() {
- return this.userOverrideDefaultSchema;
- }
-
- public void setUserOverrideDefaultSchema(String userOverrideDefaultSchema) {
- this.userOverrideDefaultSchema = userOverrideDefaultSchema;
- }
-
- public String getUserOverrideDefaultCatalog() {
- return this.userOverrideDefaultCatalog;
- }
-
- public void setUserOverrideDefaultCatalog(String userOverrideDefaultCatalog) {
- this.userOverrideDefaultCatalog = userOverrideDefaultCatalog;
- }
-
- public boolean discoverAnnotatedClasses() {
- return this.discoverAnnotatedClasses;
- }
-
- public void setDiscoverAnnotatedClasses(boolean discoverAnnotatedClasses) {
- this.discoverAnnotatedClasses = discoverAnnotatedClasses;
- }
-
- public String getMetamodelSourceFolderName() {
- return this.metamodelSourceFolderName;
- }
-
- public void setMetamodelSourceFolderName(String metamodelSourceFolderName) {
- this.metamodelSourceFolderName = metamodelSourceFolderName;
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.project.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/WorkspaceAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/WorkspaceAdapterFactory.java
deleted file mode 100644
index e2f6e475b9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/WorkspaceAdapterFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-
-/**
- * Factory to build Dali adapters for an {@link IWorkspace}:<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.JpaProjectManager}
- * </ul>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- */
-public class WorkspaceAdapterFactory
- implements IAdapterFactory
-{
- private static final Class<?>[] ADAPTER_LIST = new Class[] {
- JpaProjectManager.class
- };
-
- public Class<?>[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
- if (adaptableObject instanceof IWorkspace) {
- return this.getAdapter((IWorkspace) adaptableObject, adapterType);
- }
- return null;
- }
-
- private Object getAdapter(IWorkspace workspace, Class<?> adapterType) {
- if (adapterType == JpaProjectManager.class) {
- return this.getJpaProjectManager(workspace);
- }
- return null;
- }
-
- private JpaProjectManager getJpaProjectManager(IWorkspace workspace) {
- return JptJpaCorePlugin.getJpaProjectManager(workspace);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
deleted file mode 100644
index 22507e4026..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JpaNode;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.MappingFileRoot;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaNode;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-
-public abstract class AbstractJpaContextNode
- extends AbstractJpaNode
- implements JpaContextNode
-{
- protected AbstractJpaContextNode(JpaNode parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- public void synchronizeWithResourceModel() {
- // NOP
- }
-
- /**
- * convenience method
- */
- protected void synchronizeNodesWithResourceModel(Iterable<? extends JpaContextNode> nodes) {
- for (JpaContextNode node : nodes) {
- node.synchronizeWithResourceModel();
- }
- }
-
- public void update() {
- // NOP
- }
-
- /**
- * convenience method
- */
- protected void updateNodes(Iterable<? extends JpaContextNode> nodes) {
- for (JpaContextNode node : nodes) {
- node.update();
- }
- }
-
-
- // ********** containment hierarchy **********
-
- /**
- * covariant override
- */
- @Override
- public JpaContextNode getParent() {
- return (JpaContextNode) super.getParent();
- }
-
- /**
- * Overridden in:<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode#getResourceType() AbstractJavaJpaContextNode}
- * <li>{@link org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJarFile#getResourceType() GenericJarFile}
- * <li>{@link org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXml#getResourceType() GenericOrmXml}
- * <li>{@link org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml#getResourceType() GenericPersistenceXml}
- * </ul>
- */
- public JptResourceType getResourceType() {
- return this.getParent().getResourceType();
- }
-
- /**
- * Overridden in:<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#getPersistenceUnit() AbstractPersistenceUnit}
- * to return itself
- * <li>{@link org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode#getPersistenceUnit() GenericRootContextNode}
- * to return <code>null</code>
- * </ul>
- */
- public PersistenceUnit getPersistenceUnit() {
- return this.getParent().getPersistenceUnit();
- }
-
- /**
- * Overridden in:<ul>
- * <li>{@link org.eclipse.jpt.jpa.core.internal.context.orm.AbstractEntityMappings#getMappingFileRoot() AbstractEntityMappings}
- * to return itself
- * <li>{@link org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode#getMappingFileRoot() GenericRootContextNode}
- * to return <code>null</code>
- * </ul>
- */
- public MappingFileRoot getMappingFileRoot() {
- return this.getParent().getMappingFileRoot();
- }
-
-
- // ********** database stuff **********
-
- public Schema getContextDefaultDbSchema() {
- SchemaContainer dbSchemaContainer = this.getContextDefaultDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getContextDefaultSchema());
- }
-
- protected String getContextDefaultSchema() {
- MappingFileRoot mfr = this.getMappingFileRoot();
- return (mfr != null) ? mfr.getSchema() : this.getPersistenceUnit().getDefaultSchema();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getContextDefaultDbSchemaContainer() {
- String catalog = this.getContextDefaultCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getContextDefaultDbCatalog() {
- String catalog = this.getContextDefaultCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- protected String getContextDefaultCatalog() {
- MappingFileRoot mfr = this.getMappingFileRoot();
- return (mfr != null) ? mfr.getCatalog() : this.getPersistenceUnit().getDefaultCatalog();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
deleted file mode 100644
index 0af1269cc8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractXmlContextNode
- extends AbstractJpaContextNode
- implements XmlContextNode
-{
- protected AbstractXmlContextNode(JpaContextNode parent) {
- super(parent);
- }
-
-
- // ********** validation **********
-
- /**
- * All subclass implementations should be have a "super" call to this method.
- */
- public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
-
- /**
- * Validate the specified node if it is not <code>null</code>.
- */
- protected void validateNode(XmlContextNode node, List<IMessage> messages, IReporter reporter) {
- if (node != null) {
- node.validate(messages, reporter);
- }
- }
-
- /**
- * Validate the specified nodes.
- */
- protected void validateNodes(Iterable<? extends XmlContextNode> nodes, List<IMessage> messages, IReporter reporter) {
- for (XmlContextNode node : nodes) {
- node.validate(messages, reporter);
- }
- }
-
- /**
- * Return the specified text range if it is not <code>null</code>; if it is
- * <code>null</code>, return the node's validation text range.
- */
- protected TextRange getValidationTextRange(TextRange textRange) {
- return (textRange != null) ? textRange : this.getValidationTextRange();
- }
-
- // *********** completion proposals ***********
-
- public Iterable<String> getXmlCompletionProposals(int pos) {
- if (this.connectionProfileIsActive()) {
- Iterable<String> result = this.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * This method is called if the database is connected, allowing us to
- * get candidates from the various database tables etc.
- * This method should <em>not</em> be cascaded to "child" objects; it should
- * only return candidates for the current object. The cascading is
- * handled by {@link #getXmlCompletionProposals(int)}.
- */
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AttributeMappingTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AttributeMappingTools.java
deleted file mode 100644
index 796cb0e144..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AttributeMappingTools.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context;
-
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-
-/**
- * Gather some of the behavior common to the Java and XML models. :-(
- */
-public final class AttributeMappingTools
-{
-
- // ********** all mapping names transformer **********
-
- public static final Transformer<AttributeMapping, Iterable<String>> ALL_MAPPING_NAMES_TRANSFORMER = new AllMappingNamesTransformer();
- static class AllMappingNamesTransformer
- implements Transformer<AttributeMapping, Iterable<String>>
- {
- public Iterable<String> transform(AttributeMapping mapping) {
- return mapping.getAllMappingNames();
- }
- }
-
-
- // ********** all overridable attribute mapping names transformer **********
-
- public static final Transformer<AttributeMapping, Iterable<String>> ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER = new AllOverridableAttributeMappingNamesTransformer();
- static class AllOverridableAttributeMappingNamesTransformer
- implements Transformer<AttributeMapping, Iterable<String>>
- {
- public Iterable<String> transform(AttributeMapping mapping) {
- return mapping.getAllOverridableAttributeMappingNames();
- }
- }
-
-
- // ********** all overridable association mapping names transformer **********
-
- public static final Transformer<AttributeMapping, Iterable<String>> ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER = new AllOverridableAssociationMappingNamesTransformer();
- static class AllOverridableAssociationMappingNamesTransformer
- implements Transformer<AttributeMapping, Iterable<String>>
- {
- public Iterable<String> transform(AttributeMapping mapping) {
- return mapping.getAllOverridableAssociationMappingNames();
- }
- }
-
-
- // ********** constructor **********
-
- /**
- * Suppress default constructor, ensuring non-instantiability.
- */
- private AttributeMappingTools() {
- super();
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java
deleted file mode 100644
index 8918e1ce48..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on join columns
- */
-public interface BaseJoinColumnTextRangeResolver extends NamedColumnTextRangeResolver
-{
- TextRange getReferencedColumnNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java
deleted file mode 100644
index f8c958501b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java
+++ /dev/null
@@ -1,148 +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.jpa.core.internal.context;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * Utility methods for manipulating context containers.
- */
-public class ContextContainerTools {
-
- /**
- * Adapter used to synchronize a context container with its corresponding
- * resource container.
- *
- * @param <C> the type of context elements
- * @param <R> the type of resource elements
- */
- public interface Adapter<C extends JpaContextNode, R> {
-
- /**
- * Return the container's context elements.
- */
- Iterable<C> getContextElements();
-
- /**
- * Return the container's current set of resource elements.
- * These are what the context elements will be synchronized to.
- */
- Iterable<R> getResourceElements();
-
- /**
- * Return the resource element corresponding to the specified context
- * element.
- */
- R getResourceElement(C contextElement);
-
- /**
- * Move the specified context element to the specified index.
- */
- void moveContextElement(int index, C element);
-
- /**
- * Add a context element for the specified resource element at the
- * specified index.
- */
- void addContextElement(int index, R resourceElement);
-
- /**
- * Remove the specified context element from the container.
- */
- void removeContextElement(C element);
- }
-
-
- /**
- * Using the specified adapter, synchronize a context container with its
- * corresponding resource container: moving, removing, and adding elements
- * as necessary.
- * <p>
- * We can do this because:<ul>
- * <li>the XML translators will <em>move</em> the EMF elements when
- * appropriate (as opposed to simply rebuilding them in place).
- * <li>the Java resource model will re-use existing annotations when
- * appropriate (as opposed to simply rebuilding them in place).
- * </ul>
- */
- public static <C extends JpaContextNode, R> void synchronizeWithResourceModel(Adapter<C, R> adapter) {
- sync(adapter, true); // true = sync
- }
-
- /**
- * @see #synchronizeWithResourceModel(Adapter)
- */
- public static <C extends JpaContextNode, R> void update(Adapter<C, R> adapter) {
- sync(adapter, false); // false = update
- }
-
- /**
- * The specified <code>sync</code> flag controls whether any surviving
- * context nodes are either <em>synchronized</em> (<code>true</code>) or
- * <em>updated</em> (<code>false</code>).
- */
- protected static <C extends JpaContextNode, R> void sync(Adapter<C, R> adapter, boolean sync) {
- HashSet<C> contextElements = CollectionTools.set(adapter.getContextElements());
- ArrayList<C> contextElementsToSync = new ArrayList<C>(contextElements.size());
- int resourceIndex = 0;
-
- for (R resourceElement : adapter.getResourceElements()) {
- boolean match = false;
- for (Iterator<C> stream = contextElements.iterator(); stream.hasNext(); ) {
- C contextElement = stream.next();
- if (Tools.valuesAreEqual(adapter.getResourceElement(contextElement), resourceElement)) {
- // we don't know the source index because the element has been moved by previously moved elements
- adapter.moveContextElement(resourceIndex, contextElement);
- stream.remove();
- // TODO perform update here someday...
- contextElementsToSync.add(contextElement);
- match = true;
- break;
- }
- }
- if ( ! match) {
- // added elements are sync'ed during construction or will be
- // updated during the next "update" (which is triggered by
- // their addition to the model)
- adapter.addContextElement(resourceIndex, resourceElement);
- }
- resourceIndex++;
- }
- // remove any leftover context elements
- for (C contextElement : contextElements) {
- adapter.removeContextElement(contextElement);
- }
- // TODO bjv
- // take care of the structural changes before sync'ing the remaining elements;
- // we might be able to do this inline once we get rid of the "list change" events
- // and go with only add, remove, etc. list events
- // (these syncs will trigger "list change" events with list aspect adapters, which
- // trigger refreshes of UI adapters (e.g. TableModelAdapter) which will prematurely
- // discover any structural changes... :( )
- // see ItemAspectListValueModelAdapter.itemAspectChanged(EventObject)
- for (C contextElement : contextElementsToSync) {
- if (sync) {
- contextElement.synchronizeWithResourceModel();
- } else {
- contextElement.update();
- }
- }
- }
-
- private ContextContainerTools() {
- super();
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java
deleted file mode 100644
index 19b118f3b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java
+++ /dev/null
@@ -1,18 +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.jpa.core.internal.context;
-
-
-public interface EntityTextRangeResolver
- extends PrimaryKeyTextRangeResolver
-{
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java
deleted file mode 100644
index 3d237dc6ca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-/**
- * Interface to resolve text ranges on join columns
- */
-public interface JoinColumnTextRangeResolver
- extends BaseJoinColumnTextRangeResolver, TableColumnTextRangeResolver
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JptValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JptValidator.java
deleted file mode 100644
index 9b3ecb21a5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JptValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public interface JptValidator
-{
- /**
- * Return whether the client should continue validating.
- */
- boolean validate(List<IMessage> messages, IReporter reporter);
-
-
- final class Null
- implements JptValidator
- {
- private static final JptValidator INSTANCE = new Null();
- public static JptValidator instance() {
- return INSTANCE;
- }
- // ensure single instance
- private Null() {
- super();
- }
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- return true; // continue validating
- }
- @Override
- public String toString() {
- return StringTools.buildSingletonToString(this);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java
deleted file mode 100644
index e3e4cb7428..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context;
-
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.ReflectionTools;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.ColumnMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.JoinTable;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReferenceTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.ElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Gather some of the behavior common to the Java and XML models. :-(
- */
-public final class MappingTools {
-
- /**
- * Return whether the specified type is "basic".
- * @param fullyQualifiedName may include array brackets but not generic type arguments
- */
- public static boolean typeIsBasic(IJavaProject javaProject, String fullyQualifiedName) {
- if (fullyQualifiedName == null) {
- return false;
- }
-
- int arrayDepth = ReflectionTools.getArrayDepthForTypeDeclaration(fullyQualifiedName);
- if (arrayDepth > 1) {
- return false; // multi-dimensional arrays are not supported
- }
-
- if (arrayDepth == 1) {
- String elementTypeName = ReflectionTools.getElementTypeNameForTypeDeclaration(fullyQualifiedName, 1);
- return elementTypeIsValidForBasicArray(elementTypeName);
- }
-
- // arrayDepth == 0
- if (ClassName.isVariablePrimitive(fullyQualifiedName)) {
- return true; // any primitive but 'void'
- }
- if (ClassName.isVariablePrimitiveWrapper(fullyQualifiedName)) {
- return true; // any primitive wrapper but 'java.lang.Void'
- }
- if (typeIsOtherValidBasicType(fullyQualifiedName)) {
- return true;
- }
- IType type = JDTTools.findType(javaProject, fullyQualifiedName);
- if (type == null) {
- return false;
- }
- if (JDTTools.typeIsSerializable(javaProject, type)) {
- return true;
- }
- if (JDTTools.typeIsEnum(type)) {
- return true;
- }
- return false;
- }
-
- /**
- * Return whether the specified type is a valid element type for
- * a one-dimensional array that can default to a basic mapping:<ul>
- * <li><code>byte</code>
- * <li><code>java.lang.Byte</code>
- * <li><code>char</code>
- * <li><code>java.lang.Character</code>
- * </ul>
- */
- public static boolean elementTypeIsValidForBasicArray(String elementTypeName) {
- return ArrayTools.contains(VALID_BASIC_ARRAY_ELEMENT_TYPE_NAMES, elementTypeName);
- }
-
- private static final String[] VALID_BASIC_ARRAY_ELEMENT_TYPE_NAMES = {
- byte.class.getName(),
- char.class.getName(),
- java.lang.Byte.class.getName(),
- java.lang.Character.class.getName()
- };
-
- /**
- * Return whether the specified type is among the various "other" types
- * that can default to a basic mapping.
- */
- public static boolean typeIsOtherValidBasicType(String typeName) {
- return ArrayTools.contains(OTHER_VALID_BASIC_TYPE_NAMES, typeName);
- }
-
- private static final String[] OTHER_VALID_BASIC_TYPE_NAMES = {
- java.lang.String.class.getName(),
- java.math.BigInteger.class.getName(),
- java.math.BigDecimal.class.getName(),
- java.util.Date.class.getName(),
- java.util.Calendar.class.getName(),
- java.sql.Date.class.getName(),
- java.sql.Time.class.getName(),
- java.sql.Timestamp.class.getName(),
- };
-
- /**
- * Default join table name from the JPA spec:<br>
- * "The concatenated names of the two associated primary
- * entity tables, separated by a underscore."
- * <pre>
- * [owning table name]_[target table name]
- * </pre>
- * <strong>NB:</strong> The <em>names</em> are concatenated,
- * <em>not</em> the <em>identifiers</em>.
- * E.g. the join table for <code>"Foo"</code> and <code>"baR"</code>
- * (where the "delimited" identifier is required) is:
- * <pre>
- * "Foo_baR"
- * </pre>
- * not
- * <pre>
- * "Foo"_"baR"
- * </pre>
- * As a result, we cannot honestly calculate the default name without a
- * database connection. We need the database to convert the resulting name
- * to an identifier appropriate to the current database.
- */
- public static String buildJoinTableDefaultName(ReadOnlyRelationship relationship) {
- if (relationship.getJpaProject().getDataSource().connectionProfileIsActive()) {
- return buildDbJoinTableDefaultName(relationship);
- }
- // continue with a "best effort":
- String owningTableName = relationship.getTypeMapping().getPrimaryTableName();
- if (owningTableName == null) {
- return null;
- }
- RelationshipMapping relationshipMapping = relationship.getMapping();
- if (relationshipMapping == null) {
- return null;
- }
- Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
- if (targetEntity == null) {
- return null;
- }
- String targetTableName = targetEntity.getPrimaryTableName();
- if (targetTableName == null) {
- return null;
- }
- return owningTableName + '_' + targetTableName;
- }
-
- /**
- * Use the database to build a more accurate default name.
- */
- private static String buildDbJoinTableDefaultName(ReadOnlyRelationship relationship) {
- Table owningTable = relationship.getTypeMapping().getPrimaryDbTable();
- if (owningTable == null) {
- return null;
- }
- RelationshipMapping relationshipMapping = relationship.getMapping();
- if (relationshipMapping == null) {
- return null;
- }
- Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
- if (targetEntity == null) {
- return null;
- }
- Table targetTable = targetEntity.getPrimaryDbTable();
- if (targetTable == null) {
- return null;
- }
- String name = owningTable.getName() + '_' + targetTable.getName();
- return owningTable.getDatabase().convertNameToIdentifier(name);
- }
-
- /**
- * Default collection table name from the JPA spec:<br>
- * "The concatenation of the name of the containing entity and
- * the name of the collection attribute, separated by an underscore."
- * <pre>
- * [owning entity name]_[attribute name]
- * </pre>
- */
- public static String buildCollectionTableDefaultName(ElementCollectionMapping2_0 mapping) {
- Entity entity = mapping.getEntity();
- if (entity == null) {
- return null;
- }
- String owningEntityName = entity.getName();
- String attributeName = mapping.getName();
- return owningEntityName + '_' + attributeName;
- }
-
- /**
- * Return the join column's default name;
- * which is typically<pre>
- * [attribute name]_[referenced column name]
- * </pre>
- * But, if we don't have an attribute name (e.g. in a unidirectional
- * one-to-many or many-to-many) is<pre>
- * [target entity name]_[referenced column name]
- * </pre>
- * @see #buildJoinTableDefaultName(ReadOnlyRelationship)
- */
- public static String buildJoinColumnDefaultName(ReadOnlyJoinColumn joinColumn, ReadOnlyJoinColumn.Owner owner) {
- if (owner.getJoinColumnsSize() != 1) {
- return null;
- }
- String prefix = owner.getAttributeName();
- if (prefix == null) {
- Entity targetEntity = owner.getRelationshipTarget();
- if (targetEntity == null) {
- return null;
- }
- prefix = targetEntity.getName();
- }
- // It's not clear which of these is correct....
- // The spec implies that the referenced column is always the
- // *primary key* column of the target entity; i.e. the primary key as
- // defined on the *database* (or, possibly, the primary key as defined
- // by the target entity's Id mapping?), not the name of the referenced
- // column irrespective of whether it is the primary key on the target
- // entity's table. But this seems like it would be wrong; since the
- // referenced column need not be a primary key and we don't always have
- // access to the database.
- //
- // Column targetColumn = joinColumn.getTargetPrimaryKeyDbColumn();
- String targetColumnName = joinColumn.getReferencedColumnName();
- if (targetColumnName == null) {
- return null;
- }
- String name = prefix + '_' + targetColumnName;
- // Again, it's not clear which of these is correct....
- // Converting the name to an identifier will result in the identifier
- // being delimited nearly every time (at least on non-Sybase/MS
- // databases); but that probably is not the intent of the spec....
- //
- // return targetColumn.getDatabase().convertNameToIdentifier(name);
- return name;
- }
-
- /**
- * Return the name of the attribute in the specified mapping's target entity
- * that is owned by the mapping.
- */
- public static String getTargetAttributeName(RelationshipMapping relationshipMapping) {
- if (relationshipMapping == null) {
- return null;
- }
- Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
- if (targetEntity == null) {
- return null;
- }
- for (ReadOnlyPersistentAttribute attribute : targetEntity.getPersistentType().getAllAttributes()) {
- if (attribute.getMapping().isOwnedBy(relationshipMapping)) {
- return attribute.getName();
- }
- }
- return null;
- }
-
- /**
- * If appropriate, return the name of the single primary key column of the
- * relationship target.
- * Spec states:<br>
- * "The same name as the primary key column of the referenced table."<br>
- * We are assuming that the primary key column is defined by the mappings instead of the database.
- */
- public static String buildJoinColumnDefaultReferencedColumnName(ReadOnlyJoinColumn.Owner joinColumnOwner) {
- if (joinColumnOwner.getJoinColumnsSize() != 1) {
- return null;
- }
- Entity targetEntity = joinColumnOwner.getRelationshipTarget();
- if (targetEntity == null) {
- return null;
- }
- return targetEntity.getPrimaryKeyColumnName();
- }
-
- public static ColumnMapping getColumnMapping(String attributeName, PersistentType persistentType) {
- if ((attributeName == null) || (persistentType == null)) {
- return null;
- }
- for (ReadOnlyPersistentAttribute persAttribute : persistentType.getAllAttributes()) {
- if (attributeName.equals(persAttribute.getName())) {
- if (persAttribute.getMapping() instanceof ColumnMapping) {
- return (ColumnMapping) persAttribute.getMapping();
- }
- // keep looking or return null???
- }
- }
- return null;
- }
-
- public static RelationshipMapping getRelationshipMapping(String attributeName, TypeMapping typeMapping) {
- if ((attributeName == null) || (typeMapping == null)) {
- return null;
- }
- for (AttributeMapping attributeMapping : typeMapping.getAllAttributeMappings()) {
- if (attributeName.equals(attributeMapping.getName())) {
- if (attributeMapping instanceof RelationshipMapping) {
- return (RelationshipMapping) attributeMapping;
- }
- // keep looking or return null???
- }
- }
- return null;
- }
-
- public static void convertReferenceTableDefaultToSpecifiedJoinColumn(ReferenceTable referenceTable) {
- JoinColumn defaultJoinColumn = referenceTable.getDefaultJoinColumn();
- if (defaultJoinColumn != null) {
- String columnName = defaultJoinColumn.getDefaultName();
- String referencedColumnName = defaultJoinColumn.getDefaultReferencedColumnName();
- JoinColumn joinColumn = referenceTable.addSpecifiedJoinColumn();
- joinColumn.setSpecifiedName(columnName);
- joinColumn.setSpecifiedReferencedColumnName(referencedColumnName);
- }
- }
-
- public static void convertJoinTableDefaultToSpecifiedInverseJoinColumn(JoinTable joinTable) {
- JoinColumn defaultInverseJoinColumn = joinTable.getDefaultInverseJoinColumn();
- if (defaultInverseJoinColumn != null) {
- String columnName = defaultInverseJoinColumn.getDefaultName();
- String referencedColumnName = defaultInverseJoinColumn.getDefaultReferencedColumnName();
- JoinColumn joinColumn = joinTable.addSpecifiedInverseJoinColumn(0);
- joinColumn.setSpecifiedName(columnName);
- joinColumn.setSpecifiedReferencedColumnName(referencedColumnName);
- }
- }
-
- public static String getMetamodelFieldMapKeyTypeName(CollectionMapping2_0 mapping) {
- PersistentType targetType = mapping.getResolvedTargetType();
- String mapKey = mapping.getMapKey();
- if ((mapKey == null) || (targetType == null)) {
- String mapKeyClass = mapping.getFullyQualifiedMapKeyClass();
- return mapKeyClass != null ? mapKeyClass : MetamodelField.DEFAULT_TYPE_NAME;
- }
- ReadOnlyPersistentAttribute mapKeyAttribute = targetType.resolveAttribute(mapKey);
- if (mapKeyAttribute == null) {
- return MetamodelField.DEFAULT_TYPE_NAME;
- }
- AttributeMapping2_0 mapKeyMapping = (AttributeMapping2_0) mapKeyAttribute.getMapping();
- if (mapKeyMapping == null) {
- return MetamodelField.DEFAULT_TYPE_NAME;
- }
- return mapKeyMapping.getMetamodelTypeName();
- }
-
- // TODO move to TypeMapping? may need different name (or may need to rename existing #resolve...)
- public static Column resolveOverriddenColumn(TypeMapping overridableTypeMapping, String attributeName) {
- // convenience null check to simplify client code
- if (overridableTypeMapping == null) {
- return null;
- }
-
- for (TypeMapping typeMapping : overridableTypeMapping.getInheritanceHierarchy()) {
- Column column = typeMapping.resolveOverriddenColumn(attributeName);
- if (column != null) {
- return column;
- }
- }
- return null;
- }
-
- // TODO move to TypeMapping? may need different name (or may need to rename existing #resolve...)
- public static Relationship resolveOverriddenRelationship(TypeMapping overridableTypeMapping, String attributeName) {
- // convenience null check to simplify client code
- if (overridableTypeMapping == null) {
- return null;
- }
-
- for (TypeMapping typeMapping : overridableTypeMapping.getInheritanceHierarchy()) {
- Relationship relationship = typeMapping.resolveOverriddenRelationship(attributeName);
- if (relationship != null) {
- return relationship;
- }
- }
- return null;
- }
-
- public static String getPrimaryKeyColumnName(Entity entity) {
- String pkColumnName = null;
- for (ReadOnlyPersistentAttribute attribute : entity.getPersistentType().getAllAttributes()) {
- String current = attribute.getPrimaryKeyColumnName();
- if (current != null) {
- // 229423 - if the attribute is a primary key, but it has an attribute override,
- // use the override column instead
- ReadOnlyAttributeOverride attributeOverride = entity.getAttributeOverrideContainer().getOverrideNamed(attribute.getName());
- if (attributeOverride != null) {
- current = attributeOverride.getColumn().getName();
- }
- }
- if (pkColumnName == null) {
- pkColumnName = current;
- } else {
- if (current != null) {
- // if we encounter a composite primary key, return null
- return null;
- }
- }
- }
- // if we encounter only a single primary key column name, return it
- return pkColumnName;
- }
-
- /**
- * "Unqualify" the specified attribute name, removing the mapping's name
- * from the front of the attribute name if it is present. For example, if
- * the mapping's name is <code>"foo"</code>, the attribute name
- * <code>"foo.bar"</code> would be converted to <code>"bar"</code>).
- * Return <code>null</code> if the attribute name cannot be "unqualified".
- */
- public static String unqualify(String mappingName, String attributeName) {
- if (mappingName == null) {
- return null;
- }
- if ( ! attributeName.startsWith(mappingName)) {
- return null;
- }
- int mappingNameLength = mappingName.length();
- if (attributeName.length() <= mappingNameLength) {
- return null;
- }
- return (attributeName.charAt(mappingNameLength) == '.') ? attributeName.substring(mappingNameLength + 1) : null;
- }
-
- /**
- * This transformer will prepend a specified qualifier, followed by a
- * dot ('.'), to a string. For example, if a mapping's name is
- * <code>"foo"</code> and one of its attribute's is named
- * <code>"bar"</code>, the attribute's name will be transformed
- * into <code>"foo.bar"</code>. If the specified qualifier is
- * <code>null</code> (or an empty string), only a dot will be prepended
- * to a string.
- */
- public static class QualifierTransformer
- implements Transformer<String, String>
- {
- private final String prefix;
- public QualifierTransformer(String qualifier) {
- super();
- this.prefix = (qualifier == null) ? "." : qualifier + '.'; //$NON-NLS-1$
- }
- public String transform(String s) {
- return this.prefix + s;
- }
- }
-
-
- // ********** constructor **********
-
- /**
- * Suppress default constructor, ensuring non-instantiability.
- */
- private MappingTools() {
- super();
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java
deleted file mode 100644
index da477387e9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface NamedColumnTextRangeResolver
-{
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java
deleted file mode 100644
index 901eae1c02..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface OverrideTextRangeResolver
-{
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributePropertyTester.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributePropertyTester.java
deleted file mode 100644
index ff5cfc699e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributePropertyTester.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-
-/**
- * Property tester for {@link ReadOnlyPersistentAttribute}.
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>
- */
-public class PersistentAttributePropertyTester
- extends PropertyTester
-{
- public static final String IS_MAPPED = "isMapped"; //$NON-NLS-1$
- public static final String IS_NOT_MAPPED = "isNotMapped"; //$NON-NLS-1$
- public static final String IS_VIRTUAL = "isVirtual"; //$NON-NLS-1$
- public static final String IS_NOT_VIRTUAL = "isNotVirtual"; //$NON-NLS-1$
-
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof ReadOnlyPersistentAttribute) {
- return this.test((ReadOnlyPersistentAttribute) receiver, property, expectedValue);
- }
- return false;
- }
-
- protected boolean test(ReadOnlyPersistentAttribute attribute, String property, Object expectedValue) {
- if (property.equals(IS_NOT_MAPPED)) {
- return ! this.test(attribute, IS_MAPPED, expectedValue);
- }
- if (property.equals(IS_MAPPED)) {
- boolean expected = (expectedValue == null) ? true : ((Boolean) expectedValue).booleanValue();
- boolean actual = (attribute.getMapping().getKey() != null);
- return actual == expected;
- }
-
- if (property.equals(IS_NOT_VIRTUAL)) {
- return ! this.test(attribute, IS_VIRTUAL, expectedValue);
- }
- if (property.equals(IS_VIRTUAL)) {
- boolean expected = (expectedValue == null) ? true : ((Boolean) expectedValue).booleanValue();
- boolean actual = attribute.isVirtual();
- return actual == expected;
- }
-
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java
deleted file mode 100644
index a2345cc459..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent attributes
- */
-public interface PersistentAttributeTextRangeResolver
-{
- TextRange getAttributeTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java
deleted file mode 100644
index 8a759ea107..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java
+++ /dev/null
@@ -1,24 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent type mappings that can define primary keys
- */
-public interface PrimaryKeyTextRangeResolver extends TypeMappingTextRangeResolver
-{
-
- TextRange getIdClassTextRange();
-
- TextRange getAttributeMappingTextRange(String attributeName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java
deleted file mode 100644
index 877b397111..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface TableColumnTextRangeResolver extends NamedColumnTextRangeResolver
-{
- TextRange getTableTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java
deleted file mode 100644
index adb744dcfd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on tables.
- */
-public interface TableTextRangeResolver
-{
- TextRange getNameTextRange();
-
- TextRange getSchemaTextRange();
-
- TextRange getCatalogTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java
deleted file mode 100644
index a30cac215c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent type mappings
- */
-public interface TypeMappingTextRangeResolver
-{
- TextRange getTypeMappingTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTools.java
deleted file mode 100644
index f9b0287c3a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTools.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context;
-
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.SingleRelationshipMapping2_0;
-
-/**
- * Gather some of the behavior common to the Java and XML models. :-(
- */
-public class TypeMappingTools {
-
- // ********** single relationship mappings **********
-
- /**
- * Return whether the specified attribute is a derived ID for the specified
- * type mapping.
- */
- public static boolean attributeIsDerivedId(TypeMapping typeMapping, String attributeName) {
- if (attributeName == null) {
- return false;
- }
- // the attribute name may be qualified - we test only the first attribute name
- int dotIndex = attributeName.indexOf('.');
- attributeName = (dotIndex == -1) ? attributeName : attributeName.substring(0, dotIndex);
- return CollectionTools.contains(getMapsIdDerivedIdAttributeNames(typeMapping), attributeName);
- }
-
- /**
- * Return the names of all the ID attributes derived from
- * single-relationship mappings for the specified type mapping
- * (i.e. the names of the ID attributes that are specified by a single-
- * relationship mapping's "maps ID" setting).
- */
- protected static Iterable<String> getMapsIdDerivedIdAttributeNames(TypeMapping typeMapping) {
- return new TransformationIterable<MapsIdDerivedIdentityStrategy2_0, String>(getMapsIdDerivedIdentityStrategies(typeMapping)) {
- @Override
- protected String transform(MapsIdDerivedIdentityStrategy2_0 strategy) {
- return strategy.getIdAttributeName();
- }
- };
- }
-
- /**
- * Return all the single-relationship "maps ID" derived identity strategies
- * for the specified type mapping.
- */
- protected static Iterable<MapsIdDerivedIdentityStrategy2_0> getMapsIdDerivedIdentityStrategies(TypeMapping typeMapping) {
- return new TransformationIterable<DerivedIdentity2_0, MapsIdDerivedIdentityStrategy2_0>(getMapsIdDerivedIdentities(typeMapping)) {
- @Override
- protected MapsIdDerivedIdentityStrategy2_0 transform(DerivedIdentity2_0 derivedIdentity) {
- return derivedIdentity.getMapsIdDerivedIdentityStrategy();
- }
- };
- }
-
- /**
- * Return all the single-relationship "maps ID" derived identities for the
- * specified type mapping.
- */
- protected static Iterable<DerivedIdentity2_0> getMapsIdDerivedIdentities(TypeMapping typeMapping) {
- return new FilteringIterable<DerivedIdentity2_0>(getDerivedIdentities(typeMapping)) {
- @Override
- protected boolean accept(DerivedIdentity2_0 derivedIdentity) {
- return derivedIdentity.usesMapsIdDerivedIdentityStrategy();
- }
- };
- }
-
- /**
- * Return all the single-relationship derived identities for the specified
- * type mapping.
- */
- protected static Iterable<DerivedIdentity2_0> getDerivedIdentities(TypeMapping typeMapping) {
- return new TransformationIterable<SingleRelationshipMapping2_0, DerivedIdentity2_0>(getSingleRelationshipMappings(typeMapping)) {
- @Override
- protected DerivedIdentity2_0 transform(SingleRelationshipMapping2_0 mapping) {
- return mapping.getDerivedIdentity();
- }
- };
- }
-
- /**
- * Return all the single-relationship attribute mappings for the specified
- * type mapping.
- */
- protected static Iterable<SingleRelationshipMapping2_0> getSingleRelationshipMappings(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(getSingleRelationshipMappings_(typeMapping));
- }
-
- @SuppressWarnings("unchecked")
- protected static Iterable<AttributeMapping> getSingleRelationshipMappings_(TypeMapping typeMapping) {
- return new CompositeIterable<AttributeMapping>(
- typeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
- typeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)
- );
- }
-
-
- // ********** attribute mappings transformer **********
-
- public static final Transformer<TypeMapping, Iterable<AttributeMapping>> ATTRIBUTE_MAPPINGS_TRANSFORMER = new AttributeMappingsTransformer();
- static class AttributeMappingsTransformer
- implements Transformer<TypeMapping, Iterable<AttributeMapping>>
- {
- public Iterable<AttributeMapping> transform(TypeMapping mapping) {
- return mapping.getAttributeMappings();
- }
- }
-
-
- // ********** associated tables transformer **********
-
- public static final Transformer<TypeMapping, Iterable<ReadOnlyTable>> ASSOCIATED_TABLES_TRANSFORMER = new AssociatedTablesTransformer();
- static class AssociatedTablesTransformer
- implements Transformer<TypeMapping, Iterable<ReadOnlyTable>>
- {
- public Iterable<ReadOnlyTable> transform(TypeMapping mapping) {
- return mapping.getAssociatedTables();
- }
- }
-
-
- // ********** overridable attribute names transformer **********
-
- public static final Transformer<TypeMapping, Iterable<String>> OVERRIDABLE_ATTRIBUTE_NAMES_TRANSFORMER = new OverridableAttributeNamesTransformer();
- static class OverridableAttributeNamesTransformer
- implements Transformer<TypeMapping, Iterable<String>>
- {
- public Iterable<String> transform(TypeMapping mapping) {
- return mapping.getOverridableAttributeNames();
- }
- }
-
-
- // ********** overridable association names transformer **********
-
- public static final Transformer<TypeMapping, Iterable<String>> OVERRIDABLE_ASSOCIATION_NAMES_TRANSFORMER = new OverridableAssociationNamesTransformer();
- static class OverridableAssociationNamesTransformer
- implements Transformer<TypeMapping, Iterable<String>>
- {
- public Iterable<String> transform(TypeMapping mapping) {
- return mapping.getOverridableAssociationNames();
- }
- }
-
-
- // ********** constructor **********
-
- /**
- * Suppress default constructor, ensuring non-instantiability.
- */
- private TypeMappingTools() {
- super();
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/XmlFilePropertyTester.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/XmlFilePropertyTester.java
deleted file mode 100644
index 4b8da00999..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/XmlFilePropertyTester.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.jpt.jpa.core.context.XmlFile;
-
-/**
- * Property tester for {@link XmlFile}.
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>
- */
-public class XmlFilePropertyTester
- extends PropertyTester
-{
- public static final String IS_LATEST_SUPPORTED_VERSION = "isLatestSupportedVersion"; //$NON-NLS-1$
- public static final String IS_NOT_LATEST_SUPPORTED_VERSION = "isNotLatestSupportedVersion"; //$NON-NLS-1$
-
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof XmlFile) {
- return this.test((XmlFile) receiver, property, expectedValue);
- }
- return false;
- }
-
- private boolean test(XmlFile xmlFile, String property, Object expectedValue) {
- if (property.equals(IS_NOT_LATEST_SUPPORTED_VERSION)) {
- return ! this.test(xmlFile, IS_LATEST_SUPPORTED_VERSION, expectedValue);
- }
- if (property.equals(IS_LATEST_SUPPORTED_VERSION)) {
- boolean expected = (expectedValue == null) ? true : ((Boolean) expectedValue).booleanValue();
- boolean actual = xmlFile.isLatestSupportedVersion();
- return actual == expected;
- }
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
deleted file mode 100644
index 5893324538..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.context.java;
-
-import java.util.HashMap;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNode;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.Accessor;
-
-public abstract class AbstractAccessor
- extends AbstractJavaJpaContextNode
- implements Accessor
-{
-
- protected AbstractAccessor(ReadOnlyPersistentAttribute parent) {
- super(parent);
- }
-
-
- // ********** unannotated Java resource member **********
-
- /**
- * Wrap another Java resource member and suppress all its annotations.
- */
- protected abstract class UnannotatedJavaResourceMember<M extends JavaResourceMember>
- extends SourceNode
- implements JavaResourceMember
- {
- protected final M member;
-
- /**
- * these are built as needed
- */
- protected final HashMap<String, Annotation> nullAnnotationsCache = new HashMap<String, Annotation>();
-
-
- protected UnannotatedJavaResourceMember(M member) {
- super(member.getParent());
- this.member = member;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // NOP
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // NOP
- }
-
-
- // ********** annotations **********
-
- public Iterable<Annotation> getAnnotations() {
- return EmptyIterable.instance();
- }
-
- public int getAnnotationsSize() {
- return 0;
- }
-
- public Annotation getAnnotation(String annotationName) {
- return null;
- }
-
- public synchronized Annotation getNonNullAnnotation(String annotationName) {
- Annotation annotation = this.nullAnnotationsCache.get(annotationName);
- if (annotation == null) {
- annotation = this.buildNullAnnotation(annotationName);
- this.nullAnnotationsCache.put(annotationName, annotation);
- }
- return annotation;
- }
-
- protected abstract Annotation buildNullAnnotation(String annotationName);
-
- public ListIterable<NestableAnnotation> getAnnotations(String nestableAnnotationName) {
- return EmptyListIterable.instance();
- }
-
- public int getAnnotationsSize(String nestableAnnotationName) {
- return 0;
- }
-
- public NestableAnnotation getAnnotation(int index, String nestableAnnotationName) {
- return null;
- }
-
- public Annotation addAnnotation(String annotationName) {
- throw new UnsupportedOperationException();
- }
-
- public NestableAnnotation addAnnotation(int index, String nestableAnnotationName) {
- throw new UnsupportedOperationException();
- }
-
- public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
- throw new UnsupportedOperationException();
- }
-
- public void removeAnnotation(String annotationName) {
- throw new UnsupportedOperationException();
- }
-
- public void removeAnnotation(int index, String nestableAnnotationName) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** misc **********
-
- public Iterable<Annotation> getTopLevelAnnotations() {
- return EmptyIterable.instance();
- }
-
- public boolean isAnnotated() {
- return false;
- }
-
- public boolean isAnnotatedWithAnyOf(Iterable<String> annotationNames) {
- return false;
- }
-
- public boolean isFinal() {
- return this.member.isFinal();
- }
-
- public boolean isPublic() {
- return this.member.isPublic();
- }
-
- public boolean isStatic() {
- return this.member.isStatic();
- }
-
- public boolean isTransient() {
- return this.member.isTransient();
- }
-
- public boolean isProtected() {
- return this.member.isProtected();
- }
-
- public boolean isPublicOrProtected() {
- return isPublic() || isProtected();
- }
-
- public boolean isFor(String memberName, int occurrence) {
- return this.member.isFor(memberName, occurrence);
- }
-
- public TextRange getTextRange(CompilationUnit astRoot) {
- // should never be null
- return this.member.getTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- // should never be null
- return this.member.getNameTextRange(astRoot);
- }
-
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
- // should never be null
- return this.member.getTextRange(nestableAnnotationName, astRoot);
- }
-
- public void resolveTypes(CompilationUnit astRoot) {
- // NOP
- }
- }
-
- // ********** unannotated Java resource attribute **********
-
- /**
- * Wrap another Java resource attribute and suppress all its annotations.
- */
- protected abstract class UnannotatedJavaResourceAttribute<A extends JavaResourceAttribute>
- extends UnannotatedJavaResourceMember<A>
- implements JavaResourceAttribute
- {
- public UnannotatedJavaResourceAttribute(A attribute){
- super(attribute);
- }
-
- // ********** annotations **********
-
- @Override
- public Annotation buildNullAnnotation(String annotationName) {
- return (annotationName == null) ? null : this.buildNullAnnotation_(annotationName);
- }
-
- private Annotation buildNullAnnotation_(String annotationName) {
- return this.getAnnotationProvider().buildNullAnnotation(this, annotationName);
- }
-
-
- // ********** delegated behavior **********
-
- @Override
- public JavaResourceType getParent() {
- return this.member.getParent();
- }
-
- public JavaResourceType getResourceType() {
- return this.member.getResourceType();
- }
-
- public String getName() {
- return this.member.getName();
- }
-
- public boolean typeIsSubTypeOf(String tn) {
- return this.member.typeIsSubTypeOf(tn);
- }
-
- public boolean typeIsVariablePrimitive() {
- return this.member.typeIsVariablePrimitive();
- }
-
- public int getModifiers() {
- return this.member.getModifiers();
- }
-
- public String getTypeName() {
- return this.member.getTypeName();
- }
-
- public boolean typeIsInterface() {
- return this.member.typeIsInterface();
- }
-
- public boolean typeIsEnum() {
- return this.member.typeIsEnum();
- }
-
- public boolean typeIsArray() {
- return this.member.typeIsArray();
- }
-
- public int getTypeArrayDimensionality() {
- return this.member.getTypeArrayDimensionality();
- }
-
- public String getTypeArrayComponentTypeName() {
- return this.member.getTypeArrayComponentTypeName();
- }
-
- public ListIterable<String> getTypeSuperclassNames() {
- return this.member.getTypeSuperclassNames();
- }
-
- public Iterable<String> getTypeInterfaceNames() {
- return this.member.getTypeInterfaceNames();
- }
-
- public ListIterable<String> getTypeTypeArgumentNames() {
- return this.member.getTypeTypeArgumentNames();
- }
-
- public int getTypeTypeArgumentNamesSize() {
- return this.member.getTypeTypeArgumentNamesSize();
- }
-
- public String getTypeTypeArgumentName(int index) {
- return this.member.getTypeTypeArgumentName(index);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
deleted file mode 100644
index 01e404334b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.ColumnMapping;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.SimpleMetamodelField;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java attribute mapping
- * <p>
- * The mapping annotation is <code>null</code> for default mappings.
- * It will be faulted into existence whenever {@link #getAnnotationForUpdate()}
- * is called. It will <em>not</em> return to <code>null</code> automatically
- * when all its state is defaulted; it must be explicitly cleared via
- * {@link JavaPersistentAttribute#setMappingKey(String)}.
- */
-public abstract class AbstractJavaAttributeMapping<A extends Annotation>
- extends AbstractJavaJpaContextNode
- implements JavaAttributeMapping, AttributeMapping2_0
-{
- protected boolean default_;
-
-
- protected AbstractJavaAttributeMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.default_ = this.buildDefault();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.updateDefault();
- }
-
- @Override
- public void update() {
- super.update();
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.getPersistentAttribute().getName();
- }
-
-
- // ********** annotation **********
-
- @SuppressWarnings("unchecked")
- public A getMappingAnnotation() {
- return (A) this.getAnnotation_();
- }
-
- protected Annotation getAnnotation_() {
- return this.getResourceAttribute().getAnnotation(this.getAnnotationName());
- }
-
- protected abstract String getAnnotationName();
-
- /**
- * This method should only be called on mappings that can occur by default
- * (e.g. <code>Basic</code>, <code>Embedded</code>, <code>OneToOne</code>,
- * and <code>OneToMany</code>).
- */
- public A getAnnotationForUpdate() {
- A annotation = this.getMappingAnnotation();
- if (annotation == null) {
- this.getPersistentAttribute().setMappingKey(this.getKey());
- annotation = this.getMappingAnnotation();
- if (annotation == null) {
- throw new IllegalStateException("missing annotation: " + this); //$NON-NLS-1$
- }
- }
- return annotation;
- }
-
-
- // ********** default **********
-
- public boolean isDefault() {
- return this.default_;
- }
-
- protected void setDefault(boolean default_) {
- boolean old = this.default_;
- this.default_ = default_;
- this.firePropertyChanged(DEFAULT_PROPERTY, old, default_);
- }
-
- public void updateDefault() {
- this.setDefault(this.buildDefault());
- }
-
- protected boolean buildDefault() {
- return this.getMappingAnnotation() == null;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaPersistentAttribute getParent() {
- return (JavaPersistentAttribute) super.getParent();
- }
-
- public JavaPersistentAttribute getPersistentAttribute() {
- return this.getParent();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getPersistentAttribute().getOwningTypeMapping();
- }
-
- public JavaResourceAttribute getResourceAttribute() {
- return this.getPersistentAttribute().getResourceAttribute();
- }
-
- public String getPrimaryKeyColumnName() {
- return null;
- }
-
- public boolean isOverridableAttributeMapping() {
- return false;
- }
-
- public boolean isOverridableAssociationMapping() {
- return false;
- }
-
- public boolean isRelationshipOwner() {
- return false;
- }
-
- public boolean isOwnedBy(AttributeMapping mapping) {
- return false;
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getTypeMapping().validatesAgainstDatabase();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- protected JavaPersistentAttribute getJavaPersistentAttribute() {
- return this.getPersistentAttribute().getJavaPersistentAttribute();
- }
-
- public Iterable<Generator> getGenerators() {
- return EmptyIterable.instance();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
-
-
- // ********** embedded mappings **********
-
- public Iterable<String> getAllMappingNames() {
- return new SingleElementIterable<String>(this.getName());
- }
-
- public Iterable<String> getAllOverridableAttributeMappingNames() {
- return this.isOverridableAttributeMapping() ?
- new SingleElementIterable<String>(this.getName()) :
- EmptyIterable.<String>instance();
- }
-
- public Iterable<String> getAllOverridableAssociationMappingNames() {
- return this.isOverridableAssociationMapping() ?
- new SingleElementIterable<String>(this.getName()) :
- EmptyIterable.<String>instance();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- ColumnMapping mapping = this.resolveColumnMapping(attributeName);
- return (mapping == null) ? null : mapping.getColumn();
- }
-
- protected ColumnMapping resolveColumnMapping(String name) {
- AttributeMapping mapping = this.resolveAttributeMapping(name);
- return ((mapping != null) && mapping.isOverridableAttributeMapping()) ? (ColumnMapping) mapping : null;
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- RelationshipMapping mapping = this.resolveRelationshipMapping(attributeName);
- return (mapping == null) ? null : mapping.getRelationship();
- }
-
- protected RelationshipMapping resolveRelationshipMapping(String name) {
- AttributeMapping mapping = this.resolveAttributeMapping(name);
- return ((mapping != null) && mapping.isOverridableAssociationMapping()) ? (RelationshipMapping) mapping : null;
- }
-
- public AttributeMapping resolveAttributeMapping(String attributeName) {
- return this.getName().equals(attributeName) ? this : null;
- }
-
- protected Transformer<String, String> buildQualifierTransformer() {
- return new MappingTools.QualifierTransformer(this.getName());
- }
-
- protected String unqualify(String attributeName) {
- return MappingTools.unqualify(this.getName(), attributeName);
- }
-
-
- // ********** metamodel **********
-
- public MetamodelField getMetamodelField() {
- return new SimpleMetamodelField(
- this.getMetamodelFieldModifiers(),
- this.getMetamodelFieldTypeName(),
- this.getMetamodelFieldTypeArgumentNames(),
- this.getMetamodelFieldName()
- );
- }
-
- protected Iterable<String> getMetamodelFieldModifiers() {
- return STANDARD_METAMODEL_FIELD_MODIFIERS;
- }
-
- /**
- * most mappings are "singular"
- */
- protected String getMetamodelFieldTypeName() {
- return JPA2_0.SINGULAR_ATTRIBUTE;
- }
-
- protected final Iterable<String> getMetamodelFieldTypeArgumentNames() {
- ArrayList<String> typeArgumentNames = new ArrayList<String>(3);
- typeArgumentNames.add(this.getTypeMapping().getPersistentType().getName());
- this.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
- return typeArgumentNames;
- }
-
- /**
- * by default, we add only the mapping's attribute type name;
- * but collection relationship mappings will also need to add the key type
- * name if the "collection" is of type java.util.Map
- */
- protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
- typeArgumentNames.add(this.getMetamodelTypeName());
- }
-
- public String getMetamodelTypeName() {
- return ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelTypeName();
- }
-
- protected String getMetamodelFieldName() {
- return this.getName();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMappingType(messages, astRoot);
- }
-
- protected void validateMappingType(List<IMessage> messages, CompilationUnit astRoot) {
- if ( ! this.getTypeMapping().attributeMappingKeyAllowed(this.getKey())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_MAPPING,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getMappingAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getPersistentAttribute().getValidationTextRange(astRoot);
- }
-
- protected TextRange getMappingAnnotationTextRange(CompilationUnit astRoot) {
- A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
deleted file mode 100644
index cf874d2b84..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.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.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
-
-/**
- * Java column or join column
- */
-public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O extends JavaReadOnlyBaseColumn.Owner>
- extends AbstractJavaNamedColumn<A, O>
- implements JavaBaseColumn
-{
- protected String specifiedTable;
- protected String defaultTable;
-
- protected Boolean specifiedUnique;
- protected boolean defaultUnique;
-
- protected Boolean specifiedNullable;
- protected boolean defaultNullable;
-
- protected Boolean specifiedInsertable;
- protected boolean defaultInsertable;
-
- protected Boolean specifiedUpdatable;
- protected boolean defaultUpdatable;
-
-
- protected AbstractJavaBaseColumn(JavaJpaContextNode parent, O owner) {
- this(parent, owner, null);
- }
-
- protected AbstractJavaBaseColumn(JavaJpaContextNode parent, O owner, A columnAnnotation) {
- super(parent, owner, columnAnnotation);
- this.specifiedTable = this.buildSpecifiedTable();
- this.specifiedUnique = this.buildSpecifiedUnique();
- this.specifiedNullable = this.buildSpecifiedNullable();
- this.specifiedInsertable = this.buildSpecifiedInsertable();
- this.specifiedUpdatable = this.buildSpecifiedUpdatable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTable_(this.buildSpecifiedTable());
- this.setSpecifiedUnique_(this.buildSpecifiedUnique());
- this.setSpecifiedNullable_(this.buildSpecifiedNullable());
- this.setSpecifiedInsertable_(this.buildSpecifiedInsertable());
- this.setSpecifiedUpdatable_(this.buildSpecifiedUpdatable());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTable(this.buildDefaultTable());
- this.setDefaultUnique(this.buildDefaultUnique());
- this.setDefaultNullable(this.buildDefaultNullable());
- this.setDefaultInsertable(this.buildDefaultInsertable());
- this.setDefaultUpdatable(this.buildDefaultUpdatable());
- }
-
-
- // ********** table **********
-
- @Override
- public String getTable() {
- return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
- }
-
- public String getSpecifiedTable() {
- return this.specifiedTable;
- }
-
- public void setSpecifiedTable(String table) {
- if (this.valuesAreDifferent(this.specifiedTable, table)) {
- this.getColumnAnnotation().setTable(table);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedTable_(table);
- }
- }
-
- protected void setSpecifiedTable_(String table) {
- String old = this.specifiedTable;
- this.specifiedTable = table;
- this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
- }
-
- protected String buildSpecifiedTable() {
- return this.getColumnAnnotation().getTable();
- }
-
- public String getDefaultTable() {
- return this.defaultTable;
- }
-
- protected void setDefaultTable(String table) {
- String old = this.defaultTable;
- this.defaultTable = table;
- this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
- }
-
- protected String buildDefaultTable() {
- return this.owner.getDefaultTableName();
- }
-
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange(), astRoot);
- }
-
-
- // ********** unique **********
-
- public boolean isUnique() {
- return (this.specifiedUnique != null) ? this.specifiedUnique.booleanValue() : this.isDefaultUnique();
- }
-
- public Boolean getSpecifiedUnique() {
- return this.specifiedUnique;
- }
-
- public void setSpecifiedUnique(Boolean unique) {
- if (this.valuesAreDifferent(this.specifiedUnique, unique)) {
- this.getColumnAnnotation().setUnique(unique);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedUnique_(unique);
- }
- }
-
- protected void setSpecifiedUnique_(Boolean unique) {
- Boolean old = this.specifiedUnique;
- this.specifiedUnique = unique;
- this.firePropertyChanged(SPECIFIED_UNIQUE_PROPERTY, old, unique);
- }
-
- protected Boolean buildSpecifiedUnique() {
- return this.getColumnAnnotation().getUnique();
- }
-
- public boolean isDefaultUnique() {
- return this.defaultUnique;
- }
-
- protected void setDefaultUnique(boolean unique) {
- boolean old = this.defaultUnique;
- this.defaultUnique = unique;
- this.firePropertyChanged(DEFAULT_UNIQUE_PROPERTY, old, unique);
- }
-
- protected boolean buildDefaultUnique() {
- return DEFAULT_UNIQUE;
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return (this.specifiedNullable != null) ? this.specifiedNullable.booleanValue() : this.isDefaultNullable();
- }
-
- public Boolean getSpecifiedNullable() {
- return this.specifiedNullable;
- }
-
- public void setSpecifiedNullable(Boolean nullable) {
- if (this.valuesAreDifferent(this.specifiedNullable, nullable)) {
- this.getColumnAnnotation().setNullable(nullable);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedNullable_(nullable);
- }
- }
-
- protected void setSpecifiedNullable_(Boolean nullable) {
- Boolean old = this.specifiedNullable;
- this.specifiedNullable = nullable;
- this.firePropertyChanged(SPECIFIED_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected Boolean buildSpecifiedNullable() {
- return this.getColumnAnnotation().getNullable();
- }
-
- public boolean isDefaultNullable() {
- return this.defaultNullable;
- }
-
- protected void setDefaultNullable(boolean nullable) {
- boolean old = this.defaultNullable;
- this.defaultNullable = nullable;
- this.firePropertyChanged(DEFAULT_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected boolean buildDefaultNullable() {
- return DEFAULT_NULLABLE;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return (this.specifiedInsertable != null) ? this.specifiedInsertable.booleanValue() : this.isDefaultInsertable();
- }
-
- public Boolean getSpecifiedInsertable() {
- return this.specifiedInsertable;
- }
-
- public void setSpecifiedInsertable(Boolean insertable) {
- if (this.valuesAreDifferent(this.specifiedInsertable, insertable)) {
- this.getColumnAnnotation().setInsertable(insertable);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedInsertable_(insertable);
- }
- }
-
- protected void setSpecifiedInsertable_(Boolean insertable) {
- Boolean old = this.specifiedInsertable;
- this.specifiedInsertable = insertable;
- this.firePropertyChanged(SPECIFIED_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected Boolean buildSpecifiedInsertable() {
- return this.getColumnAnnotation().getInsertable();
- }
-
- public boolean isDefaultInsertable() {
- return this.defaultInsertable;
- }
-
- protected void setDefaultInsertable(boolean insertable) {
- boolean old = this.defaultInsertable;
- this.defaultInsertable = insertable;
- this.firePropertyChanged(DEFAULT_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected boolean buildDefaultInsertable() {
- return DEFAULT_INSERTABLE;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return (this.specifiedUpdatable != null) ? this.specifiedUpdatable.booleanValue() : this.isDefaultUpdatable();
- }
-
- public Boolean getSpecifiedUpdatable() {
- return this.specifiedUpdatable;
- }
-
- public void setSpecifiedUpdatable(Boolean updatable) {
- if (this.valuesAreDifferent(this.specifiedUpdatable, updatable)) {
- this.getColumnAnnotation().setUpdatable(updatable);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedUpdatable_(updatable);
- }
- }
-
- protected void setSpecifiedUpdatable_(Boolean updatable) {
- Boolean old = this.specifiedUpdatable;
- this.specifiedUpdatable = updatable;
- this.firePropertyChanged(SPECIFIED_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected Boolean buildSpecifiedUpdatable() {
- return this.getColumnAnnotation().getUpdatable();
- }
-
- public boolean isDefaultUpdatable() {
- return this.defaultUpdatable;
- }
-
- protected void setDefaultUpdatable(boolean updatable) {
- boolean old = this.defaultUpdatable;
- this.defaultUpdatable = updatable;
- this.firePropertyChanged(DEFAULT_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected boolean buildDefaultUpdatable() {
- return DEFAULT_UPDATABLE;
- }
-
-
- // ********** misc **********
-
- protected void initializeFrom(ReadOnlyBaseColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedTable(oldColumn.getSpecifiedTable());
- this.setSpecifiedUnique(oldColumn.getSpecifiedUnique());
- this.setSpecifiedNullable(oldColumn.getSpecifiedNullable());
- this.setSpecifiedInsertable(oldColumn.getSpecifiedInsertable());
- this.setSpecifiedUpdatable(oldColumn.getSpecifiedUpdatable());
- }
-
- protected void initializeFromVirtual(ReadOnlyBaseColumn virtualColumn) {
- super.initializeFromVirtual(virtualColumn);
- this.setSpecifiedTable(virtualColumn.getTable());
- // ignore other settings?
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.tableTouches(pos)) {
- return this.getJavaCandidateTableNames(filter);
- }
- return null;
- }
-
- protected boolean tableTouches(int pos) {
- return this.getColumnAnnotation().tableTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateTableNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateTableNames(filter));
- }
-
- protected Iterable<String> getCandidateTableNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateTableNames(), filter);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.owner.getCandidateTableNames();
- }
-
-
- // ********** validation **********
-
- public boolean tableNameIsInvalid() {
- return this.owner.tableNameIsInvalid(this.getTable());
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
deleted file mode 100644
index ef53809060..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAttributeOverrideContainer2_0;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> embedded or embedded ID mapping
- */
-public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
- extends AbstractJavaAttributeMapping<A>
- implements JavaBaseEmbeddedMapping
-{
- protected final JavaAttributeOverrideContainer attributeOverrideContainer;
-
- protected Embeddable targetEmbeddable;
-
-
- protected AbstractJavaBaseEmbeddedMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.attributeOverrideContainer = this.buildAttributeOverrideContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.attributeOverrideContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.attributeOverrideContainer.update();
- this.setTargetEmbeddable(this.buildTargetEmbeddable());
- }
-
-
- // ********** attribute override container **********
-
- public JavaAttributeOverrideContainer getAttributeOverrideContainer() {
- return this.attributeOverrideContainer;
- }
-
- protected JavaAttributeOverrideContainer buildAttributeOverrideContainer() {
- return this.getJpaFactory().buildJavaAttributeOverrideContainer(this, this.buildAttributeOverrideContainerOwner());
- }
-
- protected abstract JavaAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner();
-
-
- // ********** target embeddable **********
-
- public Embeddable getTargetEmbeddable() {
- return this.targetEmbeddable;
- }
-
- protected void setTargetEmbeddable(Embeddable embeddable) {
- Embeddable old = this.targetEmbeddable;
- this.targetEmbeddable = embeddable;
- this.firePropertyChanged(TARGET_EMBEDDABLE_PROPERTY, old, embeddable);
- }
-
- protected Embeddable buildTargetEmbeddable() {
- String typeName = this.getPersistentAttribute().getSingleReferenceTargetTypeName();
- return (typeName == null) ? null : this.getPersistenceUnit().getEmbeddable(typeName);
- }
-
-
- // ********** embedded mappings **********
-
- @Override
- public Iterable<String> getAllOverridableAttributeMappingNames() {
- return this.isJpa2_0Compatible() ?
- this.getEmbeddableOverridableAttributeMappingNames() :
- super.getAllOverridableAttributeMappingNames();
- }
-
- protected Iterable<String> getEmbeddableOverridableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllOverridableAssociationMappingNames() {
- return this.isJpa2_0Compatible() ?
- this.getEmbeddableOverridableAssociationMappingNames() :
- super.getAllOverridableAssociationMappingNames();
- }
-
- protected Iterable<String> getEmbeddableOverridableAssociationMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<String> getQualifiedEmbeddableOverridableMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<String, String>(this.getEmbeddableAttributeMappingNames(transformer), this.buildQualifierTransformer());
- }
-
- protected Iterable<String> getEmbeddableAttributeMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new CompositeIterable<String>(this.getEmbeddableAttributeMappingNamesLists(transformer));
- }
-
- /**
- * Return a list of lists; each nested list holds the names for one of the
- * embedded mapping's target embeddable type mapping's attribute mappings
- * (attribute or association mappings, depending on the specified transformer).
- */
- protected Iterable<Iterable<String>> getEmbeddableAttributeMappingNamesLists(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getEmbeddableAttributeMappings(), transformer);
- }
-
- /**
- * Return the target embeddable's attribute mappings.
- */
- protected Iterable<AttributeMapping> getEmbeddableAttributeMappings() {
- return ((this.targetEmbeddable != null) && (this.targetEmbeddable != this.getTypeMapping())) ?
- this.targetEmbeddable.getAttributeMappings() :
- EmptyIterable.<AttributeMapping>instance();
- }
-
-
- // ********** misc **********
-
- @Override
- public Column resolveOverriddenColumn(String attributeName) {
- return this.isJpa2_0Compatible() ? this.resolveOverriddenColumn_(attributeName) : null;
- }
-
- protected Column resolveOverriddenColumn_(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AttributeOverride override = this.attributeOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getColumn() : this.resolveOverriddenColumnInTargetEmbeddable(attributeName);
- }
-
- protected Column resolveOverriddenColumnInTargetEmbeddable(String attributeName) {
- return (this.targetEmbeddable == null) ? null : this.targetEmbeddable.resolveOverriddenColumn(attributeName);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.attributeOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- if (this.validateTargetEmbeddable(messages, astRoot)) {
- this.validateOverrides(messages, reporter, astRoot);
- }
- }
-
- protected boolean validateTargetEmbeddable(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.targetEmbeddable != null) {
- return true;
- }
- String targetEmbeddableTypeName = this.getPersistentAttribute().getTypeName();
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_NOT_AN_EMBEDDABLE,
- new String[] {this.getName(), targetEmbeddableTypeName},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TARGET_NOT_AN_EMBEDDABLE,
- new String[] {targetEmbeddableTypeName},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- return false;
- }
-
- protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.attributeOverrideContainer.validate(messages, reporter, astRoot);
- }
-
-
- // ********** attribute override container owner *********
-
- protected abstract class AttributeOverrideContainerOwner
- implements JavaAttributeOverrideContainer2_0.Owner
- {
- public JavaResourceMember getResourceMember() {
- return AbstractJavaBaseEmbeddedMapping.this.getResourceAttribute();
- }
-
- public TypeMapping getTypeMapping() {
- return AbstractJavaBaseEmbeddedMapping.this.getTypeMapping();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractJavaBaseEmbeddedMapping.this.getTargetEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? this.getAllOverridableAttributeNames_(overriddenTypeMapping) : EmptyIterable.<String>instance();
- }
-
- /**
- * pre-condition: type mapping is not <code>null</code>
- * <p>
- * NB: Overridden in {@link GenericJavaEmbeddedIdMapping.AttributeOverrideContainerOwner}
- */
- protected Iterable<String> getAllOverridableAttributeNames_(TypeMapping overriddenTypeMapping) {
- return overriddenTypeMapping.getAllOverridableAttributeNames();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public String getPossiblePrefix() {
- return null;
- }
-
- public String getWritePrefix() {
- return null;
- }
-
- // no maps, so all overrides are relevant
- public boolean isRelevant(String overrideName) {
- return true;
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaBaseEmbeddedMapping.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- protected JavaPersistentAttribute getPersistentAttribute() {
- return AbstractJavaBaseEmbeddedMapping.this.getPersistentAttribute();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
deleted file mode 100644
index 943fe9db23..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.Association;
-import org.eclipse.jpt.common.utility.internal.SimpleAssociation;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaBasicMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
-import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java basic mapping
- */
-public abstract class AbstractJavaBasicMapping
- extends AbstractJavaAttributeMapping<BasicAnnotation>
- implements JavaBasicMapping
-{
- protected final JavaColumn column;
-
- protected FetchType specifiedFetch;
- protected FetchType defaultFetch;
-
- protected Boolean specifiedOptional;
- protected boolean defaultOptional;
-
- protected JavaConverter converter; // never null
-
-
- protected static final JavaConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new JavaConverter.Adapter[] {
- JavaEnumeratedConverter.Adapter.instance(),
- JavaTemporalConverter.BasicAdapter.instance(),
- JavaLobConverter.Adapter.instance()
- };
- protected static final Iterable<JavaConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<JavaConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractJavaBasicMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.column = this.buildColumn();
- this.specifiedFetch = this.buildSpecifiedFetch();
- this.specifiedOptional = this.buildSpecifiedOptional();
- this.converter = this.buildConverter();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- this.setSpecifiedFetch_(this.buildSpecifiedFetch());
- this.setSpecifiedOptional_(this.buildSpecifiedOptional());
- this.syncConverter();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- this.setDefaultFetch(this.buildDefaultFetch());
- this.setDefaultOptional(this.buildDefaultOptional());
- this.converter.update();
- }
-
-
- // ********** column **********
-
- public JavaColumn getColumn() {
- return this.column;
- }
-
- protected JavaColumn buildColumn() {
- return this.getJpaFactory().buildJavaColumn(this, this);
- }
-
-
- // ********** fetch **********
-
- public FetchType getFetch() {
- return (this.specifiedFetch != null) ? this.specifiedFetch : this.defaultFetch;
- }
-
- public FetchType getSpecifiedFetch() {
- return this.specifiedFetch;
- }
-
- public void setSpecifiedFetch(FetchType fetch) {
- if (this.valuesAreDifferent(fetch, this.specifiedFetch)) {
- this.getAnnotationForUpdate().setFetch(FetchType.toJavaResourceModel(fetch));
- this.setSpecifiedFetch_(fetch);
- }
- }
-
- protected void setSpecifiedFetch_(FetchType fetch) {
- FetchType old = this.specifiedFetch;
- this.specifiedFetch = fetch;
- this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildSpecifiedFetch() {
- BasicAnnotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : FetchType.fromJavaResourceModel(annotation.getFetch());
- }
-
- public FetchType getDefaultFetch() {
- return this.defaultFetch;
- }
-
- protected void setDefaultFetch(FetchType fetch) {
- FetchType old = this.defaultFetch;
- this.defaultFetch = fetch;
- this.firePropertyChanged(DEFAULT_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
-
- // ********** optional **********
-
- public boolean isOptional() {
- return (this.specifiedOptional != null) ? this.specifiedOptional.booleanValue() : this.isDefaultOptional();
- }
-
- public Boolean getSpecifiedOptional() {
- return this.specifiedOptional;
- }
-
- public void setSpecifiedOptional(Boolean optional) {
- if (this.valuesAreDifferent(optional, this.specifiedOptional)) {
- this.getAnnotationForUpdate().setOptional(optional);
- this.setSpecifiedOptional_(optional);
- }
- }
-
- protected void setSpecifiedOptional_(Boolean optional) {
- Boolean old = this.specifiedOptional;
- this.specifiedOptional = optional;
- this.firePropertyChanged(SPECIFIED_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected Boolean buildSpecifiedOptional() {
- BasicAnnotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getOptional();
- }
-
- public boolean isDefaultOptional() {
- return this.defaultOptional;
- }
-
- protected void setDefaultOptional(boolean optional) {
- boolean old = this.defaultOptional;
- this.defaultOptional = optional;
- this.firePropertyChanged(DEFAULT_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected boolean buildDefaultOptional() {
- return DEFAULT_OPTIONAL;
- }
-
-
- // ********** converter **********
-
- public JavaConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- this.converter.dispose();
- JavaConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.retainConverterAnnotation(converterAdapter);
- this.setConverter_(this.buildConverter(converterAdapter));
- }
- }
-
- protected JavaConverter buildConverter(JavaConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getJpaFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(JavaConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- /**
- * Clear all the converter annotations <em>except</em> for the annotation
- * corresponding to the specified adapter. If the specified adapter is
- * <code>null</code>, remove <em>all</em> the converter annotations.
- */
- protected void retainConverterAnnotation(JavaConverter.Adapter converterAdapter) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter != converterAdapter) {
- adapter.removeConverterAnnotation(resourceAttribute);
- }
- }
- }
-
- protected JavaConverter buildConverter() {
- JpaFactory jpaFactory = this.getJpaFactory();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- JavaConverter javaConverter = adapter.buildConverter(this, jpaFactory);
- if (javaConverter != null) {
- return javaConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- Association<JavaConverter.Adapter, Annotation> assoc = this.getConverterAnnotation();
- if (assoc == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- JavaConverter.Adapter adapter = assoc.getKey();
- Annotation annotation = assoc.getValue();
- if ((this.converter.getType() == adapter.getConverterType()) &&
- (this.converter.getConverterAnnotation() == annotation)) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildConverter(annotation, this, this.getJpaFactory()));
- }
- }
- }
-
- /**
- * Return the first converter annotation we find along with its corresponding
- * adapter. Return <code>null</code> if there are no converter annotations.
- */
- protected Association<JavaConverter.Adapter, Annotation> getConverterAnnotation() {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- Annotation annotation = adapter.getConverterAnnotation(resourceAttribute);
- if (annotation != null) {
- return new SimpleAssociation<JavaConverter.Adapter, Annotation>(adapter, annotation);
- }
- }
- return null;
- }
-
- protected JavaConverter buildNullConverter() {
- return new NullJavaConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected JavaConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<JavaConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return BasicAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
-
- // ********** JavaColumn.Owner implementation **********
-
- public ColumnAnnotation getColumnAnnotation() {
- return (ColumnAnnotation) this.getResourceAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public void removeColumnAnnotation() {
- this.getResourceAttribute().removeAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getName();
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.converter.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddable.java
deleted file mode 100644
index 95b5e3d1a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddable.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * Java embeddable type mapping
- */
-public abstract class AbstractJavaEmbeddable
- extends AbstractJavaTypeMapping<EmbeddableAnnotation>
- implements JavaEmbeddable
-{
- protected AbstractJavaEmbeddable(JavaPersistentType parent, EmbeddableAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- }
-
- public String getKey() {
- return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
- public JavaPersistentType getIdClass() {
- return null;
- }
-
- public boolean isMapped() {
- return true;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-
- @Override
- public boolean validatesAgainstDatabase() {
- return false;
- }
-
- public Iterable<Query> getQueries() {
- return EmptyIterable.instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
deleted file mode 100644
index b256d72998..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.EmbeddedIdMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java embedded ID mapping
- */
-public abstract class AbstractJavaEmbeddedIdMapping
- extends AbstractJavaBaseEmbeddedMapping<EmbeddedIdAnnotation>
- implements EmbeddedIdMapping2_0, JavaEmbeddedIdMapping
-{
- /* JPA 2.0 - the embedded id may be derived from a relationship */
- protected boolean derived;
-
-
- protected AbstractJavaEmbeddedIdMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.setDerived(this.buildDerived());
- }
-
-
- // ********** derived **********
-
- public boolean isDerived() {
- return this.derived;
- }
-
- protected void setDerived(boolean derived) {
- boolean old = this.derived;
- this.derived = derived;
- this.firePropertyChanged(DERIVED_PROPERTY, old, derived);
- }
-
- protected boolean buildDerived() {
- return this.isJpa2_0Compatible() && this.buildDerived_();
- }
-
- protected boolean buildDerived_() {
- return this.getTypeMapping().attributeIsDerivedId(this.getName());
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return EmbeddedIdAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- protected Iterable<String> getEmbeddableOverridableAttributeMappingNames() {
- return (this.derived) ?
- EmptyIterable.<String>instance() :
- super.getEmbeddableOverridableAttributeMappingNames();
- }
-
- @Override
- protected JavaAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
- return new AttributeOverrideContainerOwner();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- // [JPA 2.0] if the embedded id is mapped by a relationship, then any specified
- // attribute overrides are in error
- // (in JPA 1.0, this will obviously never be reached)
- if (this.derived
- && (this.attributeOverrideContainer.getSpecifiedOverridesSize() > 0)) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
- new String[] {this.getName()},
- this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
- EMPTY_STRING_ARRAY,
- this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange(astRoot)
- )
- );
- }
- }
-
- validateTargetEmbeddableImplementsSerializable(messages, reporter, astRoot);
- validateNoRelationshipMappingsOnTargetEmbeddable(messages, reporter, astRoot);
- validateTargetEmbeddableImplementsEqualsAndHashcode(messages, reporter, astRoot);
- validateTargetEmbeddableIsPublic(messages, reporter, astRoot);
- validateTargetEmbeddableImplementsZeroArgConstructor(messages, reporter, astRoot);
- }
-
- protected void validateTargetEmbeddableImplementsZeroArgConstructor(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getTargetEmbeddable() != null) {
- String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
- IJavaProject javaProject = getJpaProject().getJavaProject();
- if (!JDTTools.classHasPublicZeroArgConstructor(javaProject, targetEmbeddableClassName)){
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
- }
-
- protected void validateTargetEmbeddableImplementsEqualsAndHashcode(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getTargetEmbeddable() != null) {
- JavaResourceType resourceType = getTargetEmbeddable().getJavaResourceType();
- if (resourceType != null
- && (!resourceType.hasHashCodeMethod() || !resourceType.hasEqualsMethod())) {
-
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
- }
-
- protected void validateTargetEmbeddableIsPublic(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getTargetEmbeddable() != null) {
- if (!getTargetEmbeddable().getJavaResourceType().isPublic()) {
- if (getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
- }
-
- protected void validateTargetEmbeddableImplementsSerializable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getTargetEmbeddable() != null) {
- String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
- IJavaProject javaProject = getJpaProject().getJavaProject();
- if (!JDTTools.typeIsSubType(javaProject, targetEmbeddableClassName, Serializable.class.getName())) {
- if (getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
- }
-
- protected void validateNoRelationshipMappingsOnTargetEmbeddable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getTargetEmbeddable() != null) {
- TypeMapping targetEmbeddableTypeMapping = this.getTargetEmbeddable().getPersistentType().getMapping();
- if (targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
- || targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
- || targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
- || targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()) {
- if (getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
- }
-
-
- // ********** attribute override container owner *********
-
- protected class AttributeOverrideContainerOwner
- extends AbstractJavaBaseEmbeddedMapping<EmbeddedIdAnnotation>.AttributeOverrideContainerOwner
- {
- @Override
- public Iterable<String> getAllOverridableNames() {
- return AbstractJavaEmbeddedIdMapping.this.isDerived() ?
- EmptyIterable.<String>instance() :
- super.getAllOverridableNames();
- }
-
- @Override
- protected Iterable<String> getAllOverridableAttributeNames_(TypeMapping overriddenTypeMapping) {
- return new FilteringIterable<String>(super.getAllOverridableAttributeNames_(overriddenTypeMapping)) {
- @Override
- protected boolean accept(String attributeName) {
- return ! AttributeOverrideContainerOwner.this.getTypeMapping().attributeIsDerivedId(attributeName);
- }
- };
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
deleted file mode 100644
index 149053efa3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaEmbeddedMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java embedded mapping
- */
-public abstract class AbstractJavaEmbeddedMapping
- extends AbstractJavaBaseEmbeddedMapping<EmbeddedAnnotation>
- implements JavaEmbeddedMapping2_0
-{
- protected final JavaAssociationOverrideContainer associationOverrideContainer;
-
-
- protected AbstractJavaEmbeddedMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.associationOverrideContainer = this.buildAssociationOverrideContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.associationOverrideContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.associationOverrideContainer.update();
- }
-
-
- // ********** association override container **********
-
- protected JavaAssociationOverrideContainer buildAssociationOverrideContainer() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaAssociationOverrideContainer(this, this.buildAssociationOverrideContainerOwner()) :
- new GenericJavaAssociationOverrideContainer(this, null);
- }
-
- public JavaAssociationOverrideContainer getAssociationOverrideContainer() {
- return this.associationOverrideContainer;
- }
-
- protected JavaAssociationOverrideContainer.Owner buildAssociationOverrideContainerOwner() {
- return new AssociationOverrideContainerOwner();
- }
-
-
- // ********** embedded mappings **********
-
- /**
- * This is only to build the choices for a "mapped by" setting in a
- * relationship mapping. JPA 2.0 does not support relationship mappings
- * in an embedded ID class; so we only put this logic here.
- */
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<String> getAllMappingNames() {
- return this.isJpa2_0Compatible() ?
- new CompositeIterable<String>(super.getAllMappingNames(), this.getAllEmbeddableAttributeMappingNames()) :
- super.getAllMappingNames();
- }
-
- protected Iterable<String> getAllEmbeddableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public AttributeMapping resolveAttributeMapping(String attributeName) {
- AttributeMapping resolvedMapping = super.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- return this.isJpa2_0Compatible() ? this.resolveAttributeMapping_(attributeName) : null;
- }
-
- protected AttributeMapping resolveAttributeMapping_(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- // recurse into the embeddable mappings
- for (AttributeMapping mapping : this.getEmbeddableAttributeMappings()) {
- AttributeMapping resolvedMapping = mapping.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- }
- return null;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return EmbeddedAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return this.isJpa2_0Compatible() ? this.resolveOverriddenRelationship_(attributeName) : null;
- }
-
- protected Relationship resolveOverriddenRelationship_(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AssociationOverride override = this.associationOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getRelationship() : this.resolveOverriddenRelationshipInTargetEmbeddable(attributeName);
- }
-
- protected Relationship resolveOverriddenRelationshipInTargetEmbeddable(String attributeName) {
- return (this.targetEmbeddable == null) ? null : this.targetEmbeddable.resolveOverriddenRelationship(attributeName);
- }
-
- @Override
- protected JavaAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
- return new AttributeOverrideContainerOwner();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.associationOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateOverrides(messages, reporter, astRoot);
- this.associationOverrideContainer.validate(messages, reporter, astRoot);
- }
-
-
- // ********** attribute override container owner *********
-
- protected class AttributeOverrideContainerOwner
- extends AbstractJavaBaseEmbeddedMapping<EmbeddedAnnotation>.AttributeOverrideContainerOwner
- {
- // nothing yet
- }
-
-
- // ********** association override container owner **********
-
- protected class AssociationOverrideContainerOwner
- implements JavaAssociationOverrideContainer2_0.Owner
- {
- public JavaResourceAttribute getResourceMember() {
- return AbstractJavaEmbeddedMapping.this.getResourceAttribute();
- }
-
- public TypeMapping getTypeMapping() {
- return AbstractJavaEmbeddedMapping.this.getTypeMapping();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractJavaEmbeddedMapping.this.getTargetEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping typeMapping = this.getOverridableTypeMapping();
- return (typeMapping != null) ? typeMapping.getAllOverridableAssociationNames() : EmptyIterable.<String>instance();
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public String getPossiblePrefix() {
- return null;
- }
-
- public String getWritePrefix() {
- return null;
- }
-
- // no maps, so all overrides are relevant
- public boolean isRelevant(String overrideName) {
- return true;
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEmbeddedMapping.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table, textRangeResolver);
- }
-
- protected JavaPersistentAttribute getPersistentAttribute() {
- return AbstractJavaEmbeddedMapping.this.getPersistentAttribute();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
deleted file mode 100644
index a995db8db3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
+++ /dev/null
@@ -1,1722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubListIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaPlatformVariation.Supported;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.InheritanceType;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.SecondaryTable;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.DiscriminatorColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityPrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericEntityPrimaryKeyValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MappedSuperclassOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.TableValidator;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullPrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAttributeOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java entity
- */
-public abstract class AbstractJavaEntity
- extends AbstractJavaTypeMapping<EntityAnnotation>
- implements JavaEntity, JavaCacheableHolder2_0, JavaGeneratorContainer.ParentAdapter, JavaQueryContainer.Owner
-{
- protected String specifiedName;
- protected String defaultName;
-
- protected Entity rootEntity;
- protected final Vector<Entity> descendants = new Vector<Entity>();
-
- protected final JavaIdClassReference idClassReference;
-
- protected final JavaTable table;
- protected boolean specifiedTableIsAllowed;
- protected boolean tableIsUndefined;
-
- protected final ContextListContainer<JavaSecondaryTable, SecondaryTableAnnotation> specifiedSecondaryTableContainer;
- protected final Table.Owner specifiedSecondaryTableOwner;
-
- protected final PrimaryKeyJoinColumnOwner primaryKeyJoinColumnOwner;
- protected final ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> specifiedPrimaryKeyJoinColumnContainer;
- protected JavaPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
-
- protected InheritanceType specifiedInheritanceStrategy;
- protected InheritanceType defaultInheritanceStrategy;
-
- protected String specifiedDiscriminatorValue;
- protected String defaultDiscriminatorValue;
- protected boolean specifiedDiscriminatorValueIsAllowed;
- protected boolean discriminatorValueIsUndefined;
-
- protected final JavaDiscriminatorColumn discriminatorColumn;
- protected boolean specifiedDiscriminatorColumnIsAllowed;
- protected boolean discriminatorColumnIsUndefined;
-
- protected final JavaAttributeOverrideContainer attributeOverrideContainer;
- protected final JavaAssociationOverrideContainer associationOverrideContainer;
-
- protected final JavaGeneratorContainer generatorContainer;
- protected final JavaQueryContainer queryContainer;
-
-
- // ********** construction **********
-
- protected AbstractJavaEntity(JavaPersistentType parent, EntityAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- this.specifiedName = this.mappingAnnotation.getName();
- this.idClassReference = this.buildIdClassReference();
- this.table = this.buildTable();
- this.specifiedSecondaryTableOwner = this.buildSpecifiedSecondaryTableOwner();
- this.specifiedSecondaryTableContainer = this.buildSpecifiedSecondaryTableContainer();
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.specifiedPrimaryKeyJoinColumnContainer = this.buildSpecifiedPrimaryKeyJoinColumnContainer();
- this.specifiedInheritanceStrategy = this.buildSpecifiedInheritanceStrategy();
- this.specifiedDiscriminatorValue = this.getDiscriminatorValueAnnotation().getValue();
- this.discriminatorColumn = this.buildDiscriminatorColumn();
- // start with the entity as the root - it will be recalculated in update()
- this.rootEntity = this;
- this.attributeOverrideContainer = this.buildAttributeOverrideContainer();
- this.associationOverrideContainer = this.buildAssociationOverrideContainer();
- this.generatorContainer = this.buildGeneratorContainer();
- this.queryContainer = this.buildQueryContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedName_(this.mappingAnnotation.getName());
- this.idClassReference.synchronizeWithResourceModel();
- this.table.synchronizeWithResourceModel();
- this.syncSpecifiedSecondaryTables();
- this.syncSpecifiedPrimaryKeyJoinColumns();
- this.setSpecifiedInheritanceStrategy_(this.buildSpecifiedInheritanceStrategy());
- this.setSpecifiedDiscriminatorValue_(this.getDiscriminatorValueAnnotation().getValue());
- this.discriminatorColumn.synchronizeWithResourceModel();
- this.attributeOverrideContainer.synchronizeWithResourceModel();
- this.associationOverrideContainer.synchronizeWithResourceModel();
- this.generatorContainer.synchronizeWithResourceModel();
- this.queryContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
-
- this.setDefaultName(this.buildDefaultName());
-
- // calculate root entity early - other things depend on it
- this.setRootEntity(this.buildRootEntity());
- this.updateDescendants();
-
- this.idClassReference.update();
-
- this.table.update();
- this.setSpecifiedTableIsAllowed(this.buildSpecifiedTableIsAllowed());
- this.setTableIsUndefined(this.buildTableIsUndefined());
-
- this.updateNodes(this.getSecondaryTables());
-
- this.updateDefaultPrimaryKeyJoinColumn();
- this.updateNodes(this.getPrimaryKeyJoinColumns());
-
- this.setDefaultInheritanceStrategy(this.buildDefaultInheritanceStrategy());
-
- this.setDefaultDiscriminatorValue(this.buildDefaultDiscriminatorValue());
- this.setSpecifiedDiscriminatorValueIsAllowed(this.buildSpecifiedDiscriminatorValueIsAllowed());
- this.setDiscriminatorValueIsUndefined(this.buildDiscriminatorValueIsUndefined());
-
- this.discriminatorColumn.update();
- this.setSpecifiedDiscriminatorColumnIsAllowed(this.buildSpecifiedDiscriminatorColumnIsAllowed());
- this.setDiscriminatorColumnIsUndefined(this.buildDiscriminatorColumnIsUndefined());
-
- this.attributeOverrideContainer.update();
- this.associationOverrideContainer.update();
-
- this.generatorContainer.update();
- this.queryContainer.update();
- }
-
-
- // ********** name **********
-
- @Override
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- public void setSpecifiedName(String name) {
- this.mappingAnnotation.setName(name);
- this.setSpecifiedName_(name);
- }
-
- protected void setSpecifiedName_(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultName() {
- return this.getJavaResourceType().getName();
- }
-
-
- // ********** root entity **********
-
- @Override
- public Entity getRootEntity() {
- return this.rootEntity;
- }
-
- protected void setRootEntity(Entity entity) {
- Entity old = this.rootEntity;
- this.rootEntity = entity;
- this.firePropertyChanged(ROOT_ENTITY_PROPERTY, old, entity);
- }
-
- protected Entity buildRootEntity() {
- Entity root = this;
- for (TypeMapping typeMapping : this.getAncestors()) {
- if (typeMapping instanceof Entity) {
- root = (Entity) typeMapping;
- }
- }
- return root;
- }
-
-
- // ********** descendants **********
-
- public Iterable<Entity> getDescendants() {
- return new LiveCloneListIterable<Entity>(this.descendants);
- }
-
- protected void updateDescendants() {
- this.synchronizeCollection(this.buildDescendants(), this.descendants, DESCENDANTS_COLLECTION);
- }
-
- protected Iterable<Entity> buildDescendants() {
- return new FilteringIterable<Entity>(this.getPersistenceUnit().getEntities()) {
- @Override
- protected boolean accept(Entity entity) {
- return AbstractJavaEntity.this.entityIsDescendant(entity);
- }
- };
- }
-
- /**
- * Return whether specified entity is a descendant of the entity.
- */
- protected boolean entityIsDescendant(Entity entity) {
- String typeName = this.getPersistentType().getName();
- String entityTypeName = entity.getPersistentType().getName();
- String rootEntityTypeName = entity.getRootEntity().getPersistentType().getName();
- return Tools.valuesAreDifferent(typeName, entityTypeName) &&
- Tools.valuesAreEqual(typeName, rootEntityTypeName);
- }
-
-
- // ********** id class **********
-
- public JavaIdClassReference getIdClassReference() {
- return this.idClassReference;
- }
-
- protected JavaIdClassReference buildIdClassReference() {
- return new GenericJavaIdClassReference(this);
- }
-
- public JavaPersistentType getIdClass() {
- return this.idClassReference.getIdClass();
- }
-
-
- // ********** table **********
-
- public JavaTable getTable() {
- return this.table;
- }
-
- protected JavaTable buildTable() {
- return this.getJpaFactory().buildJavaTable(this, this.buildTableOwner());
- }
-
- protected JavaTable.Owner buildTableOwner() {
- return new TableOwner();
- }
-
- public boolean specifiedTableIsAllowed() {
- return this.specifiedTableIsAllowed;
- }
-
- protected void setSpecifiedTableIsAllowed(boolean specifiedTableIsAllowed) {
- boolean old = this.specifiedTableIsAllowed;
- this.specifiedTableIsAllowed = specifiedTableIsAllowed;
- this.firePropertyChanged(SPECIFIED_TABLE_IS_ALLOWED_PROPERTY, old, specifiedTableIsAllowed);
- }
-
- protected boolean buildSpecifiedTableIsAllowed() {
- return ! this.isAbstractTablePerClass() && ! this.isSingleTableDescendant();
- }
-
- public boolean tableIsUndefined() {
- return this.tableIsUndefined;
- }
-
- protected void setTableIsUndefined(boolean tableIsUndefined) {
- boolean old = this.tableIsUndefined;
- this.tableIsUndefined = tableIsUndefined;
- this.firePropertyChanged(TABLE_IS_UNDEFINED_PROPERTY, old, tableIsUndefined);
- }
-
- protected boolean buildTableIsUndefined() {
- return this.isAbstractTablePerClass();
- }
-
- /**
- * <ul>
- * <li>If the entity is part of a single table inheritance hierarchy, the table
- * name defaults to the root entity's table name.
- * <li>If the entity is abstract and part of a table per class
- * inheritance hierarchy, the table name defaults to null, as no table applies.
- * <li>Otherwise, the table name defaults to the entity name.
- * </ul>
- */
- public String getDefaultTableName() {
- return this.isSingleTableDescendant() ?
- this.rootEntity.getTable().getName() :
- this.isAbstractTablePerClass() ? null : this.getName();
- }
-
- /**
- * @see #getDefaultTableName()
- */
- public String getDefaultSchema() {
- return this.isSingleTableDescendant() ?
- this.rootEntity.getTable().getSchema() :
- this.isAbstractTablePerClass() ? null : this.getContextDefaultSchema();
- }
-
- /**
- * @see #getDefaultTableName()
- */
- public String getDefaultCatalog() {
- return this.isSingleTableDescendant() ?
- this.rootEntity.getTable().getCatalog() :
- this.isAbstractTablePerClass() ? null : this.getContextDefaultCatalog();
- }
-
-
- // ********** secondary tables **********
-
- public ListIterable<JavaSecondaryTable> getSecondaryTables() {
- return this.getSpecifiedSecondaryTables();
- }
-
- public int getSecondaryTablesSize() {
- return this.getSpecifiedSecondaryTablesSize();
- }
-
-
- // ********** specified secondary tables **********
-
- public ListIterable<JavaSecondaryTable> getSpecifiedSecondaryTables() {
- return this.specifiedSecondaryTableContainer.getContextElements();
- }
-
- public int getSpecifiedSecondaryTablesSize() {
- return this.specifiedSecondaryTableContainer.getContextElementsSize();
- }
-
- public JavaSecondaryTable addSpecifiedSecondaryTable() {
- return this.addSpecifiedSecondaryTable(this.getSpecifiedSecondaryTablesSize());
- }
-
- public JavaSecondaryTable addSpecifiedSecondaryTable(int index) {
- SecondaryTableAnnotation annotation = this.addSecondaryTableAnnotation(index);
- return this.specifiedSecondaryTableContainer.addContextElement(index, annotation);
- }
-
- protected SecondaryTableAnnotation addSecondaryTableAnnotation(int index) {
- return (SecondaryTableAnnotation) this.getJavaResourceType().addAnnotation(index, SecondaryTableAnnotation.ANNOTATION_NAME);
- }
-
- public void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable) {
- this.removeSpecifiedSecondaryTable(this.specifiedSecondaryTableContainer.indexOfContextElement((JavaSecondaryTable) secondaryTable));
- }
-
- public void removeSpecifiedSecondaryTable(int index) {
- this.getJavaResourceType().removeAnnotation(index, SecondaryTableAnnotation.ANNOTATION_NAME);
- this.specifiedSecondaryTableContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex) {
- this.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, SecondaryTableAnnotation.ANNOTATION_NAME);
- this.specifiedSecondaryTableContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected JavaSecondaryTable buildSecondaryTable(SecondaryTableAnnotation secondaryTableAnnotation) {
- return this.getJpaFactory().buildJavaSecondaryTable(this, this.specifiedSecondaryTableOwner, secondaryTableAnnotation);
- }
-
- protected void syncSpecifiedSecondaryTables() {
- this.specifiedSecondaryTableContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<SecondaryTableAnnotation> getSecondaryTableAnnotations() {
- return this.getSecondaryTableAnnotations_();
- }
-
- protected ListIterable<SecondaryTableAnnotation> getSecondaryTableAnnotations_() {
- return new SubListIterableWrapper<NestableAnnotation, SecondaryTableAnnotation>(this.getNestableSecondaryTableAnnotations_());
- }
-
- protected ListIterable<NestableAnnotation> getNestableSecondaryTableAnnotations_() {
- return this.getResourceAnnotatedElement().getAnnotations(SecondaryTableAnnotation.ANNOTATION_NAME);
- }
-
- protected ContextListContainer<JavaSecondaryTable, SecondaryTableAnnotation> buildSpecifiedSecondaryTableContainer() {
- SpecifiedSecondaryTableContainer container = new SpecifiedSecondaryTableContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified secondary table container
- */
- protected class SpecifiedSecondaryTableContainer
- extends ContextListContainer<JavaSecondaryTable, SecondaryTableAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_SECONDARY_TABLES_LIST;
- }
- @Override
- protected JavaSecondaryTable buildContextElement(SecondaryTableAnnotation resourceElement) {
- return AbstractJavaEntity.this.buildSecondaryTable(resourceElement);
- }
- @Override
- protected ListIterable<SecondaryTableAnnotation> getResourceElements() {
- return AbstractJavaEntity.this.getSecondaryTableAnnotations();
- }
- @Override
- protected SecondaryTableAnnotation getResourceElement(JavaSecondaryTable contextElement) {
- return contextElement.getTableAnnotation();
- }
- }
-
- protected Table.Owner buildSpecifiedSecondaryTableOwner() {
- return new SecondaryTableOwner();
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumns() : this.getDefaultPrimaryKeyJoinColumns();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumnsSize() : this.getDefaultPrimaryKeyJoinColumnsSize();
- }
-
-
- // ********** specified primary key join columns **********
-
- public ListIterable<JavaPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedPrimaryKeyJoinColumnsSize() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- protected boolean hasSpecifiedPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumnsSize() != 0;
- }
-
- public JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn() {
- return this.addSpecifiedPrimaryKeyJoinColumn(this.getSpecifiedPrimaryKeyJoinColumnsSize());
- }
-
- public JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
- PrimaryKeyJoinColumnAnnotation annotation = this.addPrimaryKeyJoinColumnAnnotation(index);
- return this.specifiedPrimaryKeyJoinColumnContainer.addContextElement(index, annotation);
- }
-
- protected PrimaryKeyJoinColumnAnnotation addPrimaryKeyJoinColumnAnnotation(int index) {
- return (PrimaryKeyJoinColumnAnnotation) this.getJavaResourceType().addAnnotation(index, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn joinColumn) {
- this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumnContainer.indexOfContextElement((JavaPrimaryKeyJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
- this.getJavaResourceType().removeAnnotation(index, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- this.specifiedPrimaryKeyJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.getJavaResourceType().moveAnnotation(targetIndex, sourceIndex, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- this.specifiedPrimaryKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedPrimaryKeyJoinColumns() {
- this.specifiedPrimaryKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getPrimaryKeyJoinColumnAnnotations() {
- return getPrimaryKeyJoinColumnAnnotations_();
- }
-
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getPrimaryKeyJoinColumnAnnotations_() {
- return new SubListIterableWrapper<NestableAnnotation, PrimaryKeyJoinColumnAnnotation>(this.getNestablePrimaryKeyJoinColumnAnnotations_());
- }
-
- protected ListIterable<NestableAnnotation> getNestablePrimaryKeyJoinColumnAnnotations_() {
- return this.getResourceAnnotatedElement().getAnnotations(PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- protected PrimaryKeyJoinColumnOwner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
- protected JavaPrimaryKeyJoinColumn buildSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumnAnnotation primaryKeyJoinColumnAnnotation) {
- return this.getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, primaryKeyJoinColumnAnnotation);
- }
-
- protected ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> buildSpecifiedPrimaryKeyJoinColumnContainer() {
- SpecifiedPrimaryKeyJoinColumnContainer container = new SpecifiedPrimaryKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified primary key join column container
- */
- protected class SpecifiedPrimaryKeyJoinColumnContainer
- extends ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaPrimaryKeyJoinColumn buildContextElement(PrimaryKeyJoinColumnAnnotation resourceElement) {
- return AbstractJavaEntity.this.buildSpecifiedPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getResourceElements() {
- return AbstractJavaEntity.this.getPrimaryKeyJoinColumnAnnotations();
- }
- @Override
- protected PrimaryKeyJoinColumnAnnotation getResourceElement(JavaPrimaryKeyJoinColumn contextElement) {
- return contextElement.getColumnAnnotation();
- }
- }
-
- // ********** default primary key join column **********
-
- public JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
- return this.defaultPrimaryKeyJoinColumn;
- }
-
- protected void setDefaultPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn pkJoinColumn) {
- JavaPrimaryKeyJoinColumn old = this.defaultPrimaryKeyJoinColumn;
- this.defaultPrimaryKeyJoinColumn = pkJoinColumn;
- this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN_PROPERTY, old, pkJoinColumn);
- }
-
- protected ListIterable<JavaPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- return (this.defaultPrimaryKeyJoinColumn != null) ?
- new SingleElementListIterable<JavaPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn) :
- EmptyListIterable.<JavaPrimaryKeyJoinColumn>instance();
- }
-
- protected int getDefaultPrimaryKeyJoinColumnsSize() {
- return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultPrimaryKeyJoinColumn() {
- if (this.buildsDefaultPrimaryKeyJoinColumn()) {
- if (this.defaultPrimaryKeyJoinColumn == null) {
- this.setDefaultPrimaryKeyJoinColumn(this.buildDefaultPrimaryKeyJoinColumn());
- } else {
- this.defaultPrimaryKeyJoinColumn.update();
- }
- } else {
- this.setDefaultPrimaryKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultPrimaryKeyJoinColumn() {
- return ! this.hasSpecifiedPrimaryKeyJoinColumns();
- }
-
- protected JavaPrimaryKeyJoinColumn buildDefaultPrimaryKeyJoinColumn() {
- return this.buildSpecifiedPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(this.getJavaResourceType()));
- }
-
-
- // ********** inheritance strategy **********
-
- @Override
- public InheritanceType getInheritanceStrategy() {
- return (this.specifiedInheritanceStrategy != null) ? this.specifiedInheritanceStrategy : this.defaultInheritanceStrategy;
- }
-
- public InheritanceType getSpecifiedInheritanceStrategy() {
- return this.specifiedInheritanceStrategy;
- }
-
- public void setSpecifiedInheritanceStrategy(InheritanceType inheritanceType) {
- if (this.valuesAreDifferent(this.specifiedInheritanceStrategy, inheritanceType)) {
- this.getInheritanceAnnotation().setStrategy(InheritanceType.toJavaResourceModel(inheritanceType));
- this.removeInheritanceAnnotationIfUnset();
- this.setSpecifiedInheritanceStrategy_(inheritanceType);
- }
- }
-
- protected void setSpecifiedInheritanceStrategy_(InheritanceType inheritanceType) {
- InheritanceType old = this.specifiedInheritanceStrategy;
- this.specifiedInheritanceStrategy = inheritanceType;
- this.firePropertyChanged(SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, old, inheritanceType);
- }
-
- protected InheritanceType buildSpecifiedInheritanceStrategy() {
- return InheritanceType.fromJavaResourceModel(this.getInheritanceAnnotation().getStrategy());
- }
-
- public InheritanceType getDefaultInheritanceStrategy() {
- return this.defaultInheritanceStrategy;
- }
-
- protected void setDefaultInheritanceStrategy(InheritanceType inheritanceType) {
- InheritanceType old = this.defaultInheritanceStrategy;
- this.defaultInheritanceStrategy = inheritanceType;
- this.firePropertyChanged(DEFAULT_INHERITANCE_STRATEGY_PROPERTY, old, inheritanceType);
- }
-
- protected InheritanceType buildDefaultInheritanceStrategy() {
- return this.isRootEntity() ? InheritanceType.SINGLE_TABLE : this.rootEntity.getInheritanceStrategy();
- }
-
-
- // ********** inheritance annotation **********
-
- protected InheritanceAnnotation getInheritanceAnnotation() {
- return (InheritanceAnnotation) this.getJavaResourceType().getNonNullAnnotation(InheritanceAnnotation.ANNOTATION_NAME);
- }
-
- protected void removeInheritanceAnnotationIfUnset() {
- if (this.getInheritanceAnnotation().isUnset()) {
- this.removeInheritanceAnnotation();
- }
- }
-
- protected void removeInheritanceAnnotation() {
- this.getJavaResourceType().removeAnnotation(InheritanceAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** discriminator value **********
-
- public String getDiscriminatorValue() {
- return (this.specifiedDiscriminatorValue != null) ? this.specifiedDiscriminatorValue : this.defaultDiscriminatorValue;
- }
-
- public String getSpecifiedDiscriminatorValue() {
- return this.specifiedDiscriminatorValue;
- }
-
- public void setSpecifiedDiscriminatorValue(String discriminatorValue) {
- if (this.valuesAreDifferent(this.specifiedDiscriminatorValue, discriminatorValue)) {
- this.getDiscriminatorValueAnnotation().setValue(discriminatorValue);
- this.removeDiscriminatorValueAnnotationIfUnset();
- this.setSpecifiedDiscriminatorValue_(discriminatorValue);
- }
- }
-
- protected void setSpecifiedDiscriminatorValue_(String discriminatorValue) {
- String old = this.specifiedDiscriminatorValue;
- this.specifiedDiscriminatorValue = discriminatorValue;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, old, discriminatorValue);
- }
-
- public String getDefaultDiscriminatorValue() {
- return this.defaultDiscriminatorValue;
- }
-
- protected void setDefaultDiscriminatorValue(String discriminatorValue) {
- String old = this.defaultDiscriminatorValue;
- this.defaultDiscriminatorValue = discriminatorValue;
- this.firePropertyChanged(DEFAULT_DISCRIMINATOR_VALUE_PROPERTY, old, discriminatorValue);
- }
-
- /**
- * From the Spec:
- * If the DiscriminatorValue annotation is not specified, a
- * provider-specific function to generate a value representing
- * the entity type is used for the value of the discriminator
- * column. If the DiscriminatorType is STRING, the discriminator
- * value default is the entity name.
- */
- // TODO extension point for provider-specific function?
- protected String buildDefaultDiscriminatorValue() {
- if (this.discriminatorValueIsUndefined) {
- return null;
- }
- return (this.getDiscriminatorType() == DiscriminatorType.STRING) ? this.getName() : null;
- }
-
- protected DiscriminatorType getDiscriminatorType() {
- return this.discriminatorColumn.getDiscriminatorType();
- }
-
- public boolean specifiedDiscriminatorValueIsAllowed() {
- return this.specifiedDiscriminatorValueIsAllowed;
- }
-
- protected void setSpecifiedDiscriminatorValueIsAllowed(boolean allowed) {
- boolean old = this.specifiedDiscriminatorValueIsAllowed;
- this.specifiedDiscriminatorValueIsAllowed = allowed;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY, old, allowed);
- }
-
- protected boolean buildSpecifiedDiscriminatorValueIsAllowed() {
- return ! this.isTablePerClass() && ! this.isAbstract();
- }
-
- public boolean discriminatorValueIsUndefined() {
- return this.discriminatorValueIsUndefined;
- }
-
- protected void setDiscriminatorValueIsUndefined(boolean undefined) {
- boolean old = this.discriminatorValueIsUndefined;
- this.discriminatorValueIsUndefined = undefined;
- this.firePropertyChanged(DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY, old, undefined);
- }
-
- protected boolean buildDiscriminatorValueIsUndefined() {
- return this.isTablePerClass() ||
- this.isAbstract() ||
- this.isRootNoDescendantsNoStrategyDefined();
- }
-
-
- // ********** discriminator value annotation **********
-
- protected DiscriminatorValueAnnotation getDiscriminatorValueAnnotation() {
- return (DiscriminatorValueAnnotation) this.getJavaResourceType().getNonNullAnnotation(DiscriminatorValueAnnotation.ANNOTATION_NAME);
- }
-
- protected void removeDiscriminatorValueAnnotationIfUnset() {
- if (this.getDiscriminatorValueAnnotation().isUnset()) {
- this.removeDiscriminatorValueAnnotation();
- }
- }
-
- protected void removeDiscriminatorValueAnnotation() {
- this.getJavaResourceType().removeAnnotation(DiscriminatorValueAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** discriminator column **********
-
- public JavaDiscriminatorColumn getDiscriminatorColumn() {
- return this.discriminatorColumn;
- }
-
- protected JavaDiscriminatorColumn buildDiscriminatorColumn() {
- return this.getJpaFactory().buildJavaDiscriminatorColumn(this, this.buildDiscriminatorColumnOwner());
- }
-
- protected JavaDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
- return new DiscriminatorColumnOwner();
- }
-
- public boolean specifiedDiscriminatorColumnIsAllowed() {
- return this.specifiedDiscriminatorColumnIsAllowed;
- }
-
- protected void setSpecifiedDiscriminatorColumnIsAllowed(boolean allowed) {
- boolean old = this.specifiedDiscriminatorColumnIsAllowed;
- this.specifiedDiscriminatorColumnIsAllowed = allowed;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY, old, allowed);
- }
-
- protected boolean buildSpecifiedDiscriminatorColumnIsAllowed() {
- return ! this.isTablePerClass() && this.isRootEntity();
- }
-
- public boolean discriminatorColumnIsUndefined() {
- return this.discriminatorColumnIsUndefined;
- }
-
- protected void setDiscriminatorColumnIsUndefined(boolean undefined) {
- boolean old = this.discriminatorColumnIsUndefined;
- this.discriminatorColumnIsUndefined = undefined;
- this.firePropertyChanged(DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY, old, undefined);
- }
-
- protected boolean buildDiscriminatorColumnIsUndefined() {
- return this.isTablePerClass() ||
- this.isRootNoDescendantsNoStrategyDefined();
- }
-
-
- // ********** attribute override container **********
-
- public JavaAttributeOverrideContainer getAttributeOverrideContainer() {
- return this.attributeOverrideContainer;
- }
-
- protected JavaAttributeOverrideContainer buildAttributeOverrideContainer() {
- return this.getJpaFactory().buildJavaAttributeOverrideContainer(this, new AttributeOverrideContainerOwner());
- }
-
- public TypeMapping getOverridableTypeMapping() {
- PersistentType superPersistentType = this.getPersistentType().getSuperPersistentType();
- return (superPersistentType == null) ? null : superPersistentType.getMapping();
- }
-
-
- // ********** association override container **********
-
- public JavaAssociationOverrideContainer getAssociationOverrideContainer() {
- return this.associationOverrideContainer;
- }
-
- protected JavaAssociationOverrideContainer buildAssociationOverrideContainer() {
- return this.getJpaFactory().buildJavaAssociationOverrideContainer(this, new AssociationOverrideContainerOwner());
- }
-
- @Override
- public Relationship resolveOverriddenRelationship(String attributeName) {
- // check for an override before looking at attribute mappings
- AssociationOverride override = this.associationOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- return (override != null) ? override.getRelationship() : super.resolveOverriddenRelationship(attributeName);
- }
-
-
- // ********** generator container **********
-
- public JavaGeneratorContainer getGeneratorContainer() {
- return this.generatorContainer;
- }
-
- protected JavaGeneratorContainer buildGeneratorContainer() {
- return this.getJpaFactory().buildJavaGeneratorContainer(this);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<Generator> getGenerators() {
- return new CompositeIterable<Generator>(
- super.getGenerators(),
- this.generatorContainer.getGenerators()
- );
- }
-
-
- // ********** generator container parent adapter **********
-
- public JavaJpaContextNode getGeneratorContainerParent() {
- return this; // no adapter
- }
-
- public JavaResourceType getResourceAnnotatedElement() {
- return this.getJavaResourceType();
- }
-
- public boolean parentSupportsGenerators() {
- return true;
- }
-
-
- // ********** query container **********
-
- public JavaQueryContainer getQueryContainer() {
- return this.queryContainer;
- }
-
- protected JavaQueryContainer buildQueryContainer() {
- return this.getJpaFactory().buildJavaQueryContainer(this, this);
- }
-
- public Iterable<Query> getQueries() {
- return this.queryContainer.getQueries();
- }
-
-
- // ********** associated tables **********
-
- @Override
- public Iterable<ReadOnlyTable> getAssociatedTables() {
- return new CompositeIterable<ReadOnlyTable>(this.table, this.getSecondaryTables());
- }
-
-
- @Override
- public Iterable<ReadOnlyTable> getAllAssociatedTables() {
- return new CompositeIterable<ReadOnlyTable>(this.allAssociatedTablesLists());
- }
-
- // TODO eliminate duplicate tables?
- protected Iterable<Iterable<ReadOnlyTable>> allAssociatedTablesLists() {
- return new TransformationIterable<TypeMapping, Iterable<ReadOnlyTable>>(this.getInheritanceHierarchy(), TypeMappingTools.ASSOCIATED_TABLES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllAssociatedTableNames() {
- return this.convertToNames(this.getAllAssociatedTables());
- }
-
- /**
- * strip out <code>null</code> names
- */
- protected Iterable<String> convertToNames(Iterable<ReadOnlyTable> tables) {
- return new FilteringIterable<String>(this.convertToNames_(tables), NotNullFilter.<String>instance());
- }
-
- protected Iterable<String> convertToNames_(Iterable<ReadOnlyTable> tables) {
- return new TransformationIterable<ReadOnlyTable, String>(tables) {
- @Override
- protected String transform(ReadOnlyTable t) {
- return t.getName();
- }
- };
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return ! this.tableNameIsValid(tableName);
- }
-
- protected boolean tableNameIsValid(String tableName) {
- return this.tableIsUndefined || this.tableNameIsValid_(tableName);
- }
-
- protected boolean tableNameIsValid_(String tableName) {
- return this.connectionProfileIsActive() ?
- (this.resolveDbTable(tableName) != null) :
- CollectionTools.contains(this.getAllAssociatedTableNames(), tableName);
- }
-
-
- // ********** database **********
-
- @Override
- public String getPrimaryTableName() {
- return this.table.getName();
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table getPrimaryDbTable() {
- return this.table.getDbTable();
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- // matching database objects and identifiers is database platform-specific
- return this.getDataSource().selectTableForIdentifier(this.getAllAssociatedDbTables(), tableName);
- }
-
- /**
- * strip out null db tables
- */
- protected Iterable<org.eclipse.jpt.jpa.db.Table> getAllAssociatedDbTables() {
- return new FilteringIterable<org.eclipse.jpt.jpa.db.Table>(this.getAllAssociatedDbTables_(), NotNullFilter.<org.eclipse.jpt.jpa.db.Table>instance());
- }
-
- protected Iterable<org.eclipse.jpt.jpa.db.Table> getAllAssociatedDbTables_() {
- return new TransformationIterable<ReadOnlyTable, org.eclipse.jpt.jpa.db.Table>(this.getAllAssociatedTables()) {
- @Override
- protected org.eclipse.jpt.jpa.db.Table transform(ReadOnlyTable entityTable) {
- return entityTable.getDbTable();
- }
- };
- }
-
- @Override
- public Schema getDbSchema() {
- return this.table.getDbSchema();
- }
-
-
- // ********** primary key **********
-
- public String getPrimaryKeyColumnName() {
- return MappingTools.getPrimaryKeyColumnName(this);
- }
-
- public PersistentAttribute getIdAttribute() {
- Iterator<AttributeMapping> idAttributeMappings = this.getAllAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY).iterator();
- if (idAttributeMappings.hasNext()) {
- PersistentAttribute attribute = idAttributeMappings.next().getPersistentAttribute();
- return idAttributeMappings.hasNext() ? null /*more than one*/: attribute;
- }
- return null;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
- public boolean isMapped() {
- return true;
- }
-
- @Override
- public JavaResourceType getJavaResourceType() {
- return super.getJavaResourceType();
- }
-
-
- // ********** attribute mappings **********
-
- @Override
- public Column resolveOverriddenColumn(String attributeName) {
- // check for an override before looking at attribute mappings
- AttributeOverride override = this.attributeOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- return (override != null) ? override.getColumn() : super.resolveOverriddenColumn(attributeName);
- }
-
- @Override
- public Iterable<String> getOverridableAttributeNames() {
- return this.isTablePerClass() ?
- super.getOverridableAttributeNames() :
- EmptyIterable.<String>instance();
- }
-
- @Override
- public Iterable<String> getOverridableAssociationNames() {
- return this.isTablePerClass() ?
- super.getOverridableAssociationNames() :
- EmptyIterable.<String>instance();
- }
-
- public AttributeMapping resolveAttributeMapping(String name) {
- for (AttributeMapping attributeMapping : this.getAllAttributeMappings()) {
- AttributeMapping resolvedMapping = attributeMapping.resolveAttributeMapping(name);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- }
- return null;
- }
-
-
- // ********** inheritance **********
-
- public Entity getParentEntity() {
- for (TypeMapping typeMapping : this.getAncestors()) {
- if (typeMapping instanceof Entity) {
- return (Entity) typeMapping;
- }
- }
- return null;
- }
-
- @Override
- public boolean isRootEntity() {
- return this == this.rootEntity;
- }
-
- /**
- * Return whether the entity is a descendant in (as opposed to the root of)
- * an inheritance hierarchy.
- */
- protected boolean isDescendant() {
- return ! this.isRootEntity();
- }
-
- /**
- * Return whether the entity is a descendant of the root entity
- * of a "single table" inheritance hierarchy.
- */
- protected boolean isSingleTableDescendant() {
- return this.isDescendant() &&
- (this.getInheritanceStrategy() == InheritanceType.SINGLE_TABLE);
- }
-
- /**
- * Return whether the entity is the top of an inheritance hierarchy
- * and has no descendants and no specified inheritance strategy has been defined.
- */
- protected boolean isRootNoDescendantsNoStrategyDefined() {
- return this.isRootEntity() &&
- this.descendants.isEmpty() &&
- (this.specifiedInheritanceStrategy == null);
- }
-
- /**
- * Return whether the entity is abstract and is a part of a
- * "table per class" inheritance hierarchy.
- */
- protected boolean isAbstractTablePerClass() {
- return this.isAbstract() && this.isTablePerClass();
- }
-
- /**
- * Return whether the entity is a part of a "table per class"
- * inheritance hierarchy.
- */
- protected boolean isTablePerClass() {
- return this.getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS;
- }
-
- /**
- * Return whether the entity is a part of a "table per class"
- * inheritance hierarchy.
- */
- protected boolean isTablePerClassDescendant() {
- return this.isTablePerClass() && this.isDescendant();
- }
-
- /**
- * Return whether the type is abstract.
- */
- protected boolean isAbstract() {
- return this.getJavaResourceType().isAbstract();
- }
-
- /**
- * Return whether the entity's type is final.
- */
- protected boolean isFinal() {
- return this.getJavaResourceType().isFinal();
- }
-
- /**
- * Return whether the entity's type is a member of another type.
- */
- protected boolean isMember() {
- return this.getJavaResourceType().isMemberType();
- }
-
- /**
- * Return whether the entity's type is static.
- */
- protected boolean isStatic() {
- return this.getJavaResourceType().isStatic();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.table.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaSecondaryTable secondaryTable : this.getSecondaryTables()) {
- result = secondaryTable.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- result = pkJoinColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- result = this.attributeOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.associationOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.discriminatorColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.generatorContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- this.validatePrimaryKey(messages, reporter, astRoot);
- this.validateTable(messages, reporter, astRoot);
- for (JavaSecondaryTable secondaryTable : this.getSecondaryTables()) {
- secondaryTable.validate(messages, reporter, astRoot);
- }
- this.validateInheritance(messages, reporter, astRoot);
- for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
- }
- this.generatorContainer.validate(messages, reporter, astRoot);
- this.queryContainer.validate(messages, reporter, astRoot);
- this.attributeOverrideContainer.validate(messages, reporter, astRoot);
- this.associationOverrideContainer.validate(messages, reporter, astRoot);
- this.validateEntityName(messages);
- this.idClassReference.validate(messages, reporter, astRoot);
- }
-
- @Override
- public boolean validatesAgainstDatabase() {
- return super.validatesAgainstDatabase() && ! this.isAbstractTablePerClass();
- }
-
- protected void validateEntityName(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.getName())){
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NAME_MISSING,
- new String[] {this.getPersistentType().getName()},
- this,
- this.getMappingAnnotation().getNameTextRange()
- )
- );
- }
- }
-
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new GenericEntityPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
- }
-
- @Override
- protected EntityTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaEntityTextRangeResolver(this, astRoot);
- }
-
- protected void validateTable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.isAbstractTablePerClass()) {
- if (this.table.isSpecifiedInResource()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
- new String[] {this.getName()},
- this,
- this.table.getValidationTextRange(astRoot)
- )
- );
- }
- return;
- }
- if (this.isSingleTableDescendant() && this.getDataSource().connectionProfileIsActive()) {
- if (this.specifiedTableDoesNotMatchRootTable()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE,
- new String[] {this.getName()},
- this,
- this.table.getValidationTextRange(astRoot)
- )
- );
- }
- return;
- }
- this.table.validate(messages, reporter, astRoot);
- }
-
- /**
- * Return whether the entity specifies a table and it is a different table
- * than the root entity's table.
- */
- protected boolean specifiedTableDoesNotMatchRootTable() {
- return this.table.isSpecifiedInResource() &&
- (this.table.getDbTable() != this.getRootEntity().getTable().getDbTable());
- }
-
- protected void validateInheritance(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateInheritanceStrategy(messages, astRoot);
- this.validateDiscriminatorColumn(messages, reporter, astRoot);
- this.validateDiscriminatorValue(messages, astRoot);
- }
-
- protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.specifiedDiscriminatorColumnIsAllowed && ! this.discriminatorColumnIsUndefined) {
- this.discriminatorColumn.validate(messages, reporter, astRoot);
- }
- else if (!this.discriminatorColumn.isVirtual()) {
- if (this.isDescendant()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorColumnTextRange(astRoot)
- )
- );
- }
- else if (this.isTablePerClass()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorColumnTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected void validateDiscriminatorValue(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.discriminatorValueIsUndefined && (this.specifiedDiscriminatorValue != null)) {
- if (this.isAbstract()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorValueTextRange(astRoot)
- )
- );
- }
- else if (this.isTablePerClass()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorValueTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected void validateInheritanceStrategy(List<IMessage> messages, CompilationUnit astRoot) {
- Supported tablePerConcreteClassInheritanceIsSupported = this.getJpaPlatformVariation().getTablePerConcreteClassInheritanceIsSupported();
- if (tablePerConcreteClassInheritanceIsSupported == Supported.YES) {
- return;
- }
- if ((this.getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS) && this.isRootEntity()) {
- if (tablePerConcreteClassInheritanceIsSupported == Supported.NO) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
- new String[] {this.getName()},
- this,
- this.getInheritanceStrategyTextRange(astRoot)
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM,
- new String[] {this.getName()},
- this,
- this.getInheritanceStrategyTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected TextRange getDiscriminatorValueTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getDiscriminatorValueAnnotation().getTextRange(astRoot), astRoot);
- }
-
- protected TextRange getDiscriminatorColumnTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.discriminatorColumn.getValidationTextRange(astRoot), astRoot);
- }
-
- protected TextRange getInheritanceStrategyTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getInheritanceAnnotation().getStrategyTextRange(), astRoot);
- }
-
-
- // ********** OrmOverrideContainer.Owner implementation **********
-
- /**
- * some common behavior
- */
- protected abstract class OverrideContainerOwner
- implements JavaOverrideContainer2_0.Owner
- {
- public JavaResourceMember getResourceMember() {
- return AbstractJavaEntity.this.getJavaResourceType();
- }
-
- public AbstractJavaEntity getTypeMapping() {
- return AbstractJavaEntity.this;
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEntity.this.getValidationTextRange(astRoot);
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractJavaEntity.this.getOverridableTypeMapping();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? this.getAllOverridableNames_(overriddenTypeMapping) : EmptyIterable.<String>instance();
- }
-
- /**
- * pre-condition: <code>typeMapping</code> is not <code>null</code>
- */
- protected abstract Iterable<String> getAllOverridableNames_(TypeMapping overriddenTypeMapping);
-
- public String getDefaultTableName() {
- return AbstractJavaEntity.this.getPrimaryTableName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return AbstractJavaEntity.this.tableNameIsInvalid(tableName);
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return AbstractJavaEntity.this.resolveDbTable(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return AbstractJavaEntity.this.getAllAssociatedTableNames();
- }
-
- public String getPossiblePrefix() {
- return null;
- }
-
- public String getWritePrefix() {
- return null;
- }
-
- // no maps, so all overrides are relevant
- public boolean isRelevant(String overrideName) {
- return true;
- }
-
- }
-
-
- // ********** JavaAttributeOverrideContainer.Owner implementation **********
-
- protected class AttributeOverrideContainerOwner
- extends OverrideContainerOwner
- implements JavaAttributeOverrideContainer2_0.Owner
- {
- @Override
- protected Iterable<String> getAllOverridableNames_(TypeMapping overriddenTypeMapping) {
- return new FilteringIterable<String>(overriddenTypeMapping.getAllOverridableAttributeNames()) {
- @Override
- protected boolean accept(String attributeName) {
- return ! AttributeOverrideContainerOwner.this.getTypeMapping().attributeIsDerivedId(attributeName);
- }
- };
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
- }
- }
-
-
- // ********** JavaAssociationOverrideContainer.Owner implementation **********
-
- protected class AssociationOverrideContainerOwner
- extends OverrideContainerOwner
- implements JavaAssociationOverrideContainer2_0.Owner
- {
- @Override
- protected Iterable<String> getAllOverridableNames_(TypeMapping overriddenTypeMapping) {
- return overriddenTypeMapping.getAllOverridableAssociationNames();
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t, textRangeResolver);
- }
- }
-
-
- // ********** JavaNamedColumn.Owner implementation **********
-
- /**
- * some common behavior
- */
- protected abstract class NamedColumnOwner
- implements JavaReadOnlyNamedColumn.Owner
- {
- public String getDefaultTableName() {
- return AbstractJavaEntity.this.getPrimaryTableName();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return AbstractJavaEntity.this.resolveDbTable(tableName);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEntity.this.getValidationTextRange(astRoot);
- }
- }
-
-
- // ********** JavaBaseJoinColumn.Owner implementation **********
-
- protected class PrimaryKeyJoinColumnOwner
- extends NamedColumnOwner
- implements JavaReadOnlyBaseJoinColumn.Owner
- {
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- Entity parentEntity = AbstractJavaEntity.this.getParentEntity();
- return (parentEntity == null) ? null : parentEntity.getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return AbstractJavaEntity.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- if (this.getJoinColumnsSize() != 1) {
- return null;
- }
- Entity parentEntity = AbstractJavaEntity.this.getParentEntity();
- return (parentEntity == null) ? AbstractJavaEntity.this.getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-
-
- // ********** JavaDiscriminatorColumn.Owner implementation **********
-
- protected class DiscriminatorColumnOwner
- extends NamedColumnOwner
- implements JavaDiscriminatorColumn.Owner
- {
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.isDescendant() ?
- this.getRootDiscriminatorColumn().getName() :
- this.discriminatorColumnIsUndefined() ? null : DiscriminatorColumn.DEFAULT_NAME;
- }
-
- public int getDefaultLength() {
- return this.isDescendant() ?
- this.getRootDiscriminatorColumn().getLength() :
- this.discriminatorColumnIsUndefined() ? 0 : ReadOnlyNamedDiscriminatorColumn.DEFAULT_LENGTH;
- }
-
- public DiscriminatorType getDefaultDiscriminatorType() {
- return this.isDescendant() ?
- this.getRootDiscriminatorColumn().getDiscriminatorType() :
- this.discriminatorColumnIsUndefined() ? null : ReadOnlyNamedDiscriminatorColumn.DEFAULT_DISCRIMINATOR_TYPE;
- }
-
- protected boolean isDescendant() {
- return AbstractJavaEntity.this.isDescendant();
- }
-
- protected DiscriminatorColumn getRootDiscriminatorColumn() {
- return AbstractJavaEntity.this.rootEntity.getDiscriminatorColumn();
- }
-
- protected boolean discriminatorColumnIsUndefined() {
- return AbstractJavaEntity.this.discriminatorColumnIsUndefined;
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new DiscriminatorColumnValidator(column, textRangeResolver);
- }
- }
-
-
- // ********** table owner **********
-
- protected class TableOwner
- implements ReadOnlyTable.Owner
- {
- public JptValidator buildTableValidator(ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new TableValidator(t, textRangeResolver);
- }
- }
-
-
- // ********** secondary table owner **********
-
- protected class SecondaryTableOwner
- implements ReadOnlyTable.Owner
- {
- public JptValidator buildTableValidator(ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new SecondaryTableValidator((ReadOnlySecondaryTable) t, textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
deleted file mode 100644
index c5a43be97f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java sequence or table generator
- */
-public abstract class AbstractJavaGenerator<A extends GeneratorAnnotation>
- extends AbstractJavaJpaContextNode
- implements JavaGenerator
-{
- protected final A generatorAnnotation;
-
- protected String name;
-
- protected Integer specifiedInitialValue;
- protected int defaultInitialValue;
-
- protected Integer specifiedAllocationSize;
- protected int defaultAllocationSize;
-
-
- protected AbstractJavaGenerator(JavaGeneratorContainer parent, A generatorAnnotation) {
- super(parent);
- this.generatorAnnotation = generatorAnnotation;
- this.name = generatorAnnotation.getName();
- this.specifiedInitialValue = generatorAnnotation.getInitialValue();
- this.specifiedAllocationSize = generatorAnnotation.getAllocationSize();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.generatorAnnotation.getName());
- this.setSpecifiedInitialValue_(this.generatorAnnotation.getInitialValue());
- this.setSpecifiedAllocationSize_(this.generatorAnnotation.getAllocationSize());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultInitialValue(this.buildDefaultInitialValue());
- this.setDefaultAllocationSize(this.buildDefaultAllocationSize());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.generatorAnnotation.setName(name);
- this.setName_(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** initial value **********
-
- public int getInitialValue() {
- return (this.specifiedInitialValue != null) ? this.specifiedInitialValue.intValue() : this.defaultInitialValue;
- }
-
- public Integer getSpecifiedInitialValue() {
- return this.specifiedInitialValue;
- }
-
- public void setSpecifiedInitialValue(Integer value) {
- this.generatorAnnotation.setInitialValue(value);
- this.setSpecifiedInitialValue_(value);
- }
-
- protected void setSpecifiedInitialValue_(Integer value) {
- Integer old = this.specifiedInitialValue;
- this.specifiedInitialValue = value;
- this.firePropertyChanged(SPECIFIED_INITIAL_VALUE_PROPERTY, old, value);
- }
-
- public int getDefaultInitialValue() {
- return this.defaultInitialValue;
- }
-
- protected void setDefaultInitialValue(int value) {
- int old = this.defaultInitialValue;
- this.defaultInitialValue = value;
- this.firePropertyChanged(DEFAULT_INITIAL_VALUE_PROPERTY, old, value);
- }
-
- protected abstract int buildDefaultInitialValue();
-
-
- // ********** allocation size **********
-
- public int getAllocationSize() {
- return (this.specifiedAllocationSize != null) ? this.specifiedAllocationSize.intValue() : this.defaultAllocationSize;
- }
-
- public Integer getSpecifiedAllocationSize() {
- return this.specifiedAllocationSize;
- }
-
- public void setSpecifiedAllocationSize(Integer size) {
- this.generatorAnnotation.setAllocationSize(size);
- this.setSpecifiedAllocationSize_(size);
- }
-
- protected void setSpecifiedAllocationSize_(Integer size) {
- Integer old = this.specifiedAllocationSize;
- this.specifiedAllocationSize = size;
- this.firePropertyChanged(SPECIFIED_ALLOCATION_SIZE_PROPERTY, old, size);
- }
-
- public int getDefaultAllocationSize() {
- return this.defaultAllocationSize;
- }
-
- protected void setDefaultAllocationSize(int size) {
- int old = this.defaultAllocationSize;
- this.defaultAllocationSize = size;
- this.firePropertyChanged(DEFAULT_ALLOCATION_SIZE_PROPERTY, old, size);
- }
-
- protected int buildDefaultAllocationSize() {
- return DEFAULT_ALLOCATION_SIZE;
- }
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- if (StringTools.stringIsEmpty(this.name)){
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.GENERATOR_NAME_UNDEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getNameTextRange(astRoot)
- )
- );
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.generatorAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.generatorAnnotation.getNameTextRange(), astRoot);
- }
-
-
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return (this != node) &&
- (this.getType() == node.getType()) &&
- this.isEquivalentTo((Generator)node);
- }
-
- protected boolean isEquivalentTo(Generator generator) {
- return Tools.valuesAreEqual(this.name, generator.getName()) &&
- Tools.valuesAreEqual(this.specifiedAllocationSize, generator.getSpecifiedAllocationSize()) &&
- Tools.valuesAreEqual(this.specifiedInitialValue, generator.getSpecifiedInitialValue());
- }
-
- // ********** database stuff **********
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- protected abstract String getSchema();
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- protected abstract String getCatalog();
-
-
- // ********** misc **********
-
- @Override
- public JavaGeneratorContainer getParent() {
- return (JavaGeneratorContainer) super.getParent();
- }
-
- public A getGeneratorAnnotation() {
- return this.generatorAnnotation;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
deleted file mode 100644
index 7f3ae83366..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
+++ /dev/null
@@ -1,494 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.Association;
-import org.eclipse.jpt.common.utility.internal.SimpleAssociation;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratedValue;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.IdMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java ID mapping
- */
-public abstract class AbstractJavaIdMapping
- extends AbstractJavaAttributeMapping<IdAnnotation>
- implements JavaIdMapping, IdMapping2_0
-{
- protected final JavaColumn column;
-
- protected final JavaGeneratorContainer generatorContainer;
-
- protected JavaGeneratedValue generatedValue;
-
- protected JavaConverter converter; // never null
-
- /* JPA 2.0 - the embedded id may be derived from a relationship */
- protected boolean derived;
-
-
- protected static final JavaConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new JavaConverter.Adapter[] {
- JavaTemporalConverter.BasicAdapter.instance(),
- };
- protected static final Iterable<JavaConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<JavaConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractJavaIdMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.column = this.buildColumn();
- this.generatorContainer = this.buildGeneratorContainer();
- this.generatedValue = this.buildGeneratedValue();
- this.converter = this.buildConverter();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- this.generatorContainer.synchronizeWithResourceModel();
- this.syncGeneratedValue();
- this.syncConverter();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- this.generatorContainer.update();
- if (this.generatedValue != null) {
- this.generatedValue.update();
- }
- this.converter.update();
- this.setDerived(this.buildDerived());
- }
-
-
- // ********** column **********
-
- public JavaColumn getColumn() {
- return this.column;
- }
-
- protected JavaColumn buildColumn() {
- return this.getJpaFactory().buildJavaColumn(this, this);
- }
-
-
- // ********** generator container **********
-
- public JavaGeneratorContainer getGeneratorContainer() {
- return this.generatorContainer;
- }
-
- protected JavaGeneratorContainer buildGeneratorContainer() {
- return this.getJpaFactory().buildJavaGeneratorContainer(this);
- }
-
- @Override
- public Iterable<Generator> getGenerators() {
- return this.generatorContainer.getGenerators();
- }
-
-
- // ********** generator container parent adapter **********
-
- public JavaJpaContextNode getGeneratorContainerParent() {
- return this; // no adapter
- }
-
- public JavaResourceMember getResourceAnnotatedElement() {
- return this.getResourceAttribute();
- }
-
- public boolean parentSupportsGenerators() {
- return ! this.getPersistentAttribute().isVirtual();
- }
-
-
- // ********** generated value **********
-
- public JavaGeneratedValue getGeneratedValue() {
- return this.generatedValue;
- }
-
- public JavaGeneratedValue addGeneratedValue() {
- if (this.generatedValue != null) {
- throw new IllegalStateException("generated value already exists: " + this.generatedValue); //$NON-NLS-1$
- }
- GeneratedValueAnnotation annotation = this.buildGeneratedValueAnnotation();
- JavaGeneratedValue value = this.buildGeneratedValue(annotation);
- this.setGeneratedValue(value);
- return value;
- }
-
- protected GeneratedValueAnnotation buildGeneratedValueAnnotation() {
- return (GeneratedValueAnnotation) this.getResourceAttribute().addAnnotation(GeneratedValueAnnotation.ANNOTATION_NAME);
- }
-
- public void removeGeneratedValue() {
- if (this.generatedValue == null) {
- throw new IllegalStateException("generated value does not exist"); //$NON-NLS-1$
- }
- this.getResourceAttribute().removeAnnotation(GeneratedValueAnnotation.ANNOTATION_NAME);
- this.setGeneratedValue(null);
- }
-
- protected JavaGeneratedValue buildGeneratedValue() {
- GeneratedValueAnnotation annotation = this.getGeneratedValueAnnotation();
- return (annotation == null) ? null : this.buildGeneratedValue(annotation);
- }
-
- protected GeneratedValueAnnotation getGeneratedValueAnnotation() {
- return (GeneratedValueAnnotation) this.getResourceAttribute().getAnnotation(GeneratedValueAnnotation.ANNOTATION_NAME);
- }
-
- protected JavaGeneratedValue buildGeneratedValue(GeneratedValueAnnotation generatedValueAnnotation) {
- return this.getJpaFactory().buildJavaGeneratedValue(this, generatedValueAnnotation);
- }
-
- protected void syncGeneratedValue() {
- GeneratedValueAnnotation annotation = this.getGeneratedValueAnnotation();
- if (annotation == null) {
- if (this.generatedValue != null) {
- this.setGeneratedValue(null);
- }
- }
- else {
- if ((this.generatedValue != null) && (this.generatedValue.getGeneratedValueAnnotation() == annotation)) {
- this.generatedValue.synchronizeWithResourceModel();
- } else {
- this.setGeneratedValue(this.buildGeneratedValue(annotation));
- }
- }
- }
-
- protected void setGeneratedValue(JavaGeneratedValue value) {
- JavaGeneratedValue old = this.generatedValue;
- this.generatedValue = value;
- this.firePropertyChanged(GENERATED_VALUE_PROPERTY, old, value);
- }
-
-
- // ********** converter **********
-
- public JavaConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- this.converter.dispose();
- JavaConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.retainConverterAnnotation(converterAdapter);
- this.setConverter_(this.buildConverter(converterAdapter));
- }
- }
-
- protected JavaConverter buildConverter(JavaConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getJpaFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(JavaConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- /**
- * Clear all the converter annotations <em>except</em> for the annotation
- * corresponding to the specified adapter. If the specified adapter is
- * <code>null</code>, remove <em>all</em> the converter annotations.
- */
- protected void retainConverterAnnotation(JavaConverter.Adapter converterAdapter) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter != converterAdapter) {
- adapter.removeConverterAnnotation(resourceAttribute);
- }
- }
- }
-
- protected JavaConverter buildConverter() {
- JpaFactory jpaFactory = this.getJpaFactory();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- JavaConverter javaConverter = adapter.buildConverter(this, jpaFactory);
- if (javaConverter != null) {
- return javaConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- Association<JavaConverter.Adapter, Annotation> assoc = this.getConverterAnnotation();
- if (assoc == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- JavaConverter.Adapter adapter = assoc.getKey();
- Annotation annotation = assoc.getValue();
- if ((this.converter.getType() == adapter.getConverterType()) &&
- (this.converter.getConverterAnnotation() == annotation)) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildConverter(annotation, this, this.getJpaFactory()));
- }
- }
- }
-
- /**
- * Return the first converter annotation we find along with its corresponding
- * adapter. Return <code>null</code> if there are no converter annotations.
- */
- protected Association<JavaConverter.Adapter, Annotation> getConverterAnnotation() {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- Annotation annotation = adapter.getConverterAnnotation(resourceAttribute);
- if (annotation != null) {
- return new SimpleAssociation<JavaConverter.Adapter, Annotation>(adapter, annotation);
- }
- }
- return null;
- }
-
- protected JavaConverter buildNullConverter() {
- return new NullJavaConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected JavaConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<JavaConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** derived **********
-
- public boolean isDerived() {
- return this.derived;
- }
-
- protected void setDerived(boolean derived) {
- boolean old = this.derived;
- this.derived = derived;
- this.firePropertyChanged(DERIVED_PROPERTY, old, derived);
- }
-
- protected boolean buildDerived() {
- return this.isJpa2_0Compatible() && this.buildDerived_();
- }
-
- protected boolean buildDerived_() {
- return this.getTypeMapping().attributeIsDerivedId(this.getName());
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return IdAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- public String getPrimaryKeyColumnName() {
- return this.column.getName();
- }
-
- protected boolean columnIsSpecified() {
- return this.getResourceAttribute().getAnnotation(ColumnAnnotation.ANNOTATION_NAME) != null;
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
-
- // ********** JavaColumn.Owner implementation **********
-
- public ColumnAnnotation getColumnAnnotation() {
- return (ColumnAnnotation) this.getResourceAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public void removeColumnAnnotation() {
- this.getResourceAttribute().removeAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn col) {
- return (this.derived && ! this.columnIsSpecified()) ? null : this.getName();
- }
-
- public String getDefaultTableName() {
- return (this.derived && ! this.columnIsSpecified()) ? null : this.getTypeMapping().getPrimaryTableName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.generatorContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- if (this.generatedValue != null) {
- result = this.generatedValue.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
-
- result = this.converter.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- // JPA 2.0: If the column is specified or if the ID is not mapped by a relationship,
- // the column is validated.
- // JPA 1.0: The column is always be validated, since the ID is never mapped by a
- // relationship.
- if (this.columnIsSpecified() || ! this.derived) {
- this.column.validate(messages, reporter, astRoot);
- }
-
- // JPA 2.0: If the column is specified and the ID is mapped by a relationship,
- // we have an error.
- // JPA 1.0: The ID cannot be mapped by a relationship.
- if (this.columnIsSpecified() && this.derived) {
- messages.add(this.buildColumnSpecifiedAndDerivedMessage(astRoot));
- }
-
- this.generatorContainer.validate(messages, reporter, astRoot);
- if (this.generatedValue != null) {
- this.generatedValue.validate(messages, reporter, astRoot);
- }
- this.converter.validate(messages, reporter, astRoot);
- }
-
- protected IMessage buildColumnSpecifiedAndDerivedMessage(CompilationUnit astRoot) {
- return this.buildMessage(
- JpaValidationMessages.ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED,
- EMPTY_STRING_ARRAY,
- this.column.getValidationTextRange(astRoot)
- );
- }
-
- protected IMessage buildMessage(String msgID, String[] parms, TextRange textRange) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- ArrayTools.add(parms, 0, this.buildAttributeDescription()),
- this,
- textRange
- );
- }
-
- protected String buildAttributeDescription() {
- return NLS.bind(this.getAttributeDescriptionTemplate(), this.getPersistentAttribute().getName());
- }
-
- protected String getAttributeDescriptionTemplate() {
- return this.getPersistentAttribute().isVirtual() ?
- JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC :
- JpaValidationDescriptionMessages.ATTRIBUTE_DESC;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 707fc994e2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractJavaJoinColumnRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaJoinColumnRelationshipStrategy
-{
- protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected JavaJoinColumn defaultJoinColumn;
-
-
- protected AbstractJavaJoinColumnRelationshipStrategy(JavaJoinColumnRelationship parent) {
- super(parent);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedJoinColumns());
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<JavaJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<JavaJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public JavaJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- public JavaJoinColumn addSpecifiedJoinColumn() {
- return this.addSpecifiedJoinColumn(this.getSpecifiedJoinColumnsSize());
- }
-
- public JavaJoinColumn addSpecifiedJoinColumn(int index) {
- JoinColumnAnnotation annotation = this.addJoinColumnAnnotation(index);
- return this.specifiedJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedJoinColumn(this.specifiedJoinColumnContainer.indexOfContextElement((JavaJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedJoinColumn(int index) {
- this.removeJoinColumnAnnotation(index);
- this.specifiedJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
- this.moveJoinColumnAnnotation(targetIndex, sourceIndex);
- this.specifiedJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> buildSpecifiedJoinColumnContainer() {
- SpecifiedJoinColumnContainer container = new SpecifiedJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<JavaJoinColumn, JoinColumnAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaJoinColumn buildContextElement(JoinColumnAnnotation resourceElement) {
- return AbstractJavaJoinColumnRelationshipStrategy.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<JoinColumnAnnotation> getResourceElements() {
- return AbstractJavaJoinColumnRelationshipStrategy.this.getJoinColumnAnnotations();
- }
- @Override
- protected JoinColumnAnnotation getResourceElement(JavaJoinColumn contextElement) {
- return (JoinColumnAnnotation) contextElement.getColumnAnnotation();
- }
- }
-
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
-
-
- // ********** default join column **********
-
- public JavaJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(JavaJoinColumn joinColumn) {
- JavaJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<JavaJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<JavaJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- if (this.buildsDefaultJoinColumn()) {
- if (this.defaultJoinColumn == null) {
- this.setDefaultJoinColumn(this.buildJoinColumn(this.buildNullJoinColumnAnnotation()));
- } else {
- this.defaultJoinColumn.update();
- }
- } else {
- this.setDefaultJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultJoinColumn() {
- return ! this.hasSpecifiedJoinColumns() &&
- this.getRelationship().mayHaveDefaultJoinColumn();
- }
-
-
- // ********** join column annotations **********
-
- protected abstract ListIterable<JoinColumnAnnotation> getJoinColumnAnnotations();
-
- protected abstract JoinColumnAnnotation addJoinColumnAnnotation(int index);
-
- protected abstract void removeJoinColumnAnnotation(int index);
-
- protected abstract void moveJoinColumnAnnotation(int targetIndex, int sourceIndex);
-
- protected abstract JoinColumnAnnotation buildNullJoinColumnAnnotation();
-
-
- // ********** misc **********
-
- @Override
- public JavaJoinColumnRelationship getParent() {
- return (JavaJoinColumnRelationship) super.getParent();
- }
-
- public JavaJoinColumnRelationship getRelationship() {
- return this.getParent();
- }
-
- protected JavaJoinColumn buildJoinColumn(JoinColumnAnnotation joinColumnAnnotation) {
- return this.getJpaFactory().buildJavaJoinColumn(this, this.joinColumnOwner, joinColumnAnnotation);
- }
-
- public void initializeFrom(ReadOnlyJoinColumnRelationshipStrategy oldStrategy) {
- for (ReadOnlyJoinColumn joinColumn : oldStrategy.getSpecifiedJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFrom(joinColumn);
- }
- }
-
- public void initializeFromVirtual(ReadOnlyJoinColumnRelationshipStrategy virtualStrategy) {
- for (ReadOnlyJoinColumn joinColumn : virtualStrategy.getJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFromVirtual(joinColumn);
- }
- }
-
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public String getTableName() {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping == null) ? null : typeMapping.getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping == null) ? null : typeMapping.resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping != null) && typeMapping.tableNameIsInvalid(tableName);
- }
-
- // subclasses like this to be public
- public Table getReferencedColumnDbTable() {
- TypeMapping relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- protected Iterable<String> getCandidateTableNames() {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping != null) ? typeMapping.getAllAssociatedTableNames() : EmptyIterable.<String>instance();
- }
-
- public void addStrategy() {
- if (this.getSpecifiedJoinColumnsSize() == 0) {
- this.addSpecifiedJoinColumn();
- }
- }
-
- public void removeStrategy() {
- for (int i = this.getSpecifiedJoinColumnsSize(); i-- > 0; ) {
- this.removeSpecifiedJoinColumn(i);
- }
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaJoinColumn joinColumn : this.getJoinColumns()) {
- result = joinColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- for (JavaJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
deleted file mode 100644
index 2b5f2622d9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractJavaJoinTableRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaJoinTableRelationshipStrategy, ReadOnlyTable.Owner
-{
- protected JavaJoinTable joinTable;
-
-
- protected AbstractJavaJoinTableRelationshipStrategy(JavaJoinTableRelationship parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- if (this.joinTable != null) {
- this.joinTable.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJoinTable();
- }
-
-
- // ********** join table **********
-
- public JavaJoinTable getJoinTable() {
- return this.joinTable;
- }
-
- protected void setJoinTable(JavaJoinTable joinTable) {
- JavaJoinTable old = this.joinTable;
- this.joinTable = joinTable;
- this.firePropertyChanged(JOIN_TABLE_PROPERTY, old, joinTable);
- }
-
- protected void updateJoinTable() {
- if (this.buildsJoinTable()) {
- if (this.joinTable == null) {
- this.setJoinTable(this.buildJoinTable());
- } else {
- this.joinTable.update();
- }
- } else {
- if (this.joinTable != null) {
- this.setJoinTable(null);
- }
- }
- }
-
- /**
- * The strategy can have a join table if either the table annotation is present
- * or the [mapping] relationship supports a default join table.
- */
- protected boolean buildsJoinTable() {
- return this.getJoinTableAnnotation().isSpecified()
- || this.getRelationship().mayHaveDefaultJoinTable();
- }
-
- protected JavaJoinTable buildJoinTable() {
- return this.getJpaFactory().buildJavaJoinTable(this, this);
- }
-
-
- // ********** join table annotation **********
-
- protected abstract JoinTableAnnotation addJoinTableAnnotation();
-
- protected abstract void removeJoinTableAnnotation();
-
-
- // ********** misc **********
-
- @Override
- public JavaJoinTableRelationship getParent() {
- return (JavaJoinTableRelationship) super.getParent();
- }
-
- public JavaJoinTableRelationship getRelationship() {
- return this.getParent();
- }
-
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public void initializeFrom(ReadOnlyJoinTableRelationshipStrategy oldStrategy) {
- ReadOnlyJoinTable oldJoinTable = oldStrategy.getJoinTable();
- if (oldJoinTable != null) {
- this.addStrategy();
- this.joinTable.initializeFrom(oldJoinTable);
- }
- }
-
- public void initializeFromVirtual(ReadOnlyJoinTableRelationshipStrategy virtualStrategy) {
- ReadOnlyJoinTable oldJoinTable = virtualStrategy.getJoinTable();
- if (oldJoinTable != null) {
- this.addStrategy();
- this.joinTable.initializeFromVirtual(oldJoinTable);
- }
- }
-
- public String getTableName() {
- return (this.joinTable == null) ? null : this.joinTable.getName();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return (this.joinTable == null) ? null : this.joinTable.getDbTable();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getTableName(), tableName);
- }
-
- public String getColumnTableNotValidDescription() {
- return JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE;
- }
-
- public String getJoinTableDefaultName() {
- return MappingTools.buildJoinTableDefaultName(this.getRelationship());
- }
-
- public void addStrategy() {
- if (this.joinTable == null) {
- this.addJoinTableAnnotation();
- this.setJoinTable(this.buildJoinTable());
- }
- }
-
- public void removeStrategy() {
- if (this.joinTable != null) {
- this.removeJoinTableAnnotation();
- this.setJoinTable(null);
- }
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.joinTable != null) {
- result = this.joinTable.getJavaCompletionProposals(pos, filter, astRoot);
- }
- return result;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter, astRoot);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
deleted file mode 100644
index 965f34f8f2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractJavaJpaContextNode
- extends AbstractJpaContextNode
- implements JavaJpaContextNode
-{
- protected AbstractJavaJpaContextNode(JpaContextNode parent) {
- super(parent);
- }
-
- @Override
- public JptResourceType getResourceType() {
- return JptCommonCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
- }
-
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- if (this.connectionProfileIsActive()) {
- Iterable<String> result = this.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * This method is called if the database is connected, allowing us to
- * get candidates from the various database tables etc.
- * This method should <em>not</em> be cascaded to "child" objects; it should
- * only return candidates for the current object. The cascading is
- * handled by {@link #getJavaCompletionProposals(int, Filter, CompilationUnit)}.
- */
- @SuppressWarnings("unused")
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- return null;
- }
-
- // ********** validation **********
-
- /**
- * All subclass implementations
- * should be preceded by a "super" call to this method.
- */
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
-
- /**
- * Validate the specified node if it is not <code>null</code>.
- */
- protected void validateNode(JavaJpaContextNode node, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (node != null) {
- node.validate(messages, reporter, astRoot);
- }
- }
-
- /**
- * Validate the specified nodes.
- */
- protected void validateNodes(Iterable<? extends JavaJpaContextNode> nodes, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- for (JavaJpaContextNode node : nodes) {
- node.validate(messages, reporter, astRoot);
- }
- }
-
- /**
- * Return the specified text range if it is not <code>null</code>; if it is
- * <code>null</code>, return the node's validation text range.
- */
- protected TextRange getValidationTextRange(TextRange textRange, CompilationUnit astRoot) {
- return (textRange != null) ? textRange : this.getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToManyMapping.java
deleted file mode 100644
index 22c5d8c9e3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToManyMapping.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToManyMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation;
-
-public abstract class AbstractJavaManyToManyMapping
- extends AbstractJavaMultiRelationshipMapping<ManyToManyAnnotation>
- implements JavaManyToManyMapping2_0
-{
- protected AbstractJavaManyToManyMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-
-
- // ********** relationship **********
-
- @Override
- public JavaManyToManyRelationship getRelationship() {
- return (JavaManyToManyRelationship) super.getRelationship();
- }
-
- @Override
- protected JavaMappingRelationship buildRelationship() {
- return new GenericJavaManyToManyRelationship(this);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return ManyToManyAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToOneMapping.java
deleted file mode 100644
index 42a93b9b37..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaManyToOneMapping.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToOneRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToOneMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation;
-
-public abstract class AbstractJavaManyToOneMapping
- extends AbstractJavaSingleRelationshipMapping<ManyToOneAnnotation>
- implements JavaManyToOneMapping2_0
-{
- protected AbstractJavaManyToOneMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-
-
- // ********** relationship **********
-
- @Override
- public JavaManyToOneRelationship getRelationship() {
- return (JavaManyToOneRelationship) super.getRelationship();
- }
-
- @Override
- protected JavaManyToOneRelationship buildRelationship() {
- return new GenericJavaManyToOneRelationship(this);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return ManyToOneAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
deleted file mode 100644
index ebf34ebef6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java mapped superclass
- */
-public abstract class AbstractJavaMappedSuperclass
- extends AbstractJavaTypeMapping<MappedSuperclassAnnotation>
- implements JavaMappedSuperclass, JavaQueryContainer.Owner
-{
- protected final JavaIdClassReference idClassReference;
- protected final JavaQueryContainer queryContainer;
-
-
- protected AbstractJavaMappedSuperclass(JavaPersistentType parent, MappedSuperclassAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- this.idClassReference = this.buildIdClassReference();
- this.queryContainer = this.buildQueryContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.idClassReference.synchronizeWithResourceModel();
- this.queryContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.idClassReference.update();
- this.queryContainer.update();
- }
-
-
- // ********** id class **********
-
- public JavaIdClassReference getIdClassReference() {
- return this.idClassReference;
- }
-
- protected JavaIdClassReference buildIdClassReference() {
- return new GenericJavaIdClassReference(this);
- }
-
- public JavaPersistentType getIdClass() {
- return this.idClassReference.getIdClass();
- }
-
-
- // ********** query container **********
-
- public JavaQueryContainer getQueryContainer() {
- return this.queryContainer;
- }
-
- protected JavaQueryContainer buildQueryContainer() {
- return this.getJpaFactory().buildJavaQueryContainer(this, this);
- }
-
- public JavaResourceMember getResourceAnnotatedElement() {
- return this.getJavaResourceType();
- }
-
- public Iterable<Query> getQueries() {
- return this.queryContainer.getQueries();
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
- public boolean isMapped() {
- return true;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validatePrimaryKey(messages, reporter, astRoot);
- this.idClassReference.validate(messages, reporter, astRoot);
- this.queryContainer.validate(messages, reporter, astRoot);
- }
-
- @Override
- public boolean validatesAgainstDatabase() {
- return false;
- }
-
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new GenericMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
- // TODO - JPA 2.0 validation
- }
-
- @Override
- protected PrimaryKeyTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaMappedSuperclassTextRangeResolver(this, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
deleted file mode 100644
index 629387495a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingRelationshipStrategy2_0;
-
-/**
- * <strong>NB:</strong> Subclasses may want to set the {@link #strategy} at the
- * end of their constructors; otherwise, it will be <code>null</code> until it
- * is set during {@link #update()}.
- */
-public abstract class AbstractJavaMappingRelationship<M extends JavaRelationshipMapping>
- extends AbstractJavaJpaContextNode
- implements JavaMappingRelationship
-{
- protected JavaMappingRelationshipStrategy2_0 strategy;
-
-
- public AbstractJavaMappingRelationship(M parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateStrategy();
- }
-
-
- // ********** strategy **********
-
- public JavaMappingRelationshipStrategy2_0 getStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(JavaMappingRelationshipStrategy2_0 strategy) {
- RelationshipStrategy old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- protected abstract JavaMappingRelationshipStrategy2_0 buildStrategy();
-
- /**
- * This is called by subclasses when the various supported strategies are
- * added or removed; allowing the strategy to be set synchronously. (?)
- */
- protected void updateStrategy() {
- this.setStrategy(this.buildStrategy());
- }
-
-
- // ********** conversions **********
-
- public void initializeFrom(ReadOnlyRelationship oldRelationship) {
- oldRelationship.initializeOn(this);
- }
-
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- // NOP
- }
-
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- // NOP
- }
-
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- // NOP
- }
-
-
- // ********** misc **********
-
- @Override
- @SuppressWarnings("unchecked")
- public M getParent() {
- return (M) super.getParent();
- }
-
- public JavaRelationshipMapping getMapping() {
- return this.getParent();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getMapping().getTypeMapping();
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public boolean isOverridable() {
- return this.strategy.isOverridable();
- }
-
- public boolean isVirtual() {
- return this.getMapping().getPersistentAttribute().isVirtual();
- }
-
- public boolean isTargetForeignKey() {
- return false;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getMapping().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
deleted file mode 100644
index 270fd3cc60..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
+++ /dev/null
@@ -1,1288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.Association;
-import org.eclipse.jpt.common.utility.internal.SimpleAssociation;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubListIterableWrapper;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaMultiRelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.RelationshipStrategyTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.MapKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.NullJavaMapKeyColumn2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.NullMapKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAttributeOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapKeyEnumeratedConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapKeyTemporalConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java multi-relationship (m:m, 1:m) mapping
- */
-public abstract class AbstractJavaMultiRelationshipMapping<A extends RelationshipMappingAnnotation>
- extends AbstractJavaRelationshipMapping<A>
- implements JavaMultiRelationshipMapping, JavaCollectionMapping2_0
-{
- protected final JavaOrderable orderable;
-
- protected String specifiedMapKey;
- protected boolean noMapKey = false;
- protected boolean pkMapKey = false;
- protected boolean customMapKey = false;
-
- protected String specifiedMapKeyClass;
- protected String defaultMapKeyClass;
- protected String fullyQualifiedMapKeyClass;
-
- protected Type valueType;
- protected Type keyType;
-
- protected final JavaColumn mapKeyColumn;
- protected JavaConverter mapKeyConverter; // map key converter - never null
-
- protected final ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> specifiedMapKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
-
- protected JavaJoinColumn defaultMapKeyJoinColumn;
-
- protected final JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer;
-
- protected static final JavaConverter.Adapter[] MAP_KEY_CONVERTER_ADAPTER_ARRAY = new JavaConverter.Adapter[] {
- JavaMapKeyEnumeratedConverter2_0.Adapter.instance(),
- JavaMapKeyTemporalConverter2_0.Adapter.instance()
- };
- protected static final Iterable<JavaConverter.Adapter> MAP_KEY_CONVERTER_ADAPTERS = new ArrayIterable<JavaConverter.Adapter>(MAP_KEY_CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractJavaMultiRelationshipMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.orderable = this.buildOrderable();
-
- this.specifiedMapKey = this.buildSpecifiedMapKey();
- this.noMapKey = this.buildNoMapKey();
- this.pkMapKey = this.buildPkMapKey();
- this.customMapKey = this.buildCustomMapKey();
-
- this.specifiedMapKeyClass = this.buildSpecifiedMapKeyClass();
-
- this.mapKeyColumn = this.buildMapKeyColumn();
- this.mapKeyConverter = this.buildMapKeyConverter();
- this.mapKeyJoinColumnOwner = this.buildMapKeyJoinColumnOwner();
- this.specifiedMapKeyJoinColumnContainer = this.buildSpecifiedMapKeyJoinColumnContainer();
- this.mapKeyAttributeOverrideContainer = this.buildMapKeyAttributeOverrideContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.orderable.synchronizeWithResourceModel();
-
- this.setSpecifiedMapKey_(this.buildSpecifiedMapKey());
- this.setNoMapKey_(this.buildNoMapKey());
- this.setPkMapKey_(this.buildPkMapKey());
- this.setCustomMapKey_(this.buildCustomMapKey());
-
- this.setSpecifiedMapKeyClass_(this.buildSpecifiedMapKeyClass());
-
- this.mapKeyColumn.synchronizeWithResourceModel();
- this.syncMapKeyConverter();
- this.syncSpecifiedMapKeyJoinColumns();
-
- this.mapKeyAttributeOverrideContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
-
- this.orderable.update();
-
- this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
- this.setFullyQualifiedMapKeyClass(this.buildFullyQualifiedMapKeyClass());
-
- this.setValueType(this.buildValueType());
- this.setKeyType(this.buildKeyType());
-
- this.mapKeyColumn.update();
- this.mapKeyConverter.update();
- this.updateNodes(this.getSpecifiedMapKeyJoinColumns());
- this.updateDefaultMapKeyJoinColumn();
-
- this.mapKeyAttributeOverrideContainer.update();
- }
-
-
- // ********** orderable **********
-
- public JavaOrderable getOrderable() {
- return this.orderable;
- }
-
- protected JavaOrderable buildOrderable() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaOrderable(this, this.buildOrderableOwner()) :
- this.getJpaFactory().buildJavaOrderable(this);
- }
-
- protected Orderable2_0.Owner buildOrderableOwner() {
- return new OrderableOwner();
- }
-
- protected class OrderableOwner
- implements Orderable2_0.Owner
- {
- public String getTableName() {
- return this.getRelationshipStrategy().getTableName();
- }
- public Table resolveDbTable(String tableName) {
- return this.getRelationshipStrategy().resolveDbTable(tableName);
- }
- protected JavaRelationshipStrategy getRelationshipStrategy() {
- return AbstractJavaMultiRelationshipMapping.this.getRelationship().getStrategy();
- }
- }
-
-
- // ********** map key **********
-
- public String getMapKey() {
- if (this.noMapKey) {
- return null;
- }
- if (this.pkMapKey) {
- return this.getTargetEntityIdAttributeName();
- }
- if (this.customMapKey) {
- return this.specifiedMapKey;
- }
- throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
- }
-
-
- // ********** specified map key **********
-
- public String getSpecifiedMapKey() {
- return this.specifiedMapKey;
- }
-
- public void setSpecifiedMapKey(String mapKey) {
- if (mapKey != null) {
- this.getMapKeyAnnotationForUpdate().setName(mapKey);
-
- this.setSpecifiedMapKey_(mapKey);
- this.setNoMapKey_(false);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(true);
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setSpecifiedMapKey_(String mapKey) {
- String old = this.specifiedMapKey;
- this.specifiedMapKey = mapKey;
- this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
- }
-
- protected String buildSpecifiedMapKey() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation == null) ? null : mapKeyAnnotation.getName();
- }
-
-
- // ********** no map key **********
-
- public boolean isNoMapKey() {
- return this.noMapKey;
- }
-
- public void setNoMapKey(boolean noMapKey) {
- if (noMapKey) {
- if (this.getMapKeyAnnotation() != null) {
- this.removeMapKeyAnnotation();
- }
-
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(true);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(false);
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setNoMapKey_(boolean noMapKey) {
- boolean old = this.noMapKey;
- this.noMapKey = noMapKey;
- this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);
- }
-
- protected boolean buildNoMapKey() {
- return this.getMapKeyAnnotation() == null;
- }
-
-
- // ********** pk map key **********
-
- public boolean isPkMapKey() {
- return this.pkMapKey;
- }
-
- public void setPkMapKey(boolean pkMapKey) {
- if (pkMapKey) {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- if (mapKeyAnnotation == null) {
- mapKeyAnnotation = this.addMapKeyAnnotation();
- } else {
- mapKeyAnnotation.setName(null);
- }
-
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(false);
- this.setPkMapKey_(true);
- this.setCustomMapKey_(false);
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setPkMapKey_(boolean pkMapKey) {
- boolean old = this.pkMapKey;
- this.pkMapKey = pkMapKey;
- this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
- }
-
- protected boolean buildPkMapKey() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) && (mapKeyAnnotation.getName() == null);
- }
-
-
- // ********** custom map key **********
-
- public boolean isCustomMapKey() {
- return this.customMapKey;
- }
-
- public void setCustomMapKey(boolean customMapKey) {
- if (customMapKey) {
- this.setSpecifiedMapKey(""); //$NON-NLS-1$
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setCustomMapKey_(boolean customMapKey) {
- boolean old = this.customMapKey;
- this.customMapKey = customMapKey;
- this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
- }
-
- protected boolean buildCustomMapKey() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) && (mapKeyAnnotation.getName() != null);
- }
-
-
- // ********** map key annotation **********
-
- protected MapKeyAnnotation getMapKeyAnnotation() {
- return (MapKeyAnnotation) this.getResourceAttribute().getAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
- }
-
- protected MapKeyAnnotation getMapKeyAnnotationForUpdate() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) ? mapKeyAnnotation : this.addMapKeyAnnotation();
- }
-
- protected MapKeyAnnotation addMapKeyAnnotation() {
- return (MapKeyAnnotation) this.getResourceAttribute().addAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyAnnotation() {
- this.getResourceAttribute().removeAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** map key class **********
-
- public String getMapKeyClass() {
- return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
- }
-
- public String getSpecifiedMapKeyClass() {
- return this.specifiedMapKeyClass;
- }
-
- public void setSpecifiedMapKeyClass(String mapKeyClass) {
- if (this.valuesAreDifferent(mapKeyClass, this.specifiedMapKeyClass)) {
- MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- if (mapKeyClass == null) {
- if (annotation != null) {
- this.removeMapKeyClassAnnotation();
- }
- } else {
- if (annotation == null) {
- annotation = this.addMapKeyClassAnnotation();
- }
- annotation.setValue(mapKeyClass);
- }
-
- this.setSpecifiedMapKeyClass_(mapKeyClass);
- }
- }
-
- protected void setSpecifiedMapKeyClass_(String mapKeyClass) {
- String old = this.specifiedMapKeyClass;
- this.specifiedMapKeyClass = mapKeyClass;
- this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildSpecifiedMapKeyClass() {
- MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- return (annotation == null) ? null : annotation.getValue();
- }
-
- public String getDefaultMapKeyClass() {
- return this.defaultMapKeyClass;
- }
-
- protected void setDefaultMapKeyClass(String mapKeyClass) {
- String old = this.defaultMapKeyClass;
- this.defaultMapKeyClass = mapKeyClass;
- this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildDefaultMapKeyClass() {
- return this.isJpa2_0Compatible() ? this.getPersistentAttribute().getMultiReferenceMapKeyTypeName() : null;
- }
-
- public String getFullyQualifiedMapKeyClass() {
- return this.fullyQualifiedMapKeyClass;
- }
-
- protected void setFullyQualifiedMapKeyClass(String mapKeyClass) {
- String old = this.fullyQualifiedMapKeyClass;
- this.fullyQualifiedMapKeyClass = mapKeyClass;
- this.firePropertyChanged(FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildFullyQualifiedMapKeyClass() {
- return this.isJpa2_0Compatible() ? this.buildFullyQualifiedMapKeyClass_() : null;
- }
-
- protected String buildFullyQualifiedMapKeyClass_() {
- return (this.specifiedMapKeyClass == null) ?
- this.defaultMapKeyClass :
- this.getMapKeyClassAnnotation().getFullyQualifiedClassName();
- }
-
- public char getMapKeyClassEnclosingTypeSeparator() {
- return '.';
- }
-
-
- // ********** resolved map key embeddable/entity **********
-
- protected Embeddable getResolvedMapKeyEmbeddable() {
- return this.getPersistenceUnit().getEmbeddable(this.fullyQualifiedMapKeyClass);
- }
-
- protected Entity getResolvedMapKeyEntity() {
- return this.getPersistenceUnit().getEntity(this.fullyQualifiedMapKeyClass);
- }
-
- // ********** map key class annotation **********
-
- protected MapKeyClass2_0Annotation getMapKeyClassAnnotation() {
- return this.isJpa2_0Compatible() ? this.getMapKeyClassAnnotation_() : null;
- }
-
- protected MapKeyClass2_0Annotation getMapKeyClassAnnotation_() {
- return (MapKeyClass2_0Annotation) this.getResourceAttribute().getAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
- }
-
- protected MapKeyClass2_0Annotation addMapKeyClassAnnotation() {
- return (MapKeyClass2_0Annotation) this.getResourceAttribute().addAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyClassAnnotation() {
- this.getResourceAttribute().removeAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
- }
-
-
- // ********** value type **********
-
- public Type getValueType() {
- return this.valueType;
- }
-
- protected void setValueType(Type valueType) {
- Type old = this.valueType;
- this.valueType = valueType;
- this.firePropertyChanged(VALUE_TYPE_PROPERTY, old, valueType);
- }
-
- protected Type buildValueType() {
- if (this.getResolvedTargetEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getResolvedTargetEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getTargetEntity() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
- protected Embeddable getResolvedTargetEmbeddable() {
- return this.getPersistenceUnit().getEmbeddable(this.fullyQualifiedTargetEntity);
- }
-
-
- // ********** key type **********
-
- public Type getKeyType() {
- return this.keyType;
- }
-
- protected void setKeyType(Type keyType) {
- Type old = this.keyType;
- this.keyType = keyType;
- this.firePropertyChanged(KEY_TYPE_PROPERTY, old, keyType);
- }
-
- protected Type buildKeyType() {
- if (this.getResolvedMapKeyEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getResolvedMapKeyEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getMapKeyClass() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
-
- // ********** map key column **********
-
- public JavaColumn getMapKeyColumn() {
- return this.mapKeyColumn;
- }
-
- protected JavaColumn buildMapKeyColumn() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaMapKeyColumn(this, this.buildMapKeyColumnOwner()) :
- new NullJavaMapKeyColumn2_0(this);
- }
-
- protected JavaColumn.Owner buildMapKeyColumnOwner() {
- return new MapKeyColumnOwner();
- }
-
- protected MapKeyColumn2_0Annotation getMapKeyColumnAnnotation() {
- return this.isJpa2_0Compatible() ? this.getMapKeyColumnAnnotation_() : null;
- }
-
- protected MapKeyColumn2_0Annotation getMapKeyColumnAnnotation_() {
- return (MapKeyColumn2_0Annotation) this.getResourceAttribute().getNonNullAnnotation(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyColumnAnnotation() {
- if (this.isJpa2_0Compatible()) {
- this.removeMapKeyColumnAnnotation_();
- } else {
- throw new IllegalStateException();
- }
- }
-
- protected void removeMapKeyColumnAnnotation_() {
- this.getResourceAttribute().removeAnnotation(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
- }
-
-
- // ********** map key converter **********
-
- public JavaConverter getMapKeyConverter() {
- return this.mapKeyConverter;
- }
-
- public void setMapKeyConverter(Class<? extends Converter> converterType) {
- if (this.mapKeyConverter.getType() != converterType) {
- this.mapKeyConverter.dispose();
- JavaConverter.Adapter converterAdapter = this.getKeyConverterAdapter(converterType);
- this.retainMapKeyConverterAnnotation(converterAdapter);
- this.setMapKeyConverter_(this.buildMapKeyConverter(converterAdapter));
- }
- }
-
- protected JavaConverter buildMapKeyConverter(JavaConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getJpaFactory()) :
- this.buildNullMapKeyConverter();
- }
-
- protected void setMapKeyConverter_(JavaConverter mapKeyConverter) {
- Converter old = this.mapKeyConverter;
- this.mapKeyConverter = mapKeyConverter;
- this.firePropertyChanged(MAP_KEY_CONVERTER_PROPERTY, old, mapKeyConverter);
- }
-
- /**
- * Clear all the converter annotations <em>except</em> for the annotation
- * corresponding to the specified adapter. If the specified adapter is
- * <code>null</code>, remove <em>all</em> the converter annotations.
- */
- protected void retainMapKeyConverterAnnotation(JavaConverter.Adapter converterAdapter) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter != converterAdapter) {
- adapter.removeConverterAnnotation(resourceAttribute);
- }
- }
- }
-
- protected JavaConverter buildMapKeyConverter() {
- if (isJpa2_0Compatible()) {
- JpaFactory jpaFactory = this.getJpaFactory();
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- JavaConverter javaConverter = adapter.buildConverter(this, jpaFactory);
- if (javaConverter != null) {
- return javaConverter;
- }
- }
- }
- return this.buildNullMapKeyConverter();
- }
-
- protected void syncMapKeyConverter() {
- Association<JavaConverter.Adapter, Annotation> assoc = this.getMapKeyConverterAnnotation();
- if (assoc == null) {
- if (this.mapKeyConverter.getType() != null) {
- this.setMapKeyConverter_(this.buildNullMapKeyConverter());
- }
- } else {
- JavaConverter.Adapter adapter = assoc.getKey();
- Annotation annotation = assoc.getValue();
- if ((this.mapKeyConverter.getType() == adapter.getConverterType()) &&
- (this.mapKeyConverter.getConverterAnnotation() == annotation)) {
- this.mapKeyConverter.synchronizeWithResourceModel();
- } else {
- this.setMapKeyConverter_(adapter.buildConverter(annotation, this, this.getJpaFactory()));
- }
- }
- }
-
- /**
- * Return the first converter annotation we find along with its corresponding
- * adapter. Return <code>null</code> if there are no converter annotations.
- */
- protected Association<JavaConverter.Adapter, Annotation> getMapKeyConverterAnnotation() {
- if (isJpa2_0Compatible()) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- Annotation annotation = adapter.getConverterAnnotation(resourceAttribute);
- if (annotation != null) {
- return new SimpleAssociation<JavaConverter.Adapter, Annotation>(adapter, annotation);
- }
- }
- }
- return null;
- }
-
- protected JavaConverter buildNullMapKeyConverter() {
- return new NullJavaConverter(this);
- }
-
-
- // ********** map key converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected JavaConverter.Adapter getKeyConverterAdapter(Class<? extends Converter> converterType) {
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<JavaConverter.Adapter> getMapKeyConverterAdapters() {
- return MAP_KEY_CONVERTER_ADAPTERS;
- }
-
-
- // ********** map key join columns **********
-
- public ListIterable<JavaJoinColumn> getMapKeyJoinColumns() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumns() : this.getDefaultMapKeyJoinColumns();
- }
-
- public int getMapKeyJoinColumnsSize() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumnsSize() : this.getDefaultMapKeyJoinColumnsSize();
- }
-
-
- // ********** specified map key join columns **********
-
- public ListIterable<JavaJoinColumn> getSpecifiedMapKeyJoinColumns() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedMapKeyJoinColumnsSize() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedMapKeyJoinColumns() {
- return this.getSpecifiedMapKeyJoinColumnsSize() != 0;
- }
-
- public JavaJoinColumn getSpecifiedMapKeyJoinColumn(int index) {
- return this.specifiedMapKeyJoinColumnContainer.getContextElement(index);
- }
-
- public JavaJoinColumn addSpecifiedMapKeyJoinColumn() {
- return this.addSpecifiedMapKeyJoinColumn(this.getSpecifiedMapKeyJoinColumnsSize());
- }
-
- public JavaJoinColumn addSpecifiedMapKeyJoinColumn(int index) {
- MapKeyJoinColumn2_0Annotation annotation = this.addMapKeyJoinColumnAnnotation(index);
- return this.specifiedMapKeyJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removeSpecifiedMapKeyJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedMapKeyJoinColumn(this.specifiedMapKeyJoinColumnContainer.indexOfContextElement((JavaJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedMapKeyJoinColumn(int index) {
- this.removeMapKeyJoinColumnAnnotation(index);
- this.specifiedMapKeyJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedMapKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.moveMapKeyJoinColumnAnnotation(targetIndex, sourceIndex);
- this.specifiedMapKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedMapKeyJoinColumns() {
- this.specifiedMapKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> buildSpecifiedMapKeyJoinColumnContainer() {
- SpecifiedMapKeyJoinColumnContainer container = new SpecifiedMapKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified map key join column container
- */
- protected class SpecifiedMapKeyJoinColumnContainer
- extends ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_MAP_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaJoinColumn buildContextElement(MapKeyJoinColumn2_0Annotation resourceElement) {
- return AbstractJavaMultiRelationshipMapping.this.buildMapKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<MapKeyJoinColumn2_0Annotation> getResourceElements() {
- return AbstractJavaMultiRelationshipMapping.this.getMapKeyJoinColumnAnnotations();
- }
- @Override
- protected MapKeyJoinColumn2_0Annotation getResourceElement(JavaJoinColumn contextElement) {
- return (MapKeyJoinColumn2_0Annotation) contextElement.getColumnAnnotation();
- }
- }
-
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
- return new MapKeyJoinColumnOwner();
- }
-
-
- // ********** default map key join column **********
-
- public JavaJoinColumn getDefaultMapKeyJoinColumn() {
- return this.defaultMapKeyJoinColumn;
- }
-
- protected void setDefaultMapKeyJoinColumn(JavaJoinColumn joinColumn) {
- JavaJoinColumn old = this.defaultMapKeyJoinColumn;
- this.defaultMapKeyJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_MAP_KEY_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<JavaJoinColumn> getDefaultMapKeyJoinColumns() {
- return (this.defaultMapKeyJoinColumn != null) ?
- new SingleElementListIterable<JavaJoinColumn>(this.defaultMapKeyJoinColumn) :
- EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- protected int getDefaultMapKeyJoinColumnsSize() {
- return (this.defaultMapKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultMapKeyJoinColumn() {
- if (this.buildsDefaultMapKeyJoinColumn()) {
- if (this.defaultMapKeyJoinColumn == null) {
- this.setDefaultMapKeyJoinColumn(this.buildMapKeyJoinColumn(this.buildNullMapKeyJoinColumnAnnotation()));
- } else {
- this.defaultMapKeyJoinColumn.update();
- }
- } else {
- this.setDefaultMapKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultMapKeyJoinColumn() {
- return isJpa2_0Compatible() &&
- !this.hasSpecifiedMapKeyJoinColumns() &&
- getKeyType() == Type.ENTITY_TYPE;
- }
-
- protected JavaJoinColumn buildMapKeyJoinColumn(MapKeyJoinColumn2_0Annotation joinColumnAnnotation) {
- return this.getJpaFactory().buildJavaJoinColumn(this, this.mapKeyJoinColumnOwner, joinColumnAnnotation);
- }
-
- // ********** map key join column annotations **********
-
- protected ListIterable<MapKeyJoinColumn2_0Annotation> getMapKeyJoinColumnAnnotations() {
- if (isJpa2_0Compatible()) {
- return new SubListIterableWrapper<NestableAnnotation, MapKeyJoinColumn2_0Annotation>(this.getNestableMapKeyJoinColumnAnnotations());
- }
- return EmptyListIterable.instance();
- }
-
- protected ListIterable<NestableAnnotation> getNestableMapKeyJoinColumnAnnotations() {
- return this.getResourceAttribute().getAnnotations(MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected MapKeyJoinColumn2_0Annotation addMapKeyJoinColumnAnnotation(int index) {
- return (MapKeyJoinColumn2_0Annotation) this.getResourceAttribute().addAnnotation(index, MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyJoinColumnAnnotation(int index) {
- this.getResourceAttribute().removeAnnotation(index, MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void moveMapKeyJoinColumnAnnotation(int targetIndex, int sourceIndex) {
- this.getResourceAttribute().moveAnnotation(targetIndex, sourceIndex, MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected MapKeyJoinColumn2_0Annotation buildNullMapKeyJoinColumnAnnotation() {
- return new NullMapKeyJoinColumnAnnotation(this.getResourceAttribute());
- }
-
-
- // ********** map key attribute override container **********
-
- public JavaAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
- return this.mapKeyAttributeOverrideContainer;
- }
-
- public JavaAttributeOverrideContainer buildMapKeyAttributeOverrideContainer() {
- return this.getJpaFactory().buildJavaAttributeOverrideContainer(this, this.buildMapKeyAttributeOverrideContainerOwner());
- }
-
- protected JavaAttributeOverrideContainer.Owner buildMapKeyAttributeOverrideContainerOwner() {
- return new MapKeyAttributeOverrideContainerOwner();
- }
-
-
- // ********** misc **********
-
- @Override
- protected String buildDefaultTargetEntity() {
- return this.getPersistentAttribute().getMultiReferenceTargetTypeName();
- }
-
- @Override
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.orderable.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- if (this.mapKeyNameTouches(pos)) {
- return this.javaCandidateMapKeyNames(filter);
- }
-
- result = this.mapKeyColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.mapKeyConverter.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.mapKeyAttributeOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- result = joinColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
-
- return null;
- }
-
- protected boolean mapKeyNameTouches(int pos) {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) && mapKeyAnnotation.nameTouches(pos);
- }
-
- protected Iterable<String> javaCandidateMapKeyNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateMapKeyNames(filter));
- }
-
- protected Iterable<String> getCandidateMapKeyNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateMapKeyNames(), filter);
- }
-
- public Iterable<String> getCandidateMapKeyNames() {
- return this.getTargetEntityNonTransientAttributeNames();
- }
-
-
- // ********** metamodel **********
-
- @Override
- protected String getMetamodelFieldTypeName() {
- return ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldTypeName();
- }
-
- @Override
- protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
- this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
- super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
- }
-
- protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
- String keyTypeName = ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldMapKeyTypeName();
- if (keyTypeName != null) {
- typeArgumentNames.add(keyTypeName);
- }
- }
-
- public String getMetamodelFieldMapKeyTypeName() {
- return MappingTools.getMetamodelFieldMapKeyTypeName(this);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, reporter, astRoot);
- this.validateMapKeyClass(messages, astRoot);
- this.orderable.validate(messages, reporter, astRoot);
- this.validateMapKey(messages, reporter, astRoot);
- }
-
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
- new String[] {getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected TextRange getMapKeyClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getMapKeyClassAnnotationTextRange(astRoot), astRoot);
- }
-
- protected TextRange getMapKeyClassAnnotationTextRange(CompilationUnit astRoot) {
- MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
- }
-
- protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getMapKeyAnnotation() != null) {//If MapKey annotation specified, no other MapKey* annotations can be specified, don't validate them
- //TODO validate that the map key refers to an existing attribute
- return;
- }
- if (this.getKeyType() == Type.BASIC_TYPE) {
- this.mapKeyColumn.validate(messages, reporter, astRoot);
- this.mapKeyConverter.validate(messages, reporter, astRoot);
- }
- else if (this.getKeyType() == Type.ENTITY_TYPE) {
- for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
- }
- }
- else if (this.getKeyType() == Type.EMBEDDABLE_TYPE) {
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter, astRoot);
- //validate map key association overrides - for eclipselink
- }
- }
-
- protected void validateMapKeyClass(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.isJpa2_0Compatible() && this.getPersistentAttribute().getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages, astRoot);
- }
- }
-
- protected void validateMapKeyClass_(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.getMapKeyClass() == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- return;
- }
-
- if (MappingTools.typeIsBasic(this.getJavaProject(), this.getFullyQualifiedMapKeyClass())) {
- return;
- }
-
- if (this.getResolvedMapKeyEmbeddable() == null && this.getResolvedMapKeyEntity() == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getName(), this.getFullyQualifiedMapKeyClass()},
- this,
- this.getMapKeyClassTextRange(astRoot)
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getFullyQualifiedMapKeyClass()},
- this,
- this.getMapKeyClassTextRange(astRoot)
- )
- );
- }
- }
- }
-
-
-
- // ********** abstract owner **********
-
- /**
- * some common behavior
- */
- protected abstract class AbstractOwner
- {
- public TypeMapping getTypeMapping() {
- return AbstractJavaMultiRelationshipMapping.this.getTypeMapping();
- }
-
- public String getDefaultTableName() {
- return this.getRelationshipStrategy().getTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getRelationshipStrategy().resolveDbTable(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
- }
-
- protected RelationshipStrategy getRelationshipStrategy() {
- return AbstractJavaMultiRelationshipMapping.this.getRelationship().getStrategy();
- }
-
- protected JavaPersistentAttribute getPersistentAttribute() {
- return AbstractJavaMultiRelationshipMapping.this.getPersistentAttribute();
- }
- }
-
-
- // ********** map key column owner **********
-
- protected class MapKeyColumnOwner
- extends AbstractOwner
- implements JavaColumn.Owner
- {
- public MapKeyColumn2_0Annotation getColumnAnnotation() {
- return AbstractJavaMultiRelationshipMapping.this.getMapKeyColumnAnnotation();
- }
-
- public void removeColumnAnnotation() {
- AbstractJavaMultiRelationshipMapping.this.removeMapKeyColumnAnnotation();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return AbstractJavaMultiRelationshipMapping.this.getName() + "_KEY"; //$NON-NLS-1$
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getRelationshipStrategy().tableNameIsInvalid(tableName);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
- }
- }
-
-
- // ********** map key attribute override owner **********
-
- protected class MapKeyAttributeOverrideContainerOwner
- extends AbstractOwner
- implements JavaAttributeOverrideContainer2_0.Owner
- {
- public JavaResourceAttribute getResourceMember() {
- return AbstractJavaMultiRelationshipMapping.this.getResourceAttribute();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractJavaMultiRelationshipMapping.this.getResolvedMapKeyEmbeddable();
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. the table is always the collection table
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? overriddenTypeMapping.getAllOverridableAttributeNames() : EmptyIterable.<String>instance();
- }
-
- protected static final String POSSIBLE_PREFIX = "key"; //$NON-NLS-1$
- public String getPossiblePrefix() {
- return POSSIBLE_PREFIX;
- }
-
- public String getWritePrefix() {
- return this.getPossiblePrefix();
- }
-
- // since only a map's key can be an embeddable on a 1-m or m-m;
- // all overrides are relevant
- public boolean isRelevant(String overrideName) {
- return true;
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
- }
- }
-
-
- // ********** map key join column owner **********
-
- protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected MapKeyJoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return AbstractJavaMultiRelationshipMapping.this.getRelationship().getStrategy().getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return AbstractJavaMultiRelationshipMapping.this.getName() + "_KEY"; //$NON-NLS-1$
- }
-
- public String getAttributeName() {
- return AbstractJavaMultiRelationshipMapping.this.getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return AbstractJavaMultiRelationshipMapping.this.getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return AbstractJavaMultiRelationshipMapping.this.getResolvedMapKeyEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return AbstractJavaMultiRelationshipMapping.this.getRelationship().getStrategy().tableNameIsInvalid(tableName);
- }
-
- /**
- * the map key join column can be on a secondary table
- */
- public Iterable<String> getCandidateTableNames() {
- return AbstractJavaMultiRelationshipMapping.this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return AbstractJavaMultiRelationshipMapping.this.getRelationship().getStrategy().resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- Entity entity = AbstractJavaMultiRelationshipMapping.this.getResolvedMapKeyEntity();
- return entity != null ? entity.getPrimaryDbTable() : null;
- }
-
- public int getJoinColumnsSize() {
- return AbstractJavaMultiRelationshipMapping.this.getMapKeyJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyJoinColumnValidator(
- this.getPersistentAttribute(),
- (ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
- new RelationshipStrategyTableDescriptionProvider(getRelationship().getStrategy()));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
deleted file mode 100644
index 585ec73a72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java<ul>
- * <li>column
- * <li>join column
- * <li>discriminator column
- * <li>order column
- * <li>primary key join column
- * </ul>
- * <strong>NB:</strong> any subclass that directly holds its column annotation
- * must:<ul>
- * <li>call the "super" constructor that takes a column annotation
- * {@link #AbstractJavaNamedColumn(JavaJpaContextNode, JavaReadOnlyNamedColumn.Owner, NamedColumnAnnotation)}
- * <li>override {@link #setColumnAnnotation(NamedColumnAnnotation)} to set the column annotation
- * so it is in place before the column's state (e.g. {@link #specifiedName})
- * is initialized
- * </ul>
- */
-public abstract class AbstractJavaNamedColumn<A extends NamedColumnAnnotation, O extends JavaReadOnlyNamedColumn.Owner>
- extends AbstractJavaJpaContextNode
- implements JavaNamedColumn
-{
- protected final O owner;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String columnDefinition;
-
-
- protected AbstractJavaNamedColumn(JavaJpaContextNode parent, O owner) {
- this(parent, owner, null);
- }
-
- protected AbstractJavaNamedColumn(JavaJpaContextNode parent, O owner, A columnAnnotation) {
- super(parent);
- this.owner = owner;
- this.setColumnAnnotation(columnAnnotation);
- this.specifiedName = this.buildSpecifiedName();
- this.columnDefinition = this.buildColumnDefinition();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedName_(this.buildSpecifiedName());
- this.setColumnDefinition_(this.buildColumnDefinition());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultName(this.buildDefaultName());
- }
-
-
- // ********** column annotation **********
-
- /**
- * Return the Java column annotation. Do not return <code>null</code> if the
- * Java annotation does not exist; return a <em>null</em> column annotation
- * instead.
- */
- public abstract A getColumnAnnotation();
-
- /**
- * see class comment... ({@link AbstractJavaNamedColumn})
- */
- protected void setColumnAnnotation(A columnAnnotation) {
- if (columnAnnotation != null) {
- throw new IllegalArgumentException("this method must be overridden if the column annotation is not null: " + columnAnnotation); //$NON-NLS-1$
- }
- }
-
- protected void removeColumnAnnotationIfUnset() {
- if (this.getColumnAnnotation().isUnset()) {
- this.removeColumnAnnotation();
- }
- }
-
- protected abstract void removeColumnAnnotation();
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- public void setSpecifiedName(String name) {
- if (this.valuesAreDifferent(this.specifiedName, name)) {
- this.getColumnAnnotation().setName(name);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedName_(name);
- }
- }
-
- protected void setSpecifiedName_(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- return this.getColumnAnnotation().getName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultName() {
- return this.owner.getDefaultColumnName(this);
- }
-
-
- // ********** column definition **********
-
- public String getColumnDefinition() {
- return this.columnDefinition;
- }
-
- public void setColumnDefinition(String columnDefinition) {
- if (this.valuesAreDifferent(this.columnDefinition, columnDefinition)) {
- this.getColumnAnnotation().setColumnDefinition(columnDefinition);
- this.removeColumnAnnotationIfUnset();
- this.setColumnDefinition_(columnDefinition);
- }
- }
-
- protected void setColumnDefinition_(String columnDefinition) {
- String old = this.columnDefinition;
- this.columnDefinition = columnDefinition;
- this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, columnDefinition);
- }
-
- public String buildColumnDefinition() {
- return this.getColumnAnnotation().getColumnDefinition();
- }
-
-
- // ********** database stuff **********
-
- protected Column getDbColumn() {
- Table table = this.getDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getName());
- }
-
- public Table getDbTable() {
- return this.owner.resolveDbTable(this.getTable());
- }
-
- /**
- * Return the name of the column's table. This is overridden
- * in {@link AbstractJavaBaseColumn} where a table can be defined.
- */
- public String getTable() {
- return this.owner.getDefaultTableName();
- }
-
- public boolean isResolved() {
- return this.getDbColumn() != null;
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos)) {
- return this.getJavaCandidateNames(filter);
- }
- return null;
- }
-
- protected boolean nameTouches(int pos) {
- return this.getColumnAnnotation().nameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateNames(filter));
- }
-
- protected Iterable<String> getCandidateNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateNames(), filter);
- }
-
- protected Iterable<String> getCandidateNames() {
- Table dbTable = this.getDbTable();
- return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver(astRoot));
- }
-
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaNamedColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getColumnAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.owner.getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getNameTextRange(), astRoot);
- }
-
-
- // ********** misc **********
-
-
- public boolean isVirtual() {
- return !this.getColumnAnnotation().isSpecified();
- }
-
- protected void initializeFrom(ReadOnlyNamedColumn oldColumn) {
- this.setSpecifiedName(oldColumn.getSpecifiedName());
- this.setColumnDefinition(oldColumn.getColumnDefinition());
- }
-
- protected void initializeFromVirtual(ReadOnlyNamedColumn virtualColumn) {
- this.setSpecifiedName(virtualColumn.getName());
- this.setColumnDefinition(virtualColumn.getColumnDefinition());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- String table = this.getTable();
- if (table != null) {
- sb.append(table);
- sb.append('.');
- }
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java
deleted file mode 100644
index a8139f49d2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractJavaNamedColumnTextRangeResolver<C extends JavaReadOnlyNamedColumn>
- implements NamedColumnTextRangeResolver
-{
- protected final C column;
-
- protected final CompilationUnit astRoot;
-
-
- protected AbstractJavaNamedColumnTextRangeResolver(C column, CompilationUnit astRoot) {
- super();
- this.column = column;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.column.getNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToManyMapping.java
deleted file mode 100644
index a7614b8d84..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToManyMapping.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.NullJavaOrphanRemoval2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToManyMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
-
-public abstract class AbstractJavaOneToManyMapping
- extends AbstractJavaMultiRelationshipMapping<OneToManyAnnotation>
- implements JavaOneToManyMapping2_0, JavaOrphanRemovalHolder2_0
-{
- protected final JavaOrphanRemovable2_0 orphanRemoval;
-
-
- protected AbstractJavaOneToManyMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.orphanRemoval = this.buildOrphanRemoval();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.orphanRemoval.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.orphanRemoval.update();
- }
-
-
- // ********** relationship **********
-
- @Override
- public JavaOneToManyRelationship getRelationship() {
- return (JavaOneToManyRelationship) super.getRelationship();
- }
-
- @Override
- protected JavaMappingRelationship buildRelationship() {
- return new GenericJavaOneToManyRelationship(this, this.isJpa2_0Compatible());
- }
-
-
- // ********** orphan removal **********
-
- public JavaOrphanRemovable2_0 getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- protected JavaOrphanRemovable2_0 buildOrphanRemoval() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaOrphanRemoval(this) :
- new NullJavaOrphanRemoval2_0(this);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return OneToManyAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToOneMapping.java
deleted file mode 100644
index 1fca5e88aa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOneToOneMapping.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToOneRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.NullJavaOrphanRemoval2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToOneMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation;
-
-
-public abstract class AbstractJavaOneToOneMapping
- extends AbstractJavaSingleRelationshipMapping<OneToOneAnnotation>
- implements JavaOneToOneMapping2_0, JavaOrphanRemovalHolder2_0
-{
- protected final JavaOrphanRemovable2_0 orphanRemoval;
-
-
- protected AbstractJavaOneToOneMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.orphanRemoval = this.buildOrphanRemoval();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.orphanRemoval.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.orphanRemoval.update();
- }
-
-
- // ********** relationship **********
-
- @Override
- public JavaOneToOneRelationship getRelationship() {
- return (JavaOneToOneRelationship) super.getRelationship();
- }
-
- @Override
- protected JavaOneToOneRelationship buildRelationship() {
- return new GenericJavaOneToOneRelationship(this);
- }
-
-
- // ********** orphan removal **********
-
- public JavaOrphanRemovable2_0 getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- protected JavaOrphanRemovable2_0 buildOrphanRemoval() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaOrphanRemoval(this) :
- new NullJavaOrphanRemoval2_0(this);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return OneToOneAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
deleted file mode 100644
index 83595c5711..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Specified Java override
- */
-public abstract class AbstractJavaOverride<C extends JavaOverrideContainer, A extends OverrideAnnotation>
- extends AbstractJavaJpaContextNode
- implements JavaOverride
-{
- protected final A overrideAnnotation;
-
- protected String name;
-
-
- protected AbstractJavaOverride(C parent, A overrideAnnotation) {
- super(parent);
- this.overrideAnnotation = overrideAnnotation;
- this.name = this.buildName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.buildName());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- /**
- * Strip the prefix (if necessary) before storing the name in the context
- * model. Pass the unchanged name to the annotation.
- */
- public void setName(String name) {
- this.overrideAnnotation.setName(name);
- this.setName_(this.stripPrefix(name));
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- /**
- * Strip the prefix (if necessary) from the name taken from the annotation
- * before storing it in the context model.
- */
- protected String buildName() {
- return this.stripPrefix(this.overrideAnnotation.getName());
- }
-
- protected String stripPrefix(String rawName) {
- if (rawName == null) {
- return null;
- }
- String prefix = this.getPossiblePrefix();
- if (prefix == null) {
- return rawName;
- }
- int prefixLength = prefix.length();
- if ((rawName.length() > prefixLength) &&
- (rawName.charAt(prefixLength) == '.') &&
- rawName.startsWith(prefix)) {
- return rawName.substring(prefixLength + 1);
- }
- return rawName;
- }
-
- protected String getPossiblePrefix() {
- return this.isJpa2_0Compatible() ? this.getContainer2_0().getPossiblePrefix() : null;
- }
-
-
- // ********** specified/virtual **********
-
- public boolean isVirtual() {
- return false;
- }
-
- public JavaVirtualOverride convertToVirtual() {
- return this.getContainer().convertOverrideToVirtual(this);
- }
-
-
- // ********** misc **********
-
- @Override
- @SuppressWarnings("unchecked")
- public C getParent() {
- return (C) super.getParent();
- }
-
- protected C getContainer() {
- return this.getParent();
- }
-
- protected JavaOverrideContainer2_0 getContainer2_0() {
- return (JavaOverrideContainer2_0) this.getContainer();
- }
-
- public A getOverrideAnnotation() {
- return this.overrideAnnotation;
- }
-
- protected void initializeFrom(ReadOnlyOverride oldOverride) {
- this.setName(this.prefix(oldOverride.getName()));
- }
-
- protected void initializeFromVirtual(ReadOnlyOverride virtualOverride) {
- this.setName(this.prefix(virtualOverride.getName()));
- }
-
- public TypeMapping getTypeMapping() {
- return this.getContainer().getTypeMapping();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getContainer().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getContainer().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
- }
-
- protected String prefix(String oldName) {
- if (oldName == null) {
- return null;
- }
- String prefix = this.getWritePrefix();
- return (prefix == null) ? oldName : (prefix + '.' + oldName);
- }
-
- protected String getWritePrefix() {
- return this.isJpa2_0Compatible() ? this.getContainer2_0().getWritePrefix() : null;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos)) {
- return this.getJavaCandidateNames(filter);
- }
- return null;
- }
-
- protected boolean nameTouches(int pos) {
- return this.overrideAnnotation.nameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateNames(filter));
- }
-
- private Iterable<String> getCandidateNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateNames(), filter);
- }
-
- protected abstract Iterable<String> getCandidateNames();
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.getContainer().buildOverrideValidator(this, buildTextRangeResolver(astRoot));
- }
-
- protected OverrideTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaOverrideTextRangeResolver(this, astRoot);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.overrideAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getContainer().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.overrideAnnotation.getNameTextRange(), astRoot);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getContainer().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getContainer().getCandidateTableNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
deleted file mode 100644
index 2b51012788..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
+++ /dev/null
@@ -1,783 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.ReflectionTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.CollectionMapping;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.Accessor;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java persistent attributes
- */
-public abstract class AbstractJavaPersistentAttribute
- extends AbstractJavaJpaContextNode
- implements JavaPersistentAttribute2_0
-{
- protected final Accessor accessor;
-
- protected AccessType defaultAccess;
- protected AccessType specifiedAccess;
-
- protected JavaAttributeMapping mapping; // never null
- protected String defaultMappingKey;
-
- protected AbstractJavaPersistentAttribute(PersistentType parent, JavaResourceField resourceField) {
- super(parent);
- this.accessor = new FieldAccessor(this, resourceField);
- this.initialize();
- }
-
- protected AbstractJavaPersistentAttribute(PersistentType parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- super(parent);
- this.accessor = new PropertyAccessor(this, resourceGetter, resourceSetter);
- this.initialize();
- }
-
- protected AbstractJavaPersistentAttribute(PersistentType parent, Accessor accessor) {
- super(parent);
- this.accessor = accessor;
- this.initialize();
- }
-
- protected void initialize() {
- // this is determined directly from the resource model
- this.defaultAccess = this.buildDefaultAccess();
- this.specifiedAccess = this.buildSpecifiedAccess();
-
- // keep non-null at all times
- this.mapping = this.buildMapping();
- }
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- // this is determined directly from the resource model
- this.setDefaultAccess(this.buildDefaultAccess());
- this.setSpecifiedAccess_(this.buildSpecifiedAccess());
- this.syncMapping();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateMapping();
- }
-
- // ********** name **********
-
- /**
- * name will not change in java, a new persistent attribute will be built.
- */
- public String getName() {
- return this.getResourceAttribute().getName();
- }
-
-
- public Accessor getAccessor() {
- return this.accessor;
- }
-
- public boolean isFor(JavaResourceField resourceField) {
- return this.accessor.isFor(resourceField);
- }
-
- public boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- return this.accessor.isFor(resourceGetter, resourceSetter);
- }
-
- // ********** access **********
-
- public AccessType getAccess() {
- AccessType access = this.getSpecifiedAccess();
- return (access != null) ? access : this.defaultAccess;
- }
-
- public AccessType getDefaultAccess() {
- return this.defaultAccess;
- }
-
- protected void setDefaultAccess(AccessType access) {
- AccessType old = this.defaultAccess;
- this.defaultAccess = access;
- this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildDefaultAccess() {
- return getAccessor().getDefaultAccess();
- }
-
- public AccessType getSpecifiedAccess() {
- return this.specifiedAccess;
- }
-
- /**
- * Don't support changing to specified access on a java persistent attribute, this
- * involves a larger process of moving the annotations to the corresponding field/property
- * which may or may not exist or might need to be created.
- */
- public void setSpecifiedAccess(AccessType specifiedAccess) {
- throw new UnsupportedOperationException();
- }
-
- protected void setSpecifiedAccess_(AccessType access) {
- AccessType old = this.specifiedAccess;
- this.specifiedAccess = access;
- this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, access);
- }
-
- /**
- * a specified Access annotation is only supported by JPA 2.0, but
- * putting this code here to simplify. A 1.0 persistent attribute
- * will never have an Access annotation on it, specifiedAccess will
- * always be null.
- */
- protected AccessType buildSpecifiedAccess() {
- Access2_0Annotation accessAnnotation = this.getAccessAnnotation();
- return (accessAnnotation == null) ? null : AccessType.fromJavaResourceModel(accessAnnotation.getValue(), this.getJpaPlatform(), this.getResourceType());
- }
-
- protected Access2_0Annotation getAccessAnnotation() {
- return (Access2_0Annotation) this.getResourceAttribute().getAnnotation(Access2_0Annotation.ANNOTATION_NAME);
- }
-
-
- // ********** mapping **********
-
- public JavaAttributeMapping getMapping() {
- return this.mapping;
- }
-
- /**
- * Clients do not set the mapping directly.
- * @see #setMappingKey(String)
- */
- protected void setMapping(JavaAttributeMapping mapping) {
- JavaAttributeMapping old = this.mapping;
- this.mapping = mapping;
- this.firePropertyChanged(MAPPING_PROPERTY, old, mapping);
- }
-
- public String getMappingKey() {
- return this.mapping.getKey();
- }
-
- /**
- * Possible transitions:
- * <table border>
- * <th>
- * <th>null mapping/default<br>
- * <code>key = null</code>
- * <th>specified mapping A<br>
- * <code>key = "A"</code>
- * <th>specified mapping B<br>
- * <code>key = "B"</code>
- * <tr>
- * <th>[default] null mapping
- * <td>do nothing
- * <td>add annotation A<br>
- * set new mapping A
- * <td>add annotation B<br>
- * set new mapping B
- * <tr>
- * <th>default mapping A
- * <td>do nothing
- * <td>add annotation A<br>
- * <em>re-use</em> default mapping A
- * <td>add annotation B<br>
- * set new mapping B
- * <tr>
- * <th>specified mapping A
- * <td>remove annotation A<br>
- * set new default or null mapping
- * <td>do nothing
- * <td>remove annotation A<br>
- * add annotation B<br>
- * set new mapping B
- * </table>
- * The "do nothing" transitions are handled in this method.
- */
- public JavaAttributeMapping setMappingKey(String key) {
- if (this.mapping.isDefault()) {
- if (key == null) {
- // leave the default mapping unchanged
- } else {
- this.setMappingKey_(key); // replace the default mapping
- }
- } else {
- if (this.valuesAreEqual(key, this.mapping.getKey())) {
- // leave the specified mapping unchanged
- } else {
- this.setMappingKey_(key); // replace the specified mapping
- }
- }
- return this.mapping;
- }
-
- /**
- * We have either:<ul>
- * <li>a <em>default</em> mapping and a non-<code>null</code> key
- * </ul>or<ul>
- * <li>a <em>specified</em> mapping and a different (possibly
- * <code>null</code>) key
- * </ul>
- */
- protected void setMappingKey_(String key) {
- JavaAttributeMappingDefinition definition = this.getSpecifiedMappingDefinition(key);
- if (definition == null) {
- // our mapping is "specified" and the key is null;
- // check for a default definition
- definition = this.getDefaultMappingDefinition();
- Iterable<String> supportingAnnotationNames = (definition != null) ? definition.getSupportingAnnotationNames() : EmptyIterable.<String>instance();
- // clear any mapping annotation(s);
- // leave the "default" mapping's supporting annotations;
- // if there is no "default" mapping, clear all supporting annotations too(?)
- this.setMappingAnnotation(null, supportingAnnotationNames);
- } else {
- this.setMappingAnnotation(definition);
- }
- // note: 'definition' can still be null (if the key is null and there is no "default" mapping)
- this.setMapping(this.buildMapping(definition));
- }
-
- /**
- * pre-condition: definition is not <code>null</code>
- */
- protected void setMappingAnnotation(JavaAttributeMappingDefinition definition) {
- this.setMappingAnnotation(definition.getAnnotationName(), definition.getSupportingAnnotationNames());
- }
-
- protected void setMappingAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames) {
- this.getResourceAttribute().setPrimaryAnnotation(primaryAnnotationName, supportingAnnotationNames);
- }
-
- protected JavaAttributeMapping buildMapping(JavaAttributeMappingDefinition definition) {
- return (definition == null) ? this.buildNullMapping() : this.buildMapping_(definition);
- }
-
- protected JavaAttributeMapping buildNullMapping() {
- return this.getJpaFactory().buildJavaNullAttributeMapping(this);
- }
-
- /**
- * pre-condition: definition is not null
- * <p>
- * If we are converting a <em>default</em> mapping to its <em>specified</em>
- * manifestation, we just keep the same mapping and create its annotation.
- * We do <em>not</em> do the same thing when converting a <em>specified</em>
- * mapping to its <em>default</em> manifestation. We rebuild the
- * entire mapping, simplifying the clearing of all its state. We do this
- * because we allow clients to modify a <em>default</em> mapping (or any of
- * its components) directly,
- * modifying its state and triggering a conversion to a <em>specified</em>
- * mapping. The only way to convert a <em>specified</em> mapping to a
- * <em>default</em> mapping is by {@link #setMappingKey(String) setting the
- * mapping key} to <code>null</code>.
- */
- protected JavaAttributeMapping buildMapping_(JavaAttributeMappingDefinition definition) {
- // 'mapping' is null during construction
- if ((this.mapping != null) && this.mapping.isDefault() && Tools.valuesAreEqual(this.mapping.getKey(), definition.getKey())) {
- this.mapping.updateDefault(); // since nothing here changes, we need to update the mapping's flag
- return this.mapping;
- }
- return definition.buildMapping(this, this.getJpaFactory());
- }
-
- /**
- * We only look for a <em>specified</em> mapping here.
- * We look for a default mapping during <em>update</em>.
- */
- protected JavaAttributeMapping buildMapping() {
- return this.buildMapping(this.getSpecifiedMappingDefinition());
- }
-
- /**
- * Look for a <em>specified</em> mapping and sync our mapping.
- */
- protected void syncMapping() {
- JavaAttributeMappingDefinition definition = this.getSpecifiedMappingDefinition();
- if (definition == null) {
- if (this.mapping.isDefault()) {
- // null/default => null/default
- this.mapping.synchronizeWithResourceModel();
- } else {
- // specified => null/default
- definition = this.getDefaultMappingDefinition();
- this.setMapping(this.buildMapping(definition));
- }
- } else {
- if (this.mapping.isDefault()) {
- // null/default => specified
- this.setMapping(this.buildMapping(definition));
- } else {
- // specified => specified
- if (this.valuesAreEqual(definition.getKey(), this.mapping.getKey())) {
- this.mapping.synchronizeWithResourceModel();
- } else {
- this.setMapping(this.buildMapping(definition));
- }
- }
- }
- }
-
- /**
- * Return the "specified" mapping definition for the specified key.
- */
- protected JavaAttributeMappingDefinition getSpecifiedMappingDefinition(String key) {
- if (key == null) {
- return null;
- }
- for (JavaAttributeMappingDefinition definition : this.getSpecifiedMappingDefinitions()) {
- if (Tools.valuesAreEqual(definition.getKey(), key)) {
- return definition;
- }
- }
- throw new IllegalArgumentException("invalid mapping key: " + key); //$NON-NLS-1$
- }
-
- /**
- * Return the mapping definition for the mapping currently specified in the
- * source code.
- */
- protected JavaAttributeMappingDefinition getSpecifiedMappingDefinition() {
- for (JavaAttributeMappingDefinition definition : this.getSpecifiedMappingDefinitions()) {
- if (definition.isSpecified(this)) {
- return definition;
- }
- }
- return null;
- }
-
- protected Iterable<JavaAttributeMappingDefinition> getSpecifiedMappingDefinitions() {
- return this.getJpaPlatform().getSpecifiedJavaAttributeMappingDefinitions();
- }
-
-
- // ********** default mapping **********
-
- public String getDefaultMappingKey() {
- return this.defaultMappingKey;
- }
-
- protected void setDefaultMappingKey(String mappingKey) {
- String old = this.defaultMappingKey;
- this.defaultMappingKey = mappingKey;
- this.firePropertyChanged(DEFAULT_MAPPING_KEY_PROPERTY, old, mappingKey);
- }
-
- /**
- * If a mapping annotation is specified, we would have already set a
- * <em>specified</em> mapping in {@link #syncMapping()}. We need only check
- * for changes to the <em>default</em> mapping.
- */
- protected void updateMapping() {
- JavaAttributeMappingDefinition definition = this.getDefaultMappingDefinition();
- String newDefaultKey = (definition == null) ? null : definition.getKey();
- if (this.mapping.isDefault() && Tools.valuesAreDifferent(this.mapping.getKey(), newDefaultKey)) {
- this.setMapping(this.buildMapping(definition)); // the default mapping has changed
- } else {
- this.mapping.update();
- }
- this.setDefaultMappingKey(newDefaultKey);
- }
-
- protected JavaAttributeMappingDefinition getDefaultMappingDefinition() {
- for (DefaultJavaAttributeMappingDefinition definition : this.getDefaultMappingDefinitions()) {
- if (definition.isDefault(this)) {
- return definition;
- }
- }
- return null;
- }
-
- protected Iterable<DefaultJavaAttributeMappingDefinition> getDefaultMappingDefinitions() {
- return this.getJpaPlatform().getDefaultJavaAttributeMappingDefinitions();
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<JavaPersistentAttribute> getType() {
- return JavaPersistentAttribute.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- return this;
- }
-
- public TextRange getSelectionTextRange() {
- return this.getSelectionTextRange(this.buildASTRoot());
- }
-
- protected TextRange getSelectionTextRange(CompilationUnit astRoot) {
- return this.getResourceAttribute().getNameTextRange(astRoot);
- }
-
- protected CompilationUnit buildASTRoot() {
- return this.getResourceAttribute().getJavaResourceCompilationUnit().buildASTRoot();
- }
-
- public void dispose() {
- // nothing to dispose
- }
-
-
- // ********** type **********
-
- /**
- * From the JPA spec, when the basic mapping applies:<br>
- * If the type of the attribute (field or property) is one of the following
- * it must be mapped as <code>@javax.persistence.Basic</code>:<ul>
- * <li><code>byte[]</code>
- * <li><code>java.lang.Byte[]</code>
- * <li><code>char[]</code>
- * <li><code>java.lang.Character[]</code>
- * <li>primitive types (except <code>void</code>)
- * <li>primitive wrappers (except <code>java.lang.Void</code>)
- * <li><code>java.lang.String</code>
- * <li><code>java.math.BigInteger</code>
- * <li><code>java.math.BigDecimal</code>
- * <li><code>java.util.Date</code>
- * <li><code>java.util.Calendar</code>
- * <li><code>java.sql.Date</code>
- * <li><code>java.sql.Time</code>
- * <li><code>java.sql.Timestamp</code>
- * <li><code>enum</code>s
- * <li>any other type that implements <code>java.io.Serializable</code>
- * </ul>
- */
- public boolean typeIsBasic() {
- return MappingTools.typeIsBasic(this.getJavaProject(), this.getTypeName());
- }
-
- public String getSingleReferenceTargetTypeName() {
- // 'typeName' may include array brackets ("[]")
- // but not generic type arguments (e.g. "<java.lang.String>")
- String typeName = this.getTypeName();
- if (typeName == null) {
- return null;
- }
- if (ReflectionTools.getArrayDepthForTypeDeclaration(typeName) != 0) {
- return null; // arrays cannot be entities
- }
- if (this.typeIsContainer(typeName)) {
- return null; // "containers" cannot be entities
- }
- return typeName;
- }
-
- public String getMultiReferenceTargetTypeName() {
- return this.getJpaContainerDefinition().getMultiReferenceTargetTypeName(this.getResourceAttribute());
- }
-
- public String getMultiReferenceMapKeyTypeName() {
- return this.getJpaContainerDefinition().getMultiReferenceMapKeyTypeName(this.getResourceAttribute());
- }
-
- /**
- * return whether the specified type is one of the container
- * types allowed by the JPA spec
- */
- protected boolean typeIsContainer(String typeName) {
- return this.getJpaContainerDefinition(typeName).isContainer();
- }
-
-
- // ********** misc **********
-
- @Override
- public PersistentType getParent() {
- return (PersistentType) super.getParent();
- }
-
- public PersistentType getOwningPersistentType() {
- return this.getParent();
- }
-
- public TypeMapping getOwningTypeMapping() {
- return this.getOwningPersistentType().getMapping();
- }
-
- public JavaPersistentAttribute getJavaPersistentAttribute() {
- return this;
- }
-
- public JavaResourceAttribute getResourceAttribute() {
- return this.accessor.getResourceAttribute();
- }
-
- public String getPrimaryKeyColumnName() {
- return this.mapping.getPrimaryKeyColumnName();
- }
-
- public String getTypeName() {
- return this.getResourceAttribute().getTypeName();
- }
-
- public boolean contains(int offset, CompilationUnit astRoot) {
- TextRange fullTextRange = this.getResourceAttribute().getTextRange(astRoot);
- // 'fullTextRange' will be null if the attribute no longer exists in the java;
- // the context model can be out of sync with the resource model
- // when a selection event occurs before the context model has a
- // chance to sync with the resource model via the update thread
- return (fullTextRange == null) ? false : fullTextRange.includes(offset);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.isVirtual() ?
- this.getOwningPersistentType().getValidationTextRange() :
- this.getSelectionTextRange(astRoot);
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttribute(messages, reporter, astRoot);
- this.mapping.validate(messages, reporter, astRoot);
- }
-
- protected void validateAttribute(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildAttributeValidator(astRoot).validate(messages, reporter);
- }
-
- protected abstract JptValidator buildAttributeValidator(CompilationUnit astRoot);
-
- protected PersistentAttributeTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaPersistentAttributeTextRangeResolver(this, astRoot);
- }
-
- /**
- * If the attribute's owning type is an <code>orm.xml</code> persistent
- * type, the attribute must be one of the type's default attributes.
- * (Actually, the Java attribute is held by a <em>virtual</em>
- * <code>orm.xml</code> attribute
- * (see {@link org.eclipse.jpt.jpa.core.internal.context.orm.VirtualOrmPersistentAttribute})
- * that is held by the <code>orm.xml</code> type.
- * The <em>virtual</em> attribute returns the Java attribute's mapping
- * as its own.)
- */
- public boolean isVirtual() {
- IContentType persistentTypeContentType = this.getOwningPersistentType().getResourceType().getContentType();
- return ! persistentTypeContentType.isKindOf(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE)
- && ! persistentTypeContentType.isKindOf(JptCommonCorePlugin.JAR_CONTENT_TYPE);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return this.mapping.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** metamodel **********
-
- public String getMetamodelContainerFieldTypeName() {
- return this.getJpaContainerDefinition().getMetamodelContainerFieldTypeName();
- }
-
- public String getMetamodelContainerFieldMapKeyTypeName() {
- return this.getJpaContainerDefinition().getMetamodelContainerFieldMapKeyTypeName((CollectionMapping) this.mapping);
- }
-
- public String getMetamodelTypeName() {
- String typeName = this.getTypeName();
- if (typeName == null) {
- return MetamodelField.DEFAULT_TYPE_NAME;
- }
- if (ClassName.isPrimitive(typeName)) {
- return ClassName.getWrapperClassName(typeName); // ???
- }
- return typeName;
- }
-
-
- // ********** JPA container definition **********
-
- public JpaContainerDefinition getJpaContainerDefinition() {
- // 'typeName' may include array brackets ("[]")
- // but not generic type arguments (e.g. "<java.lang.String>")
- return this.getJpaContainerDefinition(this.getResourceAttribute().getTypeName());
- }
-
- /**
- * Return the JPA container definition corresponding to the specified type;
- * return a "null" definition if the specified type is not "assignable to" one of the
- * container types allowed by the JPA spec.
- */
- protected JpaContainerDefinition getJpaContainerDefinition(String typeName) {
- for (JpaContainerDefinition definition : this.getJpaContainerDefinitions()) {
- if (definition.isAssignableFrom(typeName)) {
- return definition;
- }
- }
- return JpaContainerDefinition.Null.instance();
- }
-
- protected Iterable<JpaContainerDefinition> getJpaContainerDefinitions() {
- return JPA_CONTAINER_DEFINITIONS;
- }
-
- protected static final JpaContainerDefinition[] JPA_CONTAINER_DEFINITION_ARRAY = new JpaContainerDefinition[] {
- new CollectionJpaContainerDefinition(java.util.Set.class, JPA2_0.SET_ATTRIBUTE),
- new CollectionJpaContainerDefinition(java.util.List.class, JPA2_0.LIST_ATTRIBUTE),
- new CollectionJpaContainerDefinition(java.util.Collection.class, JPA2_0.COLLECTION_ATTRIBUTE),
- new MapJpaContainerDefinition(java.util.Map.class, JPA2_0.MAP_ATTRIBUTE)
- };
-
- protected static final Iterable<JpaContainerDefinition> JPA_CONTAINER_DEFINITIONS = new ArrayIterable<JpaContainerDefinition>(JPA_CONTAINER_DEFINITION_ARRAY);
-
-
- /**
- * Abstract JPA container definition
- */
- protected abstract static class AbstractJpaContainerDefinition
- implements JpaContainerDefinition
- {
- protected final Class<?> containerClass;
- protected final String metamodelContainerFieldTypeName;
-
- protected AbstractJpaContainerDefinition(Class<?> containerClass, String metamodelContainerFieldTypeName) {
- super();
- if ((containerClass == null) || (metamodelContainerFieldTypeName == null)) {
- throw new NullPointerException();
- }
- this.containerClass = containerClass;
- this.metamodelContainerFieldTypeName = metamodelContainerFieldTypeName;
- }
-
- public boolean isAssignableFrom(String typeName) {
- try {
- return this.containerClass.isAssignableFrom(Class.forName(typeName));
- }
- catch (ClassNotFoundException e) {
- return false;
- }
- }
-
- public boolean isContainer() {
- return true;
- }
-
- public String getMetamodelContainerFieldTypeName() {
- return this.metamodelContainerFieldTypeName;
- }
-
- }
-
- /**
- * Collection JPA container definition
- */
- protected static class CollectionJpaContainerDefinition
- extends AbstractJpaContainerDefinition
- {
- protected CollectionJpaContainerDefinition(Class<?> collectionClass, String staticMetamodelTypeDeclarationTypeName) {
- super(collectionClass, staticMetamodelTypeDeclarationTypeName);
- }
-
- public String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute) {
- return (resourceAttribute.getTypeTypeArgumentNamesSize() == 1) ?
- resourceAttribute.getTypeTypeArgumentName(0) :
- null;
- }
-
- public String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute) {
- return null;
- }
-
- public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
- return null;
- }
-
- public boolean isMap() {
- return false;
- }
- }
-
- /**
- * Map JPA container definition
- */
- protected static class MapJpaContainerDefinition
- extends AbstractJpaContainerDefinition
- {
- protected MapJpaContainerDefinition(Class<?> mapClass, String staticMetamodelTypeDeclarationTypeName) {
- super(mapClass, staticMetamodelTypeDeclarationTypeName);
- }
-
- public String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute) {
- return (resourceAttribute.getTypeTypeArgumentNamesSize() == 2) ?
- resourceAttribute.getTypeTypeArgumentName(1) :
- null;
- }
-
- public String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute) {
- return (resourceAttribute.getTypeTypeArgumentNamesSize() == 2) ?
- resourceAttribute.getTypeTypeArgumentName(0) :
- null;
- }
-
- public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
- return mapping.getMetamodelFieldMapKeyTypeName();
- }
-
- public boolean isMap() {
- return true;
- }
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
deleted file mode 100644
index 8ce9799f5c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNode;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ChainIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java persistent type:<ul>
- * <li>name
- * <li>access
- * <li>mapping
- * <li>attributes
- * <li>super persistent type
- * </ul>
- */
-public abstract class AbstractJavaPersistentType
- extends AbstractJavaJpaContextNode
- implements JavaPersistentType
-{
- protected final JavaResourceType resourceType;
-
- protected String name;
-
- protected PersistentType superPersistentType;
-
- protected AccessType specifiedAccess;
- protected AccessType defaultAccess; // never null
-
- protected JavaTypeMapping mapping; // never null
-
- protected final Vector<JavaPersistentAttribute> attributes = new Vector<JavaPersistentAttribute>();
-
-
- protected AbstractJavaPersistentType(PersistentType.Owner parent, JavaResourceType resourceType) {
- super(parent);
- this.resourceType = resourceType;
- this.name = this.resourceType.getQualifiedName();
- this.specifiedAccess = this.buildSpecifiedAccess();
-
- // keep this non-null
- this.defaultAccess = AccessType.FIELD;
-
- this.mapping = this.buildMapping();
- this.initializeAttributes();
-
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName(this.resourceType.getQualifiedName());
- this.setSpecifiedAccess_(this.buildSpecifiedAccess());
- this.syncMapping();
- this.synchronizeNodesWithResourceModel(this.getAttributes());
- }
-
- @Override
- public void update() {
- super.update();
- this.setSuperPersistentType(this.buildSuperPersistentType());
- this.setDefaultAccess(this.buildDefaultAccess());
- this.mapping.update();
- this.updateAttributes();
- this.registerRootStructureNode();
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public String getSimpleName(){
- return ClassName.getSimpleName(this.name);
- }
-
- protected void setName(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** super persistent type **********
-
- public PersistentType getSuperPersistentType() {
- return this.superPersistentType;
- }
-
- protected void setSuperPersistentType(PersistentType superPersistentType) {
- PersistentType old = this.superPersistentType;
- this.superPersistentType = superPersistentType;
- this.firePropertyChanged(SUPER_PERSISTENT_TYPE_PROPERTY, old, superPersistentType);
- }
-
- protected PersistentType buildSuperPersistentType() {
- HashSet<JavaResourceType> visited = new HashSet<JavaResourceType>();
- visited.add(this.resourceType);
- PersistentType spt = this.resolveSuperPersistentType(this.resourceType.getSuperclassQualifiedName(), visited);
- if (spt == null) {
- return null;
- }
- if (CollectionTools.contains(spt.getInheritanceHierarchy(), this)) {
- return null; // short-circuit in this case, we have circular inheritance
- }
- return spt.isMapped() ? spt : spt.getSuperPersistentType();
- }
-
- /**
- * The JPA spec allows non-persistent types in a persistent type's
- * inheritance hierarchy. We check for a persistent type with the
- * specified name in the persistence unit. If it is not found we use
- * resource persistent type and look for <em>its</em> super type.
- * <p>
- * The <code>visited</code> collection is used to detect a cycle in the
- * <em>resource</em> type inheritance hierarchy and prevent the resulting
- * stack overflow. Any cycles in the <em>context</em> type inheritance
- * hierarchy are handled in {@link #buildSuperPersistentType()}.
- */
- protected PersistentType resolveSuperPersistentType(String typeName, Collection<JavaResourceType> visited) {
- if (typeName == null) {
- return null;
- }
- JavaResourceType resourceType = (JavaResourceType) this.getJpaProject().getJavaResourceType(typeName, JavaResourceAnnotatedElement.Kind.TYPE);
- if ((resourceType == null) || visited.contains(resourceType)) {
- return null;
- }
- visited.add(resourceType);
- PersistentType spt = this.resolvePersistentType(typeName);
- return (spt != null) ? spt : this.resolveSuperPersistentType(resourceType.getSuperclassQualifiedName(), visited); // recurse
- }
-
- protected PersistentType resolvePersistentType(String typeName) {
- return this.getPersistenceUnit().getPersistentType(typeName);
- }
-
-
- // ********** access annotation **********
-
- protected Access2_0Annotation getAccessAnnotation() {
- return (Access2_0Annotation) this.resourceType.getNonNullAnnotation(this.getAccessAnnotationName());
- }
-
- protected void removeAccessAnnotationIfUnset() {
- Access2_0Annotation accessAnnotation = this.getAccessAnnotation();
- if (accessAnnotation != null && accessAnnotation.isUnset()) {
- this.removeAccessAnnotation();
- }
- }
-
- protected void removeAccessAnnotation() {
- this.resourceType.removeAnnotation(this.getAccessAnnotationName());
- }
-
- protected String getAccessAnnotationName() {
- return Access2_0Annotation.ANNOTATION_NAME;
- }
-
-
- // ********** access **********
-
- public AccessType getAccess() {
- return (this.specifiedAccess != null) ? this.specifiedAccess : this.defaultAccess;
- }
-
- public AccessType getSpecifiedAccess() {
- return this.specifiedAccess;
- }
-
- public void setSpecifiedAccess(AccessType access) {
- if (this.valuesAreDifferent(this.specifiedAccess, access)) {
- this.getAccessAnnotation().setValue(AccessType.toJavaResourceModel(access));
- this.removeAccessAnnotationIfUnset();
- this.setSpecifiedAccess_(access);
- }
- }
-
- protected void setSpecifiedAccess_(AccessType access) {
- AccessType old = this.specifiedAccess;
- this.specifiedAccess = access;
- this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildSpecifiedAccess() {
- return AccessType.fromJavaResourceModel(this.getAccessAnnotation().getValue(), this.getJpaPlatform(), this.getResourceType());
- }
-
- public AccessType getDefaultAccess() {
- return this.defaultAccess;
- }
-
- protected void setDefaultAccess(AccessType access) {
- AccessType old = this.defaultAccess;
- this.defaultAccess = access;
- this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, access);
- }
-
- /**
- * Check the access "specified" by the Java resource model:<ul>
- * <li>Check Java annotations first
- * <li>If <code>null</code>, check XML mapping specified access
- * <li>If still <code>null</code>, check {@link #superPersistentType} access
- * <li>If still <code>null</code>, check <code>entity-mappings</code>
- * specified access setting if the corresponding <code>persistent-type</code>
- * is listed in a mapping (<code>orm.xml</code>) file
- * <li>If still <code>null</code>, check the <code>persistence-unit</code>
- * default Access
- * <li>Default to {@link AccessType#FIELD FIELD} if all else fails.
- * </ul>
- */
- protected AccessType buildDefaultAccess() {
- AccessType accessType = buildAccess(this.resourceType);
- if (accessType != null) {
- return accessType;
- }
- accessType = this.getOwnerOverrideAccess();
- if (accessType != null) {
- return accessType;
- }
-
- if (this.superPersistentType != null) {
- accessType = this.superPersistentType.getAccess();
- if (accessType != null) {
- return accessType;
- }
- }
-
- accessType = this.getOwnerDefaultAccess();
- if (accessType != null) {
- return accessType;
- }
-
- // last ditch attempt to allow the user to annotate *something*
- return AccessType.FIELD;
- }
-
- // ********** mapping **********
-
- public JavaTypeMapping getMapping() {
- return this.mapping;
- }
-
- public String getMappingKey() {
- return this.mapping.getKey();
- }
-
- public void setMappingKey(String key) {
- if (this.valuesAreDifferent(key, this.getMappingKey())) {
- this.setMapping(this.buildMapping(key));
- }
- }
-
- protected JavaTypeMapping buildMapping(String key) {
- for (JavaTypeMappingDefinition definition : this.getMappingDefinitions()) {
- if (Tools.valuesAreEqual(definition.getKey(), key)) {
- Annotation annotation = this.resourceType.setPrimaryAnnotation(definition.getAnnotationName(), definition.getSupportingAnnotationNames());
- return definition.buildMapping(this, annotation, this.getJpaFactory());
- }
- }
- this.resourceType.setPrimaryAnnotation(null, EmptyIterable.<String>instance());
- return this.buildNullMapping();
- }
-
- /**
- * Clients do not set the mapping directly.
- * @see #setMappingKey(String)
- */
- protected void setMapping(JavaTypeMapping mapping) {
- JavaTypeMapping old = this.mapping;
- this.mapping = mapping;
- this.firePropertyChanged(MAPPING_PROPERTY, old, mapping);
- }
-
- protected JavaTypeMapping buildMapping() {
- for (JavaTypeMappingDefinition definition : this.getMappingDefinitions()) {
- Annotation annotation = this.resourceType.getAnnotation(definition.getAnnotationName());
- if (annotation != null) {
- return definition.buildMapping(this, annotation, this.getJpaFactory());
- }
- }
- return this.buildNullMapping();
- }
-
- protected void syncMapping() {
- JavaTypeMappingDefinition definition = null;
- Annotation annotation = null;
- for (Iterator<JavaTypeMappingDefinition> stream = this.mappingDefinitions(); stream.hasNext(); ) {
- definition = stream.next();
- annotation = this.resourceType.getAnnotation(definition.getAnnotationName());
- if (annotation != null) {
- break;
- }
- }
- // 'annotation' can still be null when we get here
- if (this.mapping.getMappingAnnotation() == annotation) {
- this.mapping.synchronizeWithResourceModel();
- } else {
- this.setMapping(this.buildMapping(annotation, definition));
- }
- }
-
- protected JavaTypeMapping buildMapping(Annotation annotation, JavaTypeMappingDefinition definition) {
- return (annotation != null) ?
- definition.buildMapping(this, annotation, this.getJpaFactory()) :
- this.buildNullMapping();
- }
-
- protected Iterator<JavaTypeMappingDefinition> mappingDefinitions() {
- return this.getMappingDefinitions().iterator();
- }
-
- protected Iterable<JavaTypeMappingDefinition> getMappingDefinitions() {
- return this.getJpaPlatform().getJavaTypeMappingDefinitions();
- }
-
- protected JavaTypeMapping buildNullMapping() {
- return this.getJpaFactory().buildJavaNullTypeMapping(this);
- }
-
- public boolean isMapped() {
- return this.mapping.isMapped();
- }
-
-
- // ********** attributes **********
-
- public ListIterable<JavaPersistentAttribute> getAttributes() {
- return new LiveCloneListIterable<JavaPersistentAttribute>(this.attributes);
- }
-
- public int getAttributesSize() {
- return this.attributes.size();
- }
-
- public Iterable<String> getAttributeNames() {
- return this.convertToNames(this.getAttributes());
- }
-
- public JavaPersistentAttribute getAttributeNamed(String attributeName) {
- Iterator<JavaPersistentAttribute> stream = this.getAttributesNamed(attributeName).iterator();
- return stream.hasNext() ? stream.next() : null;
- }
-
- public JavaPersistentAttribute getAttributeFor(JavaResourceAttribute javaResourceAttribute) {
- for (JavaPersistentAttribute javaAttribute : this.getAttributes()) {
- if (javaAttribute.getResourceAttribute() == javaResourceAttribute) {
- return javaAttribute;
- }
- }
- return null;
- }
-
- public Iterable<ReadOnlyPersistentAttribute> getAllAttributes() {
- return new CompositeIterable<ReadOnlyPersistentAttribute>(
- new TransformationIterable<PersistentType, Iterable<ReadOnlyPersistentAttribute>>(this.getInheritanceHierarchy()) {
- @Override
- protected Iterable<ReadOnlyPersistentAttribute> transform(PersistentType pt) {
- return new SuperListIterableWrapper<ReadOnlyPersistentAttribute>(pt.getAttributes());
- }
- }
- );
- }
-
- public Iterable<String> getAllAttributeNames() {
- return this.convertToNames(this.getAllAttributes());
- }
-
- protected Iterable<JavaPersistentAttribute> getAttributesNamed(final String attributeName) {
- return new FilteringIterable<JavaPersistentAttribute>(this.getAttributes()) {
- @Override
- protected boolean accept(JavaPersistentAttribute attribute) {
- return Tools.valuesAreEqual(attributeName, attribute.getName());
- }
- };
- }
-
- public ReadOnlyPersistentAttribute resolveAttribute(String attributeName) {
- Iterator<JavaPersistentAttribute> stream = this.getAttributesNamed(attributeName).iterator();
- if (stream.hasNext()) {
- JavaPersistentAttribute attribute = stream.next();
- // return null if we have more than one
- return stream.hasNext() ? null : attribute;
- }
- // recurse
- return (this.superPersistentType == null) ? null : this.superPersistentType.resolveAttribute(attributeName);
- }
-
- protected Iterable<String> convertToNames(Iterable<? extends ReadOnlyPersistentAttribute> attrs) {
- return new TransformationIterable<ReadOnlyPersistentAttribute, String>(attrs) {
- @Override
- protected String transform(ReadOnlyPersistentAttribute attribute) {
- return attribute.getName();
- }
- };
- }
-
- protected JavaPersistentAttribute buildField(JavaResourceField resourceField) {
- return getJpaFactory().buildJavaPersistentField(this, resourceField);
- }
-
- protected JavaPersistentAttribute buildProperty(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- return getJpaFactory().buildJavaPersistentProperty(this, resourceGetter, resourceSetter);
- }
-
- public boolean hasAnyAnnotatedAttributes() {
- return this.resourceType.hasAnyAnnotatedFields() || this.resourceType.hasAnyAnnotatedMethods();
- }
-
- protected void moveAttribute(int index, JavaPersistentAttribute attribute) {
- this.moveItemInList(index, attribute, this.attributes, ATTRIBUTES_LIST);
- }
-
- protected void addAttribute(int index, JavaPersistentAttribute persistentAttribute) {
- this.addItemToList(index, persistentAttribute, this.attributes, ATTRIBUTES_LIST);
- }
-
- protected void removeAttribute(JavaPersistentAttribute attribute) {
- this.removeItemFromList(attribute, this.attributes, ATTRIBUTES_LIST);
- }
-
- protected void initializeAttributes() {
- if (getAccess() == AccessType.FIELD) {
- this.intializeFieldAccessAttributes();
- }
- else if (getAccess() == AccessType.PROPERTY) {
- this.intializePropertyAccessAttributes();
- }
- }
-
- /**
- * Initialize the attributes for AccessType.FIELD
- * 1. all non-transient, non-static fields
- * 2. all annotated methods (getters/setters)
- */
- private void intializeFieldAccessAttributes() {
- this.initializeFieldAttributes(buildNonTransientNonStaticResourceFieldsFilter());
- this.initializeAnnotatedPropertyAttributes();
- }
-
- private void initializeFieldAttributes(Filter<JavaResourceField> filter) {
- for (JavaResourceField resourceField : this.getResourceFields(filter)) {
- this.attributes.add(this.buildField(resourceField));
- }
- }
-
- /**
- * Initialize the attributes for XmlAccessType.PROPERTY
- * 1. all getter/setter javabeans pairs
- * 2. all annotated fields
- * 3. all annotated methods getters/setters that don't have a matching pair
- */
- private void intializePropertyAccessAttributes() {
- this.initializeFieldAttributes(ANNOTATED_RESOURCE_FIELDS_FILTER);
-
- Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods());
- //iterate through all resource methods searching for persistable getters
- for (JavaResourceMethod getterMethod : this.getResourceMethods(this.buildPersistablePropertyGetterMethodsFilter())) {
- JavaResourceMethod setterMethod = getValidSiblingSetMethod(getterMethod, resourceMethods);
- if (methodsArePersistableProperties(getterMethod, setterMethod)) {
- this.attributes.add(this.buildProperty(getterMethod, setterMethod));
- }
- resourceMethods.remove(getterMethod);
- resourceMethods.remove(setterMethod);
- }
- this.initializeRemainingResourceMethodAttributes(resourceMethods);
- }
-
- private void initializeAnnotatedPropertyAttributes() {
- Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods());
- //iterate through all resource methods searching for persistable getters
- for (JavaResourceMethod getterMethod : this.getResourceMethods(buildPersistablePropertyGetterMethodsFilter())) {
- JavaResourceMethod setterMethod = getValidSiblingSetMethod(getterMethod, resourceMethods);
- if (getterMethod.isAnnotated() || (setterMethod != null && setterMethod.isAnnotated())) {
- this.attributes.add(this.buildProperty(getterMethod, setterMethod));
- }
- resourceMethods.remove(getterMethod);
- resourceMethods.remove(setterMethod);
- }
- this.initializeRemainingResourceMethodAttributes(resourceMethods);
- }
-
- private void initializeRemainingResourceMethodAttributes(Collection<JavaResourceMethod> resourceMethods) {
- //iterate through remaining resource methods and search for those that are annotated.
- //all getter methods will already be used.
- for (JavaResourceMethod resourceMethod : resourceMethods) {
- if (resourceMethod.isAnnotated()) {
- //annotated setter(or other random method) with no corresponding getter, bring into context model for validation purposes
- this.attributes.add(this.buildProperty(null, resourceMethod));
- }
- }
- }
-
- /**
- * The attributes are synchronized during the <em>update</em> because
- * the list of resource attributes is determined by the access type
- * which can be controlled in a number of different places....
- */
- protected void updateAttributes() {
- if (getAccess() == AccessType.FIELD) {
- this.syncFieldAccessAttributes();
- }
- else if (getAccess() == AccessType.PROPERTY) {
- this.syncPropertyAccessAttributes();
- }
- }
-
- /**
- * Initialize the attributes for AccessType.FIELD
- * 1. all non-transient, non-static fields
- * 2. all annotated methods(getters/setters)
- */
- private void syncFieldAccessAttributes() {
- HashSet<JavaPersistentAttribute> contextAttributes = CollectionTools.set(this.getAttributes());
-
- this.syncFieldAttributes(contextAttributes, this.buildNonTransientNonStaticResourceFieldsFilter());
- this.syncAnnotatedPropertyAttributes(contextAttributes);
- }
-
- /**
- * Initialize the attributes for XmlAccessType.PROPERTY
- * 1. all getter/setter javabeans pairs
- * 2. all annotated fields
- * 3. all annotated methods getters/setters that don't have a matching pair
- */
- private void syncPropertyAccessAttributes() {
- HashSet<JavaPersistentAttribute> contextAttributes = CollectionTools.set(this.getAttributes());
-
- this.syncFieldAttributes(contextAttributes, ANNOTATED_RESOURCE_FIELDS_FILTER);
-
- Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods());
- //iterate through all resource methods searching for persistable getters
- for (JavaResourceMethod getterMethod : this.getResourceMethods(this.buildPersistablePropertyGetterMethodsFilter())) {
- JavaResourceMethod setterMethod = getValidSiblingSetMethod(getterMethod, resourceMethods);
- if (methodsArePersistableProperties(getterMethod, setterMethod)) {
- boolean match = false;
- for (Iterator<JavaPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext();) {
- JavaPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(getterMethod, setterMethod)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- this.addAttribute(getAttributesSize(), this.buildProperty(getterMethod, setterMethod));
- }
- }
- resourceMethods.remove(getterMethod);
- resourceMethods.remove(setterMethod);
- }
- this.syncRemainingResourceMethods(contextAttributes, resourceMethods);
- }
-
- private void syncAnnotatedPropertyAttributes(HashSet<JavaPersistentAttribute> contextAttributes) {
- Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods());
- //iterate through all resource methods searching for persistable getters
- for (JavaResourceMethod getterMethod : this.getResourceMethods(buildPersistablePropertyGetterMethodsFilter())) {
- JavaResourceMethod setterMethod = getValidSiblingSetMethod(getterMethod, resourceMethods);
- if (getterMethod.isAnnotated() || (setterMethod != null && setterMethod.isAnnotated())) {
- boolean match = false;
- for (Iterator<JavaPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext();) {
- JavaPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(getterMethod, setterMethod)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- this.addAttribute(getAttributesSize(), this.buildProperty(getterMethod, setterMethod));
- }
- }
- resourceMethods.remove(getterMethod);
- resourceMethods.remove(setterMethod);
- }
- this.syncRemainingResourceMethods(contextAttributes, resourceMethods);
- }
-
- private void syncFieldAttributes(HashSet<JavaPersistentAttribute> contextAttributes, Filter<JavaResourceField> filter) {
- for (JavaResourceField resourceField : this.getResourceFields(filter)) {
- boolean match = false;
- for (Iterator<JavaPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext(); ) {
- JavaPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(resourceField)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- // added elements are sync'ed during construction or will be
- // updated during the next "update" (which is triggered by
- // their addition to the model)
- this.addAttribute(this.getAttributesSize(), this.buildField(resourceField));
- }
- }
- }
-
- private void syncRemainingResourceMethods(HashSet<JavaPersistentAttribute> contextAttributes, Collection<JavaResourceMethod> resourceMethods) {
- //iterate through remaining resource methods and search for those that are annotated.
- //all getter methods will already be used.
- for (JavaResourceMethod resourceMethod : resourceMethods) {
- if (resourceMethod.isAnnotated()) {
- boolean match = false;
- //annotated setter(or other random method) with no corresponding getter, bring into context model for validation purposes
- for (Iterator<JavaPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext();) {
- JavaPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(null, resourceMethod)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- this.addAttribute(getAttributesSize(), this.buildProperty(null, resourceMethod));
- }
- }
- }
-
- // remove any leftover context attributes
- for (JavaPersistentAttribute contextAttribute : contextAttributes) {
- this.removeAttribute(contextAttribute);
- }
- }
-
-
- protected Iterable<JavaResourceField> getResourceFields() {
- return this.resourceType.getFields();
- }
-
- protected Iterable<JavaResourceMethod> getResourceMethods() {
- return this.resourceType.getMethods();
- }
-
- protected Iterable<JavaResourceField> getResourceFields(Filter<JavaResourceField> filter) {
- return new FilteringIterable<JavaResourceField>(getResourceFields(), filter);
- }
-
- protected Iterable<JavaResourceMethod> getResourceMethods(Filter<JavaResourceMethod> filter) {
- return new FilteringIterable<JavaResourceMethod>(getResourceMethods(), filter);
- }
-
- public static Filter<JavaResourceField> buildNonTransientNonStaticResourceFieldsFilter() {
- return new Filter<JavaResourceField>() {
- public boolean accept(JavaResourceField resourceField) {
- return memberIsNonTransientNonStatic(resourceField) || resourceField.isAnnotated();
- }
- };
- }
-
- protected static boolean memberIsNonTransientNonStatic(JavaResourceMember resourceMember) {
- return !resourceMember.isTransient() && !resourceMember.isStatic();
- }
-
- public static Filter<JavaResourceField> ANNOTATED_RESOURCE_FIELDS_FILTER =
- new Filter<JavaResourceField>() {
- public boolean accept(JavaResourceField resourceField) {
- return resourceField.isAnnotated();
- }
- };
-
- protected Filter<JavaResourceMethod> buildPersistablePropertyGetterMethodsFilter() {
- return new Filter<JavaResourceMethod>() {
- public boolean accept(JavaResourceMethod resourceMethod) {
- return methodIsPersistablePropertyGetter(resourceMethod, getResourceMethods());
- }
- };
- }
-
- /**
- * Return whether the specified method is a "getter" method that
- * represents a property that may be "persisted".
- */
- public static boolean methodIsPersistablePropertyGetter(JavaResourceMethod resourceMethod, Iterable<JavaResourceMethod> allMethods) {
- if (methodHasInvalidModifiers(resourceMethod)) {
- return false;
- }
- if (resourceMethod.isConstructor()) {
- return false;
- }
-
- String returnTypeName = resourceMethod.getTypeName();
- if (returnTypeName == null) {
- return false; // DOM method bindings can have a null name
- }
- if (returnTypeName.equals("void")) { //$NON-NLS-1$
- return false;
- }
- if (methodHasParameters(resourceMethod)) {
- return false;
- }
-
- boolean booleanGetter = methodIsBooleanGetter(resourceMethod);
-
- // if the type has both methods:
- // boolean isProperty()
- // boolean getProperty()
- // then #isProperty() takes precedence and we ignore #getProperty();
- // but only having #getProperty() is OK too
- // (see the JavaBeans spec 1.01)
- if (booleanGetter && methodHasValidSiblingIsMethod(resourceMethod, allMethods)) {
- return false; // since the type also defines #isProperty(), ignore #getProperty()
- }
- return true;
- }
-
- private static boolean methodIsBooleanGetter(JavaResourceMethod resourceMethod) {
- String returnTypeName = resourceMethod.getTypeName();
- String name = resourceMethod.getMethodName();
- boolean booleanGetter = false;
- if (name.startsWith("is")) { //$NON-NLS-1$
- if (returnTypeName.equals("boolean")) { //$NON-NLS-1$
- } else {
- return false;
- }
- } else if (name.startsWith("get")) { //$NON-NLS-1$
- if (returnTypeName.equals("boolean")) { //$NON-NLS-1$
- booleanGetter = true;
- }
- } else {
- return false;
- }
- return booleanGetter;
- }
-
- /**
- * Return whether the method's modifiers prevent it
- * from being a getter or setter for a "persistent" property.
- */
- private static boolean methodHasInvalidModifiers(JavaResourceMethod resourceMethod) {
- int modifiers = resourceMethod.getModifiers();
- if (Modifier.isStatic(modifiers)) {
- return true;
- }
- return false;
- }
-
- private static boolean methodHasParameters(JavaResourceMethod resourceMethod) {
- return resourceMethod.getParametersSize() != 0;
- }
-
- /**
- * Return whether the method has a sibling "is" method for the specified
- * property and that method is valid for a "persistable" property.
- * Pre-condition: the method is a "boolean getter" (e.g. 'public boolean getProperty()');
- * this prevents us from returning true when the method itself is an
- * "is" method.
- */
- private static boolean methodHasValidSiblingIsMethod(JavaResourceMethod getMethod, Iterable<JavaResourceMethod> resourceMethods) {
- String capitalizedAttributeName = StringTools.capitalize(getMethod.getName());
- for (JavaResourceMethod sibling : resourceMethods) {
- if ((sibling.getParametersSize() == 0)
- && sibling.getMethodName().equals("is" + capitalizedAttributeName)) { //$NON-NLS-1$
- return methodIsValidSibling(sibling, "boolean"); //$NON-NLS-1$
- }
- }
- return false;
- }
-
- /**
- * Return whether the method has a sibling "set" method
- * and that method is valid for a "persistable" property.
- */
- public static JavaResourceMethod getValidSiblingSetMethod(JavaResourceMethod getMethod, Iterable<JavaResourceMethod> resourceMethods) {
- String capitalizedAttributeName = StringTools.capitalize(getMethod.getName());
- String parameterTypeErasureName = getMethod.getTypeName();
- for (JavaResourceMethod sibling : resourceMethods) {
- ListIterable<String> siblingParmTypeNames = sibling.getParameterTypeNames();
- if ((sibling.getParametersSize() == 1)
- && sibling.getMethodName().equals("set" + capitalizedAttributeName) //$NON-NLS-1$
- && siblingParmTypeNames.iterator().next().equals(parameterTypeErasureName)) {
- return methodIsValidSibling(sibling, "void") ? sibling : null; //$NON-NLS-1$
- }
- }
- return null;
- }
-
- /**
- * Return whether the specified method is a valid sibling with the
- * specified return type.
- */
- private static boolean methodIsValidSibling(JavaResourceMethod resourceMethod, String returnTypeName) {
- if (resourceMethod == null) {
- return false;
- }
- if (methodHasInvalidModifiers(resourceMethod)) {
- return false;
- }
- if (resourceMethod.isConstructor()) {
- return false;
- }
- String rtName = resourceMethod.getTypeName();
- if (rtName == null) {
- return false; // DOM method bindings can have a null name
- }
- return rtName.equals(returnTypeName);
- }
-
- public static boolean methodsArePersistableProperties(JavaResourceMethod getterMethod, JavaResourceMethod setterMethod) {
- if (setterMethod != null) {
- return true;
- }
- else if (getterMethod.isAnnotated()) {
- //annotated getter with no corresponding setter, bring into context model for validation purposes
- return true;
- }
- return false;
- }
-
-
- // ********** inheritance **********
-
- public Iterable<PersistentType> getInheritanceHierarchy() {
- return this.getInheritanceHierarchyOf(this);
- }
-
- public Iterable<PersistentType> getAncestors() {
- return this.getInheritanceHierarchyOf(this.superPersistentType);
- }
-
- protected Iterable<PersistentType> getInheritanceHierarchyOf(PersistentType start) {
- // using a chain iterable to traverse up the inheritance tree
- return new ChainIterable<PersistentType>(start) {
- @Override
- protected PersistentType nextLink(PersistentType persistentType) {
- return persistentType.getSuperPersistentType();
- }
- };
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<JavaPersistentType> getType() {
- return JavaPersistentType.class;
- }
-
- // it would be nice if the we passed in an astRoot here, but then we
- // would need to pass it to the XML structure nodes too...
- public JpaStructureNode getStructureNode(int offset) {
- CompilationUnit astRoot = this.buildASTRoot();
-
- if (this.contains(offset, astRoot)) {
- for (JavaPersistentAttribute persistentAttribute : this.getAttributes()) {
- if (persistentAttribute.contains(offset, astRoot)) {
- return persistentAttribute;
- }
- }
- return this;
- }
- return null;
- }
-
- protected boolean contains(int offset, CompilationUnit astRoot) {
- TextRange fullTextRange = this.resourceType.getTextRange(astRoot);
- // 'fullTextRange' will be null if the type no longer exists in the java;
- // the context model can be out of sync with the resource model
- // when a selection event occurs before the context model has a
- // chance to sync with the resource model via the update thread
- return (fullTextRange == null) ? false : fullTextRange.includes(offset);
- }
-
- public TextRange getSelectionTextRange() {
- return this.getSelectionTextRange(this.buildASTRoot());
- }
-
- protected TextRange getSelectionTextRange(CompilationUnit astRoot) {
- return this.resourceType.getNameTextRange(astRoot);
- }
-
- public void dispose() {
- this.unregisterRootStructureNode();
- }
-
- protected void registerRootStructureNode() {
- JpaFile jpaFile = this.getJpaFile();
- // the JPA file can be null if the resource type is "external"
- if (jpaFile != null) {
- jpaFile.addRootStructureNode(this.name, this);
- }
- }
-
- protected void unregisterRootStructureNode() {
- JpaFile jpaFile = this.getJpaFile();
- // the JPA file can be null if the .java file was deleted
- // or the resource type is "external"
- if (jpaFile != null) {
- jpaFile.removeRootStructureNode(this.name, this);
- }
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- Iterable<String> values = this.mapping.getJavaCompletionProposals(pos, filter, astRoot);
- if (values != null) {
- return values;
- }
- for (JavaPersistentAttribute attribute : this.getAttributes()) {
- values = attribute.getJavaCompletionProposals(pos, filter, astRoot);
- if (values != null) {
- return values;
- }
- }
- return EmptyIterable.instance();
- }
-
-
- // ********** validation **********
-
- public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- // TODO temporary hack since we don't know yet where to put
- // any messages for types in another project (e.g. referenced by
- // persistence.xml)
- IFile file = this.resourceType.getFile();
- // 'file' will be null if the type is "external" and binary;
- // the file will be in a different project if the type is "external" and source;
- // the type will be binary if it is in a JAR in the current project
- if ((file != null) && file.getProject().equals(this.getJpaProject().getProject()) &&
- (this.resourceType instanceof SourceNode)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
- }
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMapping(messages, reporter, astRoot);
- this.validateAttributes(messages, reporter, astRoot);
- }
-
- protected void validateMapping(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- try {
- this.mapping.validate(messages, reporter, astRoot);
- } catch(Throwable t) {
- JptJpaCorePlugin.log(t);
- }
- }
-
- protected void validateAttributes(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- for (JavaPersistentAttribute attribute : this.getAttributes()) {
- this.validateAttribute(attribute, reporter, messages, astRoot);
- }
- }
-
- protected void validateAttribute(JavaPersistentAttribute attribute, IReporter reporter, List<IMessage> messages, CompilationUnit astRoot) {
- try {
- attribute.validate(messages, reporter, astRoot);
- } catch(Throwable t) {
- JptJpaCorePlugin.log(t);
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getSelectionTextRange(astRoot);
- }
-
- public TextRange getValidationTextRange() {
- return this.getSelectionTextRange();
- }
-
-
- // ********** misc **********
-
- @Override
- public PersistentType.Owner getParent() {
- return (PersistentType.Owner) super.getParent();
- }
-
- @Override
- public IResource getResource() {
- return this.resourceType.getFile();
- }
-
- public JavaResourceType getJavaResourceType() {
- return this.resourceType;
- }
-
- public AccessType getOwnerOverrideAccess() {
- return this.getParent().getOverridePersistentTypeAccess();
- }
-
- public AccessType getOwnerDefaultAccess() {
- return this.getParent().getDefaultPersistentTypeAccess();
- }
-
- protected CompilationUnit buildASTRoot() {
- return this.resourceType.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
- protected JpaFile getJpaFile() {
- return this.getJpaFile(this.resourceType.getFile());
- }
-
- public boolean isFor(String typeName) {
- return Tools.valuesAreEqual(typeName, this.getName());
- }
-
- public boolean isIn(IPackageFragment packageFragment) {
- return Tools.valuesAreEqual(packageFragment.getElementName(), this.getPackageName());
- }
-
- protected String getPackageName() {
- return this.getJavaResourceType().getPackageName();
- }
-
- public PersistentType getOverriddenPersistentType() {
- return null; // Java persistent types do not override anything
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** Access type **********
-
- /**
- * Return the access type currently implied by the specified Java source
- * code or class file:<ul>
- * <li>if any fields are annotated =>
- * {@link AccessType#FIELD FIELD}
- * <li>if only properties are annotated =>
- * {@link AccessType#PROPERTY PROPERTY}
- * <li>if neither are annotated =>
- * <code>null</code>
- *
- * </ul>
- */
- public static AccessType buildAccess(JavaResourceType jrType) {
- for (JavaResourceField field : jrType.getFields()) {
- if (field.isAnnotated()) {
- // any field is annotated => FIELD
- return AccessType.FIELD;
- }
- }
-
- for (JavaResourceMethod method : jrType.getMethods()) {
- if (method.isAnnotated()) {
- // none of the fields are annotated and any method is annotated => PROPERTY
- return AccessType.PROPERTY;
- }
- }
-
- // nothing is annotated
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
deleted file mode 100644
index 98d92f3d5b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.java.QueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java query
- */
-public abstract class AbstractJavaQuery<A extends QueryAnnotation>
- extends AbstractJavaJpaContextNode
- implements JavaQuery
-{
- protected final A queryAnnotation;
-
- protected String name;
-
- protected String query;
-
- protected final ContextListContainer<JavaQueryHint, QueryHintAnnotation> queryHintContainer;
-
-
- protected AbstractJavaQuery(JavaJpaContextNode parent, A queryAnnotation) {
- super(parent);
- this.queryAnnotation = queryAnnotation;
- this.name = queryAnnotation.getName();
- this.query = queryAnnotation.getQuery();
- this.queryHintContainer = this.buildHintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.queryAnnotation.getName());
- this.setQuery_(this.queryAnnotation.getQuery());
- this.syncHints();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getHints());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.queryAnnotation.setName(name);
- this.setName_(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** query **********
-
- public String getQuery() {
- return this.query;
- }
-
- public void setQuery(String query) {
- this.queryAnnotation.setQuery(query);
- this.setQuery_(query);
- }
-
- protected void setQuery_(String query) {
- String old = this.query;
- this.query = query;
- this.firePropertyChanged(QUERY_PROPERTY, old, query);
- }
-
-
- // ********** hints **********
-
- public ListIterable<JavaQueryHint> getHints() {
- return this.queryHintContainer.getContextElements();
- }
-
- public int getHintsSize() {
- return this.queryHintContainer.getContextElementsSize();
- }
-
- public JavaQueryHint addHint() {
- return this.addHint(this.getHintsSize());
- }
-
- public JavaQueryHint addHint(int index) {
- QueryHintAnnotation annotation = this.queryAnnotation.addHint(index);
- return this.queryHintContainer.addContextElement(index, annotation);
- }
-
- public void removeHint(QueryHint hint) {
- this.removeHint(this.queryHintContainer.indexOfContextElement((JavaQueryHint) hint));
- }
-
- public void removeHint(int index) {
- this.queryAnnotation.removeHint(index);
- this.queryHintContainer.removeContextElement(index);
- }
-
- public void moveHint(int targetIndex, int sourceIndex) {
- this.queryAnnotation.moveHint(targetIndex, sourceIndex);
- this.queryHintContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- public JavaQueryHint getHint(int index) {
- return this.queryHintContainer.get(index);
- }
-
- protected JavaQueryHint buildHint(QueryHintAnnotation hintAnnotation) {
- return this.getJpaFactory().buildJavaQueryHint(this, hintAnnotation);
- }
-
- protected void syncHints() {
- this.queryHintContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<QueryHintAnnotation> getHintAnnotations() {
- return this.queryAnnotation.getHints();
- }
-
- protected ContextListContainer<JavaQueryHint, QueryHintAnnotation> buildHintContainer() {
- HintContainer container = new HintContainer();
- container.initialize();
- return container;
- }
-
- /**
- * query hint container
- */
- protected class HintContainer
- extends ContextListContainer<JavaQueryHint, QueryHintAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return HINTS_LIST;
- }
- @Override
- protected JavaQueryHint buildContextElement(QueryHintAnnotation resourceElement) {
- return AbstractJavaQuery.this.buildHint(resourceElement);
- }
- @Override
- protected ListIterable<QueryHintAnnotation> getResourceElements() {
- return AbstractJavaQuery.this.getHintAnnotations();
- }
- @Override
- protected QueryHintAnnotation getResourceElement(JavaQueryHint contextElement) {
- return contextElement.getQueryHintAnnotation();
- }
- }
-
- // ********** validation **********
-
- public void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateName(messages, astRoot);
- this.validateQuery(queryHelper, messages, reporter, astRoot);
- }
-
- protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
- if (StringTools.stringIsEmpty(this.name)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.QUERY_NAME_UNDEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getNameTextRange(astRoot)
- )
- );
- }
- }
-
- public void validateQuery(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (StringTools.stringIsEmpty(this.query)){
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.QUERY_STATEMENT_UNDEFINED,
- new String[] {this.name},
- this,
- this.getNameTextRange(astRoot)
- )
- );
- } else {
- this.validateQuery_(queryHelper, messages, reporter);
- }
- }
-
- protected abstract void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.queryAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.queryAnnotation.getNameTextRange(), astRoot);
- }
-
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return (this != node) &&
- (this.getType() == node.getType()) &&
- this.isEquivalentTo((Query)node);
- }
-
- protected boolean isEquivalentTo(Query other) {
- return Tools.valuesAreEqual(this.name, other.getName()) &&
- Tools.valuesAreEqual(this.query, other.getQuery()) &&
- hintsAreEquivalentTo(other);
- }
-
- protected boolean hintsAreEquivalentTo(Query other) {
- if (this.getHintsSize() != other.getHintsSize()) {
- return false;
- }
-
- for (int i=0; i<this.getHintsSize(); i++) {
- if (! this.queryHintContainer.get(i).isEquivalentTo(other.getHint(i))) {
- return false;
- }
- }
-
- return true;
- }
-
- // ********** misc **********
-
- @Override
- public JavaQueryContainer getParent() {
- return (JavaQueryContainer) super.getParent();
- }
-
- public A getQueryAnnotation() {
- return this.queryAnnotation;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaReadOnlyUniqueConstraint.java
deleted file mode 100644
index 0760a1be4c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaReadOnlyUniqueConstraint.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.context.java;
-
-import java.util.Vector;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyUniqueConstraint;
-
-public abstract class AbstractJavaReadOnlyUniqueConstraint
- extends AbstractJavaJpaContextNode
- implements JavaReadOnlyUniqueConstraint
-{
- protected final Vector<String> columnNames = new Vector<String>();
-
-
- public AbstractJavaReadOnlyUniqueConstraint(JavaJpaContextNode parent) {
- super(parent);
- }
-
-
- // ********** column names **********
-
- public Iterable<String> getColumnNames() {
- return new LiveCloneIterable<String>(this.columnNames);
- }
-
- public int getColumnNamesSize() {
- return this.columnNames.size();
- }
-
- public String getColumnName(int index) {
- return this.columnNames.get(index);
- }
-
- protected void syncColumnNames() {
- this.synchronizeList(this.getResourceColumnNames(), this.columnNames, COLUMN_NAMES_LIST);
- }
-
- protected abstract Iterable<String> getResourceColumnNames();
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.columnNames);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJpaContextNode getParent() {
- return (JavaJpaContextNode) super.getParent();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
deleted file mode 100644
index a87afee3be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaCascade;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaCascade;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java relationship mapping (1:1, 1:m, m:1, m:m)
- */
-public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMappingAnnotation>
- extends AbstractJavaAttributeMapping<A>
- implements JavaRelationshipMapping
-{
- protected String specifiedTargetEntity;
- protected String defaultTargetEntity;
- protected String fullyQualifiedTargetEntity;
-
- protected final JavaMappingRelationship relationship;
-
- protected final JavaCascade cascade;
-
- protected FetchType specifiedFetch;
- protected FetchType defaultFetch;
-
-
- protected AbstractJavaRelationshipMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.specifiedTargetEntity = this.buildSpecifiedTargetEntity();
- this.relationship = this.buildRelationship();
- this.cascade = this.buildCascade();
- this.specifiedFetch = this.buildSpecifiedFetch();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTargetEntity_(this.buildSpecifiedTargetEntity());
- this.relationship.synchronizeWithResourceModel();
- this.cascade.synchronizeWithResourceModel();
- this.setSpecifiedFetch_(this.buildSpecifiedFetch());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTargetEntity(this.buildDefaultTargetEntity());
- this.setFullyQualifiedTargetEntity(this.buildFullyQualifiedTargetEntity());
- this.relationship.update();
- this.cascade.update();
- this.setDefaultFetch(this.buildDefaultFetch());
- }
-
-
- // ********** target entity **********
-
- public String getTargetEntity() {
- return (this.specifiedTargetEntity != null) ? this.specifiedTargetEntity : this.defaultTargetEntity;
- }
-
- public String getSpecifiedTargetEntity() {
- return this.specifiedTargetEntity;
- }
-
- public void setSpecifiedTargetEntity(String entity) {
- if (this.valuesAreDifferent(entity, this.specifiedTargetEntity)) {
- this.getAnnotationForUpdate().setTargetEntity(entity);
- this.setSpecifiedTargetEntity_(entity);
- }
- }
-
- protected void setSpecifiedTargetEntity_(String entity) {
- String old = this.specifiedTargetEntity;
- this.specifiedTargetEntity = entity;
- this.firePropertyChanged(SPECIFIED_TARGET_ENTITY_PROPERTY, old, entity);
- }
-
- protected String buildSpecifiedTargetEntity() {
- A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTargetEntity();
- }
-
- public String getDefaultTargetEntity() {
- return this.defaultTargetEntity;
- }
-
- protected void setDefaultTargetEntity(String entity) {
- String old = this.defaultTargetEntity;
- this.defaultTargetEntity = entity;
- this.firePropertyChanged(DEFAULT_TARGET_ENTITY_PROPERTY, old, entity);
- }
-
- protected abstract String buildDefaultTargetEntity();
-
- public String getFullyQualifiedTargetEntity() {
- return this.fullyQualifiedTargetEntity;
- }
-
- protected void setFullyQualifiedTargetEntity(String entity) {
- String old = this.fullyQualifiedTargetEntity;
- this.fullyQualifiedTargetEntity = entity;
- this.firePropertyChanged(FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY, old, entity);
- }
-
- protected String buildFullyQualifiedTargetEntity() {
- return (this.specifiedTargetEntity == null) ?
- this.defaultTargetEntity :
- this.getMappingAnnotation().getFullyQualifiedTargetEntityClassName();
- }
-
- public Entity getResolvedTargetEntity() {
- return this.getPersistenceUnit().getEntity(this.fullyQualifiedTargetEntity);
- }
-
- // sub-classes like this to be public
- public PersistentType getResolvedTargetType() {
- return this.getPersistenceUnit().getPersistentType(this.fullyQualifiedTargetEntity);
- }
-
- public char getTargetEntityEnclosingTypeSeparator() {
- return '.';
- }
-
-
- // ********** relationship reference **********
-
- public JavaMappingRelationship getRelationship() {
- return this.relationship;
- }
-
- protected abstract JavaMappingRelationship buildRelationship();
-
-
- // ********** cascade **********
-
- public JavaCascade getCascade() {
- return this.cascade;
- }
-
- protected JavaCascade buildCascade() {
- // NB: we don't use the platform
- return new GenericJavaCascade(this);
- }
-
-
- // ********** fetch **********
-
- public FetchType getFetch() {
- return (this.specifiedFetch != null) ? this.specifiedFetch : this.defaultFetch;
- }
-
- public FetchType getSpecifiedFetch() {
- return this.specifiedFetch;
- }
-
- public void setSpecifiedFetch(FetchType fetch) {
- if (this.valuesAreDifferent(fetch, this.specifiedFetch)) {
- this.getAnnotationForUpdate().setFetch(FetchType.toJavaResourceModel(fetch));
- this.setSpecifiedFetch_(fetch);
- }
- }
-
- protected void setSpecifiedFetch_(FetchType fetch) {
- FetchType old = this.specifiedFetch;
- this.specifiedFetch = fetch;
- this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildSpecifiedFetch() {
- A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : FetchType.fromJavaResourceModel(annotation.getFetch());
- }
-
- public FetchType getDefaultFetch() {
- return this.defaultFetch;
- }
-
- protected void setDefaultFetch(FetchType fetch) {
- FetchType old = this.defaultFetch;
- this.defaultFetch = fetch;
- this.firePropertyChanged(DEFAULT_FETCH_PROPERTY, old, fetch);
- }
-
- protected abstract FetchType buildDefaultFetch();
-
-
- // ********** misc **********
-
- @Override
- public boolean isRelationshipOwner() {
- return this.relationship.isOwner();
- }
-
- @Override
- public boolean isOwnedBy(AttributeMapping mapping) {
- return mapping.isRelationshipOwner() &&
- this.relationship.isOwnedBy((RelationshipMapping) mapping);
- }
-
- public RelationshipMapping getRelationshipOwner() {
- Entity entity = this.getResolvedTargetEntity();
- if (entity == null) {
- return null;
- }
- for (ReadOnlyPersistentAttribute attribute : entity.getPersistentType().getAllAttributes()) {
- AttributeMapping mapping = attribute.getMapping();
- if (this.isOwnedBy(mapping)) {
- return (RelationshipMapping) mapping;
- }
- }
- return null;
- }
-
- @Override
- public boolean isOverridableAssociationMapping() {
- return this.relationship.isOverridable();
- }
-
- public Iterable<String> getAllTargetEntityAttributeNames() {
- return new CompositeIterable<String>(this.getAllTargetEntityAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getAllTargetEntityAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getAllTargetEntityAttributeMappings(), AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<AttributeMapping> getAllTargetEntityAttributeMappings() {
- Entity entity = this.getResolvedTargetEntity();
- return (entity != null) ? entity.getAllAttributeMappings() : EmptyIterable.<AttributeMapping> instance();
- }
-
- // Get the names of non-transient attribute mappings
- public Iterable<String> getTargetEntityNonTransientAttributeNames() {
- return new CompositeIterable<String>(this.getTargetEntityNonTransientAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getTargetEntityNonTransientAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getTargetEntityNonTransientAttributeMappings(), AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<AttributeMapping> getTargetEntityNonTransientAttributeMappings() {
- Entity entity = this.getResolvedTargetEntity();
- return (entity != null) ? entity.getNonTransientAttributeMappings() : EmptyIterable.<AttributeMapping> instance();
- }
-
- protected String getTargetEntityIdAttributeName() {
- PersistentAttribute attribute = this.getTargetEntityIdAttribute();
- return (attribute == null) ? null : attribute.getName();
- }
-
- protected PersistentAttribute getTargetEntityIdAttribute() {
- Entity entity = this.getResolvedTargetEntity();
- return (entity == null) ? null : entity.getIdAttribute();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.relationship.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return null;
- }
-
-
- // ********** metamodel **********
-
- @Override
- public String getMetamodelTypeName() {
- return (this.fullyQualifiedTargetEntity != null) ? this.fullyQualifiedTargetEntity : MetamodelField.DEFAULT_TYPE_NAME;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateTargetEntity(messages, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
- }
-
- protected void validateTargetEntity(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.getTargetEntity() == null) {
- String msg = this.getPersistentAttribute().isVirtual() ?
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED :
- JpaValidationMessages.TARGET_ENTITY_NOT_DEFINED;
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msg,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- return;
- }
-
- IType targetEntityJdtType = JDTTools.findType(this.getJavaProject(), this.getFullyQualifiedTargetEntity());
- if (targetEntityJdtType == null) {
- //java compiler will handle this case
- return;
- }
- if (this.getResolvedTargetEntity() == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY,
- new String[] {this.getName(), this.getFullyQualifiedTargetEntity()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TARGET_ENTITY_IS_NOT_AN_ENTITY,
- new String[] {this.getFullyQualifiedTargetEntity()},
- this,
- this.getTargetEntityTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getAnnotationTargetEntityTextRange(), astRoot);
- }
-
- protected TextRange getAnnotationTargetEntityTextRange() {
- A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTargetEntityTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSequenceGenerator.java
deleted file mode 100644
index 57fc8fbc0c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSequenceGenerator.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.db.Schema;
-
-/**
- * Java sequence generator
- */
-public abstract class AbstractJavaSequenceGenerator<A extends SequenceGeneratorAnnotation>
- extends AbstractJavaGenerator<A>
- implements JavaSequenceGenerator
-{
- protected String specifiedSequenceName;
- protected String defaultSequenceName;
-
-
- protected AbstractJavaSequenceGenerator(JavaGeneratorContainer parent, A generatorAnnotation) {
- super(parent, generatorAnnotation);
- this.specifiedSequenceName = generatorAnnotation.getSequenceName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedSequenceName_(this.generatorAnnotation.getSequenceName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultSequenceName(this.buildDefaultSequenceName());
- }
-
-
- // ********** initial value **********
-
- @Override
- protected int buildDefaultInitialValue() {
- return DEFAULT_INITIAL_VALUE;
- }
-
-
- // ********** sequence name **********
-
- public String getSequenceName() {
- return (this.specifiedSequenceName != null) ? this.specifiedSequenceName : this.defaultSequenceName;
- }
-
- public String getSpecifiedSequenceName() {
- return this.specifiedSequenceName;
- }
-
- public void setSpecifiedSequenceName(String name) {
- this.generatorAnnotation.setSequenceName(name);
- this.setSpecifiedSequenceName_(name);
- }
-
- protected void setSpecifiedSequenceName_(String name) {
- String old = this.specifiedSequenceName;
- this.specifiedSequenceName = name;
- this.firePropertyChanged(SPECIFIED_SEQUENCE_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultSequenceName() {
- return this.defaultSequenceName;
- }
-
- protected void setDefaultSequenceName(String name) {
- String old = this.defaultSequenceName;
- this.defaultSequenceName = name;
- this.firePropertyChanged(DEFAULT_SEQUENCE_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultSequenceName() {
- return null; // TODO the default sequence name is determined by the runtime provider...
- }
-
-
- // ********** Java completion proposals **********
-
- /**
- * called if the database is connected:
- * sequenceName
- */
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.sequenceNameTouches(pos)) {
- return this.getJavaCandidateSequences(filter);
- }
- return null;
- }
-
- protected boolean sequenceNameTouches(int pos) {
- return this.generatorAnnotation.sequenceNameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateSequences(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateSequences(filter));
- }
-
- protected Iterable<String> getCandidateSequences(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateSequences(), filter);
- }
-
- protected Iterable<String> getCandidateSequences() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema != null) ? dbSchema.getSortedSequenceIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** misc **********
-
- public Class<SequenceGenerator> getType() {
- return SequenceGenerator.class;
- }
-
- // ********** validation **********
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((SequenceGenerator) node);
- }
-
- protected boolean isEquivalentTo(SequenceGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.specifiedSequenceName, generator.getSpecifiedSequenceName());
- }
-
- // ********** metadata conversion **********
-
- public void convertTo(EntityMappings entityMappings) {
- entityMappings.addSequenceGenerator().convertFrom(this);
- }
-
- public void delete() {
- this.getParent().removeSequenceGenerator();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
deleted file mode 100644
index 314a3c74b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.NullJavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.SingleRelationshipMappingAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java single relationship mapping (1:1, m:1)
- */
-public abstract class AbstractJavaSingleRelationshipMapping<A extends SingleRelationshipMappingAnnotation>
- extends AbstractJavaRelationshipMapping<A>
- implements JavaSingleRelationshipMapping2_0
-{
- protected Boolean specifiedOptional;
- protected boolean defaultOptional;
-
- protected final JavaDerivedIdentity2_0 derivedIdentity;
-
-
- protected AbstractJavaSingleRelationshipMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.specifiedOptional = this.buildSpecifiedOptional();
- this.derivedIdentity = this.buildDerivedIdentity();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedOptional_(this.buildSpecifiedOptional());
- this.derivedIdentity.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultOptional(this.buildDefaultOptional());
- this.derivedIdentity.update();
- }
-
-
- // ********** optional **********
-
- public boolean isOptional() {
- return (this.specifiedOptional != null) ? this.specifiedOptional.booleanValue() : this.defaultOptional;
- }
-
- public Boolean getSpecifiedOptional() {
- return this.specifiedOptional;
- }
-
- public void setSpecifiedOptional(Boolean optional) {
- if (this.valuesAreDifferent(optional, this.specifiedOptional)) {
- this.getAnnotationForUpdate().setOptional(optional);
- this.setSpecifiedOptional_(optional);
- }
- }
-
- protected void setSpecifiedOptional_(Boolean optional) {
- Boolean old = this.specifiedOptional;
- this.specifiedOptional = optional;
- this.firePropertyChanged(SPECIFIED_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected Boolean buildSpecifiedOptional() {
- A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getOptional();
- }
-
- public boolean isDefaultOptional() {
- return this.defaultOptional;
- }
-
- protected void setDefaultOptional(boolean optional) {
- boolean old = this.defaultOptional;
- this.defaultOptional = optional;
- this.firePropertyChanged(DEFAULT_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected boolean buildDefaultOptional() {
- return DEFAULT_OPTIONAL;
- }
-
-
- // ********** derived identity **********
-
- public JavaDerivedIdentity2_0 getDerivedIdentity() {
- return this.derivedIdentity;
- }
-
- protected JavaDerivedIdentity2_0 buildDerivedIdentity() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaDerivedIdentity(this) :
- new NullJavaDerivedIdentity2_0(this);
- }
-
-
- // ********** misc **********
-
- @Override
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
- @Override
- protected String buildDefaultTargetEntity() {
- return this.getPersistentAttribute().getSingleReferenceTargetTypeName();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.derivedIdentity.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.derivedIdentity.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
deleted file mode 100644
index d327a92f32..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.NameTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java table, secondary table, join table, or collection table
- * <p>
- * <strong>NB:</strong> any subclass that directly holds its table
- * annotation must:<ul>
- * <li>call the "super" constructor that takes a table annotation
- * {@link #AbstractJavaTable(JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.Table.Owner, BaseTableAnnotation)}
- * <li>override {@link #setTableAnnotation(BaseTableAnnotation)} to set the table
- * annotation so it is in place before the table's state
- * (e.g. {@link #specifiedName}) is initialized
- * </ul>
- */
-public abstract class AbstractJavaTable<A extends BaseTableAnnotation>
- extends AbstractJavaJpaContextNode
- implements JavaTable, UniqueConstraint.Owner
-{
- protected final Owner owner;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected final ContextListContainer<JavaUniqueConstraint, UniqueConstraintAnnotation> uniqueConstraintContainer;
-
-
- protected AbstractJavaTable(JavaJpaContextNode parent, Owner owner) {
- this(parent, owner, null);
- }
-
- protected AbstractJavaTable(JavaJpaContextNode parent, Owner owner, A tableAnnotation) {
- super(parent);
- this.owner = owner;
- this.setTableAnnotation(tableAnnotation);
- this.specifiedName = this.buildSpecifiedName();
- this.specifiedSchema = this.buildSpecifiedSchema();
- this.specifiedCatalog = this.buildSpecifiedCatalog();
- this.uniqueConstraintContainer = this.buildUniqueConstraintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedName_(this.buildSpecifiedName());
- this.setSpecifiedSchema_(this.buildSpecifiedSchema());
- this.setSpecifiedCatalog_(this.buildSpecifiedCatalog());
- this.syncUniqueConstraints();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultName(this.buildDefaultName());
- this.setDefaultSchema(this.buildDefaultSchema());
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.updateNodes(this.getUniqueConstraints());
- }
-
-
- // ********** table annotation **********
-
- /**
- * Return the Java table annotation. Do not return <code>null</code> if the
- * Java annotation does not exist; return a <em>null</em> table annotation
- * instead.
- */
- public abstract A getTableAnnotation();
-
- /**
- * see class comment... ({@link AbstractJavaTable})
- */
- protected void setTableAnnotation(A tableAnnotation) {
- if (tableAnnotation != null) {
- throw new IllegalArgumentException("this method must be overridden if the table annotation is not null: " + tableAnnotation); //$NON-NLS-1$
- }
- }
-
- protected void removeTableAnnotationIfUnset() {
- if (this.getTableAnnotation().isUnset()) {
- this.removeTableAnnotation();
- }
- }
-
- protected abstract void removeTableAnnotation();
-
- public boolean isSpecifiedInResource() {
- return this.getTableAnnotation().isSpecified();
- }
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- public void setSpecifiedName(String name) {
- if (this.valuesAreDifferent(this.specifiedName, name)) {
- this.getTableAnnotation().setName(name);
- this.removeTableAnnotationIfUnset();
- this.setSpecifiedName_(name);
- }
- }
-
- protected void setSpecifiedName_(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- return this.getTableAnnotation().getName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected abstract String buildDefaultName();
-
-
- // ********** schema **********
-
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- if (this.valuesAreDifferent(this.specifiedSchema, schema)) {
- this.getTableAnnotation().setSchema(schema);
- this.removeTableAnnotationIfUnset();
- this.setSpecifiedSchema_(schema);
- }
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildSpecifiedSchema() {
- return this.getTableAnnotation().getSchema();
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected abstract String buildDefaultSchema();
-
-
- // ********** catalog **********
-
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- if (this.valuesAreDifferent(this.specifiedCatalog, catalog)) {
- this.getTableAnnotation().setCatalog(catalog);
- this.removeTableAnnotationIfUnset();
- this.setSpecifiedCatalog_(catalog);
- }
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildSpecifiedCatalog() {
- return this.getTableAnnotation().getCatalog();
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected abstract String buildDefaultCatalog();
-
-
- // ********** unique constraints **********
- public ListIterable<JavaUniqueConstraint> getUniqueConstraints() {
- return this.uniqueConstraintContainer.getContextElements();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintContainer.getContextElementsSize();
- }
-
- public JavaUniqueConstraint getUniqueConstraint(int index) {
- return this.uniqueConstraintContainer.getContextElement(index);
- }
-
- public JavaUniqueConstraint addUniqueConstraint() {
- return this.addUniqueConstraint(this.getUniqueConstraintsSize());
- }
-
- public JavaUniqueConstraint addUniqueConstraint(int index) {
- UniqueConstraintAnnotation annotation = this.getTableAnnotation().addUniqueConstraint(index);
- return this.uniqueConstraintContainer.addContextElement(index, annotation);
- }
-
- public void removeUniqueConstraint(int index) {
- this.getTableAnnotation().removeUniqueConstraint(index);
- this.uniqueConstraintContainer.removeContextElement(index);
- }
-
- public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
- this.removeUniqueConstraint(this.uniqueConstraintContainer.indexOfContextElement((JavaUniqueConstraint) uniqueConstraint));
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- this.getTableAnnotation().moveUniqueConstraint(targetIndex, sourceIndex);
- this.uniqueConstraintContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncUniqueConstraints() {
- this.uniqueConstraintContainer.synchronizeWithResourceModel();
- }
-
- protected JavaUniqueConstraint buildUniqueConstraint(UniqueConstraintAnnotation constraintAnnotation) {
- return this.getJpaFactory().buildJavaUniqueConstraint(this, this, constraintAnnotation);
- }
-
- protected ListIterable<UniqueConstraintAnnotation> getUniqueConstraintAnnotations() {
- return this.getTableAnnotation().getUniqueConstraints();
- }
-
- protected ContextListContainer<JavaUniqueConstraint, UniqueConstraintAnnotation> buildUniqueConstraintContainer() {
- UniqueConstraintContainer container = new UniqueConstraintContainer();
- container.initialize();
- return container;
- }
-
- /**
- * unique constraint container
- */
- protected class UniqueConstraintContainer
- extends ContextListContainer<JavaUniqueConstraint, UniqueConstraintAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected JavaUniqueConstraint buildContextElement(UniqueConstraintAnnotation resourceElement) {
- return AbstractJavaTable.this.buildUniqueConstraint(resourceElement);
- }
- @Override
- protected ListIterable<UniqueConstraintAnnotation> getResourceElements() {
- return AbstractJavaTable.this.getUniqueConstraintAnnotations();
- }
- @Override
- protected UniqueConstraintAnnotation getResourceElement(JavaUniqueConstraint contextElement) {
- return contextElement.getUniqueConstraintAnnotation();
- }
- }
-
-
- // ********** database stuff **********
-
- public org.eclipse.jpt.jpa.db.Table getDbTable() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getName());
- }
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- public boolean isResolved() {
- return this.getDbTable() != null;
- }
-
- public boolean schemaIsResolved() {
- return this.getDbSchema() != null;
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public boolean catalogIsResolved() {
- String catalog = this.getCatalog();
- return (catalog == null) || (this.resolveDbCatalog(catalog) != null);
- }
-
-
- // ********** UniqueConstraint.Owner implementation **********
-
- public Iterable<String> getCandidateUniqueConstraintColumnNames() {
- org.eclipse.jpt.jpa.db.Table dbTable = this.getDbTable();
- return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String>instance();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaUniqueConstraint constraint : this.getUniqueConstraints()) {
- result = constraint.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * called if the database is connected:
- * name, schema, catalog
- */
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos)) {
- return this.getJavaCandidateNames(filter);
- }
- if (this.schemaTouches(pos)) {
- return this.getJavaCandidateSchemata(filter);
- }
- if (this.catalogTouches(pos)) {
- return this.getJavaCandidateCatalogs(filter);
- }
- return null;
- }
-
- protected boolean nameTouches(int pos) {
- return this.getTableAnnotation().nameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateNames(filter));
- }
-
- protected Iterable<String> getCandidateNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateNames(), filter);
- }
-
- protected Iterable<String> getCandidateNames() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema != null) ? dbSchema.getSortedTableIdentifiers() : EmptyIterable.<String> instance();
- }
-
- protected boolean schemaTouches(int pos) {
- return this.getTableAnnotation().schemaTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateSchemata(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateSchemata(filter));
- }
-
- protected Iterable<String> getCandidateSchemata(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateSchemata(), filter);
- }
-
- protected Iterable<String> getCandidateSchemata() {
- return this.getDbSchemaContainer().getSortedSchemaIdentifiers();
- }
-
- protected boolean catalogTouches(int pos) {
- return this.getTableAnnotation().catalogTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateCatalogs(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateCatalogs(filter));
- }
-
- protected Iterable<String> getCandidateCatalogs(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateCatalogs(), filter);
- }
-
- protected Iterable<String> getCandidateCatalogs() {
- Database db = this.getDatabase();
- return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildTableValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildTableValidator(CompilationUnit astRoot) {
- return this.owner.buildTableValidator(this, buildTextRangeResolver(astRoot));
- }
-
- protected TableTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableTextRangeResolver(this, astRoot);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getTableAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getNameTextRange(), astRoot);
- }
-
- public TextRange getSchemaTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getSchemaTextRange(), astRoot);
- }
-
- public TextRange getCatalogTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getCatalogTextRange(), astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJpaContextNode getParent() {
- return (JavaJpaContextNode) super.getParent();
- }
-
- protected void initializeFrom(ReadOnlyTable oldTable) {
- this.setSpecifiedName(oldTable.getSpecifiedName());
- this.setSpecifiedCatalog(oldTable.getSpecifiedCatalog());
- this.setSpecifiedSchema(oldTable.getSpecifiedSchema());
- for (ReadOnlyUniqueConstraint constraint : oldTable.getUniqueConstraints()) {
- this.addUniqueConstraint().initializeFrom(constraint);
- }
- }
-
- protected void initializeFromVirtual(ReadOnlyTable virtualTable) {
- this.setSpecifiedName(virtualTable.getName());
- // ignore other settings?
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.buildQualifiedName());
- }
-
- protected String buildQualifiedName() {
- return NameTools.buildQualifiedDatabaseObjectName(this.getCatalog(), this.getSchema(), this.getName());
- }
-
-
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
deleted file mode 100644
index 0bb739537c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.InheritanceType;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericTypeMappingValidator;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java type mapping
- */
-public abstract class AbstractJavaTypeMapping<A extends Annotation>
- extends AbstractJavaJpaContextNode
- implements JavaTypeMapping
-{
- // this can be null for a "null" type mapping
- protected final A mappingAnnotation;
-
-
- protected AbstractJavaTypeMapping(JavaPersistentType parent, A mappingAnnotation) {
- super(parent);
- this.mappingAnnotation = mappingAnnotation;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaPersistentType getParent() {
- return (JavaPersistentType) super.getParent();
- }
-
- public JavaPersistentType getPersistentType() {
- return this.getParent();
- }
-
- public JavaResourceType getJavaResourceType() {
- return this.getPersistentType().getJavaResourceType();
- }
-
- public String getName() {
- return this.getPersistentType().getName();
- }
-
- public A getMappingAnnotation() {
- return this.mappingAnnotation;
- }
-
- public boolean attributeIsDerivedId(String attributeName) {
- return TypeMappingTools.attributeIsDerivedId(this, attributeName);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getPersistentType().getName());
- }
-
-
- // ********** tables **********
-
- public String getPrimaryTableName() {
- return null;
- }
-
- public org.eclipse.jpt.jpa.db.Table getPrimaryDbTable() {
- return null;
- }
-
- public Schema getDbSchema() {
- return null;
- }
-
- public Iterable<ReadOnlyTable> getAssociatedTables() {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReadOnlyTable> getAllAssociatedTables() {
- return EmptyIterable.instance();
- }
-
- public Iterable<String> getAllAssociatedTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return null;
- }
-
-
- // ********** inheritance **********
-
- public TypeMapping getSuperTypeMapping() {
- PersistentType superPersistentType = this.getPersistentType().getSuperPersistentType();
- return (superPersistentType == null) ? null : superPersistentType.getMapping();
- }
-
- public Iterable<TypeMapping> getInheritanceHierarchy() {
- return this.convertToMappings(this.getPersistentType().getInheritanceHierarchy());
- }
-
- /**
- * Return the type mapping's "persistence" ancestors,
- * <em>excluding</em> the type mapping itself.
- * The returned iterator will return elements infinitely if the hierarchy
- * has a loop.
- */
- protected Iterable<TypeMapping> getAncestors() {
- return this.convertToMappings(this.getPersistentType().getAncestors());
- }
-
- protected Iterable<TypeMapping> convertToMappings(Iterable<PersistentType> types) {
- return new TransformationIterable<PersistentType, TypeMapping>(types) {
- @Override
- protected TypeMapping transform(PersistentType type) {
- return type.getMapping();
- }
- };
- }
-
- public InheritanceType getInheritanceStrategy() {
- return null;
- }
-
- public boolean isRootEntity() {
- return false;
- }
-
- public Entity getRootEntity() {
- return null;
- }
-
-
- // ********** attribute mappings **********
-
- public Iterable<JavaAttributeMapping> getAttributeMappings() {
- return new TransformationIterable<JavaPersistentAttribute, JavaAttributeMapping>(this.getPersistentType().getAttributes()) {
- @Override
- protected JavaAttributeMapping transform(JavaPersistentAttribute attribute) {
- return attribute.getMapping();
- }
- };
- }
-
- public Iterable<JavaAttributeMapping> getAttributeMappings(final String mappingKey) {
- return new FilteringIterable<JavaAttributeMapping>(this.getAttributeMappings()) {
- @Override
- protected boolean accept(JavaAttributeMapping attributeMapping) {
- return Tools.valuesAreEqual(attributeMapping.getKey(), mappingKey);
- }
- };
- }
-
- public Iterable<AttributeMapping> getAllAttributeMappings() {
- return new CompositeIterable<AttributeMapping>(this.getAllAttributeMappingsLists());
- }
-
- protected Iterable<Iterable<AttributeMapping>> getAllAttributeMappingsLists() {
- return new TransformationIterable<TypeMapping, Iterable<AttributeMapping>>(this.getNonNullInheritanceHierarchy(), TypeMappingTools.ATTRIBUTE_MAPPINGS_TRANSFORMER);
- }
-
- protected Iterable<TypeMapping> getNonNullInheritanceHierarchy() {
- return new FilteringIterable<TypeMapping>(this.getInheritanceHierarchy(), NotNullFilter.<TypeMapping>instance());
- }
-
- public Iterable<AttributeMapping> getAllAttributeMappings(final String mappingKey) {
- return new FilteringIterable<AttributeMapping>(CollectionTools.collection(this.getAllAttributeMappings())) {
- @Override
- protected boolean accept(AttributeMapping attributeMapping) {
- return Tools.valuesAreEqual(attributeMapping.getKey(), mappingKey);
- }
- };
- }
-
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return true;
- }
-
- public Iterable<AttributeMapping> getNonTransientAttributeMappings() {
- return new FilteringIterable<AttributeMapping>(this.getAllAttributeMappings()) {
- @Override
- protected boolean accept(AttributeMapping attributeMapping) {
- return (attributeMapping.getKey() != MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
- }
- };
- }
-
- // ********** attribute overrides **********
-
- public Iterable<String> getOverridableAttributeNames() {
- return new CompositeIterable<String>(this.getOverridableAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getOverridableAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getAttributeMappings(), AttributeMappingTools.ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER);
- }
-
- public Iterable<String> getAllOverridableAttributeNames() {
- return new CompositeIterable<String>(this.allOverridableAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> allOverridableAttributeNamesLists() {
- return new TransformationIterable<TypeMapping, Iterable<String>>(this.getInheritanceHierarchy(), TypeMappingTools.OVERRIDABLE_ATTRIBUTE_NAMES_TRANSFORMER);
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- for (AttributeMapping attributeMapping : this.getAttributeMappings()) {
- Column column = attributeMapping.resolveOverriddenColumn(attributeName);
- if (column != null) {
- return column;
- }
- }
- return null;
- }
-
-
- // ********** association overrides **********
-
- public Iterable<String> getOverridableAssociationNames() {
- return new CompositeIterable<String>(this.getOverridableAssociationNamesLists());
- }
-
- protected Iterable<Iterable<String>> getOverridableAssociationNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getAttributeMappings(), AttributeMappingTools.ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER);
- }
-
- public Iterable<String> getAllOverridableAssociationNames() {
- return new CompositeIterable<String>(this.getAllOverridableAssociationNamesLists());
- }
-
- protected Iterable<Iterable<String>> getAllOverridableAssociationNamesLists() {
- return new TransformationIterable<TypeMapping, Iterable<String>>(this.getInheritanceHierarchy(), TypeMappingTools.OVERRIDABLE_ASSOCIATION_NAMES_TRANSFORMER);
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- for (AttributeMapping attributeMapping : this.getAttributeMappings()) {
- Relationship relationship = attributeMapping.resolveOverriddenRelationship(attributeName);
- if (relationship != null) {
- return relationship;
- }
- }
- return null;
- }
-
-
- // ********** generators **********
-
- public Iterable<Generator> getGenerators() {
- return new CompositeIterable<Generator>(this.getAttributeMappingGeneratorLists());
- }
-
- protected Iterable<Iterable<Generator>> getAttributeMappingGeneratorLists() {
- return new TransformationIterable<JavaAttributeMapping, Iterable<Generator>>(this.getAttributeMappings()) {
- @Override
- protected Iterable<Generator> transform(JavaAttributeMapping attributeMapping) {
- return attributeMapping.getGenerators();
- }
- };
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateType(messages, reporter, astRoot);
- }
-
- protected void validateType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildTypeMappingValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildTypeMappingValidator(CompilationUnit astRoot) {
- return new GenericTypeMappingValidator(this, this.getJavaResourceType(), buildTextRangeResolver(astRoot));
- }
-
- protected TypeMappingTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTypeMappingTextRangeResolver(this, astRoot);
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getPersistenceUnit().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.mappingAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getPersistentType().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
deleted file mode 100644
index e8bb4821e1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.Association;
-import org.eclipse.jpt.common.utility.internal.SimpleAssociation;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaVersionMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java version mapping
- */
-public abstract class AbstractJavaVersionMapping
- extends AbstractJavaAttributeMapping<VersionAnnotation>
- implements JavaVersionMapping
-{
- protected final JavaColumn column;
-
- protected JavaConverter converter; // never null
-
-
- // the spec does not list Temporal explicitly,
- // but it is included in the orm.xml schema...
- protected static final JavaConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new JavaConverter.Adapter[] {
- JavaTemporalConverter.BasicAdapter.instance(),
- };
- protected static final Iterable<JavaConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<JavaConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractJavaVersionMapping(JavaPersistentAttribute parent) {
- super(parent);
- this.column = this.buildColumn();
- this.converter = this.buildConverter();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- this.syncConverter();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- this.converter.update();
- }
-
-
- // ********** column **********
-
- public JavaColumn getColumn() {
- return this.column;
- }
-
- protected JavaColumn buildColumn() {
- return this.getJpaFactory().buildJavaColumn(this, this);
- }
-
-
- // ********** converter **********
-
- public JavaConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- this.converter.dispose();
- JavaConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.retainConverterAnnotation(converterAdapter);
- this.setConverter_(this.buildConverter(converterAdapter));
- }
- }
-
- protected JavaConverter buildConverter(JavaConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getJpaFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(JavaConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- /**
- * Clear all the converter annotations <em>except</em> for the annotation
- * corresponding to the specified adapter. If the specified adapter is
- * <code>null</code>, remove <em>all</em> the converter annotations.
- */
- protected void retainConverterAnnotation(JavaConverter.Adapter converterAdapter) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter != converterAdapter) {
- adapter.removeConverterAnnotation(resourceAttribute);
- }
- }
- }
-
- protected JavaConverter buildConverter() {
- JpaFactory jpaFactory = this.getJpaFactory();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- JavaConverter javaConverter = adapter.buildConverter(this, jpaFactory);
- if (javaConverter != null) {
- return javaConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- Association<JavaConverter.Adapter, Annotation> assoc = this.getConverterAnnotation();
- if (assoc == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- JavaConverter.Adapter adapter = assoc.getKey();
- Annotation annotation = assoc.getValue();
- if ((this.converter.getType() == adapter.getConverterType()) &&
- (this.converter.getConverterAnnotation() == annotation)) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildConverter(annotation, this, this.getJpaFactory()));
- }
- }
- }
-
- /**
- * Return the first converter annotation we find along with its corresponding
- * adapter. Return <code>null</code> if there are no converter annotations.
- */
- protected Association<JavaConverter.Adapter, Annotation> getConverterAnnotation() {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- Annotation annotation = adapter.getConverterAnnotation(resourceAttribute);
- if (annotation != null) {
- return new SimpleAssociation<JavaConverter.Adapter, Annotation>(adapter, annotation);
- }
- }
- return null;
- }
-
- protected JavaConverter buildNullConverter() {
- return new NullJavaConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected JavaConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<JavaConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return VersionAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
-
- // ********** JavaColumn.Owner implementation **********
-
- public ColumnAnnotation getColumnAnnotation() {
- return (ColumnAnnotation) this.getResourceAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public void removeColumnAnnotation() {
- this.getResourceAttribute().removeAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getName();
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.converter.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, astRoot);
- }
-
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
- if (!ArrayTools.contains(SUPPORTED_TYPE_NAMES, this.getPersistentAttribute().getTypeName())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
deleted file mode 100644
index f6718b2611..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualBaseColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractJavaVirtualBaseColumn<O extends JavaReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
- extends AbstractJavaVirtualNamedColumn<O, C>
- implements VirtualBaseColumn, JavaReadOnlyBaseColumn
-{
- protected String specifiedTable;
- protected String defaultTable;
-
- protected Boolean specifiedUnique;
- protected boolean defaultUnique;
-
- protected Boolean specifiedNullable;
- protected boolean defaultNullable;
-
- protected Boolean specifiedInsertable;
- protected boolean defaultInsertable;
-
- protected Boolean specifiedUpdatable;
- protected boolean defaultUpdatable;
-
-
- protected AbstractJavaVirtualBaseColumn(JavaJpaContextNode parent, O owner) {
- super(parent, owner);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedTable(this.buildSpecifiedTable());
- this.setDefaultTable(this.buildDefaultTable());
-
- this.setSpecifiedUnique(this.buildSpecifiedUnique());
- this.setDefaultUnique(this.buildDefaultUnique());
-
- this.setSpecifiedNullable(this.buildSpecifiedNullable());
- this.setDefaultNullable(this.buildDefaultNullable());
-
- this.setSpecifiedInsertable(this.buildSpecifiedInsertable());
- this.setDefaultInsertable(this.buildDefaultInsertable());
-
- this.setSpecifiedUpdatable(this.buildSpecifiedUpdatable());
- this.setDefaultUpdatable(this.buildDefaultUpdatable());
- }
-
-
- // ********** table **********
-
- @Override
- public String getTable() {
- return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
- }
-
- public String getSpecifiedTable() {
- return this.specifiedTable;
- }
-
- protected void setSpecifiedTable(String table) {
- String old = this.specifiedTable;
- this.specifiedTable = table;
- this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
- }
-
- protected String buildSpecifiedTable() {
- return this.getOverriddenColumn().getSpecifiedTable();
- }
-
- public String getDefaultTable() {
- return this.defaultTable;
- }
-
- protected void setDefaultTable(String table) {
- String old = this.defaultTable;
- this.defaultTable = table;
- this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
- }
-
- protected String buildDefaultTable() {
- return this.owner.getDefaultTableName();
- }
-
-
- // ********** unique **********
-
- public boolean isUnique() {
- return (this.specifiedUnique != null) ? this.specifiedUnique.booleanValue() : this.isDefaultUnique();
- }
-
- public Boolean getSpecifiedUnique() {
- return this.specifiedUnique;
- }
-
- protected void setSpecifiedUnique(Boolean unique) {
- Boolean old = this.specifiedUnique;
- this.specifiedUnique = unique;
- this.firePropertyChanged(SPECIFIED_UNIQUE_PROPERTY, old, unique);
- }
-
- protected Boolean buildSpecifiedUnique() {
- return this.getOverriddenColumn().getSpecifiedUnique();
- }
-
- public boolean isDefaultUnique() {
- return this.defaultUnique;
- }
-
- protected void setDefaultUnique(boolean unique) {
- boolean old = this.defaultUnique;
- this.defaultUnique = unique;
- this.firePropertyChanged(DEFAULT_UNIQUE_PROPERTY, old, unique);
- }
-
- protected boolean buildDefaultUnique() {
- return DEFAULT_UNIQUE;
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return (this.specifiedNullable != null) ? this.specifiedNullable.booleanValue() : this.isDefaultNullable();
- }
-
- public Boolean getSpecifiedNullable() {
- return this.specifiedNullable;
- }
-
- protected void setSpecifiedNullable(Boolean nullable) {
- Boolean old = this.specifiedNullable;
- this.specifiedNullable = nullable;
- this.firePropertyChanged(SPECIFIED_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected Boolean buildSpecifiedNullable() {
- return this.getOverriddenColumn().getSpecifiedNullable();
- }
-
- public boolean isDefaultNullable() {
- return this.defaultNullable;
- }
-
- protected void setDefaultNullable(boolean nullable) {
- boolean old = this.defaultNullable;
- this.defaultNullable = nullable;
- this.firePropertyChanged(DEFAULT_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected boolean buildDefaultNullable() {
- return DEFAULT_NULLABLE;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return (this.specifiedInsertable != null) ? this.specifiedInsertable.booleanValue() : this.isDefaultInsertable();
- }
-
- public Boolean getSpecifiedInsertable() {
- return this.specifiedInsertable;
- }
-
- protected void setSpecifiedInsertable(Boolean insertable) {
- Boolean old = this.specifiedInsertable;
- this.specifiedInsertable = insertable;
- this.firePropertyChanged(SPECIFIED_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected Boolean buildSpecifiedInsertable() {
- return this.getOverriddenColumn().getSpecifiedInsertable();
- }
-
- public boolean isDefaultInsertable() {
- return this.defaultInsertable;
- }
-
- protected void setDefaultInsertable(boolean insertable) {
- boolean old = this.defaultInsertable;
- this.defaultInsertable = insertable;
- this.firePropertyChanged(DEFAULT_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected boolean buildDefaultInsertable() {
- return DEFAULT_INSERTABLE;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return (this.specifiedUpdatable != null) ? this.specifiedUpdatable.booleanValue() : this.isDefaultUpdatable();
- }
-
- public Boolean getSpecifiedUpdatable() {
- return this.specifiedUpdatable;
- }
-
- protected void setSpecifiedUpdatable(Boolean updatable) {
- Boolean old = this.specifiedUpdatable;
- this.specifiedUpdatable = updatable;
- this.firePropertyChanged(SPECIFIED_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected Boolean buildSpecifiedUpdatable() {
- return this.getOverriddenColumn().getSpecifiedUpdatable();
- }
-
- public boolean isDefaultUpdatable() {
- return this.defaultUpdatable;
- }
-
- protected void setDefaultUpdatable(boolean updatable) {
- boolean old = this.defaultUpdatable;
- this.defaultUpdatable = updatable;
- this.firePropertyChanged(DEFAULT_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected boolean buildDefaultUpdatable() {
- return DEFAULT_UPDATABLE;
- }
-
-
- // ********** misc **********
-
- public boolean tableNameIsInvalid() {
- return this.owner.tableNameIsInvalid(this.getTable());
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.owner.getCandidateTableNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
deleted file mode 100644
index f51541a3ac..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java virtual<ul>
- * <li>column
- * <li>join column
- * </ul>
- * <strong>NB:</strong> all state is sync'ed/updated in {@link #update()}
- * because <em>all</em> of it is derived from the context model (i.e. none of it
- * is derived from the resource model).
- */
-public abstract class AbstractJavaVirtualNamedColumn<O extends ReadOnlyNamedColumn.Owner, C extends ReadOnlyNamedColumn>
- extends AbstractJavaJpaContextNode
- implements VirtualNamedColumn, JavaReadOnlyNamedColumn
-{
- protected final O owner;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String columnDefinition;
-
-
- protected AbstractJavaVirtualNamedColumn(JavaJpaContextNode parent, O owner) {
- super(parent);
- this.owner = owner;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedName(this.buildSpecifiedName());
- this.setDefaultName(this.buildDefaultName());
-
- this.setColumnDefinition(this.buildColumnDefinition());
- }
-
-
- // ********** column **********
-
- /**
- * This should never return <code>null</code>.
- */
- public abstract C getOverriddenColumn();
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- protected void setSpecifiedName(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- return this.getOverriddenColumn().getSpecifiedName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultName() {
- return this.owner.getDefaultColumnName(this);
- }
-
-
- // ********** column definition **********
-
- public String getColumnDefinition() {
- return this.columnDefinition;
- }
-
- protected void setColumnDefinition(String columnDefinition) {
- String old = this.columnDefinition;
- this.columnDefinition = columnDefinition;
- this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, columnDefinition);
- }
-
- protected String buildColumnDefinition() {
- return this.getOverriddenColumn().getColumnDefinition();
- }
-
-
- // ********** database stuff **********
-
- protected Column getDbColumn() {
- Table table = this.getDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getName());
- }
-
- public Table getDbTable() {
- return this.owner.resolveDbTable(this.getTable());
- }
-
- /**
- * Return the name of the column's table. This is overridden
- * in {@link AbstractJavaVirtualBaseColumn} where a table can be defined.
- */
- public String getTable() {
- return this.owner.getDefaultTableName();
- }
-
- public boolean isResolved() {
- return this.getDbColumn() != null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver(astRoot));
- }
-
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaNamedColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- public boolean isVirtual() {
- return true;
- }
-
- @Override
- public JavaJpaContextNode getParent() {
- return (JavaJpaContextNode) super.getParent();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- String table = this.getTable();
- if (table != null) {
- sb.append(table);
- sb.append('.');
- }
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
deleted file mode 100644
index 2d44d0ad45..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedDiscriminatorColumn;
-
-public abstract class AbstractJavaVirtualNamedDiscriminatorColumn<O extends JavaReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
- extends AbstractJavaVirtualNamedColumn<O, C>
- implements VirtualNamedDiscriminatorColumn, JavaReadOnlyNamedDiscriminatorColumn
-{
- protected Integer specifiedLength;
- protected int defaultLength;
-
- protected DiscriminatorType specifiedDiscriminatorType;
- protected DiscriminatorType defaultDiscriminatorType;
-
- protected AbstractJavaVirtualNamedDiscriminatorColumn(JavaJpaContextNode parent, O owner) {
- super(parent, owner);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedDiscriminatorType(this.buildSpecifiedDiscriminatorType());
- this.setDefaultDiscriminatorType(this.buildDefaultDiscriminatorType());
-
- this.setSpecifiedLength(this.buildSpecifiedLength());
- this.setDefaultLength(this.buildDefaultLength());
- }
-
-
- // ********** discriminator type **********
-
- public DiscriminatorType getDiscriminatorType() {
- return (this.specifiedDiscriminatorType != null) ? this.specifiedDiscriminatorType : this.defaultDiscriminatorType;
- }
-
- public DiscriminatorType getSpecifiedDiscriminatorType() {
- return this.specifiedDiscriminatorType;
- }
-
- protected void setSpecifiedDiscriminatorType(DiscriminatorType type) {
- DiscriminatorType old = this.specifiedDiscriminatorType;
- this.specifiedDiscriminatorType = type;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, old, type);
- }
-
- protected DiscriminatorType buildSpecifiedDiscriminatorType() {
- return this.getOverriddenColumn().getSpecifiedDiscriminatorType();
- }
-
- public DiscriminatorType getDefaultDiscriminatorType() {
- return this.defaultDiscriminatorType;
- }
-
- protected void setDefaultDiscriminatorType(DiscriminatorType type) {
- DiscriminatorType old = this.defaultDiscriminatorType;
- this.defaultDiscriminatorType = type;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, type);
- }
-
- protected DiscriminatorType buildDefaultDiscriminatorType() {
- return this.owner.getDefaultDiscriminatorType();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- protected void setSpecifiedLength(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- return this.getOverriddenColumn().getSpecifiedLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int length) {
- int old = this.defaultLength;
- this.defaultLength = length;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, length);
- }
-
- protected int buildDefaultLength() {
- return this.owner.getDefaultLength();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
deleted file mode 100644
index be591b8022..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Virtual Java override
- */
-public abstract class AbstractJavaVirtualOverride<C extends JavaOverrideContainer>
- extends AbstractJavaJpaContextNode
- implements JavaVirtualOverride
-{
- protected final String name; // never null
-
-
- protected AbstractJavaVirtualOverride(C parent, String name) {
- super(parent);
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
-
- public boolean isVirtual() {
- return true;
- }
-
- public JavaOverride convertToSpecified() {
- return this.getContainer().convertOverrideToSpecified(this);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public C getParent() {
- return (C) super.getParent();
- }
-
- protected C getContainer() {
- return this.getParent();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getContainer().getTypeMapping();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getContainer().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getContainer().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver(astRoot));
- }
-
- protected OverrideTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaOverrideTextRangeResolver(this, astRoot);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getContainer().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getContainer().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getContainer().getCandidateTableNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
deleted file mode 100644
index b89f1a2db8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
-import org.eclipse.jpt.jpa.core.context.VirtualReferenceTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyReferenceTable>
- extends AbstractJavaVirtualTable<T>
- implements VirtualReferenceTable
-{
- protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected JavaVirtualJoinColumn defaultJoinColumn;
-
-
- protected AbstractJavaVirtualReferenceTable(JavaJpaContextNode parent, Owner owner, T overridenTable) {
- super(parent, owner, overridenTable);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedJoinColumns();
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<JavaVirtualJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<JavaVirtualJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public JavaVirtualJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.update();
- }
-
- protected ListIterable<ReadOnlyJoinColumn> getOverriddenJoinColumns() {
- return new SuperListIterableWrapper<ReadOnlyJoinColumn>(this.getOverriddenTable().getSpecifiedJoinColumns());
- }
-
- protected void moveSpecifiedJoinColumn(int index, JavaVirtualJoinColumn joinColumn) {
- this.specifiedJoinColumnContainer.moveContextElement(index, joinColumn);
- }
-
- protected JavaVirtualJoinColumn addSpecifiedJoinColumn(int index, JoinColumn joinColumn) {
- return this.specifiedJoinColumnContainer.addContextElement(index, joinColumn);
- }
-
- protected void removeSpecifiedJoinColumn(JavaVirtualJoinColumn joinColumn) {
- this.specifiedJoinColumnContainer.removeContextElement(joinColumn);
- }
-
- protected ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> buildSpecifiedJoinColumnContainer() {
- return new SpecifiedJoinColumnContainer();
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaVirtualJoinColumn buildContextElement(ReadOnlyJoinColumn resourceElement) {
- return AbstractJavaVirtualReferenceTable.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyJoinColumn> getResourceElements() {
- return AbstractJavaVirtualReferenceTable.this.getOverriddenJoinColumns();
- }
- @Override
- protected ReadOnlyJoinColumn getResourceElement(JavaVirtualJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
-
- // ********** default join column **********
-
- public JavaVirtualJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(JavaVirtualJoinColumn joinColumn) {
- JavaVirtualJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<JavaVirtualJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<JavaVirtualJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<JavaVirtualJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- if (this.buildsDefaultJoinColumn()) {
- if (this.defaultJoinColumn == null) {
- this.setDefaultJoinColumn(this.buildJoinColumn(this.getOverriddenTable().getDefaultJoinColumn()));
- } else {
- this.defaultJoinColumn.update();
- }
- } else {
- this.setDefaultJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultJoinColumn() {
- return ! this.hasSpecifiedJoinColumns();
- }
-
-
- // ********** misc **********
-
- protected JavaVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn joinColumn) {
- return this.buildJoinColumn(this.joinColumnOwner, joinColumn);
- }
-
- protected JavaVirtualJoinColumn buildJoinColumn(JavaReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
- return this.getJpaFactory().buildJavaVirtualJoinColumn(this, columnOwner, joinColumn);
- }
-
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- this.validateJoinColumns(messages, reporter, astRoot);
- }
- }
-
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateNodes(this.getJoinColumns(), messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
deleted file mode 100644
index 3adde36a20..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.NameTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.VirtualTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractJavaVirtualTable<T extends ReadOnlyTable>
- extends AbstractJavaJpaContextNode
- implements VirtualTable, JavaReadOnlyTable
-{
- protected final Owner owner;
-
- protected final T overriddenTable;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected final ContextListContainer<JavaVirtualUniqueConstraint, ReadOnlyUniqueConstraint> uniqueConstraintContainer;
-
-
- protected AbstractJavaVirtualTable(JavaJpaContextNode parent, Owner owner, T overridenTable) {
- super(parent);
- this.owner = owner;
- this.overriddenTable = overridenTable;
- this.uniqueConstraintContainer = this.buildUniqueConstraintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedName(this.buildSpecifiedName());
- this.setDefaultName(this.buildDefaultName());
-
- this.setSpecifiedSchema(this.buildSpecifiedSchema());
- this.setDefaultSchema(this.buildDefaultSchema());
-
- this.setSpecifiedCatalog(this.buildSpecifiedCatalog());
- this.setDefaultCatalog(this.buildDefaultCatalog());
-
- this.updateUniqueConstraints();
- }
-
-
- // ********** table **********
-
- /**
- * This should never return <code>null</code>.
- */
- public T getOverriddenTable() {
- return this.overriddenTable;
- }
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- protected void setSpecifiedName(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- return this.getOverriddenTable().getSpecifiedName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected abstract String buildDefaultName();
-
-
- // ********** schema **********
-
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- protected void setSpecifiedSchema(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildSpecifiedSchema() {
- return this.getOverriddenTable().getSchema();
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected abstract String buildDefaultSchema();
-
-
- // ********** catalog **********
-
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- protected void setSpecifiedCatalog(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildSpecifiedCatalog() {
- return this.getOverriddenTable().getCatalog();
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected abstract String buildDefaultCatalog();
-
-
- // ********** unique constraints **********
-
- public ListIterable<JavaVirtualUniqueConstraint> getUniqueConstraints() {
- return this.uniqueConstraintContainer.getContextElements();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintContainer.getContextElementsSize();
- }
-
- public JavaVirtualUniqueConstraint getUniqueConstraint(int index) {
- return this.uniqueConstraintContainer.getContextElement(index);
- }
-
- protected void updateUniqueConstraints() {
- this.uniqueConstraintContainer.update();
- }
-
- protected ListIterable<ReadOnlyUniqueConstraint> getOverriddenUniqueConstraints() {
- return new SuperListIterableWrapper<ReadOnlyUniqueConstraint>(this.getOverriddenTable().getUniqueConstraints());
- }
-
- protected void moveUniqueConstraint(int index, JavaVirtualUniqueConstraint constraint) {
- this.uniqueConstraintContainer.moveContextElement(index, constraint);
- }
-
- protected JavaVirtualUniqueConstraint addUniqueConstraint(int index, ReadOnlyUniqueConstraint uniqueConstraint) {
- return this.uniqueConstraintContainer.addContextElement(index, uniqueConstraint);
- }
-
- protected JavaVirtualUniqueConstraint buildUniqueConstraint(ReadOnlyUniqueConstraint uniqueConstraint) {
- return this.getJpaFactory().buildJavaVirtualUniqueConstraint(this, uniqueConstraint);
- }
-
- protected void removeUniqueConstraint(JavaVirtualUniqueConstraint constraint) {
- this.uniqueConstraintContainer.removeContextElement(constraint);
- }
-
- protected ContextListContainer<JavaVirtualUniqueConstraint, ReadOnlyUniqueConstraint> buildUniqueConstraintContainer() {
- return new UniqueConstraintContainer();
- }
-
- /**
- * unique constraint container
- */
- protected class UniqueConstraintContainer
- extends ContextListContainer<JavaVirtualUniqueConstraint, ReadOnlyUniqueConstraint>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected JavaVirtualUniqueConstraint buildContextElement(ReadOnlyUniqueConstraint resourceElement) {
- return AbstractJavaVirtualTable.this.buildUniqueConstraint(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyUniqueConstraint> getResourceElements() {
- return AbstractJavaVirtualTable.this.getOverriddenUniqueConstraints();
- }
- @Override
- protected ReadOnlyUniqueConstraint getResourceElement(JavaVirtualUniqueConstraint contextElement) {
- return contextElement.getOverriddenUniqueConstraint();
- }
- }
-
-
- // ********** database stuff **********
-
- public org.eclipse.jpt.jpa.db.Table getDbTable() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getName());
- }
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
- public boolean schemaIsResolved() {
- return this.getDbSchema() != null;
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public boolean catalogIsResolved() {
- String catalog = this.getCatalog();
- return (catalog == null) || (this.resolveDbCatalog(catalog) != null);
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- public boolean isResolved() {
- return this.getDbTable() != null;
- }
-
- protected boolean hasResolvedSchema() {
- return this.getDbSchema() != null;
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- protected boolean hasResolvedCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) || (this.resolveDbCatalog(catalog) != null);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildTableValidator(astRoot).validate(messages, reporter);
- }
-
- protected JptValidator buildTableValidator(CompilationUnit astRoot) {
- return this.owner.buildTableValidator(this, buildTextRangeResolver(astRoot));
- }
-
- protected TableTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableTextRangeResolver(this, astRoot);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public TextRange getSchemaTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public TextRange getCatalogTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJpaContextNode getParent() {
- return (JavaJpaContextNode) super.getParent();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.buildQualifiedName());
- }
-
- protected String buildQualifiedName() {
- return NameTools.buildQualifiedDatabaseObjectName(this.getCatalog(), this.getSchema(), this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/DefaultJavaAttributeMappingDefinitionWrapper.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/DefaultJavaAttributeMappingDefinitionWrapper.java
deleted file mode 100644
index 5c23c36ade..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/DefaultJavaAttributeMappingDefinitionWrapper.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-
-public abstract class DefaultJavaAttributeMappingDefinitionWrapper
- extends JavaAttributeMappingDefinitionWrapper
- implements DefaultJavaAttributeMappingDefinition
-{
- protected DefaultJavaAttributeMappingDefinitionWrapper() {
- super();
- }
-
- @Override
- protected abstract DefaultJavaAttributeMappingDefinition getDelegate();
-
- public boolean isDefault(JavaPersistentAttribute persistentAttribute) {
- return this.getDelegate().isDefault(persistentAttribute);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
deleted file mode 100644
index cfaffc8afd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.PersistentFieldValidator;
-
-public class FieldAccessor
- extends AbstractAccessor
-{
- private final JavaResourceField resourceField;
-
- public FieldAccessor(ReadOnlyPersistentAttribute parent, JavaResourceField resourceField) {
- super(parent);
- this.resourceField = resourceField;
- }
-
- public JavaResourceAttribute getResourceAttribute() {
- return this.getField();
- }
-
- public JavaResourceField getField() {
- return this.resourceField;
- }
-
- public boolean isFor(JavaResourceField resourceField) {
- return this.resourceField == resourceField;
- }
-
- public boolean isFor(JavaResourceMethod getterMethod, JavaResourceMethod setterMethod) {
- return false;
- }
-
- public AccessType getDefaultAccess() {
- return AccessType.FIELD;
- }
-
- public boolean isPublic() {
- return this.resourceField.isPublic();
- }
-
- public boolean isFinal() {
- return this.resourceField.isFinal();
- }
-
- public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
- return new PersistentFieldValidator(persistentAttribute, this, textRangeResolver);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getResourceAttribute().getNameTextRange(astRoot);
- }
-
- public JavaPersistentAttribute buildUnannotatedJavaAttribute(PersistentType parent) {
- return this.buildJavaAttribute(parent, this.buildUnannotatedJavaResourceField());
- }
-
- /**
- * Build a Java resource field that wraps the original Java resource
- * field and behaves as though it has no annotations. This will cause
- * all the settings in the Java <em>context</em> attribute to default.
- */
- protected JavaResourceField buildUnannotatedJavaResourceField() {
- return new UnannotatedJavaResourceField(this.getField());
- }
-
- protected JavaPersistentAttribute buildJavaAttribute(PersistentType parent, JavaResourceField resourceField) {
- return this.getJpaFactory().buildJavaPersistentField(parent, resourceField);
- }
-
-
- // ********** unannotated Java resource field **********
-
- /**
- * Wrap another Java resource field and suppress all its annotations.
- */
- protected class UnannotatedJavaResourceField
- extends UnannotatedJavaResourceAttribute<JavaResourceField>
- implements JavaResourceField
- {
- protected UnannotatedJavaResourceField(JavaResourceField field){
- super(field);
- }
-
- public Kind getKind() {
- return Kind.FIELD;
- }
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
deleted file mode 100644
index ee2df19837..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java ID class reference
- */
-public class GenericJavaIdClassReference
- extends AbstractJavaJpaContextNode
- implements JavaIdClassReference
-{
- protected String idClassName;
- protected String fullyQualifiedIdClassName;
- // the ref holds the type directly because the ref is the type's parent
- protected JavaPersistentType idClass;
-
-
- public GenericJavaIdClassReference(JavaTypeMapping parent) {
- super(parent);
- this.idClassName = this.buildIdClassName();
- // 'idClass' is resolved in the update
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setIdClassName_(this.buildIdClassName());
- if (this.idClass != null) {
- this.idClass.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.setFullyQualifiedIdClassName(this.buildFullyQualifiedIdClassName());
- this.updateIdClass();
- }
-
-
- // ********** id class name **********
-
- public String getIdClassName() {
- return this.getSpecifiedIdClassName();
- }
-
- public String getSpecifiedIdClassName() {
- return this.idClassName;
- }
-
- public void setSpecifiedIdClassName(String name) {
- if (this.valuesAreDifferent(name, this.idClassName)) {
- this.getIdClassAnnotationForUpdate().setValue(name);
- this.removeIdClassAnnotationIfUnset();
- this.setIdClassName_(name);
- }
- }
-
- protected void setIdClassName_(String name) {
- String old = this.idClassName;
- this.idClassName = name;
- this.firePropertyChanged(SPECIFIED_ID_CLASS_NAME_PROPERTY, old, name);
- }
-
- protected String buildIdClassName() {
- IdClassAnnotation annotation = this.getIdClassAnnotation();
- return (annotation == null) ? null : annotation.getValue();
- }
-
- public String getDefaultIdClassName() {
- return null;
- }
-
- public boolean isSpecified() {
- return this.idClassName != null;
- }
-
-
- // ********** id class annotation **********
-
- /**
- * Return <code>null</code> if the annotation does not exists.
- */
- protected IdClassAnnotation getIdClassAnnotation() {
- return (IdClassAnnotation) this.getJavaResourceType().getAnnotation(this.getIdClassAnnotationName());
- }
-
- /**
- * Build the annotation if it does not exist.
- */
- protected IdClassAnnotation getIdClassAnnotationForUpdate() {
- IdClassAnnotation annotation = this.getIdClassAnnotation();
- return (annotation != null) ? annotation : this.buildIdClassAnnotation();
- }
-
- protected IdClassAnnotation buildIdClassAnnotation() {
- return (IdClassAnnotation) this.getJavaResourceType().addAnnotation(this.getIdClassAnnotationName());
- }
-
- protected void removeIdClassAnnotationIfUnset() {
- if (this.getIdClassAnnotation().isUnset()) {
- this.removeIdClassAnnotation();
- }
- }
-
- protected void removeIdClassAnnotation() {
- this.getJavaResourceType().removeAnnotation(this.getIdClassAnnotationName());
- }
-
- protected String getIdClassAnnotationName() {
- return IdClassAnnotation.ANNOTATION_NAME;
- }
-
-
- // ********** fully-qualified id class name **********
-
- public String getFullyQualifiedIdClassName() {
- return this.fullyQualifiedIdClassName;
- }
-
- protected void setFullyQualifiedIdClassName(String name) {
- String old = this.fullyQualifiedIdClassName;
- this.fullyQualifiedIdClassName = name;
- this.firePropertyChanged(FULLY_QUALIFIED_ID_CLASS_PROPERTY, old, name);
- }
-
- protected String buildFullyQualifiedIdClassName() {
- IdClassAnnotation annotation = this.getIdClassAnnotation();
- return (annotation == null) ? null : annotation.getFullyQualifiedClassName();
- }
-
-
- // ********** id class **********
-
- public JavaPersistentType getIdClass() {
- return this.idClass;
- }
-
- protected void setIdClass(JavaPersistentType idClass) {
- JavaPersistentType old = this.idClass;
- this.idClass = idClass;
- this.firePropertyChanged(ID_CLASS_PROPERTY, old, idClass);
- }
-
- protected void updateIdClass() {
- JavaResourceType resourceIdClass = this.resolveResourceIdClass();
- if (resourceIdClass == null) {
- if (this.idClass != null) {
- this.idClass.dispose();
- this.setIdClass(null);
- }
- } else {
- if (this.idClass == null) {
- this.setIdClass(this.buildIdClass(resourceIdClass));
- } else {
- if (this.idClass.getJavaResourceType() == resourceIdClass) {
- this.idClass.update();
- } else {
- this.idClass.dispose();
- this.setIdClass(this.buildIdClass(resourceIdClass));
- }
- }
- }
- }
-
- protected JavaResourceType resolveResourceIdClass() {
- if (this.fullyQualifiedIdClassName == null) {
- return null;
- }
- JavaResourceType jrt = this.getIdClassJavaResourceType();
- return (jrt == null) ? null : (jrt.isAnnotatedWithAnyOf(getJpaProject().getTypeMappingAnnotationNames()) ? null : jrt);
- }
-
- protected JavaResourceType getIdClassJavaResourceType() {
- if (this.fullyQualifiedIdClassName == null) {
- return null;
- }
- return (JavaResourceType) this.getJpaProject().getJavaResourceType(this.fullyQualifiedIdClassName, Kind.TYPE);
- }
-
- protected JavaPersistentType buildIdClass(JavaResourceType resourceClass) {
- return this.getJpaFactory().buildJavaPersistentType(this, resourceClass);
- }
-
- public char getIdClassEnclosingTypeSeparator() {
- return '.';
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaTypeMapping getParent() {
- return (JavaTypeMapping) super.getParent();
- }
-
- protected JavaTypeMapping getTypeMapping() {
- return this.getParent();
- }
-
- protected JavaPersistentType getPersistentType() {
- return this.getTypeMapping().getPersistentType();
- }
-
- protected JavaResourceType getJavaResourceType() {
- return this.getPersistentType().getJavaResourceType();
- }
-
-
- // ********** PersistentType.Owner implementation **********
-
- public AccessType getOverridePersistentTypeAccess() {
- return this.getPersistentType().getAccess();
- }
-
- public AccessType getDefaultPersistentTypeAccess() {
- // this shouldn't be needed, since we've specified an override access, but just to be safe ...
- return this.getPersistentType().getAccess();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateIdClass(messages, reporter, astRoot);
- }
-
- protected void validateIdClass(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.isSpecified()) {
- JavaResourceType jrt = this.getIdClassJavaResourceType();
- if (jrt != null) {
-
- if (!jrt.isPublic()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
-
- if (!JDTTools.typeIsSubType(this.getJpaProject().getJavaProject(), jrt.getQualifiedName(), JDTTools.SERIALIZABLE_CLASS_NAME)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
-
- if (!jrt.hasEqualsMethod()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
-
- if (!jrt.hasHashCodeMethod()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- IdClassAnnotation annotation = this.getIdClassAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
deleted file mode 100644
index efbf688c40..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaMappingJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OwnableRelationshipMappingAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaManyToManyRelationship
- extends AbstractJavaMappingRelationship<JavaManyToManyMapping>
- implements JavaManyToManyRelationship
-{
- protected final JavaMappingMappedByRelationshipStrategy2_0 mappedByStrategy;
-
- protected final JavaMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
-
- public GenericJavaManyToManyRelationship(JavaManyToManyMapping parent) {
- super(parent);
- this.mappedByStrategy = this.buildMappedByStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mappedByStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.mappedByStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected JavaMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.mappedByStrategy.getMappedByAttribute() != null) {
- return this.mappedByStrategy;
- }
- return this.joinTableStrategy;
- }
-
-
- // ********** mapped by strategy **********
-
- public JavaMappedByRelationshipStrategy getMappedByStrategy() {
- return this.mappedByStrategy;
- }
-
- public boolean strategyIsMappedBy() {
- return this.strategy == this.mappedByStrategy;
- }
-
- public void setStrategyToMappedBy() {
- this.mappedByStrategy.addStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayBeMappedBy(AttributeMapping mapping) {
- return mapping.getKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- protected JavaMappingMappedByRelationshipStrategy2_0 buildMappedByStrategy() {
- return new GenericJavaMappedByRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public JavaJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public void setStrategyToJoinTable() {
- // join table is default option, so no need to add to resource
- this.mappedByStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return this.getMappedByStrategy().getMappedByAttribute() == null;
- }
-
- protected JavaMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return new GenericJavaMappingJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromMappedByRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- }
-
- @Override
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- super.initializeFromMappedByRelationship(oldRelationship);
- this.mappedByStrategy.initializeFrom(oldRelationship.getMappedByStrategy());
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaManyToManyMapping getMapping() {
- return this.getParent();
- }
-
- public OwnableRelationshipMappingAnnotation getMappingAnnotation() {
- return this.getMapping().getMappingAnnotation();
- }
-
- public OwnableRelationshipMappingAnnotation getMappingAnnotationForUpdate() {
- return this.getMapping().getAnnotationForUpdate();
- }
-
- public boolean isOwner() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return this.mappedByStrategy.relationshipIsOwnedBy(mapping);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.mappedByStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return this.joinTableStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
deleted file mode 100644
index d2a4bff421..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToOneMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaMappingJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingRelationshipStrategy2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaManyToOneRelationship
- extends AbstractJavaMappingRelationship<JavaManyToOneMapping>
- implements JavaManyToOneRelationship2_0
-{
- protected final JavaMappingJoinColumnRelationshipStrategy2_0 joinColumnStrategy;
-
- // JPA 2.0
- protected final JavaMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
-
- public GenericJavaManyToOneRelationship(JavaManyToOneMapping parent) {
- super(parent);
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected JavaMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.isJpa2_0Compatible()) {
- if (this.joinTableStrategy.getJoinTable() != null) {
- return this.joinTableStrategy;
- }
- }
- return this.joinColumnStrategy;
- }
-
-
- // ********** join table strategy **********
-
- public JavaJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public final void setStrategyToJoinTable() {
- this.joinTableStrategy.addStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return false;
- }
-
- protected JavaMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return this.isJpa2_0Compatible() ?
- new GenericJavaMappingJoinTableRelationshipStrategy(this) :
- new NullJavaJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** join column strategy **********
-
- public JavaJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- // join column strategy is the default; so no need to add stuff,
- // just remove all the others
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- return this.joinTableStrategy.getJoinTable() == null;
- }
-
- protected JavaMappingJoinColumnRelationshipStrategy2_0 buildJoinColumnStrategy() {
- return new GenericJavaMappingJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromJoinColumnRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- @Override
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- super.initializeFromJoinColumnRelationship(oldRelationship);
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaManyToOneMapping getMapping() {
- return this.getParent();
- }
-
- public boolean isOwner() {
- return true;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return false;
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.joinColumnStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return this.joinTableStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
deleted file mode 100644
index 15c2bdf220..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedByRelationship;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OwnableRelationshipMappingAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaMappedByRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaMappingMappedByRelationshipStrategy2_0
-{
- protected String mappedByAttribute;
-
-
- public GenericJavaMappedByRelationshipStrategy(JavaMappedByRelationship parent) {
- super(parent);
- this.mappedByAttribute = this.buildMappedByAttribute();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setMappedByAttribute_(this.buildMappedByAttribute());
- }
-
-
- // ********** mapped by attribute **********
-
- public String getMappedByAttribute() {
- return this.mappedByAttribute;
- }
-
- public void setMappedByAttribute(String mappedByAttribute) {
- if (this.valuesAreDifferent(mappedByAttribute, this.mappedByAttribute)) {
- this.getMappingAnnotationForUpdate().setMappedBy(mappedByAttribute);
- this.setMappedByAttribute_(mappedByAttribute);
- }
- }
-
- protected void setMappedByAttribute_(String mappedByAttribute) {
- String old = this.mappedByAttribute;
- this.mappedByAttribute = mappedByAttribute;
- this.firePropertyChanged(MAPPED_BY_ATTRIBUTE_PROPERTY, old, mappedByAttribute);
- }
-
- protected String buildMappedByAttribute() {
- OwnableRelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getMappedBy();
- }
-
-
- // ********** misc **********
-
- protected OwnableRelationshipMappingAnnotation getMappingAnnotation() {
- return this.getRelationship().getMappingAnnotation();
- }
-
- protected OwnableRelationshipMappingAnnotation getMappingAnnotationForUpdate() {
- return this.getRelationship().getMappingAnnotationForUpdate();
- }
-
- @Override
- public JavaMappedByRelationship getParent() {
- return (JavaMappedByRelationship) super.getParent();
- }
-
- public JavaMappedByRelationship getRelationship() {
- return this.getParent();
- }
-
- public void initializeFrom(MappedByRelationshipStrategy oldStrategy) {
- this.setMappedByAttribute(oldStrategy.getMappedByAttribute());
- }
-
- public String getTableName() {
- RelationshipMapping owner = this.getRelationshipOwner();
- return (owner == null) ? null : owner.getRelationship().getStrategy().getTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- RelationshipMapping owner = this.getRelationshipOwner();
- return (owner == null) ? null : owner.getRelationship().getStrategy().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- RelationshipMapping owner = this.getRelationshipOwner();
- return (owner != null) && owner.getRelationship().getStrategy().tableNameIsInvalid(tableName);
- }
-
- public String getColumnTableNotValidDescription() {
- //this will not be called if getRelationshipOwner() is null
- return this.getRelationshipOwner().getRelationship().getStrategy().getColumnTableNotValidDescription();
- }
-
- protected RelationshipMapping getRelationshipOwner() {
- return this.getRelationshipMapping().getRelationshipOwner();
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public boolean relationshipIsOwnedBy(RelationshipMapping otherMapping) {
- String thisEntityName = this.getEntityName();
- Entity otherEntity = otherMapping.getResolvedTargetEntity();
- String otherEntityName = (otherEntity == null) ? null : otherEntity.getName();
- return Tools.valuesAreEqual(thisEntityName, otherEntityName) &&
- Tools.valuesAreEqual(this.mappedByAttribute, otherMapping.getName());
- }
-
- protected String getEntityName() {
- Entity entity = this.getRelationship().getEntity();
- return (entity == null) ? null : entity.getName();
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null; // mapped-by strategies cannot be overridden
- }
-
- public void addStrategy() {
- if (this.mappedByAttribute == null) {
- this.setMappedByAttribute(""); //$NON-NLS-1$
- }
- }
-
- public void removeStrategy() {
- if (this.mappedByAttribute != null) {
- this.setMappedByAttribute(null);
- }
- }
-
-
- // ********** java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- OwnableRelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- if ((annotation != null) && annotation.mappedByTouches(pos)) {
- result = this.getJavaCandidateMappedByAttributeNames(filter);
- }
- return result;
- }
-
- public Iterable<String> getCandidateMappedByAttributeNames() {
- return this.getRelationshipMapping().getTargetEntityNonTransientAttributeNames();
- }
-
- protected Iterable<String> getCandidateMappedByAttributeNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateMappedByAttributeNames(), filter);
- }
-
- protected Iterable<String> getJavaCandidateMappedByAttributeNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateMappedByAttributeNames(filter));
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- if (this.mappedByAttribute == null) {
- return;
- }
-
- Entity targetEntity = this.getRelationshipMapping().getResolvedTargetEntity();
- if (targetEntity == null) {
- return; // null target entity is validated elsewhere
- }
-
- AttributeMapping mappedByMapping = targetEntity.resolveAttributeMapping(this.mappedByAttribute);
-
- if (mappedByMapping == null) {
- messages.add(
- this.buildMessage(
- JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
- )
- );
- return;
- }
-
- if ( ! this.getRelationship().mayBeMappedBy(mappedByMapping)) {
- messages.add(
- this.buildMessage(
- JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
- )
- );
- return;
- }
-
- // if mappedByMapping is not a relationship owner, then it should have
- // been flagged in above rule (mappedByIsValid)
- if ( ! ((RelationshipMapping) mappedByMapping).isRelationshipOwner()) {
- messages.add(
- this.buildMessage(
- JpaValidationMessages.MAPPING_MAPPED_BY_ON_BOTH_SIDES,
- new String[] {this.mappedByAttribute},
- astRoot
- )
- );
- }
- }
-
- protected IMessage buildMessage(String msgID, String[] parms, CompilationUnit astRoot) {
- PersistentAttribute attribute = this.getRelationshipMapping().getPersistentAttribute();
- String attributeDescription = attribute.isVirtual() ?
- JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC :
- JpaValidationDescriptionMessages.ATTRIBUTE_DESC;
- attributeDescription = NLS.bind(attributeDescription, attribute.getName());
- parms = ArrayTools.add(parms, 0, attributeDescription);
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- parms,
- this,
- this.getValidationTextRange(astRoot)
- );
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationMappedByTextRange();
- return (textRange != null) ? textRange : this.getRelationship().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationMappedByTextRange() {
- OwnableRelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getMappedByTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
deleted file mode 100644
index b817526c82..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-
-public class GenericJavaMappingJoinColumnRelationshipStrategy
- extends AbstractJavaJoinColumnRelationshipStrategy
- implements JavaMappingJoinColumnRelationshipStrategy2_0
-{
- protected final boolean targetForeignKey;
-
-
- /**
- * The default strategy is for a "source" foreign key.
- */
- public GenericJavaMappingJoinColumnRelationshipStrategy(JavaMappingJoinColumnRelationship parent) {
- this(parent, false);
- }
-
- public GenericJavaMappingJoinColumnRelationshipStrategy(JavaMappingJoinColumnRelationship parent, boolean targetForeignKey) {
- super(parent);
- this.targetForeignKey = targetForeignKey;
- }
-
-
- // ********** join column annotations **********
-
- @Override
- protected ListIterable<JoinColumnAnnotation> getJoinColumnAnnotations() {
- return new SubListIterableWrapper<NestableAnnotation, JoinColumnAnnotation>(this.getNestableJoinColumnAnnotations());
- }
-
- protected ListIterable<NestableAnnotation> getNestableJoinColumnAnnotations() {
- return this.getResourceAttribute().getAnnotations(JoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected JoinColumnAnnotation addJoinColumnAnnotation(int index) {
- return (JoinColumnAnnotation) this.getResourceAttribute().addAnnotation(index, JoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected void removeJoinColumnAnnotation(int index) {
- this.getResourceAttribute().removeAnnotation(index, JoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected void moveJoinColumnAnnotation(int targetIndex, int sourceIndex) {
- this.getResourceAttribute().moveAnnotation(targetIndex, sourceIndex, JoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected JoinColumnAnnotation buildNullJoinColumnAnnotation() {
- return new NullJoinColumnAnnotation(this.getResourceAttribute());
- }
-
-
- // ********** misc **********
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getRelationship().getMapping().getResourceAttribute();
- }
-
- @Override
- public JavaMappingJoinColumnRelationship getRelationship() {
- return (JavaMappingJoinColumnRelationship) super.getRelationship();
- }
-
- @Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- public boolean isOverridable() {
- return true;
- }
-
- public TypeMapping getRelationshipSource() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return this.targetForeignKey ?
- mapping.getResolvedTargetEntity() :
- mapping.getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return this.targetForeignKey ?
- mapping.getTypeMapping() :
- mapping.getResolvedTargetEntity();
- }
-
- protected Entity getRelationshipTargetEntity() {
- TypeMapping target = this.getRelationshipTarget();
- return (target instanceof Entity) ? (Entity) target : null;
- }
-
- public boolean isTargetForeignKey() {
- return this.targetForeignKey;
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return overrideRelationship.getJoinColumnStrategy();
- }
-
-
- // ********** validation **********
-
- public String getColumnTableNotValidDescription() {
- return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
-
- // ********** join column owner **********
-
- protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- /**
- * by default, the join column is in the type mapping's primary table
- */
- public String getDefaultTableName() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- public String getAttributeName() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getRelationshipMapping().getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getRelationshipMapping().getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getRelationshipTargetEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.tableNameIsInvalid(tableName);
- }
-
- /**
- * the join column can be on a secondary table
- */
- public Iterable<String> getCandidateTableNames() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getReferencedColumnDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
deleted file mode 100644
index e49cb1576d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaMappingJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToManyRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaOneToManyRelationship
- extends AbstractJavaMappingRelationship<JavaOneToManyMapping>
- implements JavaOneToManyRelationship2_0
-{
- protected final JavaMappingMappedByRelationshipStrategy2_0 mappedByStrategy;
-
- protected final JavaMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
- // JPA 2.0 or EclipseLink
- protected final boolean supportsJoinColumnStrategy;
- protected final JavaMappingJoinColumnRelationshipStrategy2_0 joinColumnStrategy;
-
-
- public GenericJavaOneToManyRelationship(JavaOneToManyMapping parent, boolean supportsJoinColumnStrategy) {
- super(parent);
- this.mappedByStrategy = this.buildMappedByStrategy();
- this.supportsJoinColumnStrategy = supportsJoinColumnStrategy;
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
-
- // build join table strategy last since it's dependent on the other strategies
- this.joinTableStrategy = this.buildJoinTableStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mappedByStrategy.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.mappedByStrategy.update();
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected JavaMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.mappedByStrategy.getMappedByAttribute() != null) {
- return this.mappedByStrategy;
- }
- if (this.supportsJoinColumnStrategy) {
- if (this.joinColumnStrategy.hasSpecifiedJoinColumns()) {
- return this.joinColumnStrategy;
- }
- }
- return this.joinTableStrategy;
- }
-
-
- // ********** mapped by strategy **********
-
- public JavaMappedByRelationshipStrategy getMappedByStrategy() {
- return this.mappedByStrategy;
- }
-
- public boolean strategyIsMappedBy() {
- return this.strategy == this.mappedByStrategy;
- }
-
- public final void setStrategyToMappedBy() {
- this.mappedByStrategy.addStrategy();
- this.joinTableStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayBeMappedBy(AttributeMapping mapping) {
- String key = mapping.getKey();
- if (key == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) {
- return true;
- }
- if (this.supportsJoinColumnStrategy) {
- return key == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
- return false;
- }
-
- protected JavaMappingMappedByRelationshipStrategy2_0 buildMappedByStrategy() {
- return new GenericJavaMappedByRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public JavaJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public final void setStrategyToJoinTable() {
- // join table is default, so no need to add annotation
- this.mappedByStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return (this.mappedByStrategy.getMappedByAttribute() == null) &&
- ! this.joinColumnStrategy.hasSpecifiedJoinColumns();
- }
-
- protected JavaMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return new GenericJavaMappingJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** join column strategy **********
-
- public JavaJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- this.joinColumnStrategy.addStrategy();
- this.mappedByStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- return false;
- }
-
- protected JavaMappingJoinColumnRelationshipStrategy2_0 buildJoinColumnStrategy() {
- return this.supportsJoinColumnStrategy ?
- new GenericJavaMappingJoinColumnRelationshipStrategy(this, true) : // true = target foreign key
- new NullJavaJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromMappedByRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- }
-
- @Override
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- super.initializeFromMappedByRelationship(oldRelationship);
- this.mappedByStrategy.initializeFrom(oldRelationship.getMappedByStrategy());
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- @Override
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- super.initializeFromJoinColumnRelationship(oldRelationship);
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaOneToManyMapping getMapping() {
- return this.getParent();
- }
-
- public OneToManyAnnotation getMappingAnnotation() {
- return this.getMapping().getMappingAnnotation();
- }
-
- public OneToManyAnnotation getMappingAnnotationForUpdate() {
- return this.getMapping().getAnnotationForUpdate();
- }
-
- public boolean isOwner() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return this.mappedByStrategy.relationshipIsOwnedBy(mapping);
- }
-
- @Override
- public boolean isTargetForeignKey() {
- return this.joinColumnStrategy.isTargetForeignKey();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.mappedByStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.joinTableStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return this.joinColumnStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
deleted file mode 100644
index c0335f4611..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaMappingJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OwnableRelationshipMappingAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaOneToOneRelationship
- extends AbstractJavaMappingRelationship<JavaOneToOneMapping>
- implements JavaOneToOneRelationship2_0
-{
- protected final JavaMappingMappedByRelationshipStrategy2_0 mappedByStrategy;
-
- protected final JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0 primaryKeyJoinColumnStrategy;
-
- // JPA 2.0
- protected final JavaMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
- protected final JavaMappingJoinColumnRelationshipStrategy2_0 joinColumnStrategy;
-
-
- public GenericJavaOneToOneRelationship(JavaOneToOneMapping parent) {
- super(parent);
- this.mappedByStrategy = this.buildMappedByStrategy();
- this.primaryKeyJoinColumnStrategy = this.buildPrimaryKeyJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mappedByStrategy.synchronizeWithResourceModel();
- this.primaryKeyJoinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.mappedByStrategy.update();
- this.primaryKeyJoinColumnStrategy.update();
- this.joinTableStrategy.update();
- this.joinColumnStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected JavaMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.mappedByStrategy.getMappedByAttribute() != null) {
- return this.mappedByStrategy;
- }
- if (this.primaryKeyJoinColumnStrategy.hasPrimaryKeyJoinColumns()) {
- return this.primaryKeyJoinColumnStrategy;
- }
- if (this.isJpa2_0Compatible()) {
- if (this.joinTableStrategy.getJoinTable() != null) {
- return this.joinTableStrategy;
- }
- }
- return this.joinColumnStrategy;
- }
-
-
- // ********** mapped by strategy **********
-
- public JavaMappedByRelationshipStrategy getMappedByStrategy() {
- return this.mappedByStrategy;
- }
-
- public boolean strategyIsMappedBy() {
- return this.strategy == this.mappedByStrategy;
- }
-
- public void setStrategyToMappedBy() {
- this.mappedByStrategy.addStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.primaryKeyJoinColumnStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayBeMappedBy(AttributeMapping mapping) {
- return mapping.getKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- protected JavaMappingMappedByRelationshipStrategy2_0 buildMappedByStrategy() {
- return new GenericJavaMappedByRelationshipStrategy(this);
- }
-
-
- // ********** primary key join column strategy **********
-
- public JavaPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy() {
- return this.primaryKeyJoinColumnStrategy;
- }
-
- public boolean strategyIsPrimaryKeyJoinColumn() {
- return this.strategy == this.primaryKeyJoinColumnStrategy;
- }
-
- public void setStrategyToPrimaryKeyJoinColumn() {
- this.primaryKeyJoinColumnStrategy.addStrategy();
- this.mappedByStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- protected JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0 buildPrimaryKeyJoinColumnStrategy() {
- return new GenericJavaPrimaryKeyJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public JavaJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public final void setStrategyToJoinTable() {
- this.joinTableStrategy.addStrategy();
- this.mappedByStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.primaryKeyJoinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return false;
- }
-
- protected JavaMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return this.isJpa2_0Compatible() ?
- new GenericJavaMappingJoinTableRelationshipStrategy(this) :
- new NullJavaJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** join column strategy **********
-
- public JavaJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- // join column strategy is the default; so no need to add stuff,
- // just remove all the others
- this.mappedByStrategy.removeStrategy();
- this.primaryKeyJoinColumnStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- return (this.mappedByStrategy.getMappedByAttribute() == null) &&
- (this.primaryKeyJoinColumnStrategy.getPrimaryKeyJoinColumnsSize() == 0) &&
- (this.joinTableStrategy.getJoinTable() == null);
- }
-
- protected JavaMappingJoinColumnRelationshipStrategy2_0 buildJoinColumnStrategy() {
- return new GenericJavaMappingJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromMappedByRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- // no other pk join column relationships yet
- }
-
- @Override
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- super.initializeFromMappedByRelationship(oldRelationship);
- this.mappedByStrategy.initializeFrom(oldRelationship.getMappedByStrategy());
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- @Override
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- super.initializeFromJoinColumnRelationship(oldRelationship);
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaOneToOneMapping getMapping() {
- return this.getParent();
- }
-
- public OwnableRelationshipMappingAnnotation getMappingAnnotation() {
- return this.getMapping().getMappingAnnotation();
- }
-
- public OwnableRelationshipMappingAnnotation getMappingAnnotationForUpdate() {
- return this.getMapping().getAnnotationForUpdate();
- }
-
- public boolean isOwner() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return this.mappedByStrategy.relationshipIsOwnedBy(mapping);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.mappedByStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.primaryKeyJoinColumnStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- result = this.joinTableStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return this.joinColumnStrategy.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.primaryKeyJoinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 5a2dfa5b02..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.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.ListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-
-public class GenericJavaOverrideJoinColumnRelationshipStrategy
- extends AbstractJavaJoinColumnRelationshipStrategy
-{
- public GenericJavaOverrideJoinColumnRelationshipStrategy(JavaOverrideRelationship parent) {
- super(parent);
- }
-
-
- // ********** join column annotations **********
-
- @Override
- protected ListIterable<JoinColumnAnnotation> getJoinColumnAnnotations() {
- return this.getOverrideAnnotation().getJoinColumns();
- }
-
- @Override
- protected JoinColumnAnnotation addJoinColumnAnnotation(int index) {
- return this.getOverrideAnnotation().addJoinColumn(index);
- }
-
- @Override
- protected void removeJoinColumnAnnotation(int index) {
- this.getOverrideAnnotation().removeJoinColumn(index);
- }
-
- @Override
- protected void moveJoinColumnAnnotation(int targetIndex, int sourceIndex) {
- this.getOverrideAnnotation().moveJoinColumn(targetIndex, sourceIndex);
- }
-
- @Override
- protected JoinColumnAnnotation buildNullJoinColumnAnnotation() {
- return new NullJoinColumnAnnotation(this.getOverrideAnnotation());
- }
-
- protected AssociationOverrideAnnotation getOverrideAnnotation() {
- return this.getRelationship().getOverrideAnnotation();
- }
-
-
- // ********** misc **********
-
- @Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- public boolean isTargetForeignKey() {
- RelationshipMapping relationshipMapping = this.getRelationshipMapping();
- return (relationshipMapping != null) &&
- relationshipMapping.getRelationship().isTargetForeignKey();
- }
-
- public TypeMapping getRelationshipSource() {
- return this.isTargetForeignKey() ?
- this.getRelationshipMapping().getResolvedTargetEntity() :
- this.getRelationship().getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- return this.isTargetForeignKey() ?
- this.getRelationship().getTypeMapping() :
- this.getRelationshipMappingTargetEntity();
- }
-
- protected TypeMapping getRelationshipMappingTargetEntity() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return (mapping == null) ? null : mapping.getResolvedTargetEntity();
- }
-
- protected Entity getRelationshipTargetEntity() {
- TypeMapping target = this.getRelationshipTarget();
- return (target instanceof Entity) ? (Entity) target : null;
- }
-
- @Override
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- protected String getAttributeName() {
- return this.getRelationship().getAttributeName();
- }
-
- @Override
- public String getTableName() {
- return this.isTargetForeignKey() ?
- super.getTableName() :
- this.getRelationship().getDefaultTableName();
- }
-
- @Override
- public Table resolveDbTable(String tableName) {
- return this.isTargetForeignKey() ?
- super.resolveDbTable(tableName) :
- this.getRelationship().resolveDbTable(tableName);
- }
-
- @Override
- public boolean tableNameIsInvalid(String tableName) {
- return this.isTargetForeignKey() ?
- super.tableNameIsInvalid(tableName) :
- this.getRelationship().tableNameIsInvalid(tableName);
- }
-
- @Override
- public Iterable<String> getCandidateTableNames() {
- return this.isTargetForeignKey() ?
- super.getCandidateTableNames() :
- this.getRelationship().getCandidateTableNames();
- }
-
- public String getColumnTableNotValidDescription() {
- return null;
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- @Override
- public JavaOverrideRelationship getRelationship() {
- return (JavaOverrideRelationship) super.getRelationship();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
-
- // ********** join column owner adapter **********
-
- protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- public String getAttributeName() {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getAttributeName();
- }
-
- public PersistentAttribute getPersistentAttribute() {
- RelationshipMapping relationshipMapping = GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationshipMapping();
- return relationshipMapping == null ? null : relationshipMapping.getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationshipTargetEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getReferencedColumnDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 4d4c15732a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
-{
- protected final ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> primaryKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
-
-
- public GenericJavaPrimaryKeyJoinColumnRelationshipStrategy(JavaPrimaryKeyJoinColumnRelationship parent) {
- super(parent);
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.primaryKeyJoinColumnContainer = this.buildPrimaryKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncPrimaryKeyJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getPrimaryKeyJoinColumns());
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.primaryKeyJoinColumnContainer.getContextElements();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.primaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasPrimaryKeyJoinColumns() {
- return this.getPrimaryKeyJoinColumnsSize() != 0;
- }
-
- public JavaPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index) {
- return this.primaryKeyJoinColumnContainer.getContextElement(index);
- }
-
- public JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn() {
- return this.addPrimaryKeyJoinColumn(this.getPrimaryKeyJoinColumnsSize());
- }
-
- public JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index) {
- PrimaryKeyJoinColumnAnnotation annotation = this.addPrimaryKeyJoinColumnAnnotation(index);
- return this.primaryKeyJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn joinColumn) {
- this.removePrimaryKeyJoinColumn(this.primaryKeyJoinColumnContainer.indexOfContextElement((JavaPrimaryKeyJoinColumn) joinColumn));
- }
-
- public void removePrimaryKeyJoinColumn(int index) {
- this.removePrimaryKeyJoinColumnAnnotation(index);
- this.primaryKeyJoinColumnContainer.removeContextElement(index);
- }
-
- public void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.movePrimaryKeyJoinColumnAnnotation(targetIndex, sourceIndex);
- this.primaryKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncPrimaryKeyJoinColumns() {
- this.primaryKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> buildPrimaryKeyJoinColumnContainer() {
- PrimaryKeyJoinColumnContainer container = new PrimaryKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * primary key join column container
- */
- protected class PrimaryKeyJoinColumnContainer
- extends ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaPrimaryKeyJoinColumn buildContextElement(PrimaryKeyJoinColumnAnnotation resourceElement) {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.buildPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getResourceElements() {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getPrimaryKeyJoinColumnAnnotations();
- }
- @Override
- protected PrimaryKeyJoinColumnAnnotation getResourceElement(JavaPrimaryKeyJoinColumn contextElement) {
- return contextElement.getColumnAnnotation();
- }
- }
-
- protected JavaReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
- protected JavaPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(PrimaryKeyJoinColumnAnnotation annotation) {
- return this.getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, annotation);
- }
-
-
- // ********** primary key join column annotations **********
-
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getPrimaryKeyJoinColumnAnnotations() {
- return new SubListIterableWrapper<NestableAnnotation, PrimaryKeyJoinColumnAnnotation>(this.getNestablePrimaryKeyJoinColumnAnnotations());
- }
-
- protected ListIterable<NestableAnnotation> getNestablePrimaryKeyJoinColumnAnnotations() {
- return this.getResourceAttribute().getAnnotations(PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- protected PrimaryKeyJoinColumnAnnotation addPrimaryKeyJoinColumnAnnotation(int index) {
- return (PrimaryKeyJoinColumnAnnotation) this.getResourceAttribute().addAnnotation(index, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- protected void removePrimaryKeyJoinColumnAnnotation(int index) {
- this.getResourceAttribute().removeAnnotation(index, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- }
-
- protected void movePrimaryKeyJoinColumnAnnotation(int targetIndex, int sourceIndex) {
- this.getResourceAttribute().moveAnnotation(targetIndex, sourceIndex, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaPrimaryKeyJoinColumnRelationship getParent() {
- return (JavaPrimaryKeyJoinColumnRelationship) super.getParent();
- }
-
- public JavaPrimaryKeyJoinColumnRelationship getRelationship() {
- return this.getParent();
- }
-
- protected JavaRelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getRelationship().getMapping().getResourceAttribute();
- }
-
- public String getTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- public String getColumnTableNotValidDescription() {
- return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getRelationshipMapping().getTypeMapping();
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null; // pk join column strategies cannot be overridden
- }
-
- public void addStrategy() {
- if (this.getPrimaryKeyJoinColumnsSize() == 0) {
- this.addPrimaryKeyJoinColumn();
- }
- }
-
- public void removeStrategy() {
- for (int i = this.getPrimaryKeyJoinColumnsSize(); i-- > 0; ) {
- this.removePrimaryKeyJoinColumn(i);
- }
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaPrimaryKeyJoinColumn column : this.getPrimaryKeyJoinColumns()) {
- result = column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
-
- // ********** join column owner **********
-
- protected class PrimaryKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected PrimaryKeyJoinColumnOwner() {
- super();
- }
-
- /**
- * by default, the join column is in the type mapping's primary table
- */
- public String getDefaultTableName() {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public Entity getRelationshipTarget() {
- return this.getRelationshipMapping().getResolvedTargetEntity();
- }
-
- public String getAttributeName() {
- return this.getRelationshipMapping().getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- /**
- * the join column can be on a secondary table
- */
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- protected TypeMapping getTypeMapping() {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getTypeMapping();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- Entity targetEntity = this.getRelationshipTarget();
- return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return null;
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
-
- protected JavaRelationshipMapping getRelationshipMapping() {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getRelationshipMapping();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
deleted file mode 100644
index bcfe509caa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java virtual join table
- */
-public class GenericJavaVirtualJoinTable
- extends AbstractJavaVirtualReferenceTable<ReadOnlyJoinTable>
- implements JavaVirtualJoinTable
-{
-
- protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
-
- protected JavaVirtualJoinColumn defaultInverseJoinColumn;
-
-
- public GenericJavaVirtualJoinTable(JavaVirtualJoinTableRelationshipStrategy parent, Owner owner, ReadOnlyJoinTable overriddenTable) {
- super(parent, owner, overriddenTable);
- this.inverseJoinColumnOwner = this.buildInverseJoinColumnOwner();
- this.specifiedInverseJoinColumnContainer = this.buildSpecifiedInverseJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedInverseJoinColumns();
- this.updateDefaultInverseJoinColumn();
- }
-
-
- // ********** inverse join columns **********
-
- public ListIterable<JavaVirtualJoinColumn> getInverseJoinColumns() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumns() : this.getDefaultInverseJoinColumns();
- }
-
- public int getInverseJoinColumnsSize() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumnsSize() : this.getDefaultInverseJoinColumnsSize();
- }
-
-
- // ********** inverse specified join columns **********
-
- public ListIterable<JavaVirtualJoinColumn> getSpecifiedInverseJoinColumns() {
- return this.specifiedInverseJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedInverseJoinColumnsSize() {
- return this.specifiedInverseJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedInverseJoinColumns() {
- return this.getSpecifiedInverseJoinColumnsSize() != 0;
- }
-
- public JavaVirtualJoinColumn getSpecifiedInverseJoinColumn(int index) {
- return this.specifiedInverseJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedInverseJoinColumns() {
- this.specifiedInverseJoinColumnContainer.update();
- }
-
- protected ListIterable<ReadOnlyJoinColumn> getOverriddenInverseJoinColumns() {
- return new SuperListIterableWrapper<ReadOnlyJoinColumn>(this.getOverriddenTable().getSpecifiedInverseJoinColumns());
- }
-
- protected void moveSpecifiedInverseJoinColumn(int index, JavaVirtualJoinColumn joinColumn) {
- this.specifiedInverseJoinColumnContainer.moveContextElement(index, joinColumn);
- }
-
- protected JavaVirtualJoinColumn addSpecifiedInverseJoinColumn(int index, ReadOnlyJoinColumn joinColumn) {
- return this.specifiedInverseJoinColumnContainer.addContextElement(index, joinColumn);
- }
-
- protected void removeSpecifiedInverseJoinColumn(JavaVirtualJoinColumn joinColumn) {
- this.specifiedInverseJoinColumnContainer.removeContextElement(joinColumn);
- }
-
- protected ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> buildSpecifiedInverseJoinColumnContainer() {
- return new SpecifiedInverseJoinColumnContainer();
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedInverseJoinColumnContainer
- extends ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_INVERSE_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaVirtualJoinColumn buildContextElement(ReadOnlyJoinColumn resourceElement) {
- return GenericJavaVirtualJoinTable.this.buildInverseJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyJoinColumn> getResourceElements() {
- return GenericJavaVirtualJoinTable.this.getOverriddenInverseJoinColumns();
- }
- @Override
- protected ReadOnlyJoinColumn getResourceElement(JavaVirtualJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
-
- // ********** default inverse join column **********
-
- public JavaVirtualJoinColumn getDefaultInverseJoinColumn() {
- return this.defaultInverseJoinColumn;
- }
-
- protected void setDefaultInverseJoinColumn(JavaVirtualJoinColumn joinColumn) {
- JavaVirtualJoinColumn old = this.defaultInverseJoinColumn;
- this.defaultInverseJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, old, joinColumn);
- }
-
- protected ListIterable<JavaVirtualJoinColumn> getDefaultInverseJoinColumns() {
- return (this.defaultInverseJoinColumn != null) ?
- new SingleElementListIterable<JavaVirtualJoinColumn>(this.defaultInverseJoinColumn) :
- EmptyListIterable.<JavaVirtualJoinColumn>instance();
- }
-
- protected int getDefaultInverseJoinColumnsSize() {
- return (this.defaultInverseJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultInverseJoinColumn() {
- if (this.buildsDefaultInverseJoinColumn()) {
- if (this.defaultInverseJoinColumn == null) {
- this.setDefaultInverseJoinColumn(this.buildInverseJoinColumn(this.getOverriddenTable().getDefaultInverseJoinColumn()));
- } else {
- this.defaultInverseJoinColumn.update();
- }
- } else {
- this.setDefaultInverseJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultInverseJoinColumn() {
- return ! this.hasSpecifiedInverseJoinColumns();
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaVirtualJoinTableRelationshipStrategy getParent() {
- return (JavaVirtualJoinTableRelationshipStrategy) super.getParent();
- }
-
- protected JavaVirtualJoinTableRelationshipStrategy getRelationshipStrategy() {
- return this.getParent();
- }
-
- @Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- protected JavaReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
- return new InverseJoinColumnOwner();
- }
-
- protected JavaVirtualJoinColumn buildInverseJoinColumn(ReadOnlyJoinColumn joinColumn) {
- return this.buildJoinColumn(this.inverseJoinColumnOwner, joinColumn);
- }
-
- @Override
- protected String buildDefaultName() {
- return this.getRelationshipStrategy().getJoinTableDefaultName();
- }
-
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationshipStrategy().getRelationship().getMapping();
- }
-
- public PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateJoinColumns(messages, reporter, astRoot);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter, astRoot);
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationshipStrategy().validatesAgainstDatabase();
- }
-
-
- // ********** join column owners **********
-
- /**
- * just a little common behavior
- */
- protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected AbstractJoinColumnOwner() {
- super();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. The table is always the join table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- /**
- * the join column can only be on the join table itself
- */
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return Tools.valuesAreEqual(GenericJavaVirtualJoinTable.this.getName(), tableName) ?
- GenericJavaVirtualJoinTable.this.getDbTable() :
- null;
- }
-
- /**
- * by default, the join column is, obviously, in the join table;
- * not sure whether it can be anywhere else...
- */
- public String getDefaultTableName() {
- return GenericJavaVirtualJoinTable.this.getName();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaVirtualJoinTable.this.getValidationTextRange(astRoot);
- }
-
- protected JavaVirtualRelationship getRelationship() {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().getRelationship();
- }
- }
-
-
- /**
- * owner for "back-pointer" join columns;
- * these point at the source/owning entity
- */
- protected class JoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- return this.getRelationship().getEntity();
- }
-
- public String getAttributeName() {
- return MappingTools.getTargetAttributeName(GenericJavaVirtualJoinTable.this.getRelationshipMapping());
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return this.getTypeMapping().getPrimaryDbTable();
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getRelationship().getTypeMapping();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaVirtualJoinTable.this.getJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-
-
- /**
- * owner for "forward-pointer" join columns;
- * these point at the target/inverse entity
- */
- protected class InverseJoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected InverseJoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- RelationshipMapping relationshipMapping = GenericJavaVirtualJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getResolvedTargetEntity();
- }
-
- public String getAttributeName() {
- RelationshipMapping relationshipMapping = GenericJavaVirtualJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getName();
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaVirtualJoinTable.this.getInverseJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaAttributeMappingDefinitionWrapper.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaAttributeMappingDefinitionWrapper.java
deleted file mode 100644
index 7f038b7ecf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaAttributeMappingDefinitionWrapper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.context.java;
-
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-
-/**
- * Simplify delegation to another definition.
- * A subclass need only implement {@link #getDelegate()} and override the
- * appropriate method(s).
- */
-public abstract class JavaAttributeMappingDefinitionWrapper
- implements JavaAttributeMappingDefinition
-{
- protected JavaAttributeMappingDefinitionWrapper() {
- super();
- }
-
- protected abstract JavaAttributeMappingDefinition getDelegate();
-
- public String getKey() {
- return this.getDelegate().getKey();
- }
-
- public String getAnnotationName() {
- return this.getDelegate().getAnnotationName();
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return this.getDelegate().isSpecified(persistentAttribute);
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return this.getDelegate().getSupportingAnnotationNames();
- }
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return this.getDelegate().buildMapping(persistentAttribute, factory);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaBasicMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaBasicMappingDefinition.java
deleted file mode 100644
index a858697319..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaBasicMappingDefinition.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-public class JavaBasicMappingDefinition
- implements DefaultJavaAttributeMappingDefinition
-{
- // singleton
- private static final DefaultJavaAttributeMappingDefinition INSTANCE = new JavaBasicMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static DefaultJavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaBasicMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return BasicAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- ColumnAnnotation.ANNOTATION_NAME,
- LobAnnotation.ANNOTATION_NAME,
- TemporalAnnotation.ANNOTATION_NAME,
- EnumeratedAnnotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaBasicMapping(persistentAttribute);
- }
-
- public boolean isDefault(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.typeIsBasic();
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddableDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddableDefinition.java
deleted file mode 100644
index 15b9f51048..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddableDefinition.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-public class JavaEmbeddableDefinition
- implements JavaTypeMappingDefinition
-{
- // singleton
- private static final JavaEmbeddableDefinition INSTANCE = new JavaEmbeddableDefinition();
-
- /**
- * Return the singleton
- */
- public static JavaTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEmbeddableDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return EmbeddableAnnotation.ANNOTATION_NAME;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return EmptyIterable.instance();
- }
-
- public JavaEmbeddable buildMapping(JavaPersistentType persistentType, Annotation mappingAnnotation, JpaFactory factory) {
- return factory.buildJavaEmbeddable(persistentType, (EmbeddableAnnotation) mappingAnnotation);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java
deleted file mode 100644
index 27d7523752..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-public class JavaEmbeddedIdMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaEmbeddedIdMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singletong usage
- */
- private JavaEmbeddedIdMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return EmbeddedIdAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- AttributeOverrideAnnotation.ANNOTATION_NAME,
- JPA.ATTRIBUTE_OVERRIDES,
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaEmbeddedIdMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedMappingDefinition.java
deleted file mode 100644
index fef316ec16..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEmbeddedMappingDefinition.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-public class JavaEmbeddedMappingDefinition
- implements DefaultJavaAttributeMappingDefinition
-{
- // singleton
- private static final DefaultJavaAttributeMappingDefinition INSTANCE = new JavaEmbeddedMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static DefaultJavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEmbeddedMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return EmbeddedAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- AttributeOverrideAnnotation.ANNOTATION_NAME,
- JPA.ATTRIBUTE_OVERRIDES,
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaEmbeddedMapping(persistentAttribute);
- }
-
- public boolean isDefault(JavaPersistentAttribute persistentAttribute) {
- String targetEmbeddable = persistentAttribute.getSingleReferenceTargetTypeName();
- return (targetEmbeddable != null)
- && (persistentAttribute.getPersistenceUnit().getEmbeddable(targetEmbeddable) != null);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityDefinition.java
deleted file mode 100644
index 264faad066..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityDefinition.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-
-public class JavaEntityDefinition
- implements JavaTypeMappingDefinition
-{
- // singleton
- private static final JavaEntityDefinition INSTANCE = new JavaEntityDefinition();
-
- /**
- * Return the singleton
- */
- public static JavaTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEntityDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return EntityAnnotation.ANNOTATION_NAME;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- TableAnnotation.ANNOTATION_NAME,
- SecondaryTableAnnotation.ANNOTATION_NAME,
- JPA.SECONDARY_TABLES,
- PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME,
- JPA.PRIMARY_KEY_JOIN_COLUMNS,
- IdClassAnnotation.ANNOTATION_NAME,
- InheritanceAnnotation.ANNOTATION_NAME,
- DiscriminatorValueAnnotation.ANNOTATION_NAME,
- DiscriminatorColumnAnnotation.ANNOTATION_NAME,
- SequenceGeneratorAnnotation.ANNOTATION_NAME,
- TableGeneratorAnnotation.ANNOTATION_NAME,
- NamedQueryAnnotation.ANNOTATION_NAME,
- JPA.NAMED_QUERIES,
- NamedNativeQueryAnnotation.ANNOTATION_NAME,
- JPA.NAMED_NATIVE_QUERIES,
- JPA.SQL_RESULT_SET_MAPPING,
- JPA.EXCLUDE_DEFAULT_LISTENERS,
- JPA.EXCLUDE_SUPERCLASS_LISTENERS,
- JPA.ENTITY_LISTENERS,
- JPA.PRE_PERSIST,
- JPA.POST_PERSIST,
- JPA.PRE_REMOVE,
- JPA.POST_REMOVE,
- JPA.PRE_UPDATE,
- JPA.POST_UPDATE,
- JPA.POST_LOAD,
- AttributeOverrideAnnotation.ANNOTATION_NAME,
- JPA.ATTRIBUTE_OVERRIDES,
- AssociationOverrideAnnotation.ANNOTATION_NAME,
- JPA.ASSOCIATION_OVERRIDES
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaEntity buildMapping(JavaPersistentType persistentType, Annotation mappingAnnotation, JpaFactory factory) {
- return factory.buildJavaEntity(persistentType, (EntityAnnotation) mappingAnnotation);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java
deleted file mode 100644
index af74224308..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java
+++ /dev/null
@@ -1,44 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-
-public class JavaEntityTextRangeResolver
- implements EntityTextRangeResolver
-{
- private JavaEntity entity;
-
- private CompilationUnit astRoot;
-
-
- public JavaEntityTextRangeResolver(JavaEntity entity, CompilationUnit astRoot) {
- this.entity = entity;
- this.astRoot = astRoot;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.entity.getValidationTextRange(this.astRoot);
- }
-
- public TextRange getIdClassTextRange() {
- return this.entity.getIdClassReference().getValidationTextRange(this.astRoot);
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.entity.getPersistentType().
- getAttributeNamed(attributeName).getMapping().getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaIdMappingDefinition.java
deleted file mode 100644
index 24c22ab227..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaIdMappingDefinition.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-public class JavaIdMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaIdMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaIdMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return IdAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- ColumnAnnotation.ANNOTATION_NAME,
- GeneratedValueAnnotation.ANNOTATION_NAME,
- TemporalAnnotation.ANNOTATION_NAME,
- TableGeneratorAnnotation.ANNOTATION_NAME,
- SequenceGeneratorAnnotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaIdMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java
deleted file mode 100644
index 5d1f33cb37..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-
-public class JavaJoinColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaReadOnlyJoinColumn>
- implements JoinColumnTextRangeResolver
-{
- public JavaJoinColumnTextRangeResolver(JavaReadOnlyJoinColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange(this.astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToManyMappingDefinition.java
deleted file mode 100644
index e430c5f21b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToManyMappingDefinition.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-
-public class JavaManyToManyMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaManyToManyMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaManyToManyMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return ManyToManyAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- JoinTableAnnotation.ANNOTATION_NAME,
- MapKeyAnnotation.ANNOTATION_NAME,
- OrderByAnnotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaManyToManyMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToOneMappingDefinition.java
deleted file mode 100644
index 316e2747e5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaManyToOneMappingDefinition.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation;
-
-public class JavaManyToOneMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaManyToOneMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaManyToOneMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return ManyToOneAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- JoinTableAnnotation.ANNOTATION_NAME,
- JoinColumnAnnotation.ANNOTATION_NAME,
- JPA.JOIN_COLUMNS
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaManyToOneMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassDefinition.java
deleted file mode 100644
index d9a40b0814..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassDefinition.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-
-public class JavaMappedSuperclassDefinition
- implements JavaTypeMappingDefinition
-{
- // singleton
- private static final JavaMappedSuperclassDefinition INSTANCE = new JavaMappedSuperclassDefinition();
-
- /**
- * Return the singleton
- */
- public static JavaTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaMappedSuperclassDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return MappedSuperclassAnnotation.ANNOTATION_NAME;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- IdClassAnnotation.ANNOTATION_NAME,
- NamedQueryAnnotation.ANNOTATION_NAME,
- JPA.NAMED_QUERIES,
- NamedNativeQueryAnnotation.ANNOTATION_NAME,
- JPA.NAMED_NATIVE_QUERIES,
- JPA.EXCLUDE_DEFAULT_LISTENERS,
- JPA.EXCLUDE_SUPERCLASS_LISTENERS,
- JPA.ENTITY_LISTENERS,
- JPA.PRE_PERSIST,
- JPA.POST_PERSIST,
- JPA.PRE_REMOVE,
- JPA.POST_REMOVE,
- JPA.PRE_UPDATE,
- JPA.POST_UPDATE,
- JPA.POST_LOAD
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaMappedSuperclass buildMapping(JavaPersistentType persistentType, Annotation mappingAnnotation, JpaFactory factory) {
- return factory.buildJavaMappedSuperclass(persistentType, (MappedSuperclassAnnotation) mappingAnnotation);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java
deleted file mode 100644
index c9319716ea..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java
+++ /dev/null
@@ -1,46 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-
-public class JavaMappedSuperclassTextRangeResolver
- implements PrimaryKeyTextRangeResolver
-{
- private JavaMappedSuperclass mappedSuperclass;
-
- private CompilationUnit astRoot;
-
-
- public JavaMappedSuperclassTextRangeResolver(
- JavaMappedSuperclass mappedSuperclass, CompilationUnit astRoot) {
-
- this.mappedSuperclass = mappedSuperclass;
- this.astRoot = astRoot;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.mappedSuperclass.getValidationTextRange(this.astRoot);
- }
-
- public TextRange getIdClassTextRange() {
- return this.mappedSuperclass.getIdClassReference().getValidationTextRange(this.astRoot);
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.mappedSuperclass.getPersistentType().
- getAttributeNamed(attributeName).getMapping().getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java
deleted file mode 100644
index 6dbf8d9884..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-
-public class JavaNamedColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaReadOnlyNamedColumn>
-{
- public JavaNamedColumnTextRangeResolver(JavaReadOnlyNamedColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java
deleted file mode 100644
index 1b98aeaff2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java null type mapping
- */
-public class JavaNullTypeMapping
- extends AbstractJavaTypeMapping<Annotation>
-{
- public JavaNullTypeMapping(JavaPersistentType parent) {
- super(parent, null);
- }
-
- public String getKey() {
- return MappingKeys.NULL_TYPE_MAPPING_KEY;
- }
-
- public JavaPersistentType getIdClass() {
- return null;
- }
-
- public boolean isMapped() {
- return false;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-
- public Iterable<Query> getQueries() {
- return EmptyIterable.instance();
- }
-
-
- // ********** validation **********
-
- /**
- * We added this message here because the most likely solution is to add
- * an annotation to the .java file.
- * This message used to be found on the <class> tag in persistence.xml.
- * The other possible way to fix the error is to remove it from persistence.xml.
- * This can be accomplished with the Synchronize Classes action.
- * We could also add a quick fix for this error.
- */
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_INVALID_CLASS,
- new String[] {this.getPersistentType().getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
-
- @Override
- public boolean validatesAgainstDatabase() {
- return false;
- }
-
- @Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getPersistentType().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToManyMappingDefinition.java
deleted file mode 100644
index e5562683b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToManyMappingDefinition.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-
-public class JavaOneToManyMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaOneToManyMappingDefinition();
-
- /**
- * Return the singleton
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaOneToManyMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return OneToManyAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- JoinTableAnnotation.ANNOTATION_NAME,
- MapKeyAnnotation.ANNOTATION_NAME,
- OrderByAnnotation.ANNOTATION_NAME,
- JoinColumnAnnotation.ANNOTATION_NAME,
- JPA.JOIN_COLUMNS
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaOneToManyMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToOneMappingDefinition.java
deleted file mode 100644
index 849d052ba5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOneToOneMappingDefinition.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-
-public class JavaOneToOneMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaOneToOneMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaOneToOneMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return OneToOneAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- JoinTableAnnotation.ANNOTATION_NAME,
- JoinColumnAnnotation.ANNOTATION_NAME,
- JPA.JOIN_COLUMNS,
- PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME,
- JPA.PRIMARY_KEY_JOIN_COLUMNS
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaOneToOneMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java
deleted file mode 100644
index cc39280cb8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-
-public class JavaOverrideTextRangeResolver
- implements OverrideTextRangeResolver
-{
- protected final JavaReadOnlyOverride javaOverride;
-
- protected final CompilationUnit astRoot;
-
- public JavaOverrideTextRangeResolver(JavaReadOnlyOverride javaOverride, CompilationUnit astRoot) {
- this.javaOverride = javaOverride;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.javaOverride.getNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java
deleted file mode 100644
index 83fe6f95ca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,33 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-
-public class JavaPersistentAttributeTextRangeResolver
- implements PersistentAttributeTextRangeResolver
-{
- private JavaPersistentAttribute javaPersistentAttribute;
-
- private CompilationUnit astRoot;
-
- public JavaPersistentAttributeTextRangeResolver(JavaPersistentAttribute javaPersistentAttribute, CompilationUnit astRoot) {
- this.javaPersistentAttribute = javaPersistentAttribute;
- this.astRoot = astRoot;
- }
-
- public TextRange getAttributeTextRange() {
- return this.javaPersistentAttribute.getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java
deleted file mode 100644
index 5c48c75400..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-
-public class JavaPrimaryKeyJoinColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaPrimaryKeyJoinColumn>
- implements BaseJoinColumnTextRangeResolver
-{
-
- public JavaPrimaryKeyJoinColumnTextRangeResolver(JavaPrimaryKeyJoinColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java
deleted file mode 100644
index 4b51f79094..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTableColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-
-public class JavaTableColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaReadOnlyTableColumn>
- implements TableColumnTextRangeResolver
-{
- public JavaTableColumnTextRangeResolver(JavaReadOnlyTableColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java
deleted file mode 100644
index 8d42bc6983..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-public class JavaTableTextRangeResolver
- implements TableTextRangeResolver
-{
- protected final JavaReadOnlyTable table;
-
- protected final CompilationUnit astRoot;
-
-
- public JavaTableTextRangeResolver(JavaReadOnlyTable table, CompilationUnit astRoot) {
- super();
- this.table = table;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.table.getNameTextRange(this.astRoot);
- }
-
- public TextRange getCatalogTextRange() {
- return this.table.getCatalogTextRange(this.astRoot);
- }
-
- public TextRange getSchemaTextRange() {
- return this.table.getSchemaTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTransientMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTransientMappingDefinition.java
deleted file mode 100644
index ca1fcc602d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTransientMappingDefinition.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
-
-public class JavaTransientMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaTransientMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaTransientMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return TransientAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return EmptyIterable.instance();
- }
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaTransientMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingDefinitionWrapper.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingDefinitionWrapper.java
deleted file mode 100644
index 9d40e1ede0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingDefinitionWrapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-
-/**
- * Simplify delegation to another definition.
- * A subclass need only implement {@link #getDelegate()} and override the
- * appropriate method(s).
- */
-public abstract class JavaTypeMappingDefinitionWrapper
- implements JavaTypeMappingDefinition
-{
- protected JavaTypeMappingDefinitionWrapper() {
- super();
- }
-
- protected abstract JavaTypeMappingDefinition getDelegate();
-
- public String getKey() {
- return this.getDelegate().getKey();
- }
-
- public String getAnnotationName() {
- return this.getDelegate().getAnnotationName();
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return this.getDelegate().getSupportingAnnotationNames();
- }
-
- public JavaTypeMapping buildMapping(JavaPersistentType persistentType, Annotation annotation, JpaFactory factory) {
- return this.getDelegate().buildMapping(persistentType, annotation, factory);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java
deleted file mode 100644
index 174e6b2b7a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,33 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-
-public class JavaTypeMappingTextRangeResolver
- implements TypeMappingTextRangeResolver
-{
- private JavaTypeMapping typeMapping;
-
- private CompilationUnit astRoot;
-
- public JavaTypeMappingTextRangeResolver(JavaTypeMapping typeMapping, CompilationUnit astRoot) {
- this.typeMapping = typeMapping;
- this.astRoot = astRoot;
- }
-
- public TextRange getTypeMappingTextRange() {
- return this.typeMapping.getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaVersionMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaVersionMappingDefinition.java
deleted file mode 100644
index fde7b35990..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaVersionMappingDefinition.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
-
-public class JavaVersionMappingDefinition
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaVersionMappingDefinition();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaVersionMappingDefinition() {
- super();
- }
-
- public String getKey() {
- return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return VersionAnnotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- ColumnAnnotation.ANNOTATION_NAME,
- TemporalAnnotation.ANNOTATION_NAME,
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return factory.buildJavaVersionMapping(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java
deleted file mode 100644
index 183148c29c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.MethodSignature;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.PersistentPropertyValidator;
-
-public class PropertyAccessor
- extends AbstractAccessor
-{
- private final JavaResourceMethod resourceGetter;
-
- private final JavaResourceMethod resourceSetter;
-
- public PropertyAccessor(ReadOnlyPersistentAttribute parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- super(parent);
- this.resourceGetter = resourceGetter;
- this.resourceSetter = resourceSetter;
- }
-
- public JavaResourceAttribute getResourceAttribute() {
- return this.resourceGetter != null ? this.resourceGetter : this.resourceSetter;
- }
-
- public boolean isFor(JavaResourceField resourceField) {
- return false;
- }
-
- public boolean isFor(JavaResourceMethod getterMethod, JavaResourceMethod setterMethod) {
- return (this.resourceGetter == getterMethod) && (this.resourceSetter == setterMethod);
- }
-
- public AccessType getDefaultAccess() {
- return AccessType.PROPERTY;
- }
-
- public JavaResourceMethod getResourceGetter() {
- return this.resourceGetter;
- }
-
- public JavaResourceMethod getResourceSetter() {
- return this.resourceSetter;
- }
-
- public JavaPersistentAttribute buildUnannotatedJavaAttribute(PersistentType parent) {
- return this.buildJavaAttribute(parent, this.buildUnannotatedJavaResourceGetter(), this.buildUnannotatedJavaResourceSetter());
- }
-
- /**
- * Build a Java resource method that wraps the original Java resource
- * getter method and behaves as though it has no annotations. This will cause
- * all the settings in the Java <em>context</em> attribute to default.
- */
- protected JavaResourceMethod buildUnannotatedJavaResourceGetter() {
- return new UnannotatedJavaResourceMethod(this.getResourceGetter());
- }
-
- /**
- * Build a Java resource method that wraps the original Java resource
- * setter method and behaves as though it has no annotations. This will cause
- * all the settings in the Java <em>context</em> attribute to default.
- */
- protected JavaResourceMethod buildUnannotatedJavaResourceSetter() {
- return new UnannotatedJavaResourceMethod(this.getResourceSetter());
- }
-
- protected JavaPersistentAttribute buildJavaAttribute(PersistentType parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- return this.getJpaFactory().buildJavaPersistentProperty(parent, resourceGetter, resourceSetter);
- }
-
-
- public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
- return new PersistentPropertyValidator(persistentAttribute, this, textRangeResolver);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getResourceAttribute().getNameTextRange(astRoot);
- }
-
-
- // ********** unannotated Java resource method **********
-
- /**
- * Wrap another Java resource method and suppress all its annotations.
- */
- protected class UnannotatedJavaResourceMethod
- extends UnannotatedJavaResourceAttribute<JavaResourceMethod>
- implements JavaResourceMethod {
-
- protected UnannotatedJavaResourceMethod(JavaResourceMethod method){
- super(method);
- }
-
-
- public Kind getKind() {
- return Kind.METHOD;
- }
-
- public String getMethodName() {
- return this.member.getMethodName();
- }
-
- public ListIterable<String> getParameterTypeNames() {
- return this.member.getParameterTypeNames();
- }
-
- public String getParameterTypeName(int index) {
- return this.member.getParameterTypeName(index);
- }
-
- public int getParametersSize() {
- return this.member.getParametersSize();
- }
-
- public boolean isConstructor() {
- return this.member.isConstructor();
- }
-
- public boolean isFor(MethodSignature methodSignature, int occurrence) {
- return this.member.isFor(methodSignature, occurrence);
- }
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java
deleted file mode 100644
index 7a5b3c585f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java
+++ /dev/null
@@ -1,1163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdClassReference;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTableGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
-import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> file
- * <br>
- * <code>entity-mappings</code> element
- */
-public abstract class AbstractEntityMappings
- extends AbstractOrmXmlContextNode
- implements EntityMappings
-{
- protected final XmlEntityMappings xmlEntityMappings;
-
- protected String description;
-
- protected String package_; // "package" is a Java keyword
-
- protected AccessType specifiedAccess;
- protected AccessType defaultAccess;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected final OrmPersistenceUnitMetadata persistenceUnitMetadata;
-
- protected final Vector<OrmPersistentType> persistentTypes = new Vector<OrmPersistentType>();
- protected final PersistentTypeContainerAdapter persistentTypeContainerAdapter = new PersistentTypeContainerAdapter();
-
- protected final ContextListContainer<OrmSequenceGenerator, XmlSequenceGenerator> sequenceGeneratorContainer;
-
- protected final ContextListContainer<OrmTableGenerator, XmlTableGenerator> tableGeneratorContainer;
-
- protected final OrmQueryContainer queryContainer;
-
- // Lookup of short class name to fully qualified class name for primitives, wrappers, array primitives
- protected static Map<String, String> PRIMITIVE_CLASSES = null;
-
-
- protected AbstractEntityMappings(OrmXml parent, XmlEntityMappings xmlEntityMappings) {
- super(parent);
- this.xmlEntityMappings = xmlEntityMappings;
-
- this.description = this.xmlEntityMappings.getDescription();
- this.package_ = this.xmlEntityMappings.getPackage();
-
- this.specifiedAccess = this.buildSpecifiedAccess();
- this.specifiedCatalog = this.xmlEntityMappings.getCatalog();
- this.specifiedSchema = this.xmlEntityMappings.getSchema();
-
- this.persistenceUnitMetadata = this.buildPersistenceUnitMetadata();
-
- this.initializePersistentTypes();
- this.sequenceGeneratorContainer = this.buildSequenceGeneratorContainer();
- this.tableGeneratorContainer = this.buildTableGeneratorContainer();
-
- this.queryContainer = this.buildQueryContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
-
- this.setDescription_(this.xmlEntityMappings.getDescription());
- this.setPackage_(this.xmlEntityMappings.getPackage());
-
- this.setSpecifiedAccess_(this.buildSpecifiedAccess());
- this.setSpecifiedCatalog_(this.xmlEntityMappings.getCatalog());
- this.setSpecifiedSchema_(this.xmlEntityMappings.getSchema());
-
- this.persistenceUnitMetadata.synchronizeWithResourceModel();
-
- this.syncPersistentTypes();
- this.syncSequenceGenerators();
- this.syncTableGenerators();
-
- this.queryContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
-
- this.setDefaultAccess(this.buildDefaultAccess());
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.setDefaultSchema(this.buildDefaultSchema());
-
- this.persistenceUnitMetadata.update();
-
- this.updateNodes(this.getPersistentTypes());
- this.updateNodes(this.getSequenceGenerators());
- this.updateNodes(this.getTableGenerators());
-
- this.queryContainer.update();
- }
-
-
- // ********** overrides **********
-
- @Override
- public OrmXml getParent() {
- return (OrmXml) super.getParent();
- }
-
- // TODO bjv add to interface
- public OrmXml getOrmXml() {
- return this.getParent();
- }
-
- @Override
- public EntityMappings getMappingFileRoot() {
- return this;
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<EntityMappings> getType() {
- return EntityMappings.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- for (OrmPersistentType persistentType: this.getPersistentTypes()) {
- if (persistentType.contains(textOffset)) {
- return persistentType.getStructureNode(textOffset);
- }
- }
- return this;
- }
-
- public TextRange getSelectionTextRange() {
- return this.xmlEntityMappings.getSelectionTextRange();
- }
-
- public void dispose() {
- for (OrmPersistentType ormPersistentType : this.getPersistentTypes()) {
- ormPersistentType.dispose();
- }
- }
-
-
- // ********** PersistentType.Owner implementation **********
-
- public AccessType getOverridePersistentTypeAccess() {
- return this.isXmlMappingMetadataComplete() ? this.specifiedAccess : null;
- }
-
- public AccessType getDefaultPersistentTypeAccess() {
- return this.getAccess();
- }
-
- public String getDefaultPersistentTypePackage() {
- return this.getPackage();
- }
-
- protected boolean isXmlMappingMetadataComplete() {
- return this.getPersistenceUnit().isXmlMappingMetadataComplete();
- }
-
-
- // ********** persistence unit metadata **********
-
- public OrmPersistenceUnitMetadata getPersistenceUnitMetadata() {
- return this.persistenceUnitMetadata;
- }
-
- protected OrmPersistenceUnitMetadata buildPersistenceUnitMetadata() {
- return this.getContextNodeFactory().buildOrmPersistenceUnitMetadata(this);
- }
-
-
- // ********** misc **********
-
- public XmlEntityMappings getXmlEntityMappings() {
- return this.xmlEntityMappings;
- }
-
- public String getVersion() {
- return this.xmlEntityMappings.getVersion();
- }
-
- public void changeMapping(OrmPersistentType ormPersistentType, OrmTypeMapping oldMapping, OrmTypeMapping newMapping) {
- AccessType savedAccess = ormPersistentType.getSpecifiedAccess();
- int sourceIndex = this.persistentTypes.indexOf(ormPersistentType);
- this.persistentTypes.remove(sourceIndex);
- oldMapping.removeXmlTypeMappingFrom(this.xmlEntityMappings);
- int targetIndex = this.calculateInsertionIndex(ormPersistentType);
- this.persistentTypes.add(targetIndex, ormPersistentType);
- newMapping.addXmlTypeMappingTo(this.xmlEntityMappings);
-
- newMapping.initializeFrom(oldMapping);
- //not sure where else to put this, need to set the access on the resource model
- ormPersistentType.setSpecifiedAccess(savedAccess);
- this.fireItemMoved(PERSISTENT_TYPES_LIST, targetIndex, sourceIndex);
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlEntityMappings.getValidationTextRange();
- return (textRange != null) ? textRange : this.getOrmXml().getValidationTextRange();
- }
-
- public boolean containsOffset(int textOffset) {
- return (this.xmlEntityMappings != null) && this.xmlEntityMappings.containsOffset(textOffset);
- }
-
-
- // ********** description **********
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.setDescription_(description);
- this.xmlEntityMappings.setDescription(description);
- }
-
- protected void setDescription_(String description) {
- String old = this.description;
- this.description = description;
- this.firePropertyChanged(DESCRIPTION_PROPERTY, old, description);
- }
-
-
- // ********** package **********
-
- public String getPackage() {
- return this.package_;
- }
-
- public void setPackage(String package_) {
- this.setPackage_(package_);
- this.xmlEntityMappings.setPackage(package_);
- }
-
- /**
- * TODO If the package changes, we should probably clear out all resolved
- * references to persistent types:<ul>
- * <li>{@link OrmIdClassReference#getIdClass()}
- * <li>{@link OrmPersistentType#getJavaPersistentType()}
- * </ul>
- */
- protected void setPackage_(String package_) {
- String old = this.package_;
- this.package_ = package_;
- this.firePropertyChanged(PACKAGE_PROPERTY, old, package_);
- }
-
-
- // ********** access **********
-
- public AccessType getAccess() {
- return (this.specifiedAccess != null) ? this.specifiedAccess : this.defaultAccess;
- }
-
- public AccessType getSpecifiedAccess() {
- return this.specifiedAccess;
- }
-
- public void setSpecifiedAccess(AccessType access) {
- this.setSpecifiedAccess_(access);
- this.xmlEntityMappings.setAccess(AccessType.toOrmResourceModel(access));
- }
-
- protected void setSpecifiedAccess_(AccessType access) {
- AccessType old = this.specifiedAccess;
- this.specifiedAccess = access;
- this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildSpecifiedAccess() {
- return AccessType.fromOrmResourceModel(this.xmlEntityMappings.getAccess(), this.getJpaPlatform(), this.getResourceType());
- }
-
- public AccessType getDefaultAccess() {
- return this.defaultAccess;
- }
-
- protected void setDefaultAccess(AccessType access) {
- AccessType old = this.defaultAccess;
- this.defaultAccess = access;
- this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildDefaultAccess() {
- return this.getPersistenceUnit().getDefaultAccess();
- }
-
-
- // ********** catalog **********
-
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- this.setSpecifiedCatalog_(catalog);
- this.xmlEntityMappings.setCatalog(catalog);
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog() {
- return this.getPersistenceUnit().getDefaultCatalog();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
-
- // ********** schema **********
-
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- this.setSpecifiedSchema_(schema);
- this.xmlEntityMappings.setSchema(schema);
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema() {
- return this.getPersistenceUnit().getDefaultSchema();
- }
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
-
- // ********** schema container **********
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
-
- // ********** persistent types **********
-
- public ListIterable<OrmPersistentType> getPersistentTypes() {
- return new LiveCloneListIterable<OrmPersistentType>(this.persistentTypes);
- }
-
- public int getPersistentTypesSize() {
- return this.persistentTypes.size();
- }
-
- public OrmPersistentType getPersistentType(String className) {
- for (OrmPersistentType ormPersistentType : this.getPersistentTypes()) {
- if (ormPersistentType.isFor(className)) {
- return ormPersistentType;
- }
- }
- return null;
- }
-
- public boolean containsPersistentType(String className) {
- return this.getPersistentType(className) != null;
- }
-
- public PersistentType resolvePersistentType(String className) {
- return (PersistentType) this.resolveType(PERSISTENT_TYPE_LOOKUP_ADAPTER, className);
- }
-
- public JavaResourceAbstractType resolveJavaResourceType(String className) {
- return (JavaResourceAbstractType) this.resolveType(RESOURCE_TYPE_LOOKUP_ADAPTER, className);
- }
-
- public JavaResourceAbstractType resolveJavaResourceType(String className, JavaResourceAbstractType.Kind kind) {
- JavaResourceAbstractType resourceType = this.resolveJavaResourceType(className);
- if (resourceType == null || resourceType.getKind() != kind) {
- return null;
- }
- return resourceType;
- }
-
- public IType resolveJdtType(String className) {
- return (IType) this.resolveType(JDT_TYPE_LOOKUP_ADAPTER, className);
- }
-
- /**
- * className passed in must have - $ for inner class
- * className is qualified or not qualified
- * append package if the name is not qualified
- */
- public String getFullyQualifiedName(String className) {
- if (StringTools.stringIsEmpty(className)) {
- return null;
- }
- String primitiveClassName = getPrimitiveClassName(className);
- if (primitiveClassName != null) {
- return primitiveClassName;
- }
-
- //No global package defined or the class name is qualified, use the className.
- //Otherwise, prepend the global package name.
- if (this.getPackage() != null && className.indexOf('.') == -1) {
- className = this.prependGlobalPackage(className);
- }
- // static inner class listed in orm.xml will use '$', replace with '.'
- className = className.replace('$', '.');
- return className;
- }
-
- protected Object resolveType(TypeLookupAdapter adapter, String className) {
- if (className == null) {
- return null;
- }
- return adapter.resolveType(this, this.getFullyQualifiedName(className));
- }
-
- /**
- * preconditions:
- * getPackage() is not null
- * unqualifiedClassName is not qualified (contains no '.')
- */
- protected String prependGlobalPackage(String unqualifiedClassName) {
- // Format of global package is "foo.bar"
- return this.getPackage() + '.' + unqualifiedClassName;
- }
-
- protected interface TypeLookupAdapter {
- Object resolveType(EntityMappings entityMappings, String className);
- }
-
- protected static final TypeLookupAdapter PERSISTENT_TYPE_LOOKUP_ADAPTER =
- new TypeLookupAdapter() {
- public Object resolveType(EntityMappings entityMappings, String className) {
- return entityMappings.getPersistenceUnit().getPersistentType(className);
- }
- };
-
- protected static final TypeLookupAdapter RESOURCE_TYPE_LOOKUP_ADAPTER =
- new TypeLookupAdapter() {
- public Object resolveType(EntityMappings entityMappings, String className) {
- return entityMappings.getJpaProject().getJavaResourceType(className);
- }
- };
-
- protected static final TypeLookupAdapter JDT_TYPE_LOOKUP_ADAPTER =
- new TypeLookupAdapter() {
- public Object resolveType(EntityMappings entityMappings, String className) {
- IJavaProject javaProject = entityMappings.getJpaProject().getJavaProject();
- return JDTTools.findType(javaProject, className);
- }
- };
-
- protected static String getPrimitiveClassName(String className) {
- if (PRIMITIVE_CLASSES == null) {
- PRIMITIVE_CLASSES = new HashMap<String, String>();
- PRIMITIVE_CLASSES.put("Boolean", Boolean.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Byte", Byte.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Character", Character.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Double", Double.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Float", Float.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Integer", Integer.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Long", Long.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Number", Number.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("Short", Short.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("String", String.class.getName()); //$NON-NLS-1$
- PRIMITIVE_CLASSES.put("boolean", "boolean"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("byte", "byte"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("char", "char"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("double", "double"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("float", "float"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("int", "int"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("long", "long"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("short", "short"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("byte[]", "byte[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("char[]", "char[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("boolean[]", "boolean[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("double[]", "double[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("float[]", "float[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("int[]", "int[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("long[]", "long[]"); //$NON-NLS-1$ //$NON-NLS-2$
- PRIMITIVE_CLASSES.put("short[]", "short[]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return (className == null) ? null : PRIMITIVE_CLASSES.get(className);
- }
-
- /**
- * We have to calculate the new persistent type's index.
- * We will use the type's short name if the entity mappings's
- * package is the same as the type's package.
- */
- public OrmPersistentType addPersistentType(String mappingKey, String className) {
- OrmTypeMappingDefinition md = this.getMappingFileDefinition().getTypeMappingDefinition(mappingKey);
- XmlTypeMapping xmlTypeMapping = md.buildResourceMapping(this.getResourceNodeFactory());
-
- // adds short name if package name is relevant
- className = this.normalizeClassName(className);
- xmlTypeMapping.setClassName(className);
-
- OrmPersistentType persistentType = this.buildPersistentType(xmlTypeMapping);
- int index = this.calculateInsertionIndex(persistentType);
- this.addItemToList(index, persistentType, this.persistentTypes, PERSISTENT_TYPES_LIST);
-
- persistentType.getMapping().addXmlTypeMappingTo(this.xmlEntityMappings);
-
- return persistentType;
- }
-
- /**
- * Shorten the specified class name if it is in the entity mappings's package.
- */
- protected String normalizeClassName(String className) {
- return ((this.package_ != null) &&
- className.startsWith(this.package_) &&
- (className.charAt(this.package_.length()) == '.') &&
- (className.indexOf('.', this.package_.length() + 1) == -1)) ?
- className.substring(this.package_.length() + 1) :
- className;
- }
-
- protected OrmPersistentType buildPersistentType(XmlTypeMapping xmlTypeMapping) {
- return this.getContextNodeFactory().buildOrmPersistentType(this, xmlTypeMapping);
- }
-
- protected int calculateInsertionIndex(OrmPersistentType ormPersistentType) {
- return CollectionTools.insertionIndexOf(this.persistentTypes, ormPersistentType, MAPPING_COMPARATOR);
- }
-
- protected static final Comparator<OrmPersistentType> MAPPING_COMPARATOR =
- new Comparator<OrmPersistentType>() {
- public int compare(OrmPersistentType o1, OrmPersistentType o2) {
- int o1Sequence = o1.getMapping().getXmlSequence();
- int o2Sequence = o2.getMapping().getXmlSequence();
- if (o1Sequence < o2Sequence) {
- return -1;
- }
- if (o1Sequence == o2Sequence) {
- return 0;
- }
- return 1;
- }
- };
-
- public void removePersistentType(int index) {
- OrmPersistentType persistentType = this.removePersistentType_(index);
- persistentType.getMapping().removeXmlTypeMappingFrom(this.xmlEntityMappings);
- }
-
- /**
- * dispose and return the persistent type
- */
- protected OrmPersistentType removePersistentType_(int index) {
- OrmPersistentType persistentType = this.removeItemFromList(index, this.persistentTypes, PERSISTENT_TYPES_LIST);
- persistentType.dispose();
- return persistentType;
- }
-
- public void removePersistentType(OrmPersistentType persistentType) {
- this.removePersistentType(this.persistentTypes.indexOf(persistentType));
- }
-
- protected void initializePersistentTypes() {
- for (XmlTypeMapping xmlTypeMapping : this.getXmlTypeMappings()) {
- this.persistentTypes.add(this.buildPersistentType(xmlTypeMapping));
- }
- }
-
- protected void syncPersistentTypes() {
- ContextContainerTools.synchronizeWithResourceModel(this.persistentTypeContainerAdapter);
- }
-
- protected Iterable<XmlTypeMapping> getXmlTypeMappings() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneIterable<XmlTypeMapping>(this.xmlEntityMappings.getTypeMappings());
- }
-
- protected void movePersistentType_(int index, OrmPersistentType persistentType) {
- this.moveItemInList(index, persistentType, this.persistentTypes, PERSISTENT_TYPES_LIST);
- }
-
- protected void addPersistentType_(int index, XmlTypeMapping xmlTypeMapping) {
- this.addItemToList(index, this.buildPersistentType(xmlTypeMapping), this.persistentTypes, PERSISTENT_TYPES_LIST);
- }
-
- protected void removePersistentType_(OrmPersistentType persistentType) {
- this.removePersistentType_(this.persistentTypes.indexOf(persistentType));
- }
-
- /**
- * persistent type container adapter
- */
- protected class PersistentTypeContainerAdapter
- implements ContextContainerTools.Adapter<OrmPersistentType, XmlTypeMapping>
- {
- public Iterable<OrmPersistentType> getContextElements() {
- return AbstractEntityMappings.this.getPersistentTypes();
- }
- public Iterable<XmlTypeMapping> getResourceElements() {
- return AbstractEntityMappings.this.getXmlTypeMappings();
- }
- public XmlTypeMapping getResourceElement(OrmPersistentType contextElement) {
- return contextElement.getMapping().getXmlTypeMapping();
- }
- public void moveContextElement(int index, OrmPersistentType element) {
- AbstractEntityMappings.this.movePersistentType_(index, element);
- }
- public void addContextElement(int index, XmlTypeMapping resourceElement) {
- AbstractEntityMappings.this.addPersistentType_(index, resourceElement);
- }
- public void removeContextElement(OrmPersistentType element) {
- AbstractEntityMappings.this.removePersistentType_(element);
- }
- }
-
-
- // ********** sequence generators **********
-
- public ListIterable<OrmSequenceGenerator> getSequenceGenerators() {
- return this.sequenceGeneratorContainer.getContextElements();
- }
-
- public int getSequenceGeneratorsSize() {
- return this.sequenceGeneratorContainer.getContextElementsSize();
- }
-
- public OrmSequenceGenerator addSequenceGenerator() {
- return this.addSequenceGenerator(this.getSequenceGeneratorsSize());
- }
-
- public OrmSequenceGenerator addSequenceGenerator(int index) {
- XmlSequenceGenerator xmlGenerator = this.buildXmlSequenceGenerator();
- OrmSequenceGenerator sequenceGenerator = this.sequenceGeneratorContainer.addContextElement(index, xmlGenerator);
- this.xmlEntityMappings.getSequenceGenerators().add(index, xmlGenerator);
- return sequenceGenerator;
- }
-
- protected XmlSequenceGenerator buildXmlSequenceGenerator() {
- return OrmFactory.eINSTANCE.createXmlSequenceGenerator();
- }
-
- protected OrmSequenceGenerator buildSequenceGenerator(XmlSequenceGenerator xmlSequenceGenerator) {
- return this.getContextNodeFactory().buildOrmSequenceGenerator(this, xmlSequenceGenerator);
- }
-
- public void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator) {
- this.removeSequenceGenerator(this.sequenceGeneratorContainer.indexOfContextElement(sequenceGenerator));
- }
-
- public void removeSequenceGenerator(int index) {
- this.sequenceGeneratorContainer.removeContextElement(index);
- this.xmlEntityMappings.getSequenceGenerators().remove(index);
- }
-
- public void moveSequenceGenerator(int targetIndex, int sourceIndex) {
- this.sequenceGeneratorContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlEntityMappings.getSequenceGenerators().move(targetIndex, sourceIndex);
- }
-
- protected void syncSequenceGenerators() {
- this.sequenceGeneratorContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlSequenceGenerator> getXmlSequenceGenerators() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlSequenceGenerator>(this.xmlEntityMappings.getSequenceGenerators());
- }
-
- protected ContextListContainer<OrmSequenceGenerator, XmlSequenceGenerator> buildSequenceGeneratorContainer() {
- SequenceGeneratorContainer container = new SequenceGeneratorContainer();
- container.initialize();
- return container;
- }
-
- /**
- * sequence generator container
- */
- protected class SequenceGeneratorContainer
- extends ContextListContainer<OrmSequenceGenerator, XmlSequenceGenerator>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SEQUENCE_GENERATORS_LIST;
- }
- @Override
- protected OrmSequenceGenerator buildContextElement(XmlSequenceGenerator resourceElement) {
- return AbstractEntityMappings.this.buildSequenceGenerator(resourceElement);
- }
- @Override
- protected ListIterable<XmlSequenceGenerator> getResourceElements() {
- return AbstractEntityMappings.this.getXmlSequenceGenerators();
- }
- @Override
- protected XmlSequenceGenerator getResourceElement(OrmSequenceGenerator contextElement) {
- return contextElement.getXmlGenerator();
- }
- }
-
-
- // ********** table generators **********
-
- public ListIterable<OrmTableGenerator> getTableGenerators() {
- return this.tableGeneratorContainer.getContextElements();
- }
-
- public int getTableGeneratorsSize() {
- return this.tableGeneratorContainer.getContextElementsSize();
- }
-
- public OrmTableGenerator addTableGenerator() {
- return this.addTableGenerator(this.getTableGeneratorsSize());
- }
-
- public OrmTableGenerator addTableGenerator(int index) {
- XmlTableGenerator xmlTableGenerator = this.buildXmlTableGenerator();
- OrmTableGenerator tableGenerator = this.tableGeneratorContainer.addContextElement(index, xmlTableGenerator);
- this.xmlEntityMappings.getTableGenerators().add(index, xmlTableGenerator);
- return tableGenerator;
- }
-
- protected XmlTableGenerator buildXmlTableGenerator() {
- return OrmFactory.eINSTANCE.createXmlTableGenerator();
- }
-
- protected OrmTableGenerator buildTableGenerator(XmlTableGenerator xmlTableGenerator) {
- return this.getContextNodeFactory().buildOrmTableGenerator(this, xmlTableGenerator);
- }
-
- public void removeTableGenerator(OrmTableGenerator tableGenerator) {
- this.removeTableGenerator(this.tableGeneratorContainer.indexOfContextElement(tableGenerator));
- }
-
- public void removeTableGenerator(int index) {
- this.tableGeneratorContainer.removeContextElement(index);
- this.xmlEntityMappings.getTableGenerators().remove(index);
- }
-
- public void moveTableGenerator(int targetIndex, int sourceIndex) {
- this.tableGeneratorContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlEntityMappings.getTableGenerators().move(targetIndex, sourceIndex);
- }
-
- protected void syncTableGenerators() {
- this.tableGeneratorContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlTableGenerator> getXmlTableGenerators() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlTableGenerator>(this.xmlEntityMappings.getTableGenerators());
- }
-
- protected ContextListContainer<OrmTableGenerator, XmlTableGenerator> buildTableGeneratorContainer() {
- TableGeneratorContainer container = new TableGeneratorContainer();
- container.initialize();
- return container;
- }
-
- /**
- * table generator container
- */
- protected class TableGeneratorContainer
- extends ContextListContainer<OrmTableGenerator, XmlTableGenerator>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return TABLE_GENERATORS_LIST;
- }
- @Override
- protected OrmTableGenerator buildContextElement(XmlTableGenerator resourceElement) {
- return AbstractEntityMappings.this.buildTableGenerator(resourceElement);
- }
- @Override
- protected ListIterable<XmlTableGenerator> getResourceElements() {
- return AbstractEntityMappings.this.getXmlTableGenerators();
- }
- @Override
- protected XmlTableGenerator getResourceElement(OrmTableGenerator contextElement) {
- return contextElement.getXmlGenerator();
- }
- }
-
-
- // ********** query container **********
-
- public OrmQueryContainer getQueryContainer() {
- return this.queryContainer;
- }
-
- protected OrmQueryContainer buildQueryContainer() {
- return this.getContextNodeFactory().buildOrmQueryContainer(this, this.xmlEntityMappings);
- }
-
-
- // ********** queries/generators **********
-
- @SuppressWarnings("unchecked")
- public Iterable<Query> getMappingFileQueries() {
- return new CompositeIterable<Query>(
- this.queryContainer.getQueries(),
- this.getTypeMappingQueries()
- );
- }
-
- protected Iterable<Query> getTypeMappingQueries() {
- return new CompositeIterable<Query>(this.getTypeMappingQueryLists());
- }
-
- protected Iterable<Iterable<Query>> getTypeMappingQueryLists() {
- return new TransformationIterable<OrmTypeMapping, Iterable<Query>>(this.getTypeMappings()) {
- @Override
- protected Iterable<Query> transform(OrmTypeMapping typeMapping) {
- return typeMapping.getQueries();
- }
- };
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<Generator> getMappingFileGenerators() {
- return new CompositeIterable<Generator>(
- this.getSequenceGenerators(),
- this.getTableGenerators(),
- this.getTypeMappingGenerators()
- );
- }
-
- protected Iterable<Generator> getTypeMappingGenerators() {
- return new CompositeIterable<Generator>(this.getTypeMappingGeneratorLists());
- }
-
- protected Iterable<Iterable<Generator>> getTypeMappingGeneratorLists() {
- return new TransformationIterable<OrmTypeMapping, Iterable<Generator>>(this.getTypeMappings()) {
- @Override
- protected Iterable<Generator> transform(OrmTypeMapping typeMapping) {
- return typeMapping.getGenerators();
- }
- };
- }
-
- protected Iterable<OrmTypeMapping> getTypeMappings() {
- return new TransformationIterable<OrmPersistentType, OrmTypeMapping>(this.getPersistentTypes()) {
- @Override
- protected OrmTypeMapping transform(OrmPersistentType persistentType) {
- return persistentType.getMapping();
- }
- };
- }
-
-
- // ********** validation **********
-
- /**
- * The generators are validated in the persistence unit.
- * @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateGenerators(List, IReporter)
- */
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateVersion(messages);
- // generators are validated in the persistence unit
- this.queryContainer.validate(messages, reporter);
- for (OrmPersistentType ormPersistentType : this.getPersistentTypes()) {
- this.validatePersistentType(ormPersistentType, messages, reporter);
- }
- }
-
- protected void validateVersion(List<IMessage> messages) {
- if (! this.getLatestDocumentVersion().equals(this.xmlEntityMappings.getVersion())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.LOW_SEVERITY,
- JpaValidationMessages.XML_VERSION_NOT_LATEST,
- this,
- this.xmlEntityMappings.getVersionTextRange()
- )
- );
- }
- }
-
- /**
- * Return the latest version of the document supported by the platform
- */
- protected String getLatestDocumentVersion() {
- return this.getJpaPlatform().getMostRecentSupportedResourceType(this.getContentType()).getVersion();
- }
-
- protected IContentType getContentType() {
- return JptJpaCorePlugin.ORM_XML_CONTENT_TYPE;
- }
-
- protected void validatePersistentType(OrmPersistentType persistentType, List<IMessage> messages, IReporter reporter) {
- try {
- persistentType.validate(messages, reporter);
- } catch (Throwable exception) {
- JptJpaCorePlugin.log(exception);
- }
- }
-
-
- // ********** refactoring **********
-
- public Iterable<DeleteEdit> createDeleteTypeEdits(final IType type) {
- return new CompositeIterable<DeleteEdit>(
- new TransformationIterable<OrmPersistentType, Iterable<DeleteEdit>>(this.getPersistentTypes()) {
- @Override
- protected Iterable<DeleteEdit> transform(OrmPersistentType persistentType) {
- return persistentType.createDeleteTypeEdits(type);
- }
- }
- );
- }
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(final IType originalType, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<OrmPersistentType, Iterable<ReplaceEdit>>(this.getPersistentTypes()) {
- @Override
- protected Iterable<ReplaceEdit> transform(OrmPersistentType persistentType) {
- return persistentType.createRenameTypeEdits(originalType, newName);
- }
- }
- );
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(final IType originalType, final IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<OrmPersistentType, Iterable<ReplaceEdit>>(this.getPersistentTypes()) {
- @Override
- protected Iterable<ReplaceEdit> transform(OrmPersistentType persistentType) {
- return persistentType.createMoveTypeEdits(originalType, newPackage);
- }
- }
- );
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(final IPackageFragment originalPackage, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- this.createPersistentTypeRenamePackageEdits(originalPackage, newName),
- this.createRenamePackageEdit(originalPackage, newName));
- }
-
- protected Iterable<ReplaceEdit> createPersistentTypeRenamePackageEdits(final IPackageFragment originalPackage, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<OrmPersistentType, Iterable<ReplaceEdit>>(this.getPersistentTypes()) {
- @Override
- protected Iterable<ReplaceEdit> transform(OrmPersistentType persistentType) {
- return persistentType.createRenamePackageEdits(originalPackage, newName);
- }
- }
- );
- }
-
- protected Iterable<ReplaceEdit> createRenamePackageEdit(final IPackageFragment originalPackage, final String newName) {
- return Tools.valuesAreEqual(this.package_, originalPackage.getElementName()) ?
- new SingleElementIterable<ReplaceEdit>(this.xmlEntityMappings.createRenamePackageEdit(newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- // ************ completion proposals**************
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.queryContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmTableGenerator tableGenerator : this.getTableGenerators()) {
- result = tableGenerator.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- for (OrmSequenceGenerator seqGenerator : this.getSequenceGenerators()) {
- result = seqGenerator.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- result = this.persistenceUnitMetadata.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.packageTouches(pos)) {
- return this.getCandidatePackages();
- }
- for (OrmPersistentType persistentType : this.getPersistentTypes()) {
- result = persistentType.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.schemaTouches(pos)) {
- return this.getCandidateSchemata();
- }
- if (this.catalogTouches(pos)) {
- return this.getCandidateCatalogs();
- }
- return null;
- }
-
- // ********** content assist: schema
-
- protected boolean schemaTouches(int pos) {
- return this.getXmlEntityMappings().schemaTouches(pos);
- }
-
- protected Iterable<String> getCandidateSchemata() {
- SchemaContainer schemaContainer = this.getDbSchemaContainer();
- return (schemaContainer != null) ? schemaContainer.getSortedSchemaIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** content assist: catalog
-
- protected boolean catalogTouches(int pos) {
- return this.getXmlEntityMappings().catalogTouches(pos);
- }
-
- protected Iterable<String> getCandidateCatalogs() {
- Database db = this.getDatabase();
- return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** content assist: package
-
- private boolean packageTouches(int pos) {
- return this.getXmlEntityMappings().packageTouches(pos);
- }
-
- private Iterable<String> getCandidatePackages() {
- return this.getPersistenceUnit().getPackageNames();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java
deleted file mode 100644
index 6eb6425cd6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.ColumnMapping;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBasicMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumnMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToOneMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMultiRelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToManyMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTransientMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVersionMapping;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.SimpleMetamodelField;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractOrmAttributeMapping<X extends XmlAttributeMapping>
- extends AbstractOrmXmlContextNode
- implements OrmAttributeMapping, AttributeMapping2_0
-{
- // never null
- protected final X xmlAttributeMapping;
-
- protected String name;
-
- protected String specifiedAttributeType;
- protected String defaultAttributeType;
- protected String fullyQualifiedAttributeType;
-
-
- protected AbstractOrmAttributeMapping(OrmPersistentAttribute parent, X xmlAttributeMapping) {
- super(parent);
- this.xmlAttributeMapping = xmlAttributeMapping;
- this.name = xmlAttributeMapping.getName();
- this.specifiedAttributeType = this.buildSpecifiedAttributeType();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.xmlAttributeMapping.getName());
- this.setSpecifiedAttributeType_(this.buildSpecifiedAttributeType());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultAttributeType(this.buildDefaultAttributeType());
- this.setFullyQualifiedAttributeType(this.buildFullyQualifiedAttributeType());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlAttributeMapping.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- if (this.firePropertyChanged(NAME_PROPERTY, old, name)) {
- // tell our attribute its name has, effectively, changed
- this.getPersistentAttribute().nameChanged(old, name);
- }
- }
-
-
- // ********** fully-qualified attribute type **********
-
- public String getFullyQualifiedAttributeType() {
- return this.fullyQualifiedAttributeType;
- }
-
- protected void setFullyQualifiedAttributeType(String attributeType) {
- String old = this.fullyQualifiedAttributeType;
- this.fullyQualifiedAttributeType = attributeType;
- this.firePropertyChanged(FULLY_QUALIFIED_ATTRIBUTE_TYPE_PROPERTY, old, attributeType);
- }
-
- protected String buildFullyQualifiedAttributeType() {
- return (this.specifiedAttributeType == null) ?
- this.defaultAttributeType :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedAttributeType);
- }
-
- // ********** attribute type **********
-
- public String getAttributeType() {
- return (this.specifiedAttributeType != null) ? this.specifiedAttributeType : this.defaultAttributeType;
- }
-
- public String getSpecifiedAttributeType() {
- return this.specifiedAttributeType;
- }
-
- public void setSpecifiedAttributeType(String attributeType) {
- this.setSpecifiedAttributeType_(attributeType);
- this.setSpecifiedAttributeTypeInXml(attributeType);
- }
-
- protected void setSpecifiedAttributeType_(String attributeType) {
- String old = this.specifiedAttributeType;
- this.specifiedAttributeType = attributeType;
- this.firePropertyChanged(SPECIFIED_ATTRIBUTE_TYPE_PROPERTY, old, attributeType);
- }
-
- /**
- * subclasses must override if they support specifying an attribute type
- */
- protected void setSpecifiedAttributeTypeInXml(String attributeType) {
- //no-op
- }
-
- /**
- * subclasses must override if they support specifying an attribute type
- */
- protected String buildSpecifiedAttributeType() {
- return null;
- }
-
- public String getDefaultAttributeType() {
- return this.defaultAttributeType;
- }
-
- protected void setDefaultAttributeType(String attributeType) {
- String old = this.defaultAttributeType;
- this.defaultAttributeType = attributeType;
- this.firePropertyChanged(DEFAULT_ATTRIBUTE_TYPE_PROPERTY, old, attributeType);
- }
-
- protected String buildDefaultAttributeType() {
- return (this.getJavaPersistentAttribute() == null) ? null :
- this.getJavaPersistentAttribute().getTypeName();
- }
-
- protected PersistentType getResolvedAttributeType() {
- if (this.fullyQualifiedAttributeType == null) {
- return null;
- }
- return getPersistenceUnit().getPersistentType(this.fullyQualifiedAttributeType);
- }
-
-
- // ********** morphing mappings **********
-
- public void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping) {
- this.setName(oldMapping.getName());
- this.setSpecifiedAttributeType(oldMapping.getSpecifiedAttributeType());
- }
-
- protected void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
- this.initializeFromOrmAttributeMapping(oldMapping);
- }
-
- public void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping) {
- this.initializeFromOrmColumnMapping(oldMapping);
- }
-
- public void initializeFromOrmIdMapping(OrmIdMapping oldMapping) {
- this.initializeFromOrmColumnMapping(oldMapping);
- }
-
- public void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping) {
- this.initializeFromOrmAttributeMapping(oldMapping);
- }
-
- protected void initializeFromOrmBaseEmbeddedMapping(OrmBaseEmbeddedMapping oldMapping) {
- this.initializeFromOrmAttributeMapping(oldMapping);
- }
-
- public void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping) {
- this.initializeFromOrmBaseEmbeddedMapping(oldMapping);
- }
-
- public void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping) {
- this.initializeFromOrmBaseEmbeddedMapping(oldMapping);
- }
-
- public void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping) {
- this.initializeFromOrmColumnMapping(oldMapping);
- }
-
- protected void initializeFromOrmRelationshipMapping(OrmRelationshipMapping oldMapping) {
- this.initializeFromOrmAttributeMapping(oldMapping);
- }
-
- protected void initializeFromOrmMultiRelationshipMapping(OrmMultiRelationshipMapping oldMapping) {
- this.initializeFromOrmRelationshipMapping(oldMapping);
- }
-
- protected void initializeFromOrmSingleRelationshipMapping(OrmSingleRelationshipMapping oldMapping) {
- this.initializeFromOrmRelationshipMapping(oldMapping);
- }
-
- public void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping) {
- this.initializeFromOrmMultiRelationshipMapping(oldMapping);
- }
-
- public void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping) {
- this.initializeFromOrmSingleRelationshipMapping(oldMapping);
- }
-
- public void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping) {
- this.initializeFromOrmSingleRelationshipMapping(oldMapping);
- }
-
- public void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping) {
- this.initializeFromOrmMultiRelationshipMapping(oldMapping);
- }
-
-
- // ********** misc **********
-
- public X getXmlAttributeMapping() {
- return this.xmlAttributeMapping;
- }
-
- @Override
- public OrmPersistentAttribute getParent() {
- return (OrmPersistentAttribute) super.getParent();
- }
-
- public OrmPersistentAttribute getPersistentAttribute() {
- return this.getParent();
- }
-
- public OrmTypeMapping getTypeMapping() {
- return this.getPersistentAttribute().getOwningTypeMapping();
- }
-
- protected JavaPersistentAttribute getJavaPersistentAttribute() {
- return this.getPersistentAttribute().getJavaPersistentAttribute();
- }
-
- protected EntityMappings getEntityMappings() {
- return this.getPersistentAttribute().getOwningPersistentType().getParent();
- }
-
- protected PersistentType resolvePersistentType(String className) {
- return this.getEntityMappings().resolvePersistentType(className);
- }
-
- public boolean isDefault() {
- return false;
- }
-
- public String getPrimaryKeyColumnName() {
- return null;
- }
-
- public boolean isOverridableAttributeMapping() {
- return false;
- }
-
- public boolean isOverridableAssociationMapping() {
- return false;
- }
-
- public boolean isRelationshipOwner() {
- return false;
- }
-
- public boolean isOwnedBy(AttributeMapping mapping) {
- return false;
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getTypeMapping().validatesAgainstDatabase();
- }
-
- public boolean contains(int textOffset) {
- return this.xmlAttributeMapping.containsOffset(textOffset);
- }
-
- public TextRange getSelectionTextRange() {
- return this.xmlAttributeMapping.getSelectionTextRange();
- }
-
- public TextRange getValidationTextRange() {
- // this should never be null; also, the persistent attribute delegates
- // to here, so don't delegate back to it (or we will get a stack overflow)
- return this.xmlAttributeMapping.getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.xmlAttributeMapping.getNameTextRange());
- }
-
- public Iterable<Generator> getGenerators() {
- return EmptyIterable.instance();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** embedded mappings **********
-
- public Iterable<String> getAllMappingNames() {
- return (this.name != null) ?
- new SingleElementIterable<String>(this.name) :
- EmptyIterable.<String>instance();
- }
-
- public Iterable<String> getAllOverridableAttributeMappingNames() {
- return ((this.name != null) && this.isOverridableAttributeMapping()) ?
- new SingleElementIterable<String>(this.name) :
- EmptyIterable.<String>instance();
- }
-
- public Iterable<String> getAllOverridableAssociationMappingNames() {
- return ((this.name != null) && this.isOverridableAssociationMapping()) ?
- new SingleElementIterable<String>(this.name) :
- EmptyIterable.<String>instance();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- ColumnMapping mapping = this.resolveColumnMapping(attributeName);
- return (mapping == null) ? null : mapping.getColumn();
- }
-
- protected ColumnMapping resolveColumnMapping(String attributeName) {
- AttributeMapping mapping = this.resolveAttributeMapping(attributeName);
- return ((mapping != null) && mapping.isOverridableAttributeMapping()) ? (ColumnMapping) mapping : null;
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- RelationshipMapping mapping = this.resolveRelationshipMapping(attributeName);
- return (mapping == null) ? null : mapping.getRelationship();
- }
-
- protected RelationshipMapping resolveRelationshipMapping(String attributeName) {
- AttributeMapping mapping = this.resolveAttributeMapping(attributeName);
- return ((mapping != null) && mapping.isOverridableAssociationMapping()) ?
- (RelationshipMapping) mapping :
- null;
- }
-
- public AttributeMapping resolveAttributeMapping(String attributeName) {
- return Tools.valuesAreEqual(attributeName, this.name) ? this : null;
- }
-
- protected Transformer<String, String> buildQualifierTransformer() {
- return new MappingTools.QualifierTransformer(this.name);
- }
-
- protected String unqualify(String attributeName) {
- return MappingTools.unqualify(this.name, attributeName);
- }
-
-
- // ********** metamodel **********
-
- public MetamodelField getMetamodelField() {
- // if we don't have a name we can't build a metamodel field...
- String metamodelFieldName = this.getMetamodelFieldName();
- return (metamodelFieldName == null) ? null :
- new SimpleMetamodelField(
- this.getMetamodelFieldModifiers(),
- this.getMetamodelFieldTypeName(),
- this.getMetamodelFieldTypeArgumentNames(),
- metamodelFieldName
- );
- }
-
- protected Iterable<String> getMetamodelFieldModifiers() {
- return STANDARD_METAMODEL_FIELD_MODIFIERS;
- }
-
- /**
- * most mappings are "singular"
- */
- protected String getMetamodelFieldTypeName() {
- return JPA2_0.SINGULAR_ATTRIBUTE;
- }
-
- protected final Iterable<String> getMetamodelFieldTypeArgumentNames() {
- ArrayList<String> typeArgumentNames = new ArrayList<String>(3);
- typeArgumentNames.add(this.getTypeMapping().getPersistentType().getName());
- this.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
- return typeArgumentNames;
- }
-
- /**
- * by default, we add only the mapping's attribute type name;
- * but collection relationship mappings will also need to add the key type
- * name if the "collection" is of type java.util.Map
- */
- protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
- typeArgumentNames.add(this.getMetamodelTypeName());
- }
-
- public String getMetamodelTypeName() {
- return ((OrmPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelTypeName();
- }
-
- protected String getMetamodelFieldName() {
- return this.name;
- }
-
-
- // ********** refactoring **********
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return EmptyIterable.instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateAttribute(messages);
- this.validateMapping(messages);
- }
-
- protected void validateAttribute(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.name)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- //TODO validation message - i think more info is needed in this message. include type mapping type?
- protected void validateMapping(List<IMessage> messages) {
- if ( ! this.getTypeMapping().attributeMappingKeyAllowed(this.getKey())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_MAPPING,
- new String[] {this.name},
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.attributeNameTouches(pos)) {
- return this.getCandidateMappingNames();
- }
- return null;
- }
-
- /**
- * @return all the attribute of corresponding Java persistent type
- */
- // Attributes of the corresponding XML persistent type include these
- // that are already defined in XML so using these attributes as candidates
- // could lead to multiple attribute mappings with the same name;
- // thus using the attribute of the corresponding Java persistent type instead
- private Iterable<String> getCandidateMappingNames() {
- JavaPersistentType jpt = this.getTypeMapping().getPersistentType().getJavaPersistentType();
- return jpt == null ? EmptyIterable.<String>instance() : CollectionTools.collection(jpt.getAttributeNames());
- }
-
- private boolean attributeNameTouches(int pos) {
- return this.getXmlAttributeMapping().nameTouches(pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java
deleted file mode 100644
index 5c215f88d2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn;
-
-/**
- * <code>orm.xml</code> column or join column
- */
-public abstract class AbstractOrmBaseColumn<X extends XmlBaseColumn, O extends OrmReadOnlyBaseColumn.Owner>
- extends AbstractOrmNamedColumn<X, O>
- implements OrmBaseColumn
-{
- protected String specifiedTable;
- protected String defaultTable;
-
- // TODO defaults from java for all of these settings
- protected Boolean specifiedUnique;
-
- protected Boolean specifiedNullable;
-
- protected Boolean specifiedInsertable;
-
- protected Boolean specifiedUpdatable;
-
-
- // ********** constructor/initialization **********
-
- protected AbstractOrmBaseColumn(XmlContextNode parent, O owner) {
- this(parent, owner, null);
- }
-
- protected AbstractOrmBaseColumn(XmlContextNode parent, O owner, X xmlColumn) {
- super(parent, owner, xmlColumn);
- this.specifiedTable = this.buildSpecifiedTable();
- this.specifiedUnique = this.buildSpecifiedUnique();
- this.specifiedNullable = this.buildSpecifiedNullable();
- this.specifiedInsertable = this.buildSpecifiedInsertable();
- this.specifiedUpdatable = this.buildSpecifiedUpdatable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTable_(this.buildSpecifiedTable());
- this.setSpecifiedUnique_(this.buildSpecifiedUnique());
- this.setSpecifiedNullable_(this.buildSpecifiedNullable());
- this.setSpecifiedInsertable_(this.buildSpecifiedInsertable());
- this.setSpecifiedUpdatable_(this.buildSpecifiedUpdatable());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTable(this.buildDefaultTable());
- }
-
-
- // ********** table **********
-
- @Override
- public String getTable() {
- return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
- }
-
- public String getSpecifiedTable() {
- return this.specifiedTable;
- }
-
- public void setSpecifiedTable(String table) {
- if (this.valuesAreDifferent(this.specifiedTable, table)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedTable_(table);
- xmlColumn.setTable(table);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedTable_(String table) {
- String old = this.specifiedTable;
- this.specifiedTable = table;
- this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
- }
-
- protected String buildSpecifiedTable() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getTable();
- }
-
- public String getDefaultTable() {
- return this.defaultTable;
- }
-
- protected void setDefaultTable(String table) {
- String old = this.defaultTable;
- this.defaultTable = table;
- this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
- }
-
- protected String buildDefaultTable() {
- return this.owner.getDefaultTableName();
- }
-
-
- // ********** unique **********
-
- public boolean isUnique() {
- return (this.specifiedUnique != null) ? this.specifiedUnique.booleanValue() : this.isDefaultUnique();
- }
-
- public Boolean getSpecifiedUnique() {
- return this.specifiedUnique;
- }
-
- public void setSpecifiedUnique(Boolean unique) {
- if (this.valuesAreDifferent(this.specifiedUnique, unique)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedUnique_(unique);
- xmlColumn.setUnique(unique);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedUnique_(Boolean unique) {
- Boolean old = this.specifiedUnique;
- this.specifiedUnique = unique;
- this.firePropertyChanged(SPECIFIED_UNIQUE_PROPERTY, old, unique);
- }
-
- protected Boolean buildSpecifiedUnique() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getUnique();
- }
-
- public boolean isDefaultUnique() {
- return DEFAULT_UNIQUE;
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return (this.specifiedNullable != null) ? this.specifiedNullable.booleanValue() : this.isDefaultNullable();
- }
-
- public Boolean getSpecifiedNullable() {
- return this.specifiedNullable;
- }
-
- public void setSpecifiedNullable(Boolean nullable) {
- if (this.valuesAreDifferent(this.specifiedNullable, nullable)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedNullable_(nullable);
- xmlColumn.setNullable(nullable);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedNullable_(Boolean nullable) {
- Boolean old = this.specifiedNullable;
- this.specifiedNullable = nullable;
- this.firePropertyChanged(SPECIFIED_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected Boolean buildSpecifiedNullable() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getNullable();
- }
-
- public boolean isDefaultNullable() {
- return DEFAULT_NULLABLE;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return (this.specifiedInsertable != null) ? this.specifiedInsertable.booleanValue() : this.isDefaultInsertable();
- }
-
- public Boolean getSpecifiedInsertable() {
- return this.specifiedInsertable;
- }
-
- public void setSpecifiedInsertable(Boolean insertable) {
- if (this.valuesAreDifferent(this.specifiedInsertable, insertable)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedInsertable_(insertable);
- xmlColumn.setInsertable(insertable);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedInsertable_(Boolean insertable) {
- Boolean old = this.specifiedInsertable;
- this.specifiedInsertable = insertable;
- this.firePropertyChanged(SPECIFIED_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected Boolean buildSpecifiedInsertable() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getInsertable();
- }
-
- public boolean isDefaultInsertable() {
- return DEFAULT_INSERTABLE;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return (this.specifiedUpdatable != null) ? this.specifiedUpdatable.booleanValue() : this.isDefaultUpdatable();
- }
-
- public Boolean getSpecifiedUpdatable() {
- return this.specifiedUpdatable;
- }
-
- public void setSpecifiedUpdatable(Boolean updatable) {
- if (this.valuesAreDifferent(this.specifiedUpdatable, updatable)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedUpdatable_(updatable);
- xmlColumn.setUpdatable(updatable);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedUpdatable_(Boolean updatable) {
- Boolean old = this.specifiedUpdatable;
- this.specifiedUpdatable = updatable;
- this.firePropertyChanged(SPECIFIED_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected Boolean buildSpecifiedUpdatable() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getUpdatable();
- }
-
- public boolean isDefaultUpdatable() {
- return DEFAULT_UPDATABLE;
- }
-
-
- // ********** misc **********
-
- protected void initializeFrom(ReadOnlyBaseColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedTable(oldColumn.getSpecifiedTable());
- this.setSpecifiedUnique(oldColumn.getSpecifiedUnique());
- this.setSpecifiedNullable(oldColumn.getSpecifiedNullable());
- this.setSpecifiedInsertable(oldColumn.getSpecifiedInsertable());
- this.setSpecifiedUpdatable(oldColumn.getSpecifiedUpdatable());
- }
-
- protected void initializeFromVirtual(ReadOnlyBaseColumn virtualColumn) {
- super.initializeFromVirtual(virtualColumn);
- this.setSpecifiedTable(virtualColumn.getTable());
- // ignore other settings?
- }
-
- public boolean tableNameIsInvalid() {
- return this.owner.tableNameIsInvalid(this.getTable());
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.owner.getCandidateTableNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getTableTextRange() {
- return this.getValidationTextRange(this.getXmlColumnTableTextRange());
- }
-
- protected TextRange getXmlColumnTableTextRange() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getTableTextRange();
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmTableColumnTextRangeResolver(this);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.tableTouches(pos)) {
- return this.getCandidateTableNames();
- }
- return null;
- }
-
- protected boolean tableTouches(int pos) {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn != null) && (xmlColumn.tableTouches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
deleted file mode 100644
index 7e641415e8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> embedded or embedded ID mapping
- */
-public abstract class AbstractOrmBaseEmbeddedMapping<X extends AbstractXmlEmbedded>
- extends AbstractOrmAttributeMapping<X>
- implements OrmBaseEmbeddedMapping
-{
- protected final OrmAttributeOverrideContainer attributeOverrideContainer;
-
- protected Embeddable targetEmbeddable;
-
-
- protected AbstractOrmBaseEmbeddedMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.attributeOverrideContainer = this.buildAttributeOverrideContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.attributeOverrideContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.attributeOverrideContainer.update();
- this.setTargetEmbeddable(this.buildTargetEmbeddable());
- }
-
-
- // ********** attribute override container **********
-
- public OrmAttributeOverrideContainer getAttributeOverrideContainer() {
- return this.attributeOverrideContainer;
- }
-
- protected OrmAttributeOverrideContainer buildAttributeOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAttributeOverrideContainer(this, this.buildAttributeOverrideContainerOwner());
- }
-
- protected abstract OrmAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner();
-
-
- // ********** target embeddable **********
-
- public Embeddable getTargetEmbeddable() {
- return this.targetEmbeddable;
- }
-
- protected void setTargetEmbeddable(Embeddable embeddable) {
- Embeddable old = this.targetEmbeddable;
- this.targetEmbeddable = embeddable;
- this.firePropertyChanged(TARGET_EMBEDDABLE_PROPERTY, old, embeddable);
- }
-
- protected Embeddable buildTargetEmbeddable() {
- TypeMapping typeMapping = this.getResolvedTargetTypeMapping();
- return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
- }
-
- protected TypeMapping getResolvedTargetTypeMapping() {
- PersistentType resolvedTargetType = this.getResolvedAttributeType();
- return (resolvedTargetType == null) ? null : resolvedTargetType.getMapping();
- }
-
- // ********** embedded mappings **********
-
- @Override
- public Iterable<String> getAllOverridableAttributeMappingNames() {
- return this.isJpa2_0Compatible() ?
- this.getEmbeddableOverridableAttributeMappingNames() :
- super.getAllOverridableAttributeMappingNames();
- }
-
- protected Iterable<String> getEmbeddableOverridableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllOverridableAssociationMappingNames() {
- return this.isJpa2_0Compatible() ?
- this.getEmbeddableOverridableAssociationMappingNames() :
- super.getAllOverridableAssociationMappingNames();
- }
-
- protected Iterable<String> getEmbeddableOverridableAssociationMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<String> getQualifiedEmbeddableOverridableMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<String, String>(this.getEmbeddableAttributeMappingNames(transformer), this.buildQualifierTransformer());
- }
-
- protected Iterable<String> getEmbeddableAttributeMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new CompositeIterable<String>(this.getEmbeddableAttributeMappingNamesLists(transformer));
- }
-
- /**
- * Return a list of lists; each nested list holds the names for one of the
- * embedded mapping's target embeddable type mapping's attribute mappings
- * (attribute or association mappings, depending on the specified transformer).
- */
- protected Iterable<Iterable<String>> getEmbeddableAttributeMappingNamesLists(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getEmbeddableAttributeMappings(), transformer);
- }
-
- /**
- * Return the target embeddable's attribute mappings.
- */
- protected Iterable<AttributeMapping> getEmbeddableAttributeMappings() {
- return ((this.targetEmbeddable != null) && (this.targetEmbeddable != this.getTypeMapping())) ?
- this.targetEmbeddable.getAttributeMappings() :
- EmptyIterable.<AttributeMapping>instance();
- }
-
-
- // ********** misc **********
-
- @Override
- protected void initializeFromOrmBaseEmbeddedMapping(OrmBaseEmbeddedMapping oldMapping) {
- super.initializeFromOrmBaseEmbeddedMapping(oldMapping);
- this.attributeOverrideContainer.initializeFrom(oldMapping.getAttributeOverrideContainer());
- }
-
- @Override
- public Column resolveOverriddenColumn(String attributeName) {
- return this.isJpa2_0Compatible() ? this.resolveOverriddenColumn_(attributeName) : null;
- }
-
- protected Column resolveOverriddenColumn_(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AttributeOverride override = this.attributeOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getColumn() : this.resolveOverriddenColumnInTargetEmbeddable(attributeName);
- }
-
- protected Column resolveOverriddenColumnInTargetEmbeddable(String attributeName) {
- return (this.targetEmbeddable == null) ? null : this.targetEmbeddable.resolveOverriddenColumn(attributeName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- if (this.validateTargetEmbeddable(messages)) {
- this.validateOverrides(messages, reporter);
- }
- }
-
- protected boolean validateTargetEmbeddable(List<IMessage> messages) {
- if (this.targetEmbeddable != null) {
- return true;
- }
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TARGET_NOT_AN_EMBEDDABLE,
- new String[] {this.getFullyQualifiedAttributeType()},
- this,
- this.getAttributeTypeTextRange()
- )
- );
- return false;
- }
-
- protected TextRange getAttributeTypeTextRange() {
- return this.getValidationTextRange();
- }
-
- protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
- this.attributeOverrideContainer.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.attributeOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** attribute override container owner *********
-
- protected abstract class AttributeOverrideContainerOwner
- implements OrmAttributeOverrideContainer.Owner
- {
- public OrmTypeMapping getTypeMapping() {
- return AbstractOrmBaseEmbeddedMapping.this.getTypeMapping();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmBaseEmbeddedMapping.this.getTargetEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? this.getAllOverridableAttributeNames_(overriddenTypeMapping) : EmptyIterable.<String>instance();
- }
-
- /**
- * pre-condition: type mapping is not <code>null</code>
- * <p>
- * NB: Overridden in {@link GenericOrmEmbeddedIdMapping.AttributeOverrideContainerOwner}
- */
- protected Iterable<String> getAllOverridableAttributeNames_(TypeMapping overriddenTypeMapping) {
- return overriddenTypeMapping.getAllOverridableAttributeNames();
- }
-
- public Iterable<String> getJavaOverrideNames() {
- return null;
- }
-
- public EList<XmlAttributeOverride> getXmlOverrides() {
- return AbstractOrmBaseEmbeddedMapping.this.getXmlAttributeMapping().getAttributeOverrides();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmBaseEmbeddedMapping.this.getValidationTextRange();
- }
-
- protected OrmPersistentAttribute getPersistentAttribute() {
- return AbstractOrmBaseEmbeddedMapping.this.getPersistentAttribute();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java
deleted file mode 100644
index ab289fdc59..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBasicMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumnMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmLobConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> basic mapping
- */
-public abstract class AbstractOrmBasicMapping<X extends XmlBasic>
- extends AbstractOrmAttributeMapping<X>
- implements OrmBasicMapping
-{
- protected final OrmColumn column;
-
- protected FetchType specifiedFetch;
- protected FetchType defaultFetch;
-
- protected Boolean specifiedOptional;
- protected boolean defaultOptional;
-
- protected OrmConverter converter; // never null
-
-
- protected static final OrmConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new OrmConverter.Adapter[] {
- OrmEnumeratedConverter.Adapter.instance(),
- OrmTemporalConverter.BasicAdapter.instance(),
- OrmLobConverter.Adapter.instance()
- };
- protected static final Iterable<OrmConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<OrmConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractOrmBasicMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.column = this.buildColumn();
- this.specifiedFetch = this.buildSpecifiedFetch();
- this.specifiedOptional = this.buildSpecifiedOptional();
- this.converter = this.buildConverter();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- this.setSpecifiedFetch_(this.buildSpecifiedFetch());
- this.setSpecifiedOptional_(this.buildSpecifiedOptional());
- this.syncConverter();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- this.setDefaultFetch(this.buildDefaultFetch());
- this.setDefaultOptional(this.buildDefaultOptional());
- this.converter.update();
- }
-
-
- // ********** column **********
-
- public OrmColumn getColumn() {
- return this.column;
- }
-
- protected OrmColumn buildColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this);
- }
-
-
- // ********** fetch **********
-
- public FetchType getFetch() {
- return (this.specifiedFetch != null) ? this.specifiedFetch : this.defaultFetch;
- }
-
- public FetchType getSpecifiedFetch() {
- return this.specifiedFetch;
- }
-
- public void setSpecifiedFetch(FetchType fetch) {
- this.setSpecifiedFetch_(fetch);
- this.xmlAttributeMapping.setFetch(FetchType.toOrmResourceModel(fetch));
- }
-
- protected void setSpecifiedFetch_(FetchType fetch) {
- FetchType old = this.specifiedFetch;
- this.specifiedFetch = fetch;
- this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildSpecifiedFetch() {
- return FetchType.fromOrmResourceModel(this.xmlAttributeMapping.getFetch());
- }
-
- public FetchType getDefaultFetch() {
- return this.defaultFetch;
- }
-
- protected void setDefaultFetch(FetchType fetch) {
- FetchType old = this.defaultFetch;
- this.defaultFetch = fetch;
- this.firePropertyChanged(DEFAULT_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
-
- // ********** optional **********
-
- public boolean isOptional() {
- return (this.specifiedOptional != null) ? this.specifiedOptional.booleanValue() : this.isDefaultOptional();
- }
-
- public Boolean getSpecifiedOptional() {
- return this.specifiedOptional;
- }
-
- public void setSpecifiedOptional(Boolean optional) {
- this.setSpecifiedOptional_(optional);
- this.xmlAttributeMapping.setOptional(optional);
- }
-
- protected void setSpecifiedOptional_(Boolean optional) {
- Boolean old = this.specifiedOptional;
- this.specifiedOptional = optional;
- this.firePropertyChanged(SPECIFIED_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected Boolean buildSpecifiedOptional() {
- return this.xmlAttributeMapping.getOptional();
- }
-
- public boolean isDefaultOptional() {
- return this.defaultOptional;
- }
-
- protected void setDefaultOptional(boolean optional) {
- boolean old = this.defaultOptional;
- this.defaultOptional = optional;
- this.firePropertyChanged(DEFAULT_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected boolean buildDefaultOptional() {
- return DEFAULT_OPTIONAL;
- }
-
-
- // ********** converter **********
-
- public OrmConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- // note: we may also clear the XML value we want;
- // but if we leave it, the resulting sync will screw things up...
- this.clearXmlConverterValues();
- OrmConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.setConverter_(this.buildConverter(converterAdapter));
- this.converter.initialize();
- }
- }
-
- protected OrmConverter buildConverter(OrmConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getContextNodeFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(OrmConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- protected void clearXmlConverterValues() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- adapter.clearXmlValue(this.xmlAttributeMapping);
- }
- }
-
- protected OrmConverter buildConverter() {
- OrmXmlContextNodeFactory factory = this.getContextNodeFactory();
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- OrmConverter ormConverter = adapter.buildConverter(this, factory);
- if (ormConverter != null) {
- return ormConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- OrmConverter.Adapter adapter = this.getXmlConverterAdapter();
- if (adapter == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- if (this.converter.getType() == adapter.getConverterType()) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildNewConverter(this, this.getContextNodeFactory()));
- }
- }
- }
-
- /**
- * Return the first adapter whose converter value is set in the XML mapping.
- * Return <code>null</code> if there are no converter values in the XML.
- */
- protected OrmConverter.Adapter getXmlConverterAdapter() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.isActive(this.xmlAttributeMapping)) {
- return adapter;
- }
- }
- return null;
- }
-
- protected OrmConverter buildNullConverter() {
- return new NullOrmConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected OrmConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<OrmConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmBasicMapping(this);
- }
-
- @Override
- protected void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
- super.initializeFromOrmColumnMapping(oldMapping);
- this.column.initializeFrom(oldMapping.getColumn());
- }
-
- public int getXmlSequence() {
- return 20;
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
- public void addXmlAttributeMappingTo(Attributes xmlAttributes) {
- xmlAttributes.getBasics().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes xmlAttributes) {
- xmlAttributes.getBasics().remove(this.xmlAttributeMapping);
- }
-
-
- // ********** OrmColumn.Owner implementation **********
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.name;
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public XmlColumn getXmlColumn() {
- return this.xmlAttributeMapping.getColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.xmlAttributeMapping.setColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.xmlAttributeMapping.setColumn(null);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.column.validate(messages, reporter);
- this.converter.validate(messages, reporter);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.converter.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEmbeddable.java
deleted file mode 100644
index ef797b970f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEmbeddable.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-
-/**
- * <code>orm.xml</code> embeddable type mapping
- */
-public abstract class AbstractOrmEmbeddable<X extends XmlEmbeddable>
- extends AbstractOrmTypeMapping<X>
- implements OrmEmbeddable
-{
- protected AbstractOrmEmbeddable(OrmPersistentType parent, X resourceMapping) {
- super(parent, resourceMapping);
- }
-
-
- // ********** key **********
-
- public String getKey() {
- return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
-
- // ********** id class **********
-
- public JavaPersistentType getIdClass() {
- return null;
- }
-
-
- // ********** tables **********
-
- public Iterable<ReadOnlyTable> getAssociatedTables() {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReadOnlyTable> getAllAssociatedTables() {
- return EmptyIterable.instance();
- }
-
- public Iterable<String> getAllAssociatedTableNames() {
- return EmptyIterable.instance();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-
-
- // ********** Java **********
-
- @Override
- public JavaEmbeddable getJavaTypeMapping() {
- return (JavaEmbeddable) super.getJavaTypeMapping();
- }
-
- @Override
- public JavaEmbeddable getJavaTypeMappingForDefaults() {
- return (JavaEmbeddable) super.getJavaTypeMappingForDefaults();
- }
-
-
- // ********** entity mappings **********
-
- public int getXmlSequence() {
- return 2;
- }
-
- public void addXmlTypeMappingTo(XmlEntityMappings entityMappings) {
- entityMappings.getEmbeddables().add(this.xmlTypeMapping);
- }
-
- public void removeXmlTypeMappingFrom(XmlEntityMappings entityMappings) {
- entityMappings.getEmbeddables().remove(this.xmlTypeMapping);
- }
-
-
- // ********** queries **********
-
- public Iterable<Query> getQueries() {
- return EmptyIterable.instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public boolean validatesAgainstDatabase() {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
deleted file mode 100644
index e2d748bc0b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
+++ /dev/null
@@ -1,2264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.common.utility.internal.iterators.CompositeIterator;
-import org.eclipse.jpt.jpa.core.JpaPlatformVariation.Supported;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.InheritanceType;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.SecondaryTable;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdClassReference;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.DiscriminatorColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityPrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericEntityPrimaryKeyValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MappedSuperclassOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.TableValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Inheritance;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> entity
- */
-public abstract class AbstractOrmEntity<X extends XmlEntity>
- extends AbstractOrmTypeMapping<X>
- implements OrmEntity, OrmCacheableHolder2_0, OrmIdClassReference.Owner
-{
- protected String specifiedName;
- protected String defaultName;
-
- protected Entity rootEntity;
- protected final Vector<Entity> descendants = new Vector<Entity>();
-
- protected final OrmIdClassReference idClassReference;
-
- protected final OrmTable table;
- protected boolean specifiedTableIsAllowed;
- protected boolean tableIsUndefined;
-
- protected final ReadOnlyTable.Owner secondaryTableOwner;
- protected final ContextListContainer<OrmSecondaryTable, XmlSecondaryTable> specifiedSecondaryTableContainer;
- protected final ContextListContainer<OrmVirtualSecondaryTable, JavaSecondaryTable> virtualSecondaryTableContainer;
-
- protected final PrimaryKeyJoinColumnOwner primaryKeyJoinColumnOwner;
- protected final ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumnContainer;
-
- // this is the default if there are Java columns
- protected final Vector<OrmVirtualPrimaryKeyJoinColumn> virtualPrimaryKeyJoinColumns = new Vector<OrmVirtualPrimaryKeyJoinColumn>();
- protected final VirtualPrimaryKeyJoinColumnContainerAdapter virtualPrimaryKeyJoinColumnContainerAdapter = new VirtualPrimaryKeyJoinColumnContainerAdapter();
-
- // this is the default if there are *no* Java columns
- protected ReadOnlyPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
-
- protected InheritanceType specifiedInheritanceStrategy;
- protected InheritanceType defaultInheritanceStrategy;
-
- protected String specifiedDiscriminatorValue;
- protected String defaultDiscriminatorValue;
- protected boolean specifiedDiscriminatorValueIsAllowed;
- protected boolean discriminatorValueIsUndefined;
-
- protected final OrmDiscriminatorColumn discriminatorColumn;
- protected boolean specifiedDiscriminatorColumnIsAllowed;
- protected boolean discriminatorColumnIsUndefined;
-
- protected final OrmAttributeOverrideContainer attributeOverrideContainer;
- protected final OrmAssociationOverrideContainer associationOverrideContainer;
-
- protected final OrmGeneratorContainer generatorContainer;
- protected final OrmQueryContainer queryContainer;
-
-
- // ********** construction **********
-
- protected AbstractOrmEntity(OrmPersistentType parent, X xmlEntity) {
- super(parent, xmlEntity);
- this.specifiedName = xmlEntity.getName();
- this.idClassReference = this.buildIdClassReference();
- this.table = this.buildTable();
- this.secondaryTableOwner = this.buildSecondaryTableOwner();
- this.specifiedSecondaryTableContainer = this.buildSpecifiedSecondaryTableContainer();
- this.virtualSecondaryTableContainer = this.buildVirtualSecondaryTableContainer();
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.specifiedPrimaryKeyJoinColumnContainer = this.buildSpecifiedPrimaryKeyJoinColumnContainer();
- this.specifiedInheritanceStrategy = this.buildSpecifiedInheritanceStrategy();
- this.specifiedDiscriminatorValue = xmlEntity.getDiscriminatorValue();
- this.discriminatorColumn = this.buildDiscriminatorColumn();
- // start with the entity as the root - it will be recalculated in update()
- this.rootEntity = this;
- this.attributeOverrideContainer = this.buildAttributeOverrideContainer();
- this.associationOverrideContainer = this.buildAssociationOverrideContainer();
- this.generatorContainer = this.buildGeneratorContainer();
- this.queryContainer = this.buildQueryContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
-
- this.setSpecifiedName_(this.xmlTypeMapping.getName());
-
- this.idClassReference.synchronizeWithResourceModel();
-
- this.table.synchronizeWithResourceModel();
-
- this.syncSpecifiedSecondaryTables();
-
- this.syncSpecifiedPrimaryKeyJoinColumns();
-
- this.setSpecifiedInheritanceStrategy_(this.buildSpecifiedInheritanceStrategy());
- this.setSpecifiedDiscriminatorValue_(this.xmlTypeMapping.getDiscriminatorValue());
- this.discriminatorColumn.synchronizeWithResourceModel();
-
- this.attributeOverrideContainer.synchronizeWithResourceModel();
- this.associationOverrideContainer.synchronizeWithResourceModel();
-
- this.generatorContainer.synchronizeWithResourceModel();
- this.queryContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
-
- this.setDefaultName(this.buildDefaultName());
-
- // calculate root entity early - other things depend on it
- this.setRootEntity(this.buildRootEntity());
- this.updateDescendants();
-
- this.idClassReference.update();
-
- this.table.update();
- this.setSpecifiedTableIsAllowed(this.buildSpecifiedTableIsAllowed());
- this.setTableIsUndefined(this.buildTableIsUndefined());
-
- this.updateVirtualSecondaryTables();
- this.updateNodes(this.getSecondaryTables());
-
- this.updateDefaultPrimaryKeyJoinColumns();
- this.updateNodes(this.getPrimaryKeyJoinColumns());
-
- this.setDefaultInheritanceStrategy(this.buildDefaultInheritanceStrategy());
-
- this.setDefaultDiscriminatorValue(this.buildDefaultDiscriminatorValue());
- this.setSpecifiedDiscriminatorValueIsAllowed(this.buildSpecifiedDiscriminatorValueIsAllowed());
- this.setDiscriminatorValueIsUndefined(this.buildDiscriminatorValueIsUndefined());
-
- this.discriminatorColumn.update();
- this.setSpecifiedDiscriminatorColumnIsAllowed(this.buildSpecifiedDiscriminatorColumnIsAllowed());
- this.setDiscriminatorColumnIsUndefined(this.buildDiscriminatorColumnIsUndefined());
-
- this.attributeOverrideContainer.update();
- this.associationOverrideContainer.update();
-
- this.generatorContainer.update();
- this.queryContainer.update();
- }
-
-
- // ********** name **********
-
- @Override
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- public void setSpecifiedName(String name) {
- this.setSpecifiedName_(name);
- this.xmlTypeMapping.setName(name);
- }
-
- protected void setSpecifiedName_(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultName() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- if (javaEntity != null) {
- return javaEntity.getName();
- }
- String className = this.getClass_();
- return StringTools.stringIsEmpty(className) ? null : ClassName.getSimpleName(className);
- }
-
-
- // ********** root entity **********
-
- @Override
- public Entity getRootEntity() {
- return this.rootEntity;
- }
-
- protected void setRootEntity(Entity entity) {
- Entity old = this.rootEntity;
- this.rootEntity = entity;
- this.firePropertyChanged(ROOT_ENTITY_PROPERTY, old, entity);
- }
-
- protected Entity buildRootEntity() {
- Entity result = this;
- for (TypeMapping typeMapping : this.getAncestors()) {
- if (typeMapping instanceof Entity) {
- result = (Entity) typeMapping;
- }
- }
- return result;
- }
-
-
- // ********** descendants **********
-
- public Iterable<Entity> getDescendants() {
- return new LiveCloneListIterable<Entity>(this.descendants);
- }
-
- protected void updateDescendants() {
- this.synchronizeCollection(this.buildDescendants(), this.descendants, DESCENDANTS_COLLECTION);
- }
-
- protected Iterable<Entity> buildDescendants() {
- return new FilteringIterable<Entity>(this.getPersistenceUnit().getEntities()) {
- @Override
- protected boolean accept(Entity entity) {
- return AbstractOrmEntity.this.entityIsDescendant(entity);
- }
- };
- }
-
- /**
- * Return whether specified entity is a descendant of the entity.
- */
- protected boolean entityIsDescendant(Entity entity) {
- String typeName = this.getPersistentType().getName();
- String entityTypeName = entity.getPersistentType().getName();
- String rootEntityTypeName = entity.getRootEntity().getPersistentType().getName();
- return Tools.valuesAreDifferent(typeName, entityTypeName) &&
- Tools.valuesAreEqual(typeName, rootEntityTypeName);
- }
-
-
- // ********** id class **********
-
- public OrmIdClassReference getIdClassReference() {
- return this.idClassReference;
- }
-
- protected OrmIdClassReference buildIdClassReference() {
- return new GenericOrmIdClassReference(this, this);
- }
-
- public XmlIdClassContainer getXmlIdClassContainer() {
- return this.getXmlTypeMapping();
- }
-
- public JavaIdClassReference getJavaIdClassReferenceForDefaults() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- return (javaEntity == null) ? null : javaEntity.getIdClassReference();
- }
-
- public JavaPersistentType getIdClass() {
- return this.idClassReference.getIdClass();
- }
-
-
- // ********** table **********
-
- public OrmTable getTable() {
- return this.table;
- }
-
- protected OrmTable buildTable() {
- return this.getContextNodeFactory().buildOrmTable(this, this.buildTableOwner());
- }
-
- protected Table.Owner buildTableOwner() {
- return new TableOwner();
- }
-
- public boolean specifiedTableIsAllowed() {
- return this.specifiedTableIsAllowed;
- }
-
- protected void setSpecifiedTableIsAllowed(boolean specifiedTableIsAllowed) {
- boolean old = this.specifiedTableIsAllowed;
- this.specifiedTableIsAllowed = specifiedTableIsAllowed;
- this.firePropertyChanged(SPECIFIED_TABLE_IS_ALLOWED_PROPERTY, old, specifiedTableIsAllowed);
- }
-
- protected boolean buildSpecifiedTableIsAllowed() {
- return ! this.isAbstractTablePerClass() && ! this.isSingleTableDescendant();
- }
-
- public boolean tableIsUndefined() {
- return this.tableIsUndefined;
- }
-
- protected void setTableIsUndefined(boolean tableIsUndefined) {
- boolean old = this.tableIsUndefined;
- this.tableIsUndefined = tableIsUndefined;
- this.firePropertyChanged(TABLE_IS_UNDEFINED_PROPERTY, old, tableIsUndefined);
- }
-
- protected boolean buildTableIsUndefined() {
- return this.isAbstractTablePerClass();
- }
-
- public String getDefaultTableName() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- if (javaEntity != null) {
- String javaName = javaEntity.getTable().getSpecifiedName();
- if ((javaName != null) && ! this.table.isSpecifiedInResource()) {
- return javaName;
- }
- }
- return this.isSingleTableDescendant() ?
- this.rootEntity.getTable().getName() :
- this.isAbstractTablePerClass() ?
- null :
- this.getName();
- }
-
- public String getDefaultSchema() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- if (javaEntity != null) {
- String javaSchema = javaEntity.getTable().getSpecifiedSchema();
- if ((javaSchema != null) && ! this.table.isSpecifiedInResource()) {
- return javaSchema;
- }
- }
- return this.isSingleTableDescendant() ?
- this.rootEntity.getTable().getSchema() :
- this.isAbstractTablePerClass() ?
- null :
- this.getContextDefaultSchema();
- }
-
- public String getDefaultCatalog() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- if (javaEntity != null) {
- String javaCatalog = javaEntity.getTable().getSpecifiedCatalog();
- if ((javaCatalog != null) && ! this.table.isSpecifiedInResource()) {
- return javaCatalog;
- }
- }
- return this.isSingleTableDescendant() ?
- this.rootEntity.getTable().getCatalog() :
- this.isAbstractTablePerClass() ?
- null :
- this.getContextDefaultCatalog();
- }
-
- protected static class TableOwner
- implements ReadOnlyTable.Owner
- {
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new TableValidator(table, textRangeResolver);
- }
- }
-
-
- // ********** secondary tables **********
-
- public ListIterable<ReadOnlySecondaryTable> getSecondaryTables() {
- return this.getSpecifiedSecondaryTablesSize() == 0 ?
- this.getReadOnlyVirtualSecondaryTables() :
- this.getReadOnlySpecifiedSecondaryTables();
- }
-
- public int getSecondaryTablesSize() {
- return this.getSpecifiedSecondaryTablesSize() == 0 ?
- this.getVirtualSecondaryTablesSize() :
- this.getSpecifiedSecondaryTablesSize();
- }
-
-
- // ********** specified secondary tables **********
-
- public ListIterable<OrmSecondaryTable> getSpecifiedSecondaryTables() {
- return this.specifiedSecondaryTableContainer.getContextElements();
- }
-
- protected ListIterable<ReadOnlySecondaryTable> getReadOnlySpecifiedSecondaryTables() {
- return new SuperListIterableWrapper<ReadOnlySecondaryTable>(this.getSpecifiedSecondaryTables());
- }
-
- public int getSpecifiedSecondaryTablesSize() {
- return this.specifiedSecondaryTableContainer.getContextElementsSize();
- }
-
- public OrmSecondaryTable addSpecifiedSecondaryTable() {
- return this.addSpecifiedSecondaryTable(this.getSpecifiedSecondaryTablesSize());
- }
-
- /**
- * no state check
- */
- protected OrmSecondaryTable addSpecifiedSecondaryTable_() {
- return this.addSpecifiedSecondaryTable_(this.getSpecifiedSecondaryTablesSize());
- }
-
- /**
- * @see #setSecondaryTablesAreDefinedInXml(boolean)
- */
- public OrmSecondaryTable addSpecifiedSecondaryTable(int index) {
- if ( ! this.secondaryTablesAreDefinedInXml()) {
- throw new IllegalStateException("virtual secondary tables exist - call OrmEntity.setSecondaryTablesAreDefinedInXml(true) first"); //$NON-NLS-1$
- }
- return this.addSpecifiedSecondaryTable_(index);
- }
-
- /**
- * no state check
- */
- protected OrmSecondaryTable addSpecifiedSecondaryTable_(int index) {
- XmlSecondaryTable xmlSecondaryTable = this.buildXmlSecondaryTable();
- OrmSecondaryTable secondaryTable = this.specifiedSecondaryTableContainer.addContextElement(index, xmlSecondaryTable);
- this.xmlTypeMapping.getSecondaryTables().add(index, xmlSecondaryTable);
- return secondaryTable;
- }
-
- protected XmlSecondaryTable buildXmlSecondaryTable() {
- return OrmFactory.eINSTANCE.createXmlSecondaryTable();
- }
-
- public void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable) {
- this.removeSpecifiedSecondaryTable(this.specifiedSecondaryTableContainer.indexOfContextElement((OrmSecondaryTable) secondaryTable));
- }
-
- public void removeSpecifiedSecondaryTable(int index) {
- this.specifiedSecondaryTableContainer.removeContextElement(index);
- this.xmlTypeMapping.getSecondaryTables().remove(index);
- }
-
- public void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex) {
- this.specifiedSecondaryTableContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlTypeMapping.getSecondaryTables().move(targetIndex, sourceIndex);
- }
-
- protected OrmSecondaryTable buildSpecifiedSecondaryTable(XmlSecondaryTable xmlSecondaryTable) {
- return this.getContextNodeFactory().buildOrmSecondaryTable(this, this.secondaryTableOwner, xmlSecondaryTable);
- }
-
- protected void clearSpecifiedSecondaryTables() {
- this.specifiedSecondaryTableContainer.clearContextList();
- this.xmlTypeMapping.getSecondaryTables().clear();
- }
-
- protected void syncSpecifiedSecondaryTables() {
- this.specifiedSecondaryTableContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlSecondaryTable> getXmlSecondaryTables() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlSecondaryTable>(this.xmlTypeMapping.getSecondaryTables());
- }
-
- protected ContextListContainer<OrmSecondaryTable, XmlSecondaryTable> buildSpecifiedSecondaryTableContainer() {
- SpecifiedSecondaryTableContainer container = new SpecifiedSecondaryTableContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified secondary table container
- */
- protected class SpecifiedSecondaryTableContainer
- extends ContextListContainer<OrmSecondaryTable, XmlSecondaryTable>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_SECONDARY_TABLES_LIST;
- }
- @Override
- protected OrmSecondaryTable buildContextElement(XmlSecondaryTable resourceElement) {
- return AbstractOrmEntity.this.buildSpecifiedSecondaryTable(resourceElement);
- }
- @Override
- protected ListIterable<XmlSecondaryTable> getResourceElements() {
- return AbstractOrmEntity.this.getXmlSecondaryTables();
- }
- @Override
- protected XmlSecondaryTable getResourceElement(OrmSecondaryTable contextElement) {
- return contextElement.getXmlTable();
- }
- }
-
-
- // ********** virtual secondary tables **********
-
- public ListIterable<OrmVirtualSecondaryTable> getVirtualSecondaryTables() {
- return this.virtualSecondaryTableContainer.getContextElements();
- }
-
- protected ListIterable<ReadOnlySecondaryTable> getReadOnlyVirtualSecondaryTables() {
- return new SuperListIterableWrapper<ReadOnlySecondaryTable>(this.getVirtualSecondaryTables());
- }
-
- public int getVirtualSecondaryTablesSize() {
- return this.virtualSecondaryTableContainer.getContextElementsSize();
- }
-
- protected void clearVirtualSecondaryTables() {
- this.virtualSecondaryTableContainer.clearContextList();
- }
-
- /**
- * If there are any specified secondary tables, then there are no virtual
- * secondary tables.
- * If there are Java specified secondary tables, then those are the virtual
- * secondary tables.
- * @see #getJavaSecondaryTablesForVirtuals()
- */
- protected void updateVirtualSecondaryTables() {
- this.virtualSecondaryTableContainer.update();
- }
-
- protected ListIterable<JavaSecondaryTable> getJavaSecondaryTablesForVirtuals() {
- if (this.getSpecifiedSecondaryTablesSize() > 0) {
- return EmptyListIterable.instance();
- }
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- return (javaEntity == null) ?
- EmptyListIterable.<JavaSecondaryTable>instance() :
- javaEntity.getSecondaryTables();
- }
-
- protected void moveVirtualSecondaryTable(int index, OrmVirtualSecondaryTable secondaryTable) {
- this.virtualSecondaryTableContainer.moveContextElement(index, secondaryTable);
- }
-
- protected OrmVirtualSecondaryTable addVirtualSecondaryTable(int index, JavaSecondaryTable javaSecondaryTable) {
- return this.virtualSecondaryTableContainer.addContextElement(index, javaSecondaryTable);
- }
-
- protected OrmVirtualSecondaryTable buildVirtualSecondaryTable(JavaSecondaryTable javaSecondaryTable) {
- return this.getContextNodeFactory().buildOrmVirtualSecondaryTable(this, this.secondaryTableOwner, javaSecondaryTable);
- }
-
- protected void removeVirtualSecondaryTable(OrmVirtualSecondaryTable secondaryTable) {
- this.virtualSecondaryTableContainer.removeContextElement(secondaryTable);
- }
-
- protected ContextListContainer<OrmVirtualSecondaryTable, JavaSecondaryTable> buildVirtualSecondaryTableContainer() {
- return new VirtualSecondaryTableContainer();
- }
-
- /**
- * virtual secondary table container
- */
- protected class VirtualSecondaryTableContainer
- extends ContextListContainer<OrmVirtualSecondaryTable, JavaSecondaryTable>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return VIRTUAL_SECONDARY_TABLES_LIST;
- }
- @Override
- protected OrmVirtualSecondaryTable buildContextElement(JavaSecondaryTable resourceElement) {
- return AbstractOrmEntity.this.buildVirtualSecondaryTable(resourceElement);
- }
- @Override
- protected ListIterable<JavaSecondaryTable> getResourceElements() {
- return AbstractOrmEntity.this.getJavaSecondaryTablesForVirtuals();
- }
- @Override
- protected JavaSecondaryTable getResourceElement(OrmVirtualSecondaryTable contextElement) {
- return contextElement.getOverriddenTable();
- }
- }
-
-
- // ********** secondary table transitions **********
-
- /**
- * If the list of virtual secondary tables is empty, then either the
- * secondary tables are defined in XML or there are no secondary tables at
- * all (implying they are defined in XML).
- */
- public boolean secondaryTablesAreDefinedInXml() {
- return this.getVirtualSecondaryTablesSize() == 0;
- }
-
- public void setSecondaryTablesAreDefinedInXml(boolean defineInXml) {
- if (defineInXml != this.secondaryTablesAreDefinedInXml()) {
- this.setSecondaryTablesAreDefinedInXml_(defineInXml);
- }
- }
-
- protected void setSecondaryTablesAreDefinedInXml_(boolean defineInXml) {
- if (defineInXml) {
- this.specifySecondaryTablesInXml();
- } else {
- this.removeSecondaryTablesFromXml();
- }
- }
-
- /**
- * This is used to take all the Java secondary tables and specify them in
- * the XML. You must use {@link #setSecondaryTablesAreDefinedInXml(boolean)}
- * before calling {@link #addSpecifiedSecondaryTable()}.
- */
- protected void specifySecondaryTablesInXml() {
- for (OrmVirtualSecondaryTable oldVirtualSecondaryTable : getVirtualSecondaryTables()) {
- this.addSpecifiedSecondaryTable_().initializeFrom(oldVirtualSecondaryTable);
- }
- // the virtual secondary tables will be cleared during the update
- }
-
- protected void removeSecondaryTablesFromXml() {
- this.clearSpecifiedSecondaryTables();
- // the virtual secondary tables will be built during the update
- }
-
- protected Table.Owner buildSecondaryTableOwner() {
- return new SecondaryTableOwner();
- }
-
- protected static class SecondaryTableOwner
- implements ReadOnlyTable.Owner
- {
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new SecondaryTableValidator((ReadOnlySecondaryTable) table, textRangeResolver);
- }
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumnsSize() == 0 ?
- this.getDefaultPrimaryKeyJoinColumns() :
- this.getReadOnlySpecifiedPrimaryKeyJoinColumns();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.getSpecifiedPrimaryKeyJoinColumnsSize() == 0 ?
- this.getDefaultPrimaryKeyJoinColumnsSize() :
- this.getSpecifiedPrimaryKeyJoinColumnsSize();
- }
-
- protected OrmPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(XmlPrimaryKeyJoinColumn xmlPkJoinColumn) {
- return this.getContextNodeFactory().buildOrmPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, xmlPkJoinColumn);
- }
-
-
- // ********** specified primary key join columns **********
-
- public ListIterable<OrmPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElements();
- }
-
- protected ListIterable<ReadOnlyPrimaryKeyJoinColumn> getReadOnlySpecifiedPrimaryKeyJoinColumns() {
- return new SuperListIterableWrapper<ReadOnlyPrimaryKeyJoinColumn>(this.getSpecifiedPrimaryKeyJoinColumns());
- }
-
- public int getSpecifiedPrimaryKeyJoinColumnsSize() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn() {
- return this.addSpecifiedPrimaryKeyJoinColumn(this.getSpecifiedPrimaryKeyJoinColumnsSize());
- }
-
- public OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
- this.clearDefaultPrimaryKeyJoinColumns(); // could leave for update?
-
- XmlPrimaryKeyJoinColumn xmlPkJoinColumn = this.buildXmlPrimaryKeyJoinColumn();
- OrmPrimaryKeyJoinColumn pkJoinColumn = this.specifiedPrimaryKeyJoinColumnContainer.addContextElement(index, xmlPkJoinColumn);
- this.xmlTypeMapping.getPrimaryKeyJoinColumns().add(index, xmlPkJoinColumn);
- return pkJoinColumn;
- }
-
- protected XmlPrimaryKeyJoinColumn buildXmlPrimaryKeyJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn();
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn) {
- this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumnContainer.indexOfContextElement((OrmPrimaryKeyJoinColumn) primaryKeyJoinColumn));
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
- this.specifiedPrimaryKeyJoinColumnContainer.removeContextElement(index);
- this.xmlTypeMapping.getPrimaryKeyJoinColumns().remove(index);
- }
-
- public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedPrimaryKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlTypeMapping.getPrimaryKeyJoinColumns().move(targetIndex, sourceIndex);
- }
-
- protected PrimaryKeyJoinColumnOwner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
- protected void syncSpecifiedPrimaryKeyJoinColumns() {
- this.specifiedPrimaryKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlPrimaryKeyJoinColumn> getXmlPrimaryKeyJoinColumns() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlPrimaryKeyJoinColumn>(this.xmlTypeMapping.getPrimaryKeyJoinColumns());
- }
-
- protected ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> buildSpecifiedPrimaryKeyJoinColumnContainer() {
- SpecifiedPrimaryKeyJoinColumnContainer container = new SpecifiedPrimaryKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified primary key join column container
- */
- protected class SpecifiedPrimaryKeyJoinColumnContainer
- extends ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmPrimaryKeyJoinColumn buildContextElement(XmlPrimaryKeyJoinColumn resourceElement) {
- return AbstractOrmEntity.this.buildPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlPrimaryKeyJoinColumn> getResourceElements() {
- return AbstractOrmEntity.this.getXmlPrimaryKeyJoinColumns();
- }
- @Override
- protected XmlPrimaryKeyJoinColumn getResourceElement(OrmPrimaryKeyJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
-
- // ********** default primary key join columns **********
-
- public ListIterable<ReadOnlyPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- int virtualSize = this.virtualPrimaryKeyJoinColumns.size();
- return (virtualSize != 0) ?
- this.getReadOnlyVirtualPrimaryKeyJoinColumns() :
- this.getReadOnlyDefaultPrimaryKeyJoinColumns();
- }
-
- public int getDefaultPrimaryKeyJoinColumnsSize() {
- int virtualSize = this.virtualPrimaryKeyJoinColumns.size();
- return (virtualSize != 0) ?
- virtualSize :
- (this.defaultPrimaryKeyJoinColumn != null) ? 1 : 0;
- }
-
- /**
- * This is (blindly) called whenever a specified pk join column is added.
- */
- protected void clearDefaultPrimaryKeyJoinColumns() {
- int virtualSize = this.virtualPrimaryKeyJoinColumns.size();
- if (virtualSize != 0) {
- this.clearVirtualPrimaryKeyJoinColumns();
- } else {
- if (this.defaultPrimaryKeyJoinColumn != null) {
- this.removeDefaultPrimaryKeyJoinColumn();
- } else {
- // nothing to clear
- }
- }
- }
-
- /**
- * If there are any specified pk join columns, then there are no default
- * pk join columns.
- * If there are Java specified pk join columns, then those are the default
- * pk join columns.
- * Otherwise, there is a single, spec-defined, default pk join column.
- */
- protected void updateDefaultPrimaryKeyJoinColumns() {
- if (this.getSpecifiedPrimaryKeyJoinColumnsSize() > 0) {
- // specified/java/default => specified
- this.clearDefaultPrimaryKeyJoinColumns();
- } else {
- // specified
- if (this.getDefaultPrimaryKeyJoinColumnsSize() == 0) {
- if (this.javaPrimaryKeyJoinColumnsWillBeDefaults()) {
- // specified => java
- this.initializeVirtualPrimaryKeyJoinColumns();
- } else {
- // specified => default
- this.addDefaultPrimaryKeyJoinColumn();
- }
- } else {
- // default
- if (this.defaultPrimaryKeyJoinColumn != null) {
- if (this.javaPrimaryKeyJoinColumnsWillBeDefaults()) {
- // default => java
- this.removeDefaultPrimaryKeyJoinColumn();
- this.initializeVirtualPrimaryKeyJoinColumns();
- } else {
- // default => default (no change)
- }
- // java
- } else {
- if (this.javaPrimaryKeyJoinColumnsWillBeDefaults()) {
- // java => java ("normal" update)
- this.updateVirtualPrimaryKeyJoinColumns();
- } else {
- // java => default
- this.clearVirtualPrimaryKeyJoinColumns();
- this.addDefaultPrimaryKeyJoinColumn();
- }
- }
- }
- }
- }
-
- protected void updateVirtualPrimaryKeyJoinColumns() {
- ContextContainerTools.update(this.virtualPrimaryKeyJoinColumnContainerAdapter);
- }
-
- /**
- * Return whether we have Java pk join columns that will be used to populate
- * our virtual pk join column collection.
- */
- protected boolean javaPrimaryKeyJoinColumnsWillBeDefaults() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- return (javaEntity != null) && (javaEntity.getPrimaryKeyJoinColumnsSize() > 0);
- }
-
-
- // ********** virtual primary key join columns **********
-
- protected ListIterable<OrmVirtualPrimaryKeyJoinColumn> getVirtualPrimaryKeyJoinColumns() {
- return new LiveCloneListIterable<OrmVirtualPrimaryKeyJoinColumn>(this.virtualPrimaryKeyJoinColumns);
- }
-
- protected ListIterable<ReadOnlyPrimaryKeyJoinColumn> getReadOnlyVirtualPrimaryKeyJoinColumns() {
- return new LiveCloneListIterable<ReadOnlyPrimaryKeyJoinColumn>(this.virtualPrimaryKeyJoinColumns);
- }
-
- protected void initializeVirtualPrimaryKeyJoinColumns() {
- for (JavaPrimaryKeyJoinColumn javaPkJoinColumn : this.getJavaPrimaryKeyJoinColumnsForVirtuals()) {
- this.addVirtualPrimaryKeyJoinColumn(this.buildVirtualPrimaryKeyJoinColumn(javaPkJoinColumn));
- }
- }
-
- protected void addVirtualPrimaryKeyJoinColumn(OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- this.addVirtualPrimaryKeyJoinColumn(this.virtualPrimaryKeyJoinColumns.size(), pkJoinColumn);
- }
-
- protected void addVirtualPrimaryKeyJoinColumn(int index, OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- this.addItemToList(index, pkJoinColumn, this.virtualPrimaryKeyJoinColumns, DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
- }
-
- protected void clearVirtualPrimaryKeyJoinColumns() {
- this.clearList(this.virtualPrimaryKeyJoinColumns, DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
- }
-
- /**
- * This will only be called when there are Java pk join columns to return.
- * @see #javaPrimaryKeyJoinColumnsWillBeDefaults()
- */
- protected Iterable<JavaPrimaryKeyJoinColumn> getJavaPrimaryKeyJoinColumnsForVirtuals() {
- return this.getJavaTypeMappingForDefaults().getPrimaryKeyJoinColumns();
- }
-
- protected void moveVirtualPrimaryKeyJoinColumn(int index, OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- this.moveItemInList(index, pkJoinColumn, this.virtualPrimaryKeyJoinColumns, DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
- }
-
- protected OrmVirtualPrimaryKeyJoinColumn addVirtualPrimaryKeyJoinColumn(int index, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn) {
- OrmVirtualPrimaryKeyJoinColumn pkJoinColumn = this.buildVirtualPrimaryKeyJoinColumn(javaPrimaryKeyJoinColumn);
- this.addVirtualPrimaryKeyJoinColumn(index, pkJoinColumn);
- return pkJoinColumn;
- }
-
- protected OrmVirtualPrimaryKeyJoinColumn buildVirtualPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn) {
- return this.getContextNodeFactory().buildOrmVirtualPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, javaPrimaryKeyJoinColumn);
- }
-
- protected void removeVirtualPrimaryKeyJoinColumn(OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- this.removeItemFromList(pkJoinColumn, this.virtualPrimaryKeyJoinColumns, DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
- }
-
- /**
- * virtual primary key join column container adapter
- */
- protected class VirtualPrimaryKeyJoinColumnContainerAdapter
- implements ContextContainerTools.Adapter<OrmVirtualPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn>
- {
- public Iterable<OrmVirtualPrimaryKeyJoinColumn> getContextElements() {
- return AbstractOrmEntity.this.getVirtualPrimaryKeyJoinColumns();
- }
- public Iterable<JavaPrimaryKeyJoinColumn> getResourceElements() {
- return AbstractOrmEntity.this.getJavaPrimaryKeyJoinColumnsForVirtuals();
- }
- public JavaPrimaryKeyJoinColumn getResourceElement(OrmVirtualPrimaryKeyJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- public void moveContextElement(int index, OrmVirtualPrimaryKeyJoinColumn element) {
- AbstractOrmEntity.this.moveVirtualPrimaryKeyJoinColumn(index, element);
- }
- public void addContextElement(int index, JavaPrimaryKeyJoinColumn resourceElement) {
- AbstractOrmEntity.this.addVirtualPrimaryKeyJoinColumn(index, resourceElement);
- }
- public void removeContextElement(OrmVirtualPrimaryKeyJoinColumn element) {
- AbstractOrmEntity.this.removeVirtualPrimaryKeyJoinColumn(element);
- }
- }
-
-
- // ********** default primary key join column **********
-
- protected ListIterable<ReadOnlyPrimaryKeyJoinColumn> getReadOnlyDefaultPrimaryKeyJoinColumns() {
- return (this.defaultPrimaryKeyJoinColumn != null) ?
- new SingleElementListIterable<ReadOnlyPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn) :
- EmptyListIterable.<ReadOnlyPrimaryKeyJoinColumn>instance();
- }
-
- protected void addDefaultPrimaryKeyJoinColumn() {
- this.defaultPrimaryKeyJoinColumn = this.buildPrimaryKeyJoinColumn(null);
- this.fireItemAdded(DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST, 0, this.defaultPrimaryKeyJoinColumn);
- }
-
- protected void removeDefaultPrimaryKeyJoinColumn() {
- ReadOnlyPrimaryKeyJoinColumn old = this.defaultPrimaryKeyJoinColumn;
- this.defaultPrimaryKeyJoinColumn = null;
- this.fireItemRemoved(DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST, 0, old);
- }
-
- protected ReadOnlyPrimaryKeyJoinColumn buildDefaultPrimaryKeyJoinColumn() {
- return this.buildPrimaryKeyJoinColumn(null);
- }
-
-
- // ********** inheritance strategy **********
-
- @Override
- public InheritanceType getInheritanceStrategy() {
- return (this.specifiedInheritanceStrategy != null) ? this.specifiedInheritanceStrategy : this.defaultInheritanceStrategy;
- }
-
- public InheritanceType getSpecifiedInheritanceStrategy() {
- return this.specifiedInheritanceStrategy;
- }
-
- public void setSpecifiedInheritanceStrategy(InheritanceType inheritanceType) {
- if (this.valuesAreDifferent(this.specifiedInheritanceStrategy, inheritanceType)) {
- Inheritance xmlInheritance = this.getXmlInheritanceForUpdate();
- this.setSpecifiedInheritanceStrategy_(inheritanceType);
- xmlInheritance.setStrategy(InheritanceType.toOrmResourceModel(inheritanceType));
- this.removeXmlInheritanceIfUnset();
- }
- }
-
- protected void setSpecifiedInheritanceStrategy_(InheritanceType inheritanceType) {
- InheritanceType old = this.specifiedInheritanceStrategy;
- this.specifiedInheritanceStrategy = inheritanceType;
- this.firePropertyChanged(SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, old, inheritanceType);
- }
-
- protected InheritanceType buildSpecifiedInheritanceStrategy() {
- Inheritance xmlInheritance = this.xmlTypeMapping.getInheritance();
- return (xmlInheritance == null) ? null : InheritanceType.fromOrmResourceModel(xmlInheritance.getStrategy());
- }
-
- protected Inheritance getXmlInheritanceForUpdate() {
- Inheritance xmlInheritance = this.xmlTypeMapping.getInheritance();
- return (xmlInheritance != null) ? xmlInheritance : this.buildXmlInheritance();
- }
-
- protected Inheritance buildXmlInheritance() {
- Inheritance xmlInheritance = OrmFactory.eINSTANCE.createInheritance();
- this.xmlTypeMapping.setInheritance(xmlInheritance);
- return xmlInheritance;
- }
-
- protected void removeXmlInheritanceIfUnset() {
- if (this.xmlTypeMapping.getInheritance().isUnset()) {
- this.xmlTypeMapping.setInheritance(null);
- }
- }
-
- public InheritanceType getDefaultInheritanceStrategy() {
- return this.defaultInheritanceStrategy;
- }
-
- protected void setDefaultInheritanceStrategy(InheritanceType inheritanceType) {
- InheritanceType old = this.defaultInheritanceStrategy;
- this.defaultInheritanceStrategy = inheritanceType;
- this.firePropertyChanged(DEFAULT_INHERITANCE_STRATEGY_PROPERTY, old, inheritanceType);
- }
-
- protected InheritanceType buildDefaultInheritanceStrategy() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- if ((javaEntity != null) && (this.xmlTypeMapping.getInheritance() == null)) {
- return javaEntity.getInheritanceStrategy();
- }
- return this.isRootEntity() ?
- InheritanceType.SINGLE_TABLE :
- this.rootEntity.getInheritanceStrategy();
- }
-
-
- // ********** discriminator value **********
-
- public String getDiscriminatorValue() {
- return (this.specifiedDiscriminatorValue != null) ? this.specifiedDiscriminatorValue : this.defaultDiscriminatorValue;
- }
-
- public String getSpecifiedDiscriminatorValue() {
- return this.specifiedDiscriminatorValue;
- }
-
- public void setSpecifiedDiscriminatorValue(String discriminatorValue) {
- this.setSpecifiedDiscriminatorValue_(discriminatorValue);
- this.xmlTypeMapping.setDiscriminatorValue(discriminatorValue);
- }
-
- protected void setSpecifiedDiscriminatorValue_(String discriminatorValue) {
- String old = this.specifiedDiscriminatorValue;
- this.specifiedDiscriminatorValue = discriminatorValue;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, old, discriminatorValue);
- }
-
- public String getDefaultDiscriminatorValue() {
- return this.defaultDiscriminatorValue;
- }
-
- protected void setDefaultDiscriminatorValue(String discriminatorValue) {
- String old = this.defaultDiscriminatorValue;
- this.defaultDiscriminatorValue = discriminatorValue;
- this.firePropertyChanged(DEFAULT_DISCRIMINATOR_VALUE_PROPERTY, old, discriminatorValue);
- }
-
- /**
- * From the Spec:
- * If the DiscriminatorValue annotation is not specified, a
- * provider-specific function to generate a value representing
- * the entity type is used for the value of the discriminator
- * column. If the DiscriminatorType is STRING, the discriminator
- * value default is the entity name.
- */
- // TODO extension point for provider-specific function?
- protected String buildDefaultDiscriminatorValue() {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- if (javaEntity != null) {
- return javaEntity.getDiscriminatorValue();
- }
- if (this.discriminatorValueIsUndefined) {
- return null;
- }
- return (this.getDiscriminatorType() == DiscriminatorType.STRING) ? this.getName() : null;
- }
-
- protected DiscriminatorType getDiscriminatorType() {
- return this.discriminatorColumn.getDiscriminatorType();
- }
-
- public boolean specifiedDiscriminatorValueIsAllowed() {
- return this.specifiedDiscriminatorValueIsAllowed;
- }
-
- protected void setSpecifiedDiscriminatorValueIsAllowed(boolean allowed) {
- boolean old = this.specifiedDiscriminatorValueIsAllowed;
- this.specifiedDiscriminatorValueIsAllowed = allowed;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY, old, allowed);
- }
-
- protected boolean buildSpecifiedDiscriminatorValueIsAllowed() {
- return ! this.isTablePerClass() && ! this.isAbstract();
- }
-
- public boolean discriminatorValueIsUndefined() {
- return this.discriminatorValueIsUndefined;
- }
-
- protected void setDiscriminatorValueIsUndefined(boolean undefined) {
- boolean old = this.discriminatorValueIsUndefined;
- this.discriminatorValueIsUndefined = undefined;
- this.firePropertyChanged(DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY, old, undefined);
- }
-
- protected boolean buildDiscriminatorValueIsUndefined() {
- return this.isTablePerClass() ||
- this.isAbstract() ||
- this.isRootNoDescendantsNoStrategyDefined();
- }
-
-
- // ********** discriminator column **********
-
- public OrmDiscriminatorColumn getDiscriminatorColumn() {
- return this.discriminatorColumn;
- }
-
- protected OrmDiscriminatorColumn buildDiscriminatorColumn() {
- return this.getContextNodeFactory().buildOrmDiscriminatorColumn(this, this.buildDiscriminatorColumnOwner());
- }
-
- protected OrmDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
- return new DiscriminatorColumnOwner();
- }
-
- public boolean specifiedDiscriminatorColumnIsAllowed() {
- return this.specifiedDiscriminatorColumnIsAllowed;
- }
-
- protected void setSpecifiedDiscriminatorColumnIsAllowed(boolean allowed) {
- boolean old = this.specifiedDiscriminatorColumnIsAllowed;
- this.specifiedDiscriminatorColumnIsAllowed = allowed;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY, old, allowed);
- }
-
- protected boolean buildSpecifiedDiscriminatorColumnIsAllowed() {
- return ! this.isTablePerClass() && this.isRootEntity();
- }
-
- public boolean discriminatorColumnIsUndefined() {
- return this.discriminatorColumnIsUndefined;
- }
-
- protected void setDiscriminatorColumnIsUndefined(boolean undefined) {
- boolean old = this.discriminatorColumnIsUndefined;
- this.discriminatorColumnIsUndefined = undefined;
- this.firePropertyChanged(DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY, old, undefined);
- }
-
- protected boolean buildDiscriminatorColumnIsUndefined() {
- return this.isTablePerClass() ||
- this.isRootNoDescendantsNoStrategyDefined();
- }
-
-
- // ********** override container **********
-
- protected JavaEntity getJavaOverrideContainerEntity() {
- if (this.isMetadataComplete()) {
- return null;
- }
- JavaPersistentType javaType = this.getJavaPersistentType();
- if (javaType == null) {
- return null;
- }
- JavaTypeMapping javaTypeMapping = javaType.getMapping();
- return (javaTypeMapping instanceof JavaEntity) ? (JavaEntity) javaTypeMapping : null;
- }
-
-
- // ********** attribute override container **********
-
- public OrmAttributeOverrideContainer getAttributeOverrideContainer() {
- return this.attributeOverrideContainer;
- }
-
- protected OrmAttributeOverrideContainer buildAttributeOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAttributeOverrideContainer(this, new AttributeOverrideContainerOwner());
- }
-
- protected TypeMapping getOverridableTypeMapping() {
- PersistentType superPersistentType = this.getPersistentType().getSuperPersistentType();
- return (superPersistentType == null) ? null : superPersistentType.getMapping();
- }
-
- protected ReadOnlyColumn resolveOverriddenColumnForAttributeOverride(String attributeName) {
- if ( ! this.isMetadataComplete()) {
- JavaPersistentType javaType = this.getJavaPersistentType();
- if (javaType != null) {
- Column column = javaType.getMapping().resolveOverriddenColumn(attributeName);
- if (column != null) {
- return column;
- }
- }
- }
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- protected JavaReadOnlyAttributeOverride getJavaAttributeOverrideNamedForVirtual(String attributeName) {
- JavaEntity javaEntity = this.getJavaTypeMappingForDefaults();
- return (javaEntity == null) ? null : javaEntity.getAttributeOverrideContainer().getOverrideNamed(attributeName);
- }
-
-
- // ********** association override container **********
-
- public OrmAssociationOverrideContainer getAssociationOverrideContainer() {
- return this.associationOverrideContainer;
- }
-
- protected OrmAssociationOverrideContainer buildAssociationOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAssociationOverrideContainer(this, new AssociationOverrideContainerOwner());
- }
-
- @Override
- public Relationship resolveOverriddenRelationship(String attributeName) {
- if (this.isJpa2_0Compatible()) {
- // strip off the first segment
- int dotIndex = attributeName.indexOf('.');
- if (dotIndex != -1) {
- AssociationOverride override = this.associationOverrideContainer.getSpecifiedOverrideNamed(attributeName.substring(dotIndex + 1));
- if (override != null) {
- return override.getRelationship();
- }
- }
- }
- return super.resolveOverriddenRelationship(attributeName);
- }
-
- protected ReadOnlyRelationship resolveOverriddenRelationshipForAssociationOverride(String attributeName) {
- if ( ! this.isMetadataComplete()) {
- JavaPersistentType javaType = this.getJavaPersistentType();
- if (javaType != null) {
- Relationship relationship = javaType.getMapping().resolveOverriddenRelationship(attributeName);
- if (relationship != null) {
- return relationship;
- }
- }
- }
- return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
- }
-
-
- // ********** generator container **********
-
- public OrmGeneratorContainer getGeneratorContainer() {
- return this.generatorContainer;
- }
-
- protected OrmGeneratorContainer buildGeneratorContainer() {
- return this.getContextNodeFactory().buildOrmGeneratorContainer(this, this.xmlTypeMapping);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<Generator> getGenerators() {
- return new CompositeIterable<Generator>(
- super.getGenerators(),
- this.generatorContainer.getGenerators()
- );
- }
-
-
- // ********** query container **********
-
- public OrmQueryContainer getQueryContainer() {
- return this.queryContainer;
- }
-
- protected OrmQueryContainer buildQueryContainer() {
- return this.getContextNodeFactory().buildOrmQueryContainer(this, this.xmlTypeMapping);
- }
-
- public Iterable<Query> getQueries() {
- return this.queryContainer.getQueries();
- }
-
-
- // ********** associated tables **********
-
- public Iterable<ReadOnlyTable> getAssociatedTables() {
- return new CompositeIterable<ReadOnlyTable>(this.table, this.getSecondaryTables());
- }
-
- public Iterable<ReadOnlyTable> getAllAssociatedTables() {
- return CollectionTools.iterable(this.allAssociatedTables());
- }
-
- public Iterator<ReadOnlyTable> allAssociatedTables() {
- return new CompositeIterator<ReadOnlyTable>(this.allAssociatedTablesLists());
- }
-
- // TODO eliminate duplicate tables?
- protected Iterable<Iterable<ReadOnlyTable>> allAssociatedTablesLists() {
- return new TransformationIterable<TypeMapping, Iterable<ReadOnlyTable>>(this.getInheritanceHierarchy(), TypeMappingTools.ASSOCIATED_TABLES_TRANSFORMER);
- }
-
- public Iterable<String> getAllAssociatedTableNames() {
- return this.convertToNames(this.getAllAssociatedTables());
- }
-
- /**
- * strip out <code>null</code> names
- */
- protected Iterable<String> convertToNames(Iterable<ReadOnlyTable> tables) {
- return new FilteringIterable<String>(this.convertToNames_(tables), NotNullFilter.<String>instance());
- }
-
- protected Iterable<String> convertToNames_(Iterable<ReadOnlyTable> tables) {
- return new TransformationIterable<ReadOnlyTable, String>(tables) {
- @Override
- protected String transform(ReadOnlyTable t) {
- return t.getName();
- }
- };
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return ! this.tableNameIsValid(tableName);
- }
-
- protected boolean tableNameIsValid(String tableName) {
- return this.tableIsUndefined || this.tableNameIsValid_(tableName);
- }
-
- protected boolean tableNameIsValid_(String tableName) {
- return this.connectionProfileIsActive() ?
- (this.resolveDbTable(tableName) != null) :
- CollectionTools.contains(this.getAllAssociatedTableNames(), tableName);
- }
-
-
- // ********** Java **********
-
- @Override
- public JavaEntity getJavaTypeMapping() {
- return (JavaEntity) super.getJavaTypeMapping();
- }
-
- @Override
- public JavaEntity getJavaTypeMappingForDefaults() {
- return (JavaEntity) super.getJavaTypeMappingForDefaults();
- }
-
-
- // ********** database **********
-
- @Override
- public String getPrimaryTableName() {
- return this.table.getName();
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table getPrimaryDbTable() {
- return this.table.getDbTable();
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- // matching database objects and identifiers is database platform-specific
- return this.getDataSource().selectTableForIdentifier(this.getAllAssociatedDbTables(), tableName);
- }
-
- /**
- * strip out null db tables
- */
- protected Iterable<org.eclipse.jpt.jpa.db.Table> getAllAssociatedDbTables() {
- return new FilteringIterable<org.eclipse.jpt.jpa.db.Table>(this.getAllAssociatedDbTables_(), NotNullFilter.<org.eclipse.jpt.jpa.db.Table>instance());
- }
-
- protected Iterable<org.eclipse.jpt.jpa.db.Table> getAllAssociatedDbTables_() {
- return new TransformationIterable<ReadOnlyTable, org.eclipse.jpt.jpa.db.Table>(this.getAllAssociatedTables()) {
- @Override
- protected org.eclipse.jpt.jpa.db.Table transform(ReadOnlyTable t) {
- return t.getDbTable();
- }
- };
- }
-
- @Override
- public Schema getDbSchema() {
- return this.table.getDbSchema();
- }
-
-
- // ********** primary key **********
-
- public String getPrimaryKeyColumnName() {
- return MappingTools.getPrimaryKeyColumnName(this);
- }
-
- public PersistentAttribute getIdAttribute() {
- Iterator<AttributeMapping> idAttributeMappings = this.getAllAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY).iterator();
- if (idAttributeMappings.hasNext()) {
- PersistentAttribute attribute = idAttributeMappings.next().getPersistentAttribute();
- return idAttributeMappings.hasNext() ? null /*more than one*/: attribute;
- }
- return null;
- }
-
-
- // ********** key **********
-
- public String getKey() {
- return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
-
- // ********** entity mappings **********
-
- public int getXmlSequence() {
- return 1;
- }
-
- public void addXmlTypeMappingTo(XmlEntityMappings entityMappings) {
- entityMappings.getEntities().add(this.xmlTypeMapping);
- }
-
- public void removeXmlTypeMappingFrom(XmlEntityMappings entityMappings) {
- entityMappings.getEntities().remove(this.xmlTypeMapping);
- }
-
-
- // ********** attribute mappings **********
-
- @Override
- public Column resolveOverriddenColumn(String attributeName) {
- if (this.isJpa2_0Compatible()) {
- // strip off the first segment
- int dotIndex = attributeName.indexOf('.');
- if (dotIndex != -1) {
- AttributeOverride override = this.attributeOverrideContainer.getSpecifiedOverrideNamed(attributeName.substring(dotIndex + 1));
- if (override != null) {
- return override.getColumn();
- }
- }
- }
- return super.resolveOverriddenColumn(attributeName);
- }
-
- @Override
- public Iterable<String> getOverridableAttributeNames() {
- return this.isTablePerClass() ?
- super.getOverridableAttributeNames() :
- EmptyIterable.<String>instance();
- }
-
- @Override
- public Iterable<String> getOverridableAssociationNames() {
- return this.isTablePerClass() ?
- super.getOverridableAssociationNames() :
- EmptyIterable.<String>instance();
- }
-
- public AttributeMapping resolveAttributeMapping(String name) {
- for (AttributeMapping attributeMapping : this.getAllAttributeMappings()) {
- AttributeMapping resolvedMapping = attributeMapping.resolveAttributeMapping(name);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- }
- return null;
- }
-
-
- // ********** inheritance **********
-
- public Entity getParentEntity() {
- for (TypeMapping typeMapping : this.getAncestors()) {
- if (typeMapping instanceof Entity) {
- return (Entity) typeMapping;
- }
- }
- return null;
- }
-
- /**
- * Return whether the entity is the top of an inheritance hierarchy.
- */
- @Override
- public boolean isRootEntity() {
- return this == this.rootEntity;
- }
-
- /**
- * Return whether the entity is a descendant in (as opposed to the root of)
- * an inheritance hierarchy.
- */
- protected boolean isDescendant() {
- return ! this.isRootEntity();
- }
-
- /**
- * Return whether the entity is a descendant of the root entity
- * of a "single table" inheritance hierarchy.
- */
- protected boolean isSingleTableDescendant() {
- return this.isDescendant() &&
- (this.getInheritanceStrategy() == InheritanceType.SINGLE_TABLE);
- }
-
- /**
- * Return whether the entity is the top of an inheritance hierarchy
- * and has no descendants and no specified inheritance strategy has been defined.
- */
- protected boolean isRootNoDescendantsNoStrategyDefined() {
- return this.isRootEntity() &&
- this.descendants.isEmpty() &&
- (this.specifiedInheritanceStrategy == null);
- }
-
- /**
- * Return whether the entity is abstract and is a part of a
- * "table per class" inheritance hierarchy.
- */
- protected boolean isAbstractTablePerClass() {
- return this.isAbstract() && this.isTablePerClass();
- }
-
- protected boolean resourceTableIsSpecified() {
- return this.table.isSpecifiedInResource() || this.javaResourceTableIsSpecified();
- }
-
- protected boolean javaResourceTableIsSpecified() {
- JavaEntity javaEntity = this.getJavaTypeMapping();
- return (javaEntity != null) && javaEntity.getTable().isSpecifiedInResource();
- }
-
- /**
- * Return whether the entity is a part of a "table per class"
- * inheritance hierarchy.
- */
- protected boolean isTablePerClass() {
- return this.getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS;
- }
-
- /**
- * Return whether the type is abstract; false if no java type exists.
- */
- protected boolean isAbstract() {
- JavaResourceType jrt = this.getJavaResourceType();
- return (jrt != null) && jrt.isAbstract();
- }
-
- /**
- * Return whether the entity's type is abstract.
- */
- protected boolean isFinal() {
- JavaResourceType jrt = this.getJavaResourceType();
- return (jrt != null) && jrt.isFinal();
- }
-
- /**
- * Return whether the entity's type is a member of another type.
- */
- protected boolean isMember() {
- JavaResourceType jrt = this.getJavaResourceType();
- return (jrt != null) && jrt.isMemberType();
- }
-
- /**
- * Return whether the entity's type is static.
- */
- protected boolean isStatic() {
- JavaResourceType jrt = this.getJavaResourceType();
- return (jrt != null) && jrt.isStatic();
- }
-
-
- // ********** refactoring **********
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenameTypeEdits(originalType, newName),
- this.createIdClassRenameTypeEdits(originalType, newName));
- }
-
- protected Iterable<ReplaceEdit> createIdClassRenameTypeEdits(IType originalType, String newName) {
- return this.idClassReference.createRenameTypeEdits(originalType, newName);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- super.createMoveTypeEdits(originalType, newPackage),
- this.createIdClassMoveTypeEdits(originalType, newPackage));
- }
-
- protected Iterable<ReplaceEdit> createIdClassMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return this.idClassReference.createMoveTypeEdits(originalType, newPackage);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenamePackageEdits(originalPackage, newName),
- this.createIdClassRenamePackageEdits(originalPackage, newName));
- }
-
- protected Iterable<ReplaceEdit> createIdClassRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return this.idClassReference.createRenamePackageEdits(originalPackage, newName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- this.validatePrimaryKey(messages, reporter);
- this.validateTable(messages, reporter);
- for (OrmSecondaryTable secondaryTable : this.getSpecifiedSecondaryTables()) {
- secondaryTable.validate(messages, reporter);
- }
- this.validateInheritance(messages, reporter);
- for (OrmPrimaryKeyJoinColumn pkJoinColumn : this.getSpecifiedPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter);
- }
- this.attributeOverrideContainer.validate(messages, reporter);
- this.associationOverrideContainer.validate(messages, reporter);
- this.generatorContainer.validate(messages, reporter);
- this.queryContainer.validate(messages, reporter);
- this.validateEntityName(messages);
- this.idClassReference.validate(messages, reporter);
- }
-
- protected void validateEntityName(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.getName())){
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NAME_MISSING,
- new String[] {this.getClass_()},
- this,
- this.getNameTextRange()
- )
- );
- }
- }
-
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
- this.buildPrimaryKeyValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildPrimaryKeyValidator() {
- return new GenericEntityPrimaryKeyValidator(this, this.buildTextRangeResolver());
- // TODO - JPA 2.0 validation
- }
-
- @Override
- protected EntityTextRangeResolver buildTextRangeResolver() {
- return new OrmEntityTextRangeResolver(this);
- }
-
- protected void validateTable(List<IMessage> messages, IReporter reporter) {
- if (this.isAbstractTablePerClass()) {
- if (this.resourceTableIsSpecified()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
- new String[] {this.getName()},
- this,
- this.table.getValidationTextRange()
- )
- );
- }
- return;
- }
- if (this.isSingleTableDescendant() && this.getDataSource().connectionProfileIsActive()) {
- if (this.specifiedTableDoesNotMatchRootTable()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE,
- new String[] {this.getName()},
- this,
- this.table.getValidationTextRange()
- )
- );
- }
- return;
- }
- this.table.validate(messages, reporter);
- }
-
- /**
- * Return whether the entity specifies a table and it is a different table
- * than the root entity's table.
- */
- protected boolean specifiedTableDoesNotMatchRootTable() {
- return this.table.isSpecifiedInResource() &&
- (this.table.getDbTable() != this.getRootEntity().getTable().getDbTable());
- }
-
- protected void validateInheritance(List<IMessage> messages, IReporter reporter) {
- this.validateInheritanceStrategy(messages);
- this.validateDiscriminatorColumn(messages, reporter);
- this.validateDiscriminatorValue(messages);
- }
-
- protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter) {
- if (this.specifiedDiscriminatorColumnIsAllowed && ! this.discriminatorColumnIsUndefined) {
- this.discriminatorColumn.validate(messages, reporter);
- }
- else if (!this.discriminatorColumn.isVirtual()) {
- if (this.isDescendant()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorColumnTextRange()
- )
- );
- }
- else if (this.isTablePerClass()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorColumnTextRange()
- )
- );
-
- }
- }
- }
-
- protected void validateDiscriminatorValue(List<IMessage> messages) {
- if (this.discriminatorValueIsUndefined && (this.specifiedDiscriminatorValue != null)) {
- if (this.isAbstract()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorValueTextRange()
- )
- );
- }
- else if (this.isTablePerClass()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED,
- new String[] {this.getName()},
- this,
- this.getDiscriminatorValueTextRange()
- )
- );
- }
- }
- }
-
- protected void validateInheritanceStrategy(List<IMessage> messages) {
- Supported tablePerConcreteClassInheritanceIsSupported = this.getJpaPlatformVariation().getTablePerConcreteClassInheritanceIsSupported();
- if (tablePerConcreteClassInheritanceIsSupported == Supported.YES) {
- return;
- }
- if ((this.getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS) && this.isRootEntity()) {
- if (tablePerConcreteClassInheritanceIsSupported == Supported.NO) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
- new String[] {this.getName()},
- this,
- this.getInheritanceStrategyTextRange()
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM,
- new String[] {this.getName()},
- this,
- this.getInheritanceStrategyTextRange()
- )
- );
- }
- }
- }
-
- protected TextRange getDiscriminatorValueTextRange() {
- return this.getValidationTextRange(this.xmlTypeMapping.getDiscriminatorValueTextRange());
- }
-
- protected TextRange getDiscriminatorColumnTextRange() {
- return this.getValidationTextRange(this.xmlTypeMapping.getDiscriminatorColumn().getValidationTextRange());
- }
-
- protected TextRange getInheritanceStrategyTextRange() {
- return this.getValidationTextRange(this.xmlTypeMapping.getInheritanceStrategyTextRange());
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.table.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmSecondaryTable secondaryTable : this.getSpecifiedSecondaryTables()) {
- result = secondaryTable.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- for (OrmPrimaryKeyJoinColumn pkJoinColumn : this.getSpecifiedPrimaryKeyJoinColumns()) {
- result = pkJoinColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- result = this.attributeOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.associationOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.discriminatorColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.generatorContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** OrmOverrideContainer.Owner implementation **********
-
- /**
- * some common behavior
- */
- protected abstract class OverrideContainerOwner
- implements OrmOverrideContainer.Owner
- {
- public AbstractOrmEntity<?> getTypeMapping() {
- return AbstractOrmEntity.this;
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmEntity.this.getValidationTextRange();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmEntity.this.getOverridableTypeMapping();
- }
-
- /**
- * Use the Java overrides if appropriate, so we bring over any invalid
- * overrides also.
- * @see JavaOverrideContainer#getOverrideNames()
- */
- public Iterable<String> getJavaOverrideNames() {
- JavaEntity javaEntity = this.getJavaOverrideContainerEntity();
- return (javaEntity == null) ? null : this.getOverrideContainer(javaEntity).getOverrideNames();
- }
-
- /**
- * Return the Java entity with the corresponding override container.
- * Return <code>null</code> if not appropriate.
- */
- protected JavaEntity getJavaOverrideContainerEntity() {
- return AbstractOrmEntity.this.getJavaOverrideContainerEntity();
- }
-
- protected abstract JavaOverrideContainer getOverrideContainer(JavaEntity javaEntity);
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? this.getAllOverridableNames_(overriddenTypeMapping) : EmptyIterable.<String>instance();
- }
-
- /**
- * pre-condition: <code>typeMapping</code> is not <code>null</code>
- */
- protected abstract Iterable<String> getAllOverridableNames_(TypeMapping overriddenTypeMapping);
-
- public String getDefaultTableName() {
- return AbstractOrmEntity.this.getPrimaryTableName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return AbstractOrmEntity.this.tableNameIsInvalid(tableName);
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return AbstractOrmEntity.this.resolveDbTable(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return AbstractOrmEntity.this.getAllAssociatedTableNames();
- }
- }
-
-
- // ********** OrmAttributeOverrideContainer.Owner implementation **********
-
- protected class AttributeOverrideContainerOwner
- extends OverrideContainerOwner
- implements OrmAttributeOverrideContainer.Owner
- {
- @Override
- protected JavaOverrideContainer getOverrideContainer(JavaEntity javaEntity) {
- return javaEntity.getAttributeOverrideContainer();
- }
-
- @Override
- protected Iterable<String> getAllOverridableNames_(TypeMapping overriddenTypeMapping) {
- return new FilteringIterable<String>(overriddenTypeMapping.getAllOverridableAttributeNames()) {
- @Override
- protected boolean accept(String attributeName) {
- return ! AttributeOverrideContainerOwner.this.getTypeMapping().attributeIsDerivedId(attributeName);
- }
- };
- }
-
- public EList<XmlAttributeOverride> getXmlOverrides() {
- return AbstractOrmEntity.this.xmlTypeMapping.getAttributeOverrides();
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- public ReadOnlyColumn resolveOverriddenColumn(String attributeName) {
- JavaEntity javaEntity = this.getJavaOverrideContainerEntity();
- return (javaEntity != null) ?
- javaEntity.getAttributeOverrideContainer().getOverrideColumn(attributeName) :
- AbstractOrmEntity.this.resolveOverriddenColumnForAttributeOverride(attributeName);
- }
- }
-
-
- // ********** OrmAssociationOverrideContainer.Owner implementation **********
-
- protected class AssociationOverrideContainerOwner
- extends OverrideContainerOwner
- implements OrmAssociationOverrideContainer2_0.Owner
- {
- @Override
- protected JavaOverrideContainer getOverrideContainer(JavaEntity javaEntity) {
- return javaEntity.getAssociationOverrideContainer();
- }
-
- @Override
- protected Iterable<String> getAllOverridableNames_(TypeMapping typeMapping) {
- return typeMapping.getAllOverridableAssociationNames();
- }
-
- public EList<XmlAssociationOverride> getXmlOverrides() {
- return AbstractOrmEntity.this.xmlTypeMapping.getAssociationOverrides();
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship(String attributeName) {
- JavaEntity javaEntity = this.getJavaOverrideContainerEntity();
- return (javaEntity != null) ?
- javaEntity.getAssociationOverrideContainer().getOverrideRelationship(attributeName) :
- AbstractOrmEntity.this.resolveOverriddenRelationshipForAssociationOverride(attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t, textRangeResolver);
- }
- }
-
-
- // ********** OrmNamedColumn.Owner implementation **********
-
- /**
- * some common behavior
- */
- protected abstract class NamedColumnOwner
- implements OrmReadOnlyNamedColumn.Owner
- {
- public String getDefaultTableName() {
- return AbstractOrmEntity.this.getPrimaryTableName();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return AbstractOrmEntity.this.resolveDbTable(tableName);
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmEntity.this.getValidationTextRange();
- }
- }
-
-
- // ********** OrmBaseJoinColumn.Owner implementation **********
-
- protected class PrimaryKeyJoinColumnOwner
- extends NamedColumnOwner
- implements OrmReadOnlyBaseJoinColumn.Owner
- {
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- Entity parentEntity = AbstractOrmEntity.this.getParentEntity();
- return (parentEntity == null) ? null : parentEntity.getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return AbstractOrmEntity.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- if (this.getJoinColumnsSize() != 1) {
- return null;
- }
- Entity parentEntity = AbstractOrmEntity.this.getParentEntity();
- return (parentEntity == null) ? AbstractOrmEntity.this.getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-
-
- // ********** OrmDiscriminatorColumn.Owner implementation **********
-
- protected class DiscriminatorColumnOwner
- extends NamedColumnOwner
- implements OrmDiscriminatorColumn.Owner
- {
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- if (this.getXmlColumn() == null) {
- JavaEntity javaEntity = this.getJavaEntityForDefaults();
- if (javaEntity != null) {
- String name = javaEntity.getDiscriminatorColumn().getSpecifiedName();
- if (name != null) {
- return name;
- }
- }
- }
- return AbstractOrmEntity.this.isDescendant() ?
- this.getRootDiscriminatorColumn().getName() :
- this.isTablePerClass() ? null : DiscriminatorColumn.DEFAULT_NAME;
- }
-
- public int getDefaultLength() {
- if (this.getXmlColumn() == null) {
- JavaEntity javaEntity = this.getJavaEntityForDefaults();
- if (javaEntity != null) {
- Integer length = javaEntity.getDiscriminatorColumn().getSpecifiedLength();
- if (length != null) {
- return length.intValue();
- }
- }
- }
- return AbstractOrmEntity.this.isDescendant() ?
- this.getRootDiscriminatorColumn().getLength() :
- this.isTablePerClass() ? 0 : ReadOnlyNamedDiscriminatorColumn.DEFAULT_LENGTH;
- }
-
- public DiscriminatorType getDefaultDiscriminatorType() {
- if (this.getXmlColumn() == null) {
- JavaEntity javaEntity = this.getJavaEntityForDefaults();
- if (javaEntity != null) {
- DiscriminatorType dt = javaEntity.getDiscriminatorColumn().getSpecifiedDiscriminatorType();
- if (dt != null) {
- return dt;
- }
- }
- }
- return AbstractOrmEntity.this.isDescendant() ?
- this.getRootDiscriminatorColumn().getDiscriminatorType() :
- this.isTablePerClass() ? null : ReadOnlyNamedDiscriminatorColumn.DEFAULT_DISCRIMINATOR_TYPE;
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new DiscriminatorColumnValidator(column, textRangeResolver);
- }
-
- public XmlDiscriminatorColumn getXmlColumn() {
- return this.getXmlEntity().getDiscriminatorColumn();
- }
-
- public XmlDiscriminatorColumn buildXmlColumn() {
- XmlDiscriminatorColumn xmlColumn = OrmFactory.eINSTANCE.createXmlDiscriminatorColumn();
- this.getXmlEntity().setDiscriminatorColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.getXmlEntity().setDiscriminatorColumn(null);
- }
-
- protected XmlEntity getXmlEntity() {
- return AbstractOrmEntity.this.getXmlTypeMapping();
- }
-
- protected DiscriminatorColumn getRootDiscriminatorColumn() {
- return AbstractOrmEntity.this.rootEntity.getDiscriminatorColumn();
- }
-
- protected boolean isMetadataComplete() {
- return AbstractOrmEntity.this.isMetadataComplete();
- }
-
- protected boolean isTablePerClass() {
- return AbstractOrmEntity.this.isTablePerClass();
- }
-
- protected JavaEntity getJavaEntityForDefaults() {
- return AbstractOrmEntity.this.getJavaTypeMappingForDefaults();
- }
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmGenerator.java
deleted file mode 100644
index cd00f7f11f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmGenerator.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGenerator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> sequence or table generator
- */
-public abstract class AbstractOrmGenerator<X extends XmlGenerator>
- extends AbstractOrmXmlContextNode
- implements OrmGenerator
-{
- protected final X xmlGenerator;
-
- protected String name;
-
- protected Integer specifiedInitialValue;
- protected int defaultInitialValue;
-
- protected Integer specifiedAllocationSize;
- protected int defaultAllocationSize;
-
-
- protected AbstractOrmGenerator(XmlContextNode parent, X xmlGenerator) {
- super(parent);
- this.xmlGenerator = xmlGenerator;
- this.name = xmlGenerator.getName();
- this.specifiedInitialValue = xmlGenerator.getInitialValue();
- this.specifiedAllocationSize = xmlGenerator.getAllocationSize();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.xmlGenerator.getName());
- this.setSpecifiedInitialValue_(this.xmlGenerator.getInitialValue());
- this.setSpecifiedAllocationSize_(this.xmlGenerator.getAllocationSize());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultInitialValue(this.buildDefaultInitialValue());
- this.setDefaultAllocationSize(this.buildDefaultAllocationSize());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlGenerator.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** initial value **********
-
- public int getInitialValue() {
- return (this.specifiedInitialValue != null) ? this.specifiedInitialValue.intValue() : this.defaultInitialValue;
- }
-
- public Integer getSpecifiedInitialValue() {
- return this.specifiedInitialValue;
- }
-
- public void setSpecifiedInitialValue(Integer specifiedInitialValue) {
- this.setSpecifiedInitialValue_(specifiedInitialValue);
- this.xmlGenerator.setInitialValue(specifiedInitialValue);
- }
-
- protected void setSpecifiedInitialValue_(Integer specifiedInitialValue) {
- Integer old = this.specifiedInitialValue;
- this.specifiedInitialValue = specifiedInitialValue;
- this.firePropertyChanged(SPECIFIED_INITIAL_VALUE_PROPERTY, old, specifiedInitialValue);
- }
-
- public int getDefaultInitialValue() {
- return this.defaultInitialValue;
- }
-
- protected void setDefaultInitialValue(int defaultInitialValue) {
- int old = this.defaultInitialValue;
- this.defaultInitialValue = defaultInitialValue;
- this.firePropertyChanged(DEFAULT_INITIAL_VALUE_PROPERTY, old, defaultInitialValue);
- }
-
- protected abstract int buildDefaultInitialValue();
-
-
- // ********** allocation size **********
-
- public int getAllocationSize() {
- return (this.specifiedAllocationSize != null) ? this.specifiedAllocationSize.intValue() : this.defaultAllocationSize;
- }
-
- public Integer getSpecifiedAllocationSize() {
- return this.specifiedAllocationSize;
- }
-
- public void setSpecifiedAllocationSize(Integer specifiedAllocationSize) {
- this.setSpecifiedAllocationSize_(specifiedAllocationSize);
- this.xmlGenerator.setAllocationSize(specifiedAllocationSize);
- }
-
- protected void setSpecifiedAllocationSize_(Integer specifiedAllocationSize) {
- Integer old = this.specifiedAllocationSize;
- this.specifiedAllocationSize = specifiedAllocationSize;
- this.firePropertyChanged(SPECIFIED_ALLOCATION_SIZE_PROPERTY, old, specifiedAllocationSize);
- }
-
- public int getDefaultAllocationSize() {
- return this.defaultAllocationSize;
- }
-
- protected void setDefaultAllocationSize(int defaultAllocationSize) {
- int old = this.defaultAllocationSize;
- this.defaultAllocationSize = defaultAllocationSize;
- this.firePropertyChanged(DEFAULT_ALLOCATION_SIZE_PROPERTY, old, defaultAllocationSize);
- }
-
- protected int buildDefaultAllocationSize() {
- return DEFAULT_ALLOCATION_SIZE;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (StringTools.stringIsEmpty(this.name)){
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.GENERATOR_NAME_UNDEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getNameTextRange()
- )
- );
- }
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlGenerator.getValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.xmlGenerator.getNameTextRange());
- }
-
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return (this != node) &&
- (this.getType() == node.getType()) &&
- this.isEquivalentTo((Generator)node);
- }
-
- protected boolean isEquivalentTo(Generator generator) {
- return Tools.valuesAreEqual(this.name, generator.getName()) &&
- Tools.valuesAreEqual(this.specifiedAllocationSize, generator.getSpecifiedAllocationSize()) &&
- Tools.valuesAreEqual(this.specifiedInitialValue, generator.getSpecifiedInitialValue());
- }
-
- // ************* completion proposals *************
- /**
- * called if the database is connected:
- * table, schema, catalog, pkColumnName, valueColumnName
- */
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.schemaTouches(pos)) {
- return this.getCandidateSchemata();
- }
- if (this.catalogTouches(pos)) {
- return this.getCandidateCatalogs();
- }
- return null;
- }
-
- // ********** content assist: schema
-
- protected boolean schemaTouches(int pos) {
- return this.xmlGenerator.schemaTouches(pos);
- }
-
- protected Iterable<String> getCandidateSchemata() {
- SchemaContainer schemaContainer = this.getDbSchemaContainer();
- return (schemaContainer != null) ? schemaContainer.getSortedSchemaIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** content assist: catalog
-
- protected boolean catalogTouches(int pos) {
- return this.xmlGenerator.catalogTouches(pos);
- }
-
- protected Iterable<String> getCandidateCatalogs() {
- Database db = this.getDatabase();
- return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** database stuff **********
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- protected abstract String getSchema();
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- protected abstract String getCatalog();
-
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaGenerator javaGenerator) {
- this.setName(javaGenerator.getName());
- this.setSpecifiedInitialValue(javaGenerator.getSpecifiedInitialValue());
- this.setSpecifiedAllocationSize(javaGenerator.getSpecifiedAllocationSize());
- }
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public X getXmlGenerator() {
- return this.xmlGenerator;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java
deleted file mode 100644
index 4fd92d485b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumnMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratedValue;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.IdMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlId;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> ID mapping
- */
-public abstract class AbstractOrmIdMapping<X extends XmlId>
- extends AbstractOrmAttributeMapping<X>
- implements OrmIdMapping, IdMapping2_0
-{
- protected final OrmColumn column;
-
- protected final OrmGeneratorContainer generatorContainer;
-
- protected OrmGeneratedValue generatedValue;
-
- protected OrmConverter converter; // never null
-
- /* JPA 2.0 - the embedded id may be derived from a relationship */
- protected boolean derived;
-
-
- protected static final OrmConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new OrmConverter.Adapter[] {
- OrmTemporalConverter.BasicAdapter.instance(),
- };
- protected static final Iterable<OrmConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<OrmConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractOrmIdMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.column = this.buildColumn();
- this.generatorContainer = this.buildGeneratorContainer();
- this.generatedValue = this.buildGeneratedValue();
- this.converter = this.buildConverter();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- this.generatorContainer.synchronizeWithResourceModel();
- this.syncGeneratedValue();
- this.syncConverter();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- this.generatorContainer.update();
- if (this.generatedValue != null) {
- this.generatedValue.update();
- }
- this.converter.update();
- this.setDerived(this.buildDerived());
- }
-
-
- // ********** column **********
-
- public OrmColumn getColumn() {
- return this.column;
- }
-
- protected OrmColumn buildColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this);
- }
-
-
- // ********** generator container **********
-
- public OrmGeneratorContainer getGeneratorContainer() {
- return this.generatorContainer;
- }
-
- protected OrmGeneratorContainer buildGeneratorContainer() {
- return this.getContextNodeFactory().buildOrmGeneratorContainer(this, this.xmlAttributeMapping);
- }
-
- @Override
- public Iterable<Generator> getGenerators() {
- return this.generatorContainer.getGenerators();
- }
-
-
- // ********** generated value **********
-
- public OrmGeneratedValue getGeneratedValue() {
- return this.generatedValue;
- }
-
- public OrmGeneratedValue addGeneratedValue() {
- if (this.generatedValue != null) {
- throw new IllegalStateException("generated value already exists: " + this.generatedValue); //$NON-NLS-1$
- }
- XmlGeneratedValue xmlGeneratedValue = this.buildXmlGeneratedValue();
- OrmGeneratedValue value = this.buildGeneratedValue(xmlGeneratedValue);
- this.setGeneratedValue(value);
- this.xmlAttributeMapping.setGeneratedValue(xmlGeneratedValue);
- return value;
- }
-
- protected XmlGeneratedValue buildXmlGeneratedValue() {
- return OrmFactory.eINSTANCE.createXmlGeneratedValue();
- }
-
- public void removeGeneratedValue() {
- if (this.generatedValue == null) {
- throw new IllegalStateException("generated value does not exist"); //$NON-NLS-1$
- }
- this.setGeneratedValue(null);
- this.xmlAttributeMapping.setGeneratedValue(null);
- }
-
- protected void setGeneratedValue(OrmGeneratedValue value) {
- OrmGeneratedValue old = this.generatedValue;
- this.generatedValue = value;
- this.firePropertyChanged(GENERATED_VALUE_PROPERTY, old, value);
- }
-
- protected OrmGeneratedValue buildGeneratedValue() {
- XmlGeneratedValue xmlGeneratedValue = this.xmlAttributeMapping.getGeneratedValue();
- return (xmlGeneratedValue == null) ? null : this.buildGeneratedValue(xmlGeneratedValue);
- }
-
- protected OrmGeneratedValue buildGeneratedValue(XmlGeneratedValue xmlGeneratedValue) {
- return this.getContextNodeFactory().buildOrmGeneratedValue(this, xmlGeneratedValue);
- }
-
- protected void syncGeneratedValue() {
- XmlGeneratedValue xmlGeneratedValue = this.xmlAttributeMapping.getGeneratedValue();
- if (xmlGeneratedValue == null) {
- if (this.generatedValue != null) {
- this.setGeneratedValue(null);
- }
- } else {
- if ((this.generatedValue != null) && (this.generatedValue.getXmlGeneratedValue() == xmlGeneratedValue)) {
- this.generatedValue.synchronizeWithResourceModel();
- } else {
- this.setGeneratedValue(this.buildGeneratedValue(xmlGeneratedValue));
- }
- }
- }
-
-
- // ********** converter **********
-
- public OrmConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- // note: we may also clear the XML value we want;
- // but if we leave it, the resulting sync will screw things up...
- this.clearXmlConverterValues();
- OrmConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.setConverter_(this.buildConverter(converterAdapter));
- this.converter.initialize();
- }
- }
-
- protected OrmConverter buildConverter(OrmConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getContextNodeFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(OrmConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- protected void clearXmlConverterValues() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- adapter.clearXmlValue(this.xmlAttributeMapping);
- }
- }
-
- protected OrmConverter buildConverter() {
- OrmXmlContextNodeFactory factory = this.getContextNodeFactory();
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- OrmConverter ormConverter = adapter.buildConverter(this, factory);
- if (ormConverter != null) {
- return ormConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- OrmConverter.Adapter adapter = this.getXmlConverterAdapter();
- if (adapter == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- if (this.converter.getType() == adapter.getConverterType()) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildNewConverter(this, this.getContextNodeFactory()));
- }
- }
- }
-
- /**
- * Return the first adapter whose converter value is set in the XML mapping.
- * Return <code>null</code> if there are no converter values in the XML.
- */
- protected OrmConverter.Adapter getXmlConverterAdapter() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.isActive(this.xmlAttributeMapping)) {
- return adapter;
- }
- }
- return null;
- }
-
- protected OrmConverter buildNullConverter() {
- return new NullOrmConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected OrmConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<OrmConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** derived **********
-
- public boolean isDerived() {
- return this.derived;
- }
-
- protected void setDerived(boolean derived) {
- boolean old = this.derived;
- this.derived = derived;
- this.firePropertyChanged(DERIVED_PROPERTY, old, derived);
- }
-
- protected boolean buildDerived() {
- return this.isJpa2_0Compatible() && this.buildDerived_();
- }
-
- protected boolean buildDerived_() {
- return this.getTypeMapping().attributeIsDerivedId(this.name);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 0;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmIdMapping(this);
- }
-
- @Override
- protected void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
- super.initializeFromOrmColumnMapping(oldMapping);
- this.column.initializeFrom(oldMapping.getColumn());
- }
-
- @Override
- public String getPrimaryKeyColumnName() {
- return this.column.getName();
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getIds().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getIds().remove(this.xmlAttributeMapping);
- }
-
-
- // ********** OrmColumn.Owner implementation **********
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return (this.derived && ! this.isColumnSpecified()) ? null : this.name;
- }
-
- public String getDefaultTableName() {
- return (this.derived && ! this.isColumnSpecified()) ? null : this.getTypeMapping().getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public XmlColumn getXmlColumn() {
- return this.xmlAttributeMapping.getColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.xmlAttributeMapping.setColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.xmlAttributeMapping.setColumn(null);
- }
-
- protected boolean isColumnSpecified() {
- return this.getXmlColumn() != null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- // JPA 2.0: If the column is specified or if the ID is not mapped by a relationship,
- // the column is validated.
- // JPA 1.0: The column is always be validated, since the ID is never mapped by a
- // relationship.
- if (this.isColumnSpecified() || ! this.derived) {
- this.column.validate(messages, reporter);
- }
-
- // JPA 2.0: If the column is specified and the ID is mapped by a relationship,
- // we have an error.
- // JPA 1.0: The ID cannot be mapped by a relationship.
- if (this.isColumnSpecified() && this.derived) {
- messages.add(this.buildColumnSpecifiedAndDerivedMessage());
- }
-
- if (this.generatedValue != null) {
- this.generatedValue.validate(messages, reporter);
- }
- this.generatorContainer.validate(messages, reporter);
- this.converter.validate(messages, reporter);
- }
-
- protected IMessage buildColumnSpecifiedAndDerivedMessage() {
- return this.buildMessage(
- JpaValidationMessages.ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED,
- EMPTY_STRING_ARRAY,
- this.column.getValidationTextRange()
- );
- }
-
- protected IMessage buildMessage(String msgID, String[] parms, TextRange textRange) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- ArrayTools.add(parms, 0, this.buildAttributeDescription()),
- this,
- textRange
- );
- }
-
- protected String buildAttributeDescription() {
- return NLS.bind(this.getAttributeDescriptionTemplate(), this.getPersistentAttribute().getName());
- }
-
- protected String getAttributeDescriptionTemplate() {
- return JpaValidationDescriptionMessages.ATTRIBUTE_DESC;
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.generatorContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.generatedValue != null) {
- result = this.generatedValue.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- result = this.converter.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 63ef3ad811..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractOrmJoinColumnRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmJoinColumnRelationshipStrategy
-{
- protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected OrmJoinColumn defaultJoinColumn;
-
-
- protected AbstractOrmJoinColumnRelationshipStrategy(OrmJoinColumnRelationship parent) {
- super(parent);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(getSpecifiedJoinColumns());
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** XML join column container **********
-
- protected XmlJoinColumnContainer getXmlJoinColumnContainer() {
- return this.getRelationship().getXmlContainer();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<OrmJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<OrmJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public OrmJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- public OrmJoinColumn addSpecifiedJoinColumn() {
- return this.addSpecifiedJoinColumn(this.getSpecifiedJoinColumnsSize());
- }
-
- public OrmJoinColumn addSpecifiedJoinColumn(int index) {
- XmlJoinColumn xmlJoinColumn = this.buildXmlJoinColumn();
- OrmJoinColumn joinColumn = this.specifiedJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- this.getXmlJoinColumnContainer().getJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- protected XmlJoinColumn buildXmlJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlJoinColumn();
- }
-
- public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedJoinColumn(this.specifiedJoinColumnContainer.indexOfContextElement((OrmJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedJoinColumn(int index) {
- this.specifiedJoinColumnContainer.removeContextElement(index);
- this.getXmlJoinColumnContainer().getJoinColumns().remove(index);
- }
-
- public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlJoinColumnContainer().getJoinColumns().move(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJoinColumn> getXmlJoinColumns() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlJoinColumn>(this.getXmlJoinColumnContainer().getJoinColumns());
- }
-
- protected ContextListContainer<OrmJoinColumn, XmlJoinColumn> buildSpecifiedJoinColumnContainer() {
- SpecifiedJoinColumnContainer container = new SpecifiedJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<OrmJoinColumn, XmlJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmJoinColumn buildContextElement(XmlJoinColumn resourceElement) {
- return AbstractOrmJoinColumnRelationshipStrategy.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlJoinColumn> getResourceElements() {
- return AbstractOrmJoinColumnRelationshipStrategy.this.getXmlJoinColumns();
- }
- @Override
- protected XmlJoinColumn getResourceElement(OrmJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected abstract OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner();
-
-
- // ********** default join column **********
-
- public OrmJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(OrmJoinColumn joinColumn) {
- OrmJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<OrmJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<OrmJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- if (this.buildsDefaultJoinColumn()) {
- if (this.defaultJoinColumn == null) {
- this.setDefaultJoinColumn(this.buildJoinColumn(null));
- } else {
- this.defaultJoinColumn.update();
- }
- } else {
- this.setDefaultJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultJoinColumn() {
- return ! this.hasSpecifiedJoinColumns() &&
- this.getRelationship().mayHaveDefaultJoinColumn();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmJoinColumnRelationship getParent() {
- return (OrmJoinColumnRelationship) super.getParent();
- }
-
- public OrmJoinColumnRelationship getRelationship() {
- return this.getParent();
- }
-
- protected OrmJoinColumn buildJoinColumn(XmlJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmJoinColumn(this, this.joinColumnOwner, xmlJoinColumn);
- }
-
- public void initializeFrom(ReadOnlyJoinColumnRelationshipStrategy oldStrategy) {
- for (ReadOnlyJoinColumn joinColumn : oldStrategy.getSpecifiedJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFrom(joinColumn);
- }
- }
-
- public void initializeFromVirtual(ReadOnlyJoinColumnRelationshipStrategy virtualStrategy) {
- for (ReadOnlyJoinColumn joinColumn : virtualStrategy.getJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFromVirtual(joinColumn);
- }
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public String getTableName() {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping == null) ? null : typeMapping.getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping == null) ? null : typeMapping.resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping != null) && typeMapping.tableNameIsInvalid(tableName);
- }
-
- // subclasses like this to be public
- public Table getReferencedColumnDbTable() {
- TypeMapping relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- protected Iterable<String> getCandidateTableNames() {
- TypeMapping typeMapping = this.getRelationshipSource();
- return (typeMapping != null) ? typeMapping.getAllAssociatedTableNames() : EmptyIterable.<String>instance();
- }
-
- public void addStrategy() {
- if (this.getSpecifiedJoinColumnsSize() == 0) {
- this.addSpecifiedJoinColumn();
- }
- }
-
- public void removeStrategy() {
- for (int i = this.getSpecifiedJoinColumnsSize(); i-- > 0; ) {
- this.removeSpecifiedJoinColumn(i);
- }
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- for (OrmJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter);
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmJoinColumn joinColumn : this.getJoinColumns()) {
- result = joinColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinTableRelationshipStrategy.java
deleted file mode 100644
index bbd2c0b3e0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractOrmJoinTableRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmJoinTableRelationshipStrategy, ReadOnlyTable.Owner
-{
- protected OrmJoinTable joinTable;
-
-
- protected AbstractOrmJoinTableRelationshipStrategy(OrmJoinTableRelationship parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- if (this.joinTable != null) {
- this.joinTable.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJoinTable();
- }
-
-
- // ********** join table **********
-
- public OrmJoinTable getJoinTable() {
- return this.joinTable;
- }
-
- protected void setJoinTable(OrmJoinTable joinTable) {
- OrmJoinTable old = this.joinTable;
- this.joinTable = joinTable;
- this.firePropertyChanged(JOIN_TABLE_PROPERTY, old, joinTable);
- }
-
- protected void updateJoinTable() {
- if (this.buildsJoinTable()) {
- if (this.joinTable == null) {
- this.setJoinTable(this.buildJoinTable());
- } else {
- this.joinTable.update();
- }
- } else {
- if (this.joinTable != null) {
- this.setJoinTable(null);
- }
- }
- }
-
- /**
- * The strategy can have a join table if either the XML table is present
- * or the [mapping] relationship supports a default join table.
- */
- protected boolean buildsJoinTable() {
- return (this.getXmlJoinTable() != null) ||
- this.getRelationship().mayHaveDefaultJoinTable();
- }
-
- protected OrmJoinTable buildJoinTable() {
- return this.getContextNodeFactory().buildOrmJoinTable(this, this);
- }
-
-
- // ********** XML join table **********
-
- public XmlJoinTable getXmlJoinTable() {
- return this.getXmlJoinTableContainer().getJoinTable();
- }
-
- public XmlJoinTable buildXmlJoinTable() {
- XmlJoinTable xmlJoinTable = OrmFactory.eINSTANCE.createXmlJoinTable();
- this.getXmlJoinTableContainer().setJoinTable(xmlJoinTable);
- return xmlJoinTable;
- }
-
- public void removeXmlJoinTable() {
- this.getXmlJoinTableContainer().setJoinTable(null);
- }
-
- protected XmlJoinTableContainer getXmlJoinTableContainer() {
- return this.getRelationship().getXmlContainer();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter);
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.joinTable != null) {
- result = this.joinTable.getXmlCompletionProposals(pos);
- }
- return result;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmJoinTableRelationship getParent() {
- return (OrmJoinTableRelationship) super.getParent();
- }
-
- public OrmJoinTableRelationship getRelationship() {
- return this.getParent();
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public void initializeFrom(ReadOnlyJoinTableRelationshipStrategy oldStrategy) {
- ReadOnlyJoinTable oldJoinTable = oldStrategy.getJoinTable();
- if (oldJoinTable != null) {
- this.addStrategy();
- this.joinTable.initializeFrom(oldJoinTable);
- }
- }
-
- public void initializeFromVirtual(ReadOnlyJoinTableRelationshipStrategy virtualStrategy) {
- ReadOnlyJoinTable oldJoinTable = virtualStrategy.getJoinTable();
- if (oldJoinTable != null) {
- this.addStrategy();
- this.joinTable.initializeFromVirtual(oldJoinTable);
- }
- }
-
- public String getTableName() {
- return (this.joinTable == null) ? null : this.joinTable.getName();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return (this.joinTable == null) ? null : this.joinTable.getDbTable();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getTableName(), tableName);
- }
-
- public String getColumnTableNotValidDescription() {
- return JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE;
- }
-
- public String getJoinTableDefaultName() {
- return MappingTools.buildJoinTableDefaultName(this.getRelationship());
- }
-
- public void addStrategy() {
- if (this.joinTable == null) {
- this.setJoinTable(this.buildJoinTable());
- this.buildXmlJoinTable();
- }
- }
-
- public void removeStrategy() {
- if (this.joinTable != null) {
- this.setJoinTable(null);
- this.removeXmlJoinTable();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToManyMapping.java
deleted file mode 100644
index e131cef90a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToManyMapping.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToManyRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToManyMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-
-public abstract class AbstractOrmManyToManyMapping<X extends XmlManyToMany>
- extends AbstractOrmMultiRelationshipMapping<X>
- implements OrmManyToManyMapping2_0
-{
- protected AbstractOrmManyToManyMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- }
-
-
- // ********** relationship **********
-
- @Override
- public OrmManyToManyRelationship getRelationship() {
- return (OrmManyToManyRelationship) super.getRelationship();
- }
-
- @Override
- protected OrmMappingRelationship buildRelationship() {
- return new GenericOrmManyToManyRelationship(this);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 70;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmManyToManyMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getManyToManys().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getManyToManys().remove(this.xmlAttributeMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToOneMapping.java
deleted file mode 100644
index d5927bd21d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmManyToOneMapping.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToOneMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-
-/**
- * <code>orm.xml</code> 1:1 mapping
- */
-public abstract class AbstractOrmManyToOneMapping<X extends XmlManyToOne>
- extends AbstractOrmSingleRelationshipMapping<X>
- implements OrmManyToOneMapping2_0
-{
- protected AbstractOrmManyToOneMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- }
-
-
- // ********** relationship **********
-
- @Override
- protected OrmManyToOneRelationship2_0 buildRelationship() {
- return new GenericOrmManyToOneRelationship(this);
- }
-
- @Override
- public OrmManyToOneRelationship2_0 getRelationship() {
- return (OrmManyToOneRelationship2_0) super.getRelationship();
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 40;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmManyToOneMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getManyToOnes().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getManyToOnes().remove(this.xmlAttributeMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
deleted file mode 100644
index 94da3f2d40..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdClassReference;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> mapped superclass
- */
-public abstract class AbstractOrmMappedSuperclass<X extends XmlMappedSuperclass>
- extends AbstractOrmTypeMapping<X>
- implements OrmMappedSuperclass, OrmIdClassReference.Owner
-{
- protected final OrmIdClassReference idClassReference;
-
-
- protected AbstractOrmMappedSuperclass(OrmPersistentType parent, X xmlMappedSuperclass) {
- super(parent, xmlMappedSuperclass);
- this.idClassReference = this.buildIdClassReference();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.idClassReference.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.idClassReference.update();
- }
-
-
- // ********** key **********
-
- public String getKey() {
- return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
-
- // ********** id class **********
-
- public OrmIdClassReference getIdClassReference() {
- return this.idClassReference;
- }
-
- protected OrmIdClassReference buildIdClassReference() {
- return new GenericOrmIdClassReference(this, this);
- }
-
- public JavaPersistentType getIdClass() {
- return this.idClassReference.getIdClass();
- }
-
- public XmlIdClassContainer getXmlIdClassContainer() {
- return this.getXmlTypeMapping();
- }
-
- public JavaIdClassReference getJavaIdClassReferenceForDefaults() {
- JavaMappedSuperclass javaMappedSuperclass = this.getJavaTypeMappingForDefaults();
- return (javaMappedSuperclass == null) ? null : javaMappedSuperclass.getIdClassReference();
- }
-
-
- // ********** entity mappings **********
-
- public int getXmlSequence() {
- return 0;
- }
-
- public void addXmlTypeMappingTo(XmlEntityMappings entityMappings) {
- entityMappings.getMappedSuperclasses().add(this.xmlTypeMapping);
- }
-
- public void removeXmlTypeMappingFrom(XmlEntityMappings entityMappings) {
- entityMappings.getMappedSuperclasses().remove(this.xmlTypeMapping);
- }
-
-
- // ********** Java **********
-
- @Override
- public JavaMappedSuperclass getJavaTypeMapping() {
- return (JavaMappedSuperclass) super.getJavaTypeMapping();
- }
-
- @Override
- public JavaMappedSuperclass getJavaTypeMappingForDefaults() {
- return (JavaMappedSuperclass) super.getJavaTypeMappingForDefaults();
- }
-
-
- // ********** tables **********
-
- public Iterable<ReadOnlyTable> getAssociatedTables() {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReadOnlyTable> getAllAssociatedTables() {
- return EmptyIterable.instance();
- }
-
- public Iterable<String> getAllAssociatedTableNames() {
- return EmptyIterable.instance();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-
-
- // ********** queries **********
-
- public Iterable<Query> getQueries() {
- // the orm.xml mapped superclass does NOT have queries(!)
- return EmptyIterable.instance();
- }
-
-
- // ********** refactoring **********
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenameTypeEdits(originalType, newName),
- this.createIdClassReplaceTypeEdits(originalType, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createIdClassReplaceTypeEdits(IType originalType, String newName) {
- return this.idClassReference.createRenameTypeEdits(originalType, newName);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- super.createMoveTypeEdits(originalType, newPackage),
- this.createIdClassMoveTypeEdits(originalType, newPackage)
- );
- }
-
- protected Iterable<ReplaceEdit> createIdClassMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return this.idClassReference.createMoveTypeEdits(originalType, newPackage);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenamePackageEdits(originalPackage, newName),
- this.createIdClassRenamePackageEdits(originalPackage, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createIdClassRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return this.idClassReference.createRenamePackageEdits(originalPackage, newName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validatePrimaryKey(messages, reporter);
- this.idClassReference.validate(messages, reporter);
- }
-
- @Override
- public boolean validatesAgainstDatabase() {
- return false;
- }
-
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
- this.buildPrimaryKeyValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildPrimaryKeyValidator() {
- return new GenericMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver());
- // TODO - JPA 2.0 validation
- }
-
- @Override
- protected PrimaryKeyTextRangeResolver buildTextRangeResolver() {
- return new OrmMappedSuperclassTextRangeResolver(this);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappingRelationship.java
deleted file mode 100644
index b0387bc002..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappingRelationship.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping;
-
-/**
- * <strong>NB:</strong> Subclasses will want to set the {@link #strategy} at the
- * end of their constructors; otherwise, it will be <code>null</code> until it
- * is set during {@link #update()}.
- */
-public abstract class AbstractOrmMappingRelationship<M extends OrmRelationshipMapping>
- extends AbstractOrmXmlContextNode
- implements OrmMappingRelationship
-{
- protected OrmMappingRelationshipStrategy2_0 strategy;
-
-
- protected AbstractOrmMappingRelationship(M parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateStrategy();
- }
-
-
- // ********** strategy **********
-
- public OrmMappingRelationshipStrategy2_0 getStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(OrmMappingRelationshipStrategy2_0 strategy) {
- RelationshipStrategy old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- protected abstract OrmMappingRelationshipStrategy2_0 buildStrategy();
-
- /**
- * This is called by subclasses when the various supported strategies are
- * added or removed; allowing the strategy to be set synchronously. (?)
- */
- protected void updateStrategy() {
- this.setStrategy(this.buildStrategy());
- }
-
-
- // ********** conversions **********
-
- public void initializeFrom(ReadOnlyRelationship oldRelationship) {
- oldRelationship.initializeOn(this);
- }
-
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- // NOP
- }
-
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- // NOP
- }
-
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- // NOP
- }
-
-
- // ********** misc **********
-
- @Override
- @SuppressWarnings("unchecked")
- public M getParent() {
- return (M) super.getParent();
- }
-
- public M getMapping() {
- return this.getParent();
- }
-
- protected AbstractXmlRelationshipMapping getXmlMapping() {
- return this.getMapping().getXmlAttributeMapping();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getMapping().getTypeMapping();
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public boolean isOverridable() {
- return this.strategy.isOverridable();
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- public boolean isTargetForeignKey() {
- return false;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getMapping().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
deleted file mode 100644
index 8cc63ff444..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
+++ /dev/null
@@ -1,1297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMultiRelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOrderable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.RelationshipStrategyTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.MapKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapKeyEnumeratedConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapKeyTemporalConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.MapKey;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> multi-relationship (1:m, m:m) mapping
- */
-public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlMultiRelationshipMapping>
- extends AbstractOrmRelationshipMapping<X>
- implements OrmMultiRelationshipMapping, OrmCollectionMapping2_0
-{
- protected final OrmOrderable orderable;
-
- protected String specifiedMapKey;
- protected boolean noMapKey = false;
- protected boolean pkMapKey = false;
- protected boolean customMapKey = false;
-
- protected String specifiedMapKeyClass;
- protected String defaultMapKeyClass;
- protected String fullyQualifiedMapKeyClass;
-
- protected Type valueType;
- protected Type keyType;
-
- protected final OrmColumn mapKeyColumn;
- protected OrmConverter mapKeyConverter; // map key converter - never null
-
- protected final OrmAttributeOverrideContainer mapKeyAttributeOverrideContainer;
-
- protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedMapKeyJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
-
- protected OrmJoinColumn defaultMapKeyJoinColumn;
-
-
- protected static final OrmConverter.Adapter[] MAP_KEY_CONVERTER_ADAPTER_ARRAY = new OrmConverter.Adapter[] {
- OrmMapKeyEnumeratedConverter2_0.Adapter.instance(),
- OrmMapKeyTemporalConverter2_0.Adapter.instance()
- };
- protected static final Iterable<OrmConverter.Adapter> MAP_KEY_CONVERTER_ADAPTERS = new ArrayIterable<OrmConverter.Adapter>(MAP_KEY_CONVERTER_ADAPTER_ARRAY);
-
- protected AbstractOrmMultiRelationshipMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.orderable = this.buildOrderable();
-
- this.specifiedMapKey = this.buildSpecifiedMapKey();
- this.noMapKey = this.buildNoMapKey();
- this.pkMapKey = this.buildPkMapKey();
- this.customMapKey = this.buildCustomMapKey();
-
- this.specifiedMapKeyClass = this.buildSpecifiedMapKeyClass();
-
- this.mapKeyColumn = this.buildMapKeyColumn();
- this.mapKeyConverter = this.buildMapKeyConverter();
- this.mapKeyAttributeOverrideContainer = this.buildMapKeyAttributeOverrideContainer();
- this.mapKeyJoinColumnOwner = this.buildMapKeyJoinColumnOwner();
- this.specifiedMapKeyJoinColumnContainer = this.buildSpecifiedMapKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.orderable.synchronizeWithResourceModel();
-
- this.setSpecifiedMapKey_(this.buildSpecifiedMapKey());
- this.setNoMapKey_(this.buildNoMapKey());
- this.setPkMapKey_(this.buildPkMapKey());
- this.setCustomMapKey_(this.buildCustomMapKey());
-
- this.setSpecifiedMapKeyClass_(this.buildSpecifiedMapKeyClass());
-
- this.mapKeyColumn.synchronizeWithResourceModel();
- this.syncMapKeyConverter();
-
- this.mapKeyAttributeOverrideContainer.synchronizeWithResourceModel();
- this.syncSpecifiedMapKeyJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
-
- this.orderable.update();
-
- this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
- this.setFullyQualifiedMapKeyClass(this.buildFullyQualifiedMapKeyClass());
-
- this.setValueType(this.buildValueType());
- this.setKeyType(this.buildKeyType());
-
- this.mapKeyColumn.update();
- this.mapKeyConverter.update();
-
- this.mapKeyAttributeOverrideContainer.update();
- this.updateNodes(this.getSpecifiedMapKeyJoinColumns());
- this.updateDefaultMapKeyJoinColumn();
- }
-
-
- // ********** orderable **********
-
- public OrmOrderable getOrderable() {
- return this.orderable;
- }
-
- protected OrmOrderable buildOrderable() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmOrderable(this, this.buildOrderableOwner()) :
- this.getContextNodeFactory().buildOrmOrderable(this);
- }
-
- protected Orderable2_0.Owner buildOrderableOwner() {
- return new OrderableOwner();
- }
-
- protected class OrderableOwner
- implements Orderable2_0.Owner
- {
- public String getTableName() {
- return this.getRelationshipStrategy().getTableName();
- }
- public Table resolveDbTable(String tableName) {
- return this.getRelationshipStrategy().resolveDbTable(tableName);
- }
- protected OrmRelationshipStrategy getRelationshipStrategy() {
- return AbstractOrmMultiRelationshipMapping.this.getRelationship().getStrategy();
- }
- }
-
-
- // ********** map key **********
-
- public String getMapKey() {
- if (this.noMapKey) {
- return null;
- }
- if (this.pkMapKey) {
- return this.getTargetEntityIdAttributeName();
- }
- if (this.customMapKey) {
- return this.specifiedMapKey;
- }
- throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
- }
-
-
- // ********** specified map key **********
-
- public String getSpecifiedMapKey() {
- return this.specifiedMapKey;
- }
-
- public void setSpecifiedMapKey(String mapKey) {
- if (mapKey != null) {
- this.setSpecifiedMapKey_(mapKey);
- this.setNoMapKey_(false);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(true);
-
- MapKey xmlMapKey = this.getXmlMapKey();
- if (xmlMapKey == null) {
- xmlMapKey = this.buildXmlMapKey();
- }
- xmlMapKey.setName(mapKey);
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setSpecifiedMapKey_(String mapKey) {
- String old = this.specifiedMapKey;
- this.specifiedMapKey = mapKey;
- this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
- }
-
- protected String buildSpecifiedMapKey() {
- MapKey xmlMapKey = this.getXmlMapKey();
- return (xmlMapKey == null) ? null : xmlMapKey.getName();
- }
-
-
- // ********** no map key **********
-
- public boolean isNoMapKey() {
- return this.noMapKey;
- }
-
- public void setNoMapKey(boolean noMapKey) {
- if (noMapKey) {
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(true);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(false);
-
- if (this.getXmlMapKey() != null) {
- this.removeXmlMapKey();
- }
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setNoMapKey_(boolean noMapKey) {
- boolean old = this.noMapKey;
- this.noMapKey = noMapKey;
- this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);
- }
-
- protected boolean buildNoMapKey() {
- return this.getXmlMapKey() == null;
- }
-
-
- // ********** pk map key **********
-
- public boolean isPkMapKey() {
- return this.pkMapKey;
- }
-
- public void setPkMapKey(boolean pkMapKey) {
- if (pkMapKey) {
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(false);
- this.setPkMapKey_(true);
- this.setCustomMapKey_(false);
-
- MapKey xmlMapKey = this.getXmlMapKey();
- if (xmlMapKey == null) {
- this.buildXmlMapKey();
- } else {
- xmlMapKey.setName(null);
- }
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setPkMapKey_(boolean pkMapKey) {
- boolean old = this.pkMapKey;
- this.pkMapKey = pkMapKey;
- this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
- }
-
- protected boolean buildPkMapKey() {
- MapKey xmlMapKey = this.getXmlMapKey();
- return (xmlMapKey != null) && (xmlMapKey.getName() == null);
- }
-
-
- // ********** custom map key **********
-
- public boolean isCustomMapKey() {
- return this.customMapKey;
- }
-
- public void setCustomMapKey(boolean customMapKey) {
- if (customMapKey) {
- this.setSpecifiedMapKey(""); //$NON-NLS-1$
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setCustomMapKey_(boolean customMapKey) {
- boolean old = this.customMapKey;
- this.customMapKey = customMapKey;
- this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
- }
-
- protected boolean buildCustomMapKey() {
- MapKey xmlMapKey = this.getXmlMapKey();
- return (xmlMapKey != null) && (xmlMapKey.getName() != null);
- }
-
-
- // ********** xml map key **********
-
- protected MapKey getXmlMapKey() {
- return this.xmlAttributeMapping.getMapKey();
- }
-
- protected MapKey buildXmlMapKey() {
- MapKey mapKey = OrmFactory.eINSTANCE.createMapKey();
- this.xmlAttributeMapping.setMapKey(mapKey);
- return mapKey;
- }
-
- protected void removeXmlMapKey() {
- this.xmlAttributeMapping.setMapKey(null);
- }
-
-
- // ********** fully-qualified map key class **********
-
- public String getFullyQualifiedMapKeyClass() {
- return this.fullyQualifiedMapKeyClass;
- }
-
- protected void setFullyQualifiedMapKeyClass(String mapKeyClass) {
- String old = this.fullyQualifiedMapKeyClass;
- this.fullyQualifiedMapKeyClass = mapKeyClass;
- this.firePropertyChanged(FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildFullyQualifiedMapKeyClass() {
- return (this.specifiedMapKeyClass == null) ?
- this.defaultMapKeyClass :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedMapKeyClass);
- }
-
- // ********** map key class **********
-
- public String getMapKeyClass() {
- return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
- }
-
- public String getSpecifiedMapKeyClass() {
- return this.specifiedMapKeyClass;
- }
-
- public void setSpecifiedMapKeyClass(String mapKeyClass) {
- if (this.setSpecifiedMapKeyClass_(mapKeyClass)) {
- XmlClassReference xmlClassRef = this.xmlAttributeMapping.getMapKeyClass();
- if (mapKeyClass == null) {
- if (xmlClassRef != null) {
- this.xmlAttributeMapping.setMapKeyClass(null);
- }
- } else {
- if (xmlClassRef == null) {
- xmlClassRef = this.buildXmlMapKeyClassReference();
- }
- xmlClassRef.setClassName(mapKeyClass);
- }
- }
- }
-
- protected boolean setSpecifiedMapKeyClass_(String mapKeyClass) {
- String old = this.specifiedMapKeyClass;
- this.specifiedMapKeyClass = mapKeyClass;
- return this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected XmlClassReference buildXmlMapKeyClassReference() {
- XmlClassReference mapKeyClass = OrmFactory.eINSTANCE.createXmlClassReference();
- this.xmlAttributeMapping.setMapKeyClass(mapKeyClass);
- return mapKeyClass;
- }
-
- protected String buildSpecifiedMapKeyClass() {
- XmlClassReference xmlClassRef = this.xmlAttributeMapping.getMapKeyClass();
- return (xmlClassRef == null) ? null : xmlClassRef.getClassName();
- }
-
- public String getDefaultMapKeyClass() {
- return this.defaultMapKeyClass;
- }
-
- protected void setDefaultMapKeyClass(String mapKeyClass) {
- String old = this.defaultMapKeyClass;
- this.defaultMapKeyClass = mapKeyClass;
- this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildDefaultMapKeyClass() {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- return (javaAttribute == null) ? null : javaAttribute.getMultiReferenceMapKeyTypeName();
- }
-
- public char getMapKeyClassEnclosingTypeSeparator() {
- return '$';
- }
-
-
- // ********** resolved map key embeddable/entity **********
-
- protected Embeddable getResolvedMapKeyEmbeddable() {
- TypeMapping typeMapping = this.getResolvedMapKeyTypeMapping();
- return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
- }
-
- protected Entity getResolvedMapKeyEntity() {
- TypeMapping typeMapping = this.getResolvedMapKeyTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- protected TypeMapping getResolvedMapKeyTypeMapping() {
- PersistentType resolvedMapKeyType = this.getResolvedMapKeyType();
- return (resolvedMapKeyType == null) ? null : resolvedMapKeyType.getMapping();
- }
-
- protected PersistentType getResolvedMapKeyType() {
- if (this.fullyQualifiedMapKeyClass == null) {
- return null;
- }
- return this.getPersistenceUnit().getPersistentType(this.fullyQualifiedMapKeyClass);
- }
-
-
- // ********** value type **********
-
- public Type getValueType() {
- return this.valueType;
- }
-
- protected void setValueType(Type valueType) {
- Type old = this.valueType;
- this.valueType = valueType;
- this.firePropertyChanged(VALUE_TYPE_PROPERTY, old, valueType);
- }
-
- protected Type buildValueType() {
- if (this.getResolvedTargetEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getResolvedTargetEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getTargetEntity() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
- protected Embeddable getResolvedTargetEmbeddable() {
- TypeMapping typeMapping = this.getResolvedTargetTypeMapping();
- return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
- }
-
-
- // ********** key type **********
-
- public Type getKeyType() {
- return this.keyType;
- }
-
- protected void setKeyType(Type keyType) {
- Type old = this.keyType;
- this.keyType = keyType;
- this.firePropertyChanged(KEY_TYPE_PROPERTY, old, keyType);
- }
-
- protected Type buildKeyType() {
- if (this.getResolvedMapKeyEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getResolvedMapKeyEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getMapKeyClass() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
-
- // ********** map key column **********
-
- public OrmColumn getMapKeyColumn() {
- return this.mapKeyColumn;
- }
-
- protected OrmColumn buildMapKeyColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this.buildMapKeyColumnOwner());
- }
-
- protected OrmColumn.Owner buildMapKeyColumnOwner() {
- return new MapKeyColumnOwner();
- }
-
- protected XmlColumn getXmlMapKeyColumn() {
- return this.xmlAttributeMapping.getMapKeyColumn();
- }
-
- protected XmlColumn buildXmlMapKeyColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.xmlAttributeMapping.setMapKeyColumn(xmlColumn);
- return xmlColumn;
- }
-
- protected void removeXmlMapKeyColumn() {
- this.xmlAttributeMapping.setMapKeyColumn(null);
- }
-
-
- // ********** map key converter **********
-
- public OrmConverter getMapKeyConverter() {
- return this.mapKeyConverter;
- }
-
- public void setMapKeyConverter(Class<? extends Converter> converterType) {
- if (this.mapKeyConverter.getType() != converterType) {
- // note: we may also clear the XML value we want;
- // but if we leave it, the resulting sync will screw things up...
- this.clearXmlMapKeyConverterValues();
- OrmConverter.Adapter converterAdapter = this.getMapKeyConverterAdapter(converterType);
- this.setMapKeyConverter_(this.buildMapKeyConverter(converterAdapter));
- this.mapKeyConverter.initialize();
- }
- }
-
- protected OrmConverter buildMapKeyConverter(OrmConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getContextNodeFactory()) :
- this.buildNullMapKeyConverter();
- }
-
- protected void setMapKeyConverter_(OrmConverter converter) {
- Converter old = this.mapKeyConverter;
- this.mapKeyConverter = converter;
- this.firePropertyChanged(MAP_KEY_CONVERTER_PROPERTY, old, converter);
- }
-
- protected void clearXmlMapKeyConverterValues() {
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- adapter.clearXmlValue(this.xmlAttributeMapping);
- }
- }
-
- protected OrmConverter buildMapKeyConverter() {
- OrmXmlContextNodeFactory factory = this.getContextNodeFactory();
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- OrmConverter ormConverter = adapter.buildConverter(this, factory);
- if (ormConverter != null) {
- return ormConverter;
- }
- }
- return this.buildNullMapKeyConverter();
- }
-
- protected void syncMapKeyConverter() {
- OrmConverter.Adapter adapter = this.getXmlMapKeyConverterAdapter();
- if (adapter == null) {
- if (this.mapKeyConverter.getType() != null) {
- this.setMapKeyConverter_(this.buildNullMapKeyConverter());
- }
- } else {
- if (this.mapKeyConverter.getType() == adapter.getConverterType()) {
- this.mapKeyConverter.synchronizeWithResourceModel();
- } else {
- this.setMapKeyConverter_(adapter.buildNewConverter(this, this.getContextNodeFactory()));
- }
- }
- }
-
- /**
- * Return the first adapter whose converter value is set in the XML mapping.
- * Return <code>null</code> if there are no converter values in the XML.
- */
- protected OrmConverter.Adapter getXmlMapKeyConverterAdapter() {
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter.isActive(this.xmlAttributeMapping)) {
- return adapter;
- }
- }
- return null;
- }
-
- protected OrmConverter buildNullMapKeyConverter() {
- return new NullOrmConverter(this);
- }
-
-
- // ********** map key converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected OrmConverter.Adapter getMapKeyConverterAdapter(Class<? extends Converter> converterType) {
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<OrmConverter.Adapter> getMapKeyConverterAdapters() {
- return MAP_KEY_CONVERTER_ADAPTERS;
- }
-
- // ********** map key attribute override container **********
-
- public OrmAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
- return this.mapKeyAttributeOverrideContainer;
- }
-
- protected OrmAttributeOverrideContainer buildMapKeyAttributeOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAttributeOverrideContainer(this, this.buildMapKeyAttributeOverrideContainerOwner());
- }
-
- protected OrmAttributeOverrideContainer.Owner buildMapKeyAttributeOverrideContainerOwner() {
- return new MapKeyAttributeOverrideContainerOwner();
- }
-
- protected JavaAttributeOverride getSpecifiedJavaMapKeyAttributeOverrideNamed(String attributeName) {
- JavaCollectionMapping2_0 javaCollectionMapping = this.getJavaCollectionMapping();
- return (javaCollectionMapping == null) ? null :
- javaCollectionMapping.getMapKeyAttributeOverrideContainer().getSpecifiedOverrideNamed(attributeName);
- }
-
- protected JavaCollectionMapping2_0 getJavaCollectionMapping() {
- AttributeMapping javaAttributeMapping = this.getJavaAttributeMapping();
- return (javaAttributeMapping.getKey() == this.getKey()) ?
- (JavaCollectionMapping2_0) javaAttributeMapping :
- null;
- }
-
- protected AttributeMapping getJavaAttributeMapping() {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- return (javaAttribute == null) ? null : javaAttribute.getMapping();
- }
- // ********** map key join columns **********
-
- public ListIterable<OrmJoinColumn> getMapKeyJoinColumns() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumns() : this.getDefaultMapKeyJoinColumns();
- }
-
- public int getMapKeyJoinColumnsSize() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumnsSize() : this.getDefaultMapKeyJoinColumnsSize();
- }
-
-
- // ********** specified map key join columns **********
-
- public ListIterable<OrmJoinColumn> getSpecifiedMapKeyJoinColumns() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedMapKeyJoinColumnsSize() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedMapKeyJoinColumns() {
- return this.getSpecifiedMapKeyJoinColumnsSize() != 0;
- }
-
- public OrmJoinColumn getSpecifiedMapKeyJoinColumn(int index) {
- return this.specifiedMapKeyJoinColumnContainer.getContextElement(index);
- }
-
- public OrmJoinColumn addSpecifiedMapKeyJoinColumn() {
- return this.addSpecifiedMapKeyJoinColumn(this.getSpecifiedMapKeyJoinColumnsSize());
- }
-
- public OrmJoinColumn addSpecifiedMapKeyJoinColumn(int index) {
- XmlJoinColumn xmlJoinColumn = this.buildXmlJoinColumn();
- OrmJoinColumn joinColumn = this.specifiedMapKeyJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- this.getXmlAttributeMapping().getMapKeyJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- protected XmlJoinColumn buildXmlJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlJoinColumn();
- }
-
- public void removeSpecifiedMapKeyJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedMapKeyJoinColumn(this.specifiedMapKeyJoinColumnContainer.indexOfContextElement((OrmJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedMapKeyJoinColumn(int index) {
- this.specifiedMapKeyJoinColumnContainer.removeContextElement(index);
- this.getXmlAttributeMapping().getMapKeyJoinColumns().remove(index);
- }
-
- public void moveSpecifiedMapKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedMapKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlAttributeMapping().getMapKeyJoinColumns().move(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedMapKeyJoinColumns() {
- this.specifiedMapKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJoinColumn> getXmlMapKeyJoinColumns() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlJoinColumn>(this.getXmlAttributeMapping().getMapKeyJoinColumns());
- }
-
- protected ContextListContainer<OrmJoinColumn, XmlJoinColumn> buildSpecifiedMapKeyJoinColumnContainer() {
- SpecifiedMapKeyJoinColumnContainer container = new SpecifiedMapKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedMapKeyJoinColumnContainer
- extends ContextListContainer<OrmJoinColumn, XmlJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_MAP_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmJoinColumn buildContextElement(XmlJoinColumn resourceElement) {
- return AbstractOrmMultiRelationshipMapping.this.buildMapKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlJoinColumn> getResourceElements() {
- return AbstractOrmMultiRelationshipMapping.this.getXmlMapKeyJoinColumns();
- }
- @Override
- protected XmlJoinColumn getResourceElement(OrmJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected OrmJoinColumn buildMapKeyJoinColumn(XmlJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmJoinColumn(this, this.mapKeyJoinColumnOwner, xmlJoinColumn);
- }
-
- protected OrmReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
- return new MapKeyJoinColumnOwner();
- }
-
-
- // ********** default map key join column **********
-
- public OrmJoinColumn getDefaultMapKeyJoinColumn() {
- return this.defaultMapKeyJoinColumn;
- }
-
- protected void setDefaultMapKeyJoinColumn(OrmJoinColumn mapKeyJoinColumn) {
- OrmJoinColumn old = this.defaultMapKeyJoinColumn;
- this.defaultMapKeyJoinColumn = mapKeyJoinColumn;
- this.firePropertyChanged(DEFAULT_MAP_KEY_JOIN_COLUMN_PROPERTY, old, mapKeyJoinColumn);
- }
-
- protected ListIterable<OrmJoinColumn> getDefaultMapKeyJoinColumns() {
- return (this.defaultMapKeyJoinColumn != null) ?
- new SingleElementListIterable<OrmJoinColumn>(this.defaultMapKeyJoinColumn) :
- EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- protected int getDefaultMapKeyJoinColumnsSize() {
- return (this.defaultMapKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultMapKeyJoinColumn() {
- if (this.buildsDefaultMapKeyJoinColumn()) {
- if (this.defaultMapKeyJoinColumn == null) {
- this.setDefaultMapKeyJoinColumn(this.buildMapKeyJoinColumn(null));
- } else {
- this.defaultMapKeyJoinColumn.update();
- }
- } else {
- this.setDefaultMapKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultMapKeyJoinColumn() {
- return ! this.hasSpecifiedMapKeyJoinColumns() &&
- getKeyType() == Type.ENTITY_TYPE;
- }
-
-
- // ********** misc **********
-
- /**
- * pre-condition: the mapping's Java persistent attribute is not
- * <code>null</code>.
- */
- @Override
- protected String getJavaTargetType() {
- return this.getJavaPersistentAttribute().getMultiReferenceTargetTypeName();
- }
-
- @Override
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
- public Iterable<String> getCandidateMapKeyNames() {
- return this.getTargetEntityNonTransientAttributeNames();
- }
-
-
- // ********** metamodel **********
-
- @Override
- protected String getMetamodelFieldTypeName() {
- return ((OrmPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldTypeName();
- }
-
- @Override
- protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
- this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
- super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
- }
-
- protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
- String keyTypeName = ((OrmPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldMapKeyTypeName();
- if (keyTypeName != null) {
- typeArgumentNames.add(keyTypeName);
- }
- }
-
- public String getMetamodelFieldMapKeyTypeName() {
- return MappingTools.getMetamodelFieldMapKeyTypeName(this);
- }
-
-
- //************* refactoring *************
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenameTypeEdits(originalType, newName),
- this.createMapKeyClassRenameTypeEdits(originalType, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createMapKeyClassRenameTypeEdits(IType originalType, String newName) {
- if (this.specifiedMapKeyClass != null) {
- PersistentType mapKeyType = this.getResolvedMapKeyType();
- if ((mapKeyType != null) && mapKeyType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.createMapKeyClassRenameTypeEdit(originalType, newName));
- }
- }
- return EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createMapKeyClassRenameTypeEdit(IType originalType, String newName) {
- return this.xmlAttributeMapping.createRenameMapKeyClassEdit(originalType, newName);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- super.createMoveTypeEdits(originalType, newPackage),
- this.createMapKeyClassMoveTypeEdits(originalType, newPackage)
- );
- }
-
- protected Iterable<ReplaceEdit> createMapKeyClassMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- if (this.specifiedMapKeyClass != null) {
- PersistentType mapKeyType = this.getResolvedMapKeyType();
- if ((mapKeyType != null) && mapKeyType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.createMapKeyClassRenamePackageEdit(newPackage.getElementName()));
- }
- }
- return EmptyIterable.<ReplaceEdit>instance();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenamePackageEdits(originalPackage, newName),
- this.createMapKeyClassRenamePackageEdits(originalPackage, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createMapKeyClassRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- if (this.specifiedMapKeyClass != null) {
- PersistentType mapKeyType = this.getResolvedMapKeyType();
- if ((mapKeyType != null) && mapKeyType.isIn(originalPackage)) {
- return new SingleElementIterable<ReplaceEdit>(this.createMapKeyClassRenamePackageEdit(newName));
- }
- }
- return EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createMapKeyClassRenamePackageEdit(String newName) {
- return this.xmlAttributeMapping.createRenameMapKeyClassPackageEdit(newName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateAttributeType(messages, reporter);
- this.orderable.validate(messages, reporter);
- this.validateMapKeyClass(messages);
- this.validateMapKey(messages, reporter);
- }
-
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter) {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
- new String[] {this.getFullyQualifiedAttributeType()},
- this,
- this.getAttributeTypeTextRange()
- )
- );
- }
- }
-
- protected TextRange getAttributeTypeTextRange() {
- return this.getValidationTextRange();
- }
-
- public void validateMapKey(List<IMessage> messages, IReporter reporter) {
- if (this.getMapKey() != null) {
- //TODO validate that the map key refers to an existing attribute
- return;
- }
- if (this.keyType == Type.BASIC_TYPE) {
- this.mapKeyColumn.validate(messages, reporter);
- this.mapKeyConverter.validate(messages, reporter);
- }
- else if (this.keyType == Type.ENTITY_TYPE) {
- for (OrmJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter);
- }
- }
- else if (this.keyType == Type.EMBEDDABLE_TYPE) {
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter);
- //validate map key association overrides
- }
- }
-
- protected void validateMapKeyClass(List<IMessage> messages) {
- if (this.isJpa2_0Compatible()) {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- if ((javaAttribute != null) && javaAttribute.getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages);
- }
- }
- }
-
- protected void validateMapKeyClass_(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(getMapKeyClass())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getMapKeyClassTextRange()
- )
- );
- return;
- }
-
- if (MappingTools.typeIsBasic(this.getJavaProject(), this.getFullyQualifiedMapKeyClass())) {
- return;
- }
-
- if (this.getResolvedMapKeyType() == null) {
- IType mapKeyJdtType = JDTTools.findType(this.getJavaProject(), this.getFullyQualifiedMapKeyClass());
- if (mapKeyJdtType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_NOT_EXIST,
- new String[] {this.getFullyQualifiedMapKeyClass()},
- this,
- this.getMapKeyClassTextRange()
- )
- );
- }
- return;
- }
- if (this.getResolvedMapKeyEmbeddable() == null && this.getResolvedMapKeyEntity() == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getFullyQualifiedMapKeyClass()},
- this,
- this.getMapKeyClassTextRange()
- )
- );
- }
- }
-
- protected TextRange getMapKeyClassTextRange() {
- return this.getValidationTextRange(this.xmlAttributeMapping.getMapKeyClassTextRange());
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.orderable.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.mapKeyNameTouches(pos)) {
- return this.getCandidateMapKeyNames();
- }
- result = this.mapKeyColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mapKeyConverter.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mapKeyAttributeOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- result = joinColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- protected boolean mapKeyNameTouches(int pos) {
- return this.xmlAttributeMapping.mapKeyNameTouches(pos);
- }
-
- // ********** abstract owner **********
-
- /**
- * some common behavior
- */
- protected class AbstractOwner
- {
- public OrmTypeMapping getTypeMapping() {
- return AbstractOrmMultiRelationshipMapping.this.getTypeMapping();
- }
-
- public String getDefaultTableName() {
- return this.getRelationshipStrategy().getTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getRelationshipStrategy().resolveDbTable(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmMultiRelationshipMapping.this.getValidationTextRange();
- }
-
- protected OrmRelationshipStrategy getRelationshipStrategy() {
- return AbstractOrmMultiRelationshipMapping.this.getRelationship().getStrategy();
- }
-
- protected OrmPersistentAttribute getPersistentAttribute() {
- return AbstractOrmMultiRelationshipMapping.this.getPersistentAttribute();
- }
- }
-
-
- // ********** map key column owner **********
-
- protected class MapKeyColumnOwner
- extends AbstractOwner
- implements OrmColumn.Owner
- {
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return AbstractOrmMultiRelationshipMapping.this.getName() + "_KEY"; //$NON-NLS-1$
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getRelationshipStrategy().tableNameIsInvalid(tableName);
- }
-
- public XmlColumn getXmlColumn() {
- return AbstractOrmMultiRelationshipMapping.this.getXmlMapKeyColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- return AbstractOrmMultiRelationshipMapping.this.buildXmlMapKeyColumn();
- }
-
- public void removeXmlColumn() {
- AbstractOrmMultiRelationshipMapping.this.removeXmlMapKeyColumn();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
- }
- }
-
-
- // ********** map key attribute override container owner **********
-
- protected class MapKeyAttributeOverrideContainerOwner
- extends AbstractOwner
- implements OrmAttributeOverrideContainer.Owner
- {
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmMultiRelationshipMapping.this.getResolvedMapKeyEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? overriddenTypeMapping.getAllOverridableAttributeNames() : EmptyIterable.<String>instance();
- }
-
- protected JavaAttributeOverride getSpecifiedJavaAttributeOverrideNamed(String attributeName) {
- return AbstractOrmMultiRelationshipMapping.this.getSpecifiedJavaMapKeyAttributeOverrideNamed(attributeName);
- }
-
- public Iterable<String> getJavaOverrideNames() {
- return null;
- }
-
- public EList<XmlAttributeOverride> getXmlOverrides() {
- return AbstractOrmMultiRelationshipMapping.this.xmlAttributeMapping.getMapKeyAttributeOverrides();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. the table is always the collection table
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
- }
- }
-
-
- // ********** map key join column owner **********
-
- protected class MapKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected MapKeyJoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return AbstractOrmMultiRelationshipMapping.this.getRelationship().getStrategy().getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return AbstractOrmMultiRelationshipMapping.this.getName() + "_KEY"; //$NON-NLS-1$
- }
-
- public String getAttributeName() {
- return AbstractOrmMultiRelationshipMapping.this.getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return AbstractOrmMultiRelationshipMapping.this.getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return AbstractOrmMultiRelationshipMapping.this.getResolvedMapKeyEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return AbstractOrmMultiRelationshipMapping.this.getRelationship().getStrategy().tableNameIsInvalid(tableName);
- }
-
- /**
- * the map key join column can be on a secondary table
- */
- public Iterable<String> getCandidateTableNames() {
- return AbstractOrmMultiRelationshipMapping.this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return AbstractOrmMultiRelationshipMapping.this.getRelationship().getStrategy().resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- Entity entity = AbstractOrmMultiRelationshipMapping.this.getResolvedMapKeyEntity();
- return entity != null ? entity.getPrimaryDbTable() : null;
- }
-
- public int getJoinColumnsSize() {
- return AbstractOrmMultiRelationshipMapping.this.getMapKeyJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmMultiRelationshipMapping.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyJoinColumnValidator(
- this.getPersistentAttribute(),
- (ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
- new RelationshipStrategyTableDescriptionProvider(getRelationship().getStrategy()));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java
deleted file mode 100644
index 99df4a66f6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code><ul>
- * <li>column
- * <li>join column
- * <li>discriminator column
- * <li>order column
- * <li>primary key join column
- * </ul>
- * <strong>NB:</strong> any subclass that directly holds its XML column must:<ul>
- * <li>call the "super" constructor that takes an XML column
- * {@link #AbstractOrmNamedColumn(XmlContextNode, OrmReadOnlyNamedColumn.Owner, AbstractXmlNamedColumn)}
- * <li>override {@link #setXmlColumn(AbstractXmlNamedColumn)} to set the XML column
- * so it is in place before the column's state (e.g. {@link #specifiedName})
- * is initialized
- * </ul>
- * Typically, a column belonging to a list of columns will directly hold its XML
- * column; since the context column only exists if the XML column exists.
- */
-public abstract class AbstractOrmNamedColumn<X extends XmlNamedColumn, O extends OrmReadOnlyNamedColumn.Owner>
- extends AbstractOrmXmlContextNode
- implements OrmNamedColumn
-{
- protected final O owner;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String columnDefinition;
-
-
- // ********** constructor/initialization **********
-
- protected AbstractOrmNamedColumn(XmlContextNode parent, O owner) {
- this(parent, owner, null);
- }
-
- protected AbstractOrmNamedColumn(XmlContextNode parent, O owner, X xmlColumn) {
- super(parent);
- this.owner = owner;
- this.setXmlColumn(xmlColumn);
- this.specifiedName = this.buildSpecifiedName();
- this.columnDefinition = this.buildColumnDefinition();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedName_(this.buildSpecifiedName());
- this.setColumnDefinition_(this.buildColumnDefinition());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultName(this.buildDefaultName());
- }
-
-
- // ********** XML column **********
-
- /**
- * Return <code>null</code> if XML column does not exists.
- */
- public abstract X getXmlColumn();
-
- /**
- * see class comment...
- */
- protected void setXmlColumn(X xmlColumn) {
- if (xmlColumn != null) {
- throw new IllegalArgumentException("this method must be overridden if the XML column is not null: " + xmlColumn); //$NON-NLS-1$
- }
- }
-
- /**
- * Build the XML column if it does not exist.
- */
- protected X getXmlColumnForUpdate() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn != null) ? xmlColumn : this.buildXmlColumn();
- }
-
- protected abstract X buildXmlColumn();
-
- protected void removeXmlColumnIfUnset() {
- if (this.getXmlColumn().isUnset()) {
- this.removeXmlColumn();
- }
- }
-
- protected abstract void removeXmlColumn();
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- public void setSpecifiedName(String name) {
- if (this.valuesAreDifferent(this.specifiedName, name)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedName_(name);
- xmlColumn.setName(name);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedName_(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultName() {
- return this.owner.getDefaultColumnName(this);
- }
-
-
- // ********** column definition **********
-
- public String getColumnDefinition() {
- return this.columnDefinition;
- }
-
- public void setColumnDefinition(String columnDefinition) {
- if (this.valuesAreDifferent(this.columnDefinition, columnDefinition)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setColumnDefinition_(columnDefinition);
- xmlColumn.setColumnDefinition(columnDefinition);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setColumnDefinition_(String columnDefinition) {
- String old = this.columnDefinition;
- this.columnDefinition = columnDefinition;
- this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, columnDefinition);
- }
-
- protected String buildColumnDefinition() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getColumnDefinition();
- }
-
-
- // ********** database stuff **********
-
- protected Column getDbColumn() {
- Table table = this.getDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getName());
- }
-
- public Table getDbTable() {
- return this.owner.resolveDbTable(this.getTable());
- }
-
- /**
- * Return the name of the column's table. This is overridden in
- * {@link AbstractOrmBaseColumn} (and other places) where a table can be
- * defined.
- */
- public String getTable() {
- return this.owner.getDefaultTableName();
- }
-
- public boolean isResolved() {
- return this.getDbColumn() != null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.buildColumnValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildColumnValidator() {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver());
- }
-
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmNamedColumnTextRangeResolver(this);
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlColumnTextRange();
- return (textRange != null) ? textRange : this.owner.getValidationTextRange();
- }
-
- protected TextRange getXmlColumnTextRange() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.getXmlColumnNameTextRange());
- }
-
- protected TextRange getXmlColumnNameTextRange() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getNameTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.columnNameTouches(pos)) {
- return this.getCandidateColumnNames();
- }
- return null;
- }
-
- protected boolean columnNameTouches(int pos) {
- X column = this.getXmlColumn();
- return (column != null) && (column.columnNameTouches(pos));
- }
-
- protected Iterable<String> getCandidateColumnNames() {
- Table dbTable = this.getDbTable();
- return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- protected void initializeFrom(ReadOnlyNamedColumn oldColumn) {
- this.setSpecifiedName(oldColumn.getSpecifiedName());
- this.setColumnDefinition(oldColumn.getColumnDefinition());
- }
-
- protected void initializeFromVirtual(ReadOnlyNamedColumn virtualColumn) {
- this.setSpecifiedName(virtualColumn.getName());
- this.setColumnDefinition(virtualColumn.getColumnDefinition());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- String table = this.getTable();
- if (table != null) {
- sb.append(table);
- sb.append('.');
- }
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java
deleted file mode 100644
index 73f81db31f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractOrmNamedColumnTextRangeResolver<C extends OrmReadOnlyNamedColumn>
- implements NamedColumnTextRangeResolver
-{
- protected final C column;
-
-
- protected AbstractOrmNamedColumnTextRangeResolver(C column) {
- super();
- this.column = column;
- }
-
- public TextRange getNameTextRange() {
- return this.column.getNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToManyMapping.java
deleted file mode 100644
index f4a7c7a7c3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToManyMapping.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.NullOrmOrphanRemoval2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToManyMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToManyRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-
-
-public abstract class AbstractOrmOneToManyMapping<X extends XmlOneToMany>
- extends AbstractOrmMultiRelationshipMapping<X>
- implements OrmOneToManyMapping2_0, OrmOrphanRemovalHolder2_0
-{
- protected final OrmOrphanRemovable2_0 orphanRemoval;
-
-
- protected AbstractOrmOneToManyMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.orphanRemoval = this.buildOrphanRemoval();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.orphanRemoval.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.orphanRemoval.update();
- }
-
-
- // ********** orphan removal **********
-
- public OrmOrphanRemovable2_0 getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- protected OrmOrphanRemovable2_0 buildOrphanRemoval() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmOrphanRemoval(this) :
- new NullOrmOrphanRemoval2_0(this);
- }
-
-
- // ********** relationship **********
-
- @Override
- protected OrmOneToManyRelationship2_0 buildRelationship() {
- return new GenericOrmOneToManyRelationship(this, this.isJpa2_0Compatible());
- }
-
- @Override
- public OrmOneToManyRelationship2_0 getRelationship() {
- return (OrmOneToManyRelationship2_0) super.getRelationship();
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 50;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmOneToManyMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getOneToManys().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getOneToManys().remove(this.xmlAttributeMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToOneMapping.java
deleted file mode 100644
index 4302119c3d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmOneToOneMapping.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.NullOrmOrphanRemoval2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToOneMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-
-/**
- * <code>orm.xml</code> 1:1 mapping
- */
-public abstract class AbstractOrmOneToOneMapping<X extends XmlOneToOne>
- extends AbstractOrmSingleRelationshipMapping<X>
- implements OrmOneToOneMapping2_0, OrmOrphanRemovalHolder2_0
-{
- protected final OrmOrphanRemovable2_0 orphanRemoval;
-
-
- protected AbstractOrmOneToOneMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.orphanRemoval = this.buildOrphanRemoval();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.orphanRemoval.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.orphanRemoval.update();
- }
-
-
- // ********** orphan removal **********
-
- public OrmOrphanRemovable2_0 getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- protected OrmOrphanRemovable2_0 buildOrphanRemoval() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmOrphanRemoval(this) :
- new NullOrmOrphanRemoval2_0(this);
- }
-
-
- // ********** relationship **********
-
- @Override
- public OrmOneToOneRelationship2_0 getRelationship() {
- return (OrmOneToOneRelationship2_0) super.getRelationship();
- }
-
- @Override
- protected OrmMappingRelationship buildRelationship() {
- return new GenericOrmOneToOneRelationship(this);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 60;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmOneToOneMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getOneToOnes().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getOneToOnes().remove(this.xmlAttributeMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java
deleted file mode 100644
index de9dc96d39..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryHint;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint;
-import org.eclipse.persistence.jpa.jpql.ExpressionTools;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> query
- */
-public abstract class AbstractOrmQuery<X extends XmlQuery>
- extends AbstractOrmXmlContextNode
- implements OrmQuery
-{
- protected final X xmlQuery;
-
- protected String name;
-
- protected String query;
-
- protected final ContextListContainer<OrmQueryHint, XmlQueryHint> queryHintContainer;
-
-
- protected AbstractOrmQuery(XmlContextNode parent, X xmlQuery) {
- super(parent);
- this.xmlQuery = xmlQuery;
- this.name = xmlQuery.getName();
- this.query = this.getUnescapedQuery();
- this.queryHintContainer = this.buildHintContainer();
- }
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.xmlQuery.getName());
- this.setQuery_(this.getUnescapedQuery());
- this.syncHints();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getHints());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlQuery.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** query **********
-
- public String getQuery() {
- return this.query;
- }
-
- public void setQuery(String query) {
- this.setQuery_(query);
- this.xmlQuery.setQuery(query);
- }
-
- protected void setQuery_(String query) {
- String old = this.query;
- this.query = query;
- this.firePropertyChanged(QUERY_PROPERTY, old, query);
- }
-
- protected String getUnescapedQuery() {
- String queryString = this.xmlQuery.getQuery();
- if (StringTools.stringIsNotEmpty(queryString)) {
- queryString = ExpressionTools.unescape(queryString, new int[1]);
- }
- return queryString;
- }
-
-
- // ********** hints **********
-
- public ListIterable<OrmQueryHint> getHints() {
- return this.queryHintContainer.getContextElements();
- }
-
- public int getHintsSize() {
- return this.queryHintContainer.getContextElementsSize();
- }
-
- public OrmQueryHint addHint() {
- return this.addHint(this.getHintsSize());
- }
-
- public OrmQueryHint addHint(int index) {
- XmlQueryHint xmlHint = this.buildXmlQueryHint();
- OrmQueryHint hint = this.queryHintContainer.addContextElement(index, xmlHint);
- this.xmlQuery.getHints().add(index, xmlHint);
- return hint;
- }
-
- protected XmlQueryHint buildXmlQueryHint() {
- return OrmFactory.eINSTANCE.createXmlQueryHint();
- }
-
- public void removeHint(QueryHint hint) {
- this.removeHint(this.queryHintContainer.indexOfContextElement((OrmQueryHint) hint));
- }
-
- public void removeHint(int index) {
- this.queryHintContainer.removeContextElement(index);
- this.xmlQuery.getHints().remove(index);
- }
-
- public void moveHint(int targetIndex, int sourceIndex) {
- this.queryHintContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlQuery.getHints().move(targetIndex, sourceIndex);
- }
-
- public OrmQueryHint getHint(int index) {
- return this.queryHintContainer.get(index);
- }
-
- protected OrmQueryHint buildHint(XmlQueryHint xmlHint) {
- return this.getContextNodeFactory().buildOrmQueryHint(this, xmlHint);
- }
-
- protected void syncHints() {
- this.queryHintContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlQueryHint> getXmlHints() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlQueryHint>(this.xmlQuery.getHints());
- }
-
- protected ContextListContainer<OrmQueryHint, XmlQueryHint> buildHintContainer() {
- HintContainer container = new HintContainer();
- container.initialize();
- return container;
- }
-
- /**
- * query hint container
- */
- protected class HintContainer
- extends ContextListContainer<OrmQueryHint, XmlQueryHint>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return HINTS_LIST;
- }
- @Override
- protected OrmQueryHint buildContextElement(XmlQueryHint resourceElement) {
- return AbstractOrmQuery.this.buildHint(resourceElement);
- }
- @Override
- protected ListIterable<XmlQueryHint> getResourceElements() {
- return AbstractOrmQuery.this.getXmlHints();
- }
- @Override
- protected XmlQueryHint getResourceElement(OrmQueryHint contextElement) {
- return contextElement.getXmlQueryHint();
- }
- }
-
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaQuery javaQuery) {
- this.setName(javaQuery.getName());
- this.setQuery(javaQuery.getQuery());
- for (JavaQueryHint javaQueryHint : javaQuery.getHints()) {
- this.addHint().convertFrom(javaQueryHint);
- }
- }
-
- // ********** validation **********
-
- public void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateName(messages);
- this.validateQuery(queryHelper, messages, reporter);
- }
-
- protected void validateName(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.name)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.QUERY_NAME_UNDEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getNameTextRange()
- )
- );
- }
- }
-
- protected void validateQuery(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- if (StringTools.stringIsEmpty(this.query)){
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.QUERY_STATEMENT_UNDEFINED,
- new String[] {this.name},
- this,
- this.getNameTextRange()
- )
- );
- } else {
- this.validateQuery_(queryHelper, messages, reporter);
- }
- }
-
- protected abstract void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlQuery.getValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.xmlQuery.getNameTextRange());
- }
-
- public TextRange getQueryTextRange() {
- return this.getValidationTextRange(this.xmlQuery.getQueryTextRange());
- }
-
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return (this != node) &&
- (this.getType() == node.getType()) &&
- this.isEquivalentTo((Query)node);
- }
-
- protected boolean isEquivalentTo(Query other) {
- return Tools.valuesAreEqual(this.name, other.getName()) &&
- Tools.valuesAreEqual(this.query, other.getQuery()) &&
- hintsAreEquivalentTo(other);
- }
-
- protected boolean hintsAreEquivalentTo(Query other) {
- if (this.getHintsSize() != CollectionTools.size(other.getHints())) {
- return false;
- }
-
- for (int i=0; i<this.getHintsSize(); i++) {
- if (! this.queryHintContainer.get(i).isEquivalentTo(other.getHint(i))) {
- return false;
- }
- }
-
- return true;
- }
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public X getXmlQuery() {
- return this.xmlQuery;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmReadOnlyUniqueConstraint.java
deleted file mode 100644
index caa97f18dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmReadOnlyUniqueConstraint.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.internal.context.orm;
-
-import java.util.Vector;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyUniqueConstraint;
-
-public abstract class AbstractOrmReadOnlyUniqueConstraint
- extends AbstractOrmXmlContextNode
- implements OrmReadOnlyUniqueConstraint
-{
- protected final Vector<String> columnNames = new Vector<String>();
-
-
- public AbstractOrmReadOnlyUniqueConstraint(XmlContextNode parent) {
- super(parent);
- }
-
-
- // ********** column names **********
-
- public Iterable<String> getColumnNames() {
- return new LiveCloneListIterable<String>(this.columnNames);
- }
-
- public int getColumnNamesSize() {
- return this.columnNames.size();
- }
-
- public String getColumnName(int index) {
- return this.columnNames.get(index);
- }
-
- protected void syncColumnNames() {
- this.synchronizeList(this.getResourceColumnNames(), this.columnNames, COLUMN_NAMES_LIST);
- }
-
- protected abstract Iterable<String> getResourceColumnNames();
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.columnNames);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmRelationshipMapping.java
deleted file mode 100644
index 3af6e596e8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmRelationshipMapping.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmCascade;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmCascade;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> relationship mapping (1:1, 1:m, m:1, m:m)
- */
-public abstract class AbstractOrmRelationshipMapping<X extends AbstractXmlRelationshipMapping>
- extends AbstractOrmAttributeMapping<X>
- implements OrmRelationshipMapping
-{
- protected String specifiedTargetEntity;
- protected String defaultTargetEntity;
- protected String fullyQualifiedTargetEntity;
-
- protected final OrmMappingRelationship relationship;
-
- protected final OrmCascade cascade;
-
- protected FetchType specifiedFetch;
- protected FetchType defaultFetch;
-
-
- protected AbstractOrmRelationshipMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.specifiedTargetEntity = xmlMapping.getTargetEntity();
- this.relationship = this.buildRelationship();
- this.cascade = this.buildCascade();
- this.specifiedFetch = this.buildSpecifiedFetch();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTargetEntity_(this.xmlAttributeMapping.getTargetEntity());
- this.relationship.synchronizeWithResourceModel();
- this.cascade.synchronizeWithResourceModel();
- this.setSpecifiedFetch_(this.buildSpecifiedFetch());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTargetEntity(this.buildDefaultTargetEntity());
- this.setFullyQualifiedTargetEntity(this.buildFullyQualifiedTargetEntity());
- this.relationship.update();
- this.cascade.update();
- this.setDefaultFetch(this.buildDefaultFetch());
- }
-
-
- // ********** fully-qualified target entity **********
-
- public String getFullyQualifiedTargetEntity() {
- return this.fullyQualifiedTargetEntity;
- }
-
- protected void setFullyQualifiedTargetEntity(String entity) {
- String old = this.fullyQualifiedTargetEntity;
- this.fullyQualifiedTargetEntity = entity;
- this.firePropertyChanged(FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY, old, entity);
- }
-
- protected String buildFullyQualifiedTargetEntity() {
- return (this.specifiedTargetEntity == null) ?
- this.defaultTargetEntity :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedTargetEntity);
- }
-
- // ********** target entity **********
-
- public String getTargetEntity() {
- return (this.specifiedTargetEntity != null) ? this.specifiedTargetEntity : this.defaultTargetEntity;
- }
-
- public String getSpecifiedTargetEntity() {
- return this.specifiedTargetEntity;
- }
-
- public void setSpecifiedTargetEntity(String entity) {
- this.setSpecifiedTargetEntity_(entity);
- this.xmlAttributeMapping.setTargetEntity(entity);
- }
-
- protected void setSpecifiedTargetEntity_(String entity) {
- String old = this.specifiedTargetEntity;
- this.specifiedTargetEntity = entity;
- this.firePropertyChanged(SPECIFIED_TARGET_ENTITY_PROPERTY, old, entity);
- }
-
- public String getDefaultTargetEntity() {
- return this.defaultTargetEntity;
- }
-
- protected void setDefaultTargetEntity(String entity) {
- String old = this.defaultTargetEntity;
- this.defaultTargetEntity = entity;
- this.firePropertyChanged(DEFAULT_TARGET_ENTITY_PROPERTY, old, entity);
- }
-
- protected String buildDefaultTargetEntity() {
- return (this.getJavaPersistentAttribute() == null) ? null : this.getJavaTargetType();
- }
-
- /**
- * pre-condition: the mapping's Java persistent attribute is not
- * <code>null</code>.
- */
- protected abstract String getJavaTargetType();
-
- public Entity getResolvedTargetEntity() {
- TypeMapping typeMapping = this.getResolvedTargetTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- protected TypeMapping getResolvedTargetTypeMapping() {
- PersistentType resolvedTargetType = this.getResolvedTargetType();
- return (resolvedTargetType == null) ? null : resolvedTargetType.getMapping();
- }
-
- // sub-classes like this to be public
- public PersistentType getResolvedTargetType() {
- if (this.fullyQualifiedTargetEntity == null) {
- return null;
- }
- return getPersistenceUnit().getPersistentType(this.fullyQualifiedTargetEntity);
- }
-
- public char getTargetEntityEnclosingTypeSeparator() {
- return '$';
- }
-
-
- // ********** relationship reference **********
-
- public OrmMappingRelationship getRelationship() {
- return this.relationship;
- }
-
- protected abstract OrmMappingRelationship buildRelationship();
-
-
- // ********** cascade **********
-
- public OrmCascade getCascade() {
- return this.cascade;
- }
-
- protected OrmCascade buildCascade() {
- // NB: we don't use the platform
- return new GenericOrmCascade(this);
- }
-
-
- // ********** fetch **********
-
- public FetchType getFetch() {
- return (this.specifiedFetch != null) ? this.specifiedFetch : this.defaultFetch;
- }
-
- public FetchType getSpecifiedFetch() {
- return this.specifiedFetch;
- }
-
- public void setSpecifiedFetch(FetchType fetch) {
- this.setSpecifiedFetch_(fetch);
- this.xmlAttributeMapping.setFetch(FetchType.toOrmResourceModel(fetch));
- }
-
- protected void setSpecifiedFetch_(FetchType fetch) {
- FetchType old = this.specifiedFetch;
- this.specifiedFetch = fetch;
- this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildSpecifiedFetch() {
- return FetchType.fromOrmResourceModel(this.xmlAttributeMapping.getFetch());
- }
-
- public FetchType getDefaultFetch() {
- return this.defaultFetch;
- }
-
- protected void setDefaultFetch(FetchType fetch) {
- FetchType old = this.defaultFetch;
- this.defaultFetch = fetch;
- this.firePropertyChanged(DEFAULT_FETCH_PROPERTY, old, fetch);
- }
-
- protected abstract FetchType buildDefaultFetch();
-
-
- // ********** misc **********
-
- @Override
- public boolean isRelationshipOwner() {
- return this.relationship.isOwner();
- }
-
- @Override
- public boolean isOwnedBy(AttributeMapping mapping) {
- return mapping.isRelationshipOwner() &&
- this.relationship.isOwnedBy((RelationshipMapping) mapping);
- }
-
- public RelationshipMapping getRelationshipOwner() {
- Entity entity = this.getResolvedTargetEntity();
- if (entity == null) {
- return null;
- }
- for (ReadOnlyPersistentAttribute attribute : entity.getPersistentType().getAllAttributes()) {
- AttributeMapping mapping = attribute.getMapping();
- if (this.isOwnedBy(mapping)) {
- return (RelationshipMapping) mapping;
- }
- }
- return null;
- }
-
- @Override
- public boolean isOverridableAssociationMapping() {
- return this.relationship.isOverridable();
- }
-
- @Override
- protected void initializeFromOrmRelationshipMapping(OrmRelationshipMapping oldMapping) {
- super.initializeFromOrmRelationshipMapping(oldMapping);
- this.setSpecifiedTargetEntity(oldMapping.getSpecifiedTargetEntity());
- this.setSpecifiedFetch(oldMapping.getSpecifiedFetch());
- oldMapping.getRelationship().initializeOn(this.relationship);
- this.cascade.initializeFrom(oldMapping.getCascade());
- //TODO should we set the fetch type from a BasicMapping??
- }
-
- public Iterable<String> getAllTargetEntityAttributeNames() {
- return new CompositeIterable<String>(this.getAllTargetEntityAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getAllTargetEntityAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getAllTargetEntityAttributeMappings(), AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<AttributeMapping> getAllTargetEntityAttributeMappings() {
- Entity entity = this.getResolvedTargetEntity();
- return (entity != null) ? entity.getAllAttributeMappings() : EmptyIterable.<AttributeMapping>instance();
- }
-
- // Get the name of non-transient attribute mappings
- public Iterable<String> getTargetEntityNonTransientAttributeNames() {
- return new CompositeIterable<String>(this.getNonTransientTargetEntityAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getNonTransientTargetEntityAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getNonTransientTargetEntityAttributeMappings(), AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<AttributeMapping> getNonTransientTargetEntityAttributeMappings() {
- Entity entity = this.getResolvedTargetEntity();
- return (entity != null) ? entity.getNonTransientAttributeMappings() : EmptyIterable.<AttributeMapping> instance();
- }
-
- protected String getTargetEntityIdAttributeName() {
- PersistentAttribute attribute = this.getTargetEntityIdAttribute();
- return (attribute == null) ? null : attribute.getName();
- }
-
- protected PersistentAttribute getTargetEntityIdAttribute() {
- Entity entity = this.getResolvedTargetEntity();
- return (entity == null) ? null : entity.getIdAttribute();
- }
-
-
- //************ refactoring ************
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenameTypeEdits(originalType, newName),
- this.createTargetEntityRenameTypeEdits(originalType, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createTargetEntityRenameTypeEdits(IType originalType, String newName) {
- if (this.specifiedTargetEntity != null) {
- PersistentType targetType = this.getResolvedTargetType();
- if ((targetType != null) && targetType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.createTargetEntityRenameTypeEdit(originalType, newName));
- }
- }
- return EmptyIterable.instance();
- }
-
- protected ReplaceEdit createTargetEntityRenameTypeEdit(IType originalType, String newName) {
- return this.xmlAttributeMapping.createRenameTargetEntityEdit(originalType, newName);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- super.createMoveTypeEdits(originalType, newPackage),
- this.createTargetEntityMoveTypeEdits(originalType, newPackage)
- );
- }
-
- protected Iterable<ReplaceEdit> createTargetEntityMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- if (this.specifiedTargetEntity != null) {
- PersistentType targetType = this.getResolvedTargetType();
- if ((targetType != null) && targetType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.createTargetEntityRenamePackageEdit(newPackage.getElementName()));
- }
- }
- return EmptyIterable.instance();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenamePackageEdits(originalPackage, newName),
- this.createTargetEntityRenamePackageEdits(originalPackage, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createTargetEntityRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- if (this.specifiedTargetEntity != null) {
- PersistentType targetType = this.getResolvedTargetType();
- if ((targetType != null) && targetType.isIn(originalPackage)) {
- return new SingleElementIterable<ReplaceEdit>(this.createTargetEntityRenamePackageEdit(newName));
- }
- }
- return EmptyIterable.instance();
- }
-
- protected ReplaceEdit createTargetEntityRenamePackageEdit(String newName) {
- return this.xmlAttributeMapping.createRenameTargetEntityPackageEdit(newName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateTargetEntity(messages);
- this.relationship.validate(messages, reporter);
- }
-
- protected void validateTargetEntity(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.getTargetEntity())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TARGET_ENTITY_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getTargetEntityTextRange()
- )
- );
- return;
- }
- if (this.getResolvedTargetType() == null) {
- IType jdtType = JDTTools.findType(this.getJavaProject(), this.getFullyQualifiedTargetEntity());
- if (jdtType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TARGET_ENTITY_NOT_EXIST,
- new String[] {this.getFullyQualifiedTargetEntity()},
- this,
- this.getTargetEntityTextRange()
- )
- );
- }
- return;
- }
- if (this.getResolvedTargetEntity() == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TARGET_ENTITY_IS_NOT_AN_ENTITY,
- new String[] {this.getFullyQualifiedTargetEntity()},
- this,
- this.getTargetEntityTextRange()
- )
- );
- }
- }
-
- protected TextRange getTargetEntityTextRange() {
- return this.getValidationTextRange(this.xmlAttributeMapping.getTargetEntityTextRange());
- }
-
-
- // ********** metamodel **********
-
- @Override
- public String getMetamodelTypeName() {
- return (this.fullyQualifiedTargetEntity != null) ? this.fullyQualifiedTargetEntity : MetamodelField.DEFAULT_TYPE_NAME;
- }
-
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.relationship.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSequenceGenerator.java
deleted file mode 100644
index 9679885f9b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSequenceGenerator.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-import org.eclipse.jpt.jpa.db.Schema;
-
-/**
- * <code>orm.xml</code> sequence generator
- */
-public abstract class AbstractOrmSequenceGenerator
- extends AbstractOrmGenerator<XmlSequenceGenerator>
- implements OrmSequenceGenerator
-{
- protected String specifiedSequenceName;
- protected String defaultSequenceName;
-
-
- protected AbstractOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator xmlSequenceGenerator) {
- super(parent, xmlSequenceGenerator);
- this.specifiedSequenceName = xmlSequenceGenerator.getSequenceName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedSequenceName_(this.xmlGenerator.getSequenceName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultSequenceName(this.buildDefaultSequenceName());
- }
-
-
- // ********** initial value **********
-
- @Override
- protected int buildDefaultInitialValue() {
- return DEFAULT_INITIAL_VALUE;
- }
-
-
- // ********** sequence name **********
-
- public String getSequenceName() {
- return (this.specifiedSequenceName != null) ? this.specifiedSequenceName : this.defaultSequenceName;
- }
-
- public String getSpecifiedSequenceName() {
- return this.specifiedSequenceName;
- }
-
- public void setSpecifiedSequenceName(String specifiedSequenceName) {
- this.setSpecifiedSequenceName_(specifiedSequenceName);
- this.xmlGenerator.setSequenceName(specifiedSequenceName);
- }
-
- protected void setSpecifiedSequenceName_(String specifiedSequenceName) {
- String old = this.specifiedSequenceName;
- this.specifiedSequenceName = specifiedSequenceName;
- this.firePropertyChanged(SPECIFIED_SEQUENCE_NAME_PROPERTY, old, specifiedSequenceName);
- }
-
- public String getDefaultSequenceName() {
- return this.defaultSequenceName;
- }
-
- protected void setDefaultSequenceName(String defaultSequenceName) {
- String old = this.defaultSequenceName;
- this.defaultSequenceName = defaultSequenceName;
- this.firePropertyChanged(DEFAULT_SEQUENCE_NAME_PROPERTY, old, defaultSequenceName);
- }
-
- protected String buildDefaultSequenceName() {
- return null; // TODO the default sequence name is determined by the runtime provider...
- }
-
- // ********** misc **********
-
- public Class<SequenceGenerator> getType() {
- return SequenceGenerator.class;
- }
-
- // ********** validation **********
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((SequenceGenerator) node);
- }
-
- protected boolean isEquivalentTo(SequenceGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.specifiedSequenceName, generator.getSpecifiedSequenceName());
- }
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaSequenceGenerator javaGenerator) {
- super.convertFrom(javaGenerator);
- this.setSpecifiedSequenceName(javaGenerator.getSpecifiedSequenceName());
- }
-
- // ********** completion proposals **********
-
- /**
- * called if the database is connected:
- * sequenceName
- */
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.sequenceNameTouches(pos)) {
- return this.getCandidateSequences();
- }
- return null;
- }
-
- protected boolean sequenceNameTouches(int pos) {
- return this.xmlGenerator.sequenceNameTouches(pos);
- }
-
- protected Iterable<String> getCandidateSequences() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema != null) ? dbSchema.getSortedSequenceIdentifiers() : EmptyIterable.<String> instance();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java
deleted file mode 100644
index 40630ac2b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.NullOrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> single relationship mapping (1:1, m:1)
- */
-public abstract class AbstractOrmSingleRelationshipMapping<X extends AbstractXmlSingleRelationshipMapping>
- extends AbstractOrmRelationshipMapping<X>
- implements OrmSingleRelationshipMapping2_0
-{
- protected Boolean specifiedOptional;
- protected boolean defaultOptional;
-
- protected final OrmDerivedIdentity2_0 derivedIdentity;
-
-
- protected AbstractOrmSingleRelationshipMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.specifiedOptional = xmlMapping.getOptional();
- this.derivedIdentity = this.buildDerivedIdentity();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedOptional_(this.xmlAttributeMapping.getOptional());
- this.derivedIdentity.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultOptional(this.buildDefaultOptional());
- this.derivedIdentity.update();
- }
-
-
- // ********** optional **********
-
- public boolean isOptional() {
- return (this.specifiedOptional != null) ? this.specifiedOptional.booleanValue() : this.defaultOptional;
- }
-
- public Boolean getSpecifiedOptional() {
- return this.specifiedOptional;
- }
-
- public void setSpecifiedOptional(Boolean optional) {
- this.setSpecifiedOptional_(optional);
- this.xmlAttributeMapping.setOptional(optional);
- }
-
- protected void setSpecifiedOptional_(Boolean optional) {
- Boolean old = this.specifiedOptional;
- this.specifiedOptional = optional;
- this.firePropertyChanged(SPECIFIED_OPTIONAL_PROPERTY, old, optional);
- }
-
- public boolean isDefaultOptional() {
- return this.defaultOptional;
- }
-
- protected void setDefaultOptional(boolean optional) {
- boolean old = this.defaultOptional;
- this.defaultOptional = optional;
- this.firePropertyChanged(DEFAULT_OPTIONAL_PROPERTY, old, optional);
- }
-
- protected boolean buildDefaultOptional() {
- return DEFAULT_OPTIONAL;
- }
-
-
- // ********** derived identity **********
-
- public OrmDerivedIdentity2_0 getDerivedIdentity() {
- return this.derivedIdentity;
- }
-
- protected OrmDerivedIdentity2_0 buildDerivedIdentity() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmDerivedIdentity(this) :
- new NullOrmDerivedIdentity2_0(this);
- }
-
-
- // ********** misc **********
-
- @Override
- protected void initializeFromOrmSingleRelationshipMapping(OrmSingleRelationshipMapping oldMapping) {
- super.initializeFromOrmSingleRelationshipMapping(oldMapping);
- if (this.isJpa2_0Compatible()) {
- this.derivedIdentity.initializeFrom(((OrmSingleRelationshipMapping2_0) oldMapping).getDerivedIdentity());
- }
- }
-
- /**
- * pre-condition: the mapping's Java persistent attribute is not
- * <code>null</code>.
- */
- @Override
- protected String getJavaTargetType() {
- return this.getJavaPersistentAttribute().getSingleReferenceTargetTypeName();
- }
-
- @Override
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.derivedIdentity.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.derivedIdentity.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
deleted file mode 100644
index 300920b453..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
+++ /dev/null
@@ -1,583 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.NameTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> table, secondary table, join table, or collection table
- * <p>
- * <strong>NB:</strong> any subclass that directly holds its XML table must:<ul>
- * <li>call the "super" constructor that takes an XML table
- * {@link #AbstractOrmTable(XmlContextNode, Owner, AbstractXmlTable)}
- * <li>override {@link #setXmlTable(AbstractXmlTable)} to set the XML table
- * so it is in place before the table's state (e.g. {@link #specifiedName})
- * is initialized
- * </ul>
- */
-public abstract class AbstractOrmTable<X extends AbstractXmlTable>
- extends AbstractOrmXmlContextNode
- implements OrmTable, UniqueConstraint.Owner
-{
- protected final Owner owner;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected final ContextListContainer<OrmUniqueConstraint, XmlUniqueConstraint> uniqueConstraintContainer;
-
-
- // ********** constructor/initialization **********
-
- protected AbstractOrmTable(XmlContextNode parent, Owner owner) {
- this(parent, owner, null);
- }
-
- protected AbstractOrmTable(XmlContextNode parent, Owner owner, X xmlTable) {
- super(parent);
- this.owner = owner;
- this.setXmlTable(xmlTable);
- this.specifiedName = this.buildSpecifiedName();
- this.specifiedSchema = this.buildSpecifiedSchema();
- this.specifiedCatalog = this.buildSpecifiedCatalog();
- this.uniqueConstraintContainer = this.buildUniqueConstraintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedName_(this.buildSpecifiedName());
- this.setSpecifiedSchema_(this.buildSpecifiedSchema());
- this.setSpecifiedCatalog_(this.buildSpecifiedCatalog());
- this.syncUniqueConstraints();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultName(this.buildDefaultName());
- this.setDefaultSchema(this.buildDefaultSchema());
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.updateNodes(this.getUniqueConstraints());
- }
-
-
- // ********** XML table **********
-
- /**
- * Return null if XML table does not exists.
- */
- protected abstract X getXmlTable();
-
- /**
- * see class comment...
- */
- protected void setXmlTable(X xmlTable) {
- if (xmlTable != null) {
- throw new IllegalArgumentException("this method must be overridden if the XML table is not null: " + xmlTable); //$NON-NLS-1$
- }
- }
-
- /**
- * Build the XML table if it does not exist.
- */
- protected X getXmlTableForUpdate() {
- X xmlTable = this.getXmlTable();
- return (xmlTable != null) ? xmlTable : this.buildXmlTable();
- }
-
- protected abstract X buildXmlTable();
-
- protected void removeXmlTableIfUnset() {
- if (this.getXmlTable().isUnset()) {
- this.removeXmlTable();
- }
- }
-
- protected abstract void removeXmlTable();
-
- public boolean isSpecifiedInResource() {
- return this.getXmlTable() != null;
- }
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- public void setSpecifiedName(String name) {
- if (this.valuesAreDifferent(this.specifiedName, name)) {
- X xmlTable = this.getXmlTableForUpdate();
- this.setSpecifiedName_(name);
- xmlTable.setName(name);
- this.removeXmlTableIfUnset();
- }
- }
-
- protected void setSpecifiedName_(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected abstract String buildDefaultName();
-
-
- // ********** schema **********
-
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- if (this.valuesAreDifferent(this.specifiedSchema, schema)) {
- X xmlTable = this.getXmlTableForUpdate();
- this.setSpecifiedSchema_(schema);
- xmlTable.setSchema(schema);
- this.removeXmlTableIfUnset();
- }
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildSpecifiedSchema() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getSchema();
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected abstract String buildDefaultSchema();
-
-
- // ********** catalog **********
-
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- if (this.valuesAreDifferent(this.specifiedCatalog, catalog)) {
- X xmlTable = this.getXmlTableForUpdate();
- this.setSpecifiedCatalog_(catalog);
- xmlTable.setCatalog(catalog);
- this.removeXmlTableIfUnset();
- }
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildSpecifiedCatalog() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getCatalog();
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected abstract String buildDefaultCatalog();
-
-
- // ********** unique constraints **********
-
- public ListIterable<OrmUniqueConstraint> getUniqueConstraints() {
- return this.uniqueConstraintContainer.getContextElements();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintContainer.getContextElementsSize();
- }
-
- public OrmUniqueConstraint getUniqueConstraint(int index) {
- return this.uniqueConstraintContainer.getContextElement(index);
- }
-
- public OrmUniqueConstraint addUniqueConstraint() {
- return this.addUniqueConstraint(this.getUniqueConstraintsSize());
- }
-
- public OrmUniqueConstraint addUniqueConstraint(int index) {
- X xmlTable = this.getXmlTableForUpdate();
- XmlUniqueConstraint xmlConstraint = this.buildXmlUniqueConstraint();
- OrmUniqueConstraint constraint = this.uniqueConstraintContainer.addContextElement(index, xmlConstraint);
- xmlTable.getUniqueConstraints().add(index, xmlConstraint);
- return constraint;
- }
-
- protected XmlUniqueConstraint buildXmlUniqueConstraint() {
- return OrmFactory.eINSTANCE.createXmlUniqueConstraint();
- }
-
- public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
- this.removeUniqueConstraint(this.uniqueConstraintContainer.indexOfContextElement((OrmUniqueConstraint) uniqueConstraint));
- }
-
- public void removeUniqueConstraint(int index) {
- this.uniqueConstraintContainer.removeContextElement(index);
- this.getXmlTable().getUniqueConstraints().remove(index);
- this.removeXmlTableIfUnset();
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- this.uniqueConstraintContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlTable().getUniqueConstraints().move(targetIndex, sourceIndex);
- }
-
- protected OrmUniqueConstraint buildUniqueConstraint(XmlUniqueConstraint xmlConstraint) {
- return this.getContextNodeFactory().buildOrmUniqueConstraint(this, this, xmlConstraint);
- }
-
- protected void syncUniqueConstraints() {
- this.uniqueConstraintContainer.synchronizeWithResourceModel();
- }
- protected ListIterable<XmlUniqueConstraint> getXmlUniqueConstraints() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ?
- EmptyListIterable.<XmlUniqueConstraint>instance() :
- // clone to reduce chance of concurrency problems
- new LiveCloneListIterable<XmlUniqueConstraint>(xmlTable.getUniqueConstraints());
- }
-
- protected ContextListContainer<OrmUniqueConstraint, XmlUniqueConstraint> buildUniqueConstraintContainer() {
- UniqueConstraintContainer container = new UniqueConstraintContainer();
- container.initialize();
- return container;
- }
-
- /**
- * unique constraint container
- */
- protected class UniqueConstraintContainer
- extends ContextListContainer<OrmUniqueConstraint, XmlUniqueConstraint>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected OrmUniqueConstraint buildContextElement(XmlUniqueConstraint resourceElement) {
- return AbstractOrmTable.this.buildUniqueConstraint(resourceElement);
- }
- @Override
- protected ListIterable<XmlUniqueConstraint> getResourceElements() {
- return AbstractOrmTable.this.getXmlUniqueConstraints();
- }
- @Override
- protected XmlUniqueConstraint getResourceElement(OrmUniqueConstraint contextElement) {
- return contextElement.getXmlUniqueConstraint();
- }
- }
-
-
- // ********** database stuff **********
-
- public org.eclipse.jpt.jpa.db.Table getDbTable() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getName());
- }
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- public boolean isResolved() {
- return this.getDbTable() != null;
- }
-
- public boolean schemaIsResolved() {
- return this.getDbSchema() != null;
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public boolean catalogIsResolved() {
- String catalog = this.getCatalog();
- return (catalog == null) || (this.resolveDbCatalog(catalog) != null);
- }
-
-
- // ********** UniqueConstraint.Owner implementation **********
-
- public Iterable<String> getCandidateUniqueConstraintColumnNames() {
- org.eclipse.jpt.jpa.db.Table dbTable = this.getDbTable();
- return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String>instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.buildTableValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildTableValidator() {
- return this.owner.buildTableValidator(this, this.buildTextRangeResolver());
- }
-
- protected TableTextRangeResolver buildTextRangeResolver() {
- return new OrmTableTextRangeResolver(this);
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlTableValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
- protected TextRange getXmlTableValidationTextRange() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.getXmlTableNameTextRange());
- }
-
- protected TextRange getXmlTableNameTextRange() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getNameTextRange();
- }
-
- public TextRange getSchemaTextRange() {
- return this.getValidationTextRange(this.getXmlTableSchemaTextRange());
- }
-
- protected TextRange getXmlTableSchemaTextRange() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getSchemaTextRange();
- }
-
- public TextRange getCatalogTextRange() {
- return this.getValidationTextRange(this.getXmlTableCatalogTextRange());
- }
-
- protected TextRange getXmlTableCatalogTextRange() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ? null : xmlTable.getCatalogTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmUniqueConstraint constraint : this.getUniqueConstraints()) {
- result = constraint.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * called if the database is connected:
- * name, schema, catalog
- */
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.tableNameTouches(pos)) {
- return this.getCandidateTableNames();
- }
- if (this.schemaTouches(pos)) {
- return this.getCandidateSchemata();
- }
- if (this.catalogTouches(pos)) {
- return this.getCandidateCatalogs();
- }
- return null;
- }
-
- // ********* content assist : table
-
- protected boolean tableNameTouches(int pos) {
- X table = this.getXmlTable();
- return (table != null) && (table.nameTouches(pos));
- }
-
- protected Iterable<String> getCandidateTableNames() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema != null) ? dbSchema.getSortedTableIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********* content assist : schema
-
- protected boolean schemaTouches(int pos) {
- X table = this.getXmlTable();
- return (table != null) && (table.schemaTouches(pos));
- }
-
- protected Iterable<String> getCandidateSchemata() {
- if (this.getDbSchemaContainer() == null)
- return EmptyIterable.<String>instance();
- else
- return this.getDbSchemaContainer().getSortedSchemaIdentifiers();
- }
-
- // ********* content assist : catalog
-
- protected boolean catalogTouches(int pos) {
- X table = this.getXmlTable();
- return (table != null) && (table.catalogTouches(pos));
- }
-
- protected Iterable<String> getCandidateCatalogs() {
- Database db = this.getDatabase();
- return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** misc **********
-
- /**
- * covariant override
- */
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- protected void initializeFrom(ReadOnlyTable oldTable) {
- this.setSpecifiedName(oldTable.getSpecifiedName());
- this.setSpecifiedCatalog(oldTable.getSpecifiedCatalog());
- this.setSpecifiedSchema(oldTable.getSpecifiedSchema());
- for (ReadOnlyUniqueConstraint constraint : oldTable.getUniqueConstraints()) {
- this.addUniqueConstraint().initializeFrom(constraint);
- }
- }
-
- protected void initializeFromVirtual(ReadOnlyTable virtualTable) {
- this.setSpecifiedName(virtualTable.getName());
- // ignore other settings?
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.buildQualifiedName());
- }
-
- protected String buildQualifiedName() {
- return NameTools.buildQualifiedDatabaseObjectName(this.getCatalog(), this.getSchema(), this.getName());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
deleted file mode 100644
index e080f292a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.InheritanceType;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericTypeMappingValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> type mapping
- */
-public abstract class AbstractOrmTypeMapping<X extends XmlTypeMapping>
- extends AbstractOrmXmlContextNode
- implements OrmTypeMapping
-{
- // never null
- protected final X xmlTypeMapping;
-
- protected String class_;
-
- protected Boolean specifiedMetadataComplete;
- protected boolean overrideMetadataComplete;
-
- protected String specifiedParentClass;
- protected String defaultParentClass;
- protected String fullyQualifiedParentClass;
-
- protected AbstractOrmTypeMapping(OrmPersistentType parent, X xmlTypeMapping) {
- super(parent);
- this.xmlTypeMapping = xmlTypeMapping;
- this.class_ = xmlTypeMapping.getClassName();
- this.specifiedMetadataComplete = xmlTypeMapping.getMetadataComplete();
- this.specifiedParentClass = this.buildSpecifiedParentClass();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setClass_(this.xmlTypeMapping.getClassName());
- this.setSpecifiedMetadataComplete_(this.xmlTypeMapping.getMetadataComplete());
- this.setSpecifiedParentClass_(this.buildSpecifiedParentClass());
- }
-
- @Override
- public void update() {
- super.update();
- this.setOverrideMetadataComplete(this.buildOverrideMetadataComplete());
- this.setDefaultParentClass(this.buildDefaultParentClass());
- this.setFullyQualifiedParentClass(this.buildFullyQualifiedParentClass());
- }
-
-
- // ********** class **********
-
- public String getClass_() {
- return this.class_;
- }
-
- public void setClass(String class_) {
- this.setClass_(class_);
- this.xmlTypeMapping.setClassName(class_);
- }
-
- protected void setClass_(String class_) {
- String old = this.class_;
- this.class_ = class_;
- this.firePropertyChanged(CLASS_PROPERTY, old, class_);
- }
-
-
- // ********** metadata complete **********
-
- /**
- * If <code>entity-mappings/persistence-unit-metadata/xml-mapping-metadata-complete</code>
- * is specified, it overrides anything set here.
- */
- public boolean isMetadataComplete() {
- if (this.overrideMetadataComplete) {
- return true;
- }
- return (this.specifiedMetadataComplete != null) ? this.specifiedMetadataComplete.booleanValue() : false;
- }
-
- public Boolean getSpecifiedMetadataComplete() {
- return this.specifiedMetadataComplete;
- }
-
- public void setSpecifiedMetadataComplete(Boolean metadataComplete) {
- this.setSpecifiedMetadataComplete_(metadataComplete);
- this.xmlTypeMapping.setMetadataComplete(metadataComplete);
- }
-
- protected void setSpecifiedMetadataComplete_(Boolean metadataComplete) {
- Boolean old = this.specifiedMetadataComplete;
- this.specifiedMetadataComplete = metadataComplete;
- this.firePropertyChanged(SPECIFIED_METADATA_COMPLETE_PROPERTY, old, metadataComplete);
- }
-
- public boolean isOverrideMetadataComplete() {
- return this.overrideMetadataComplete;
- }
-
- protected void setOverrideMetadataComplete(boolean metadataComplete) {
- boolean old = this.overrideMetadataComplete;
- this.overrideMetadataComplete = metadataComplete;
- this.firePropertyChanged(OVERRIDE_METADATA_COMPLETE_PROPERTY, old, metadataComplete);
- }
-
- protected boolean buildOverrideMetadataComplete() {
- return this.getPersistenceUnit().isXmlMappingMetadataComplete();
- }
-
-
- // ********** fully-qualified parent class **********
-
- public String getFullyQualifiedParentClass() {
- return this.fullyQualifiedParentClass;
- }
-
- protected void setFullyQualifiedParentClass(String parentClass) {
- String old = this.fullyQualifiedParentClass;
- this.fullyQualifiedParentClass = parentClass;
- this.firePropertyChanged(FULLY_QUALIFIED_PARENT_CLASS_PROPERTY, old, parentClass);
- }
-
- protected String buildFullyQualifiedParentClass() {
- return (this.specifiedParentClass == null) ?
- this.defaultParentClass :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedParentClass);
- }
-
- // ********** parent class **********
-
- public String getParentClass() {
- return (this.specifiedParentClass != null) ? this.specifiedParentClass : this.defaultParentClass;
- }
-
- public String getSpecifiedParentClass() {
- return this.specifiedParentClass;
- }
-
- public void setSpecifiedParentClass(String parentClass) {
- this.setSpecifiedParentClass_(parentClass);
- this.setSpecifiedParentClassInXml(parentClass);
- }
-
- protected void setSpecifiedParentClass_(String parentClass) {
- String old = this.specifiedParentClass;
- this.specifiedParentClass = parentClass;
- this.firePropertyChanged(SPECIFIED_PARENT_CLASS_PROPERTY, old, parentClass);
- }
-
- /**
- * subclasses must override if they support specifying a parent class
- */
- protected void setSpecifiedParentClassInXml(String parentClass) {
- //no-op
- }
-
- /**
- * subclasses must override if they support specifying a parent class
- */
- protected String buildSpecifiedParentClass() {
- return null;
- }
-
- public String getDefaultParentClass() {
- return this.defaultParentClass;
- }
-
- protected void setDefaultParentClass(String parentClass) {
- String old = this.defaultParentClass;
- this.defaultParentClass = parentClass;
- this.firePropertyChanged(DEFAULT_PARENT_CLASS_PROPERTY, old, parentClass);
- }
-
- protected String buildDefaultParentClass() {
- JavaResourceType javaResourceType = this.getJavaResourceType();
- return (javaResourceType == null) ? null : javaResourceType.getSuperclassQualifiedName();
- }
-
- protected PersistentType getResolvedParentClass() {
- if (this.fullyQualifiedParentClass == null) {
- return null;
- }
- return this.getPersistenceUnit().getPersistentType(this.fullyQualifiedParentClass);
- }
-
-
- // ********** Java type mapping **********
-
- public JavaTypeMapping getJavaTypeMapping() {
- JavaPersistentType javaType = this.getJavaPersistentType();
- if (javaType == null) {
- return null;
- }
- return (javaType.getMappingKey() == this.getKey()) ? javaType.getMapping() : null;
- }
-
- public JavaTypeMapping getJavaTypeMappingForDefaults() {
- return this.isMetadataComplete() ? null : this.getJavaTypeMapping();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmPersistentType getParent() {
- return (OrmPersistentType) super.getParent();
- }
-
- public OrmPersistentType getPersistentType() {
- return this.getParent();
- }
-
- public String getName() {
- return this.getPersistentType().getName();
- }
-
- protected JavaPersistentType getJavaPersistentType() {
- return this.getPersistentType().getJavaPersistentType();
- }
-
- public JavaResourceType getJavaResourceType() {
- JavaPersistentType javaType = this.getJavaPersistentType();
- return (javaType == null) ? null : javaType.getJavaResourceType();
- }
-
- protected EntityMappings getEntityMappings() {
- return getPersistentType().getParent();
- }
-
- public boolean isMapped() {
- return true;
- }
-
- /**
- * A type's mapping is being changed. Copy the common settings from the old
- * mapping to the new (this).
- */
- public void initializeFrom(OrmTypeMapping oldMapping) {
- this.setClass(oldMapping.getClass_());
- this.setSpecifiedMetadataComplete(oldMapping.getSpecifiedMetadataComplete());
- this.setOverrideMetadataComplete(oldMapping.isOverrideMetadataComplete());
- }
-
- public X getXmlTypeMapping() {
- return this.xmlTypeMapping;
- }
-
- public boolean attributeIsDerivedId(String attributeName) {
- return TypeMappingTools.attributeIsDerivedId(this, attributeName);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getPersistentType().getName());
- }
-
-
- // ********** tables **********
-
- public String getPrimaryTableName() {
- return null;
- }
-
- public Table getPrimaryDbTable() {
- return null;
- }
-
- public Table resolveDbTable(String tableName) {
- return null;
- }
-
- public Schema getDbSchema() {
- return null;
- }
-
-
- // ********** attribute mappings **********
-
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return true;
- }
-
- public Iterable<AttributeMapping> getAttributeMappings() {
- return new TransformationIterable<OrmReadOnlyPersistentAttribute, AttributeMapping>(this.getPersistentType().getAttributes()) {
- @Override
- protected AttributeMapping transform(OrmReadOnlyPersistentAttribute attribute) {
- return attribute.getMapping();
- }
- };
- }
-
- public Iterable<AttributeMapping> getAllAttributeMappings() {
- return new CompositeIterable<AttributeMapping>(this.getAllAttributeMappingsLists());
- }
-
- protected Iterable<Iterable<AttributeMapping>> getAllAttributeMappingsLists() {
- return new TransformationIterable<TypeMapping, Iterable<AttributeMapping>>(this.getInheritanceHierarchy(), TypeMappingTools.ATTRIBUTE_MAPPINGS_TRANSFORMER);
- }
-
- public Iterable<String> getOverridableAttributeNames() {
- return new CompositeIterable<String>(this.getOverridableAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getOverridableAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getAttributeMappings(), AttributeMappingTools.ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER);
- }
-
- public Iterable<String> getAllOverridableAttributeNames() {
- return new CompositeIterable<String>(this.getAllOverridableAttributeNamesLists());
- }
-
- protected Iterable<Iterable<String>> getAllOverridableAttributeNamesLists() {
- return new TransformationIterable<TypeMapping, Iterable<String>>(this.getInheritanceHierarchy(), TypeMappingTools.OVERRIDABLE_ATTRIBUTE_NAMES_TRANSFORMER);
- }
-
- public Iterable<AttributeMapping> getAttributeMappings(final String mappingKey) {
- return new FilteringIterable<AttributeMapping>(CollectionTools.collection(this.getAttributeMappings())) {
- @Override
- protected boolean accept(AttributeMapping o) {
- return Tools.valuesAreEqual(o.getKey(), mappingKey);
- }
- };
- }
-
- public Iterable<AttributeMapping> getAllAttributeMappings(final String mappingKey) {
- return new FilteringIterable<AttributeMapping>(CollectionTools.collection(this.getAllAttributeMappings())) {
- @Override
- protected boolean accept(AttributeMapping o) {
- return Tools.valuesAreEqual(o.getKey(), mappingKey);
- }
- };
- }
-
- public Iterable<AttributeMapping> getNonTransientAttributeMappings() {
- return new FilteringIterable<AttributeMapping>(this.getAllAttributeMappings()) {
- @Override
- protected boolean accept(AttributeMapping attributeMapping) {
- return (attributeMapping.getKey() != MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
- }
- };
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- for (AttributeMapping attributeMapping : this.getAttributeMappings()) {
- Column column = attributeMapping.resolveOverriddenColumn(attributeName);
- if (column != null) {
- return column;
- }
- }
- if ( ! this.isMetadataComplete()) {
- JavaPersistentType javaPersistentType = this.getJavaPersistentType();
- if (javaPersistentType != null) {
- return javaPersistentType.getMapping().resolveOverriddenColumn(attributeName);
- }
- }
- return null;
- }
-
- public Iterable<String> getOverridableAssociationNames() {
- return new CompositeIterable<String>(this.getOverridableAssociationNamesLists());
- }
-
- protected Iterable<Iterable<String>> getOverridableAssociationNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getAttributeMappings(), AttributeMappingTools.ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER);
- }
-
- public Iterable<String> getAllOverridableAssociationNames() {
- return new CompositeIterable<String>(this.getAllOverridableAssociationNamesLists());
- }
-
- protected Iterable<Iterable<String>> getAllOverridableAssociationNamesLists() {
- return new TransformationIterable<TypeMapping, Iterable<String>>(this.getInheritanceHierarchy(), TypeMappingTools.OVERRIDABLE_ASSOCIATION_NAMES_TRANSFORMER);
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- for (AttributeMapping attributeMapping : this.getAttributeMappings()) {
- Relationship relationship = attributeMapping.resolveOverriddenRelationship(attributeName);
- if (relationship != null) {
- return relationship;
- }
- }
- if ( ! this.isMetadataComplete()) {
- JavaPersistentType javaPersistentType = this.getJavaPersistentType();
- if (javaPersistentType != null) {
- return javaPersistentType.getMapping().resolveOverriddenRelationship(attributeName);
- }
- }
- return null;
- }
-
-
- // ********** inheritance hierarchy **********
-
- public TypeMapping getSuperTypeMapping() {
- PersistentType superPersistentType = this.getPersistentType().getSuperPersistentType();
- return (superPersistentType == null) ? null : superPersistentType.getMapping();
- }
-
- public Iterable<TypeMapping> getInheritanceHierarchy() {
- return this.convertToMappings(this.getPersistentType().getInheritanceHierarchy());
- }
-
- /**
- * Return the type mapping's "persistence" ancestors,
- * <em>excluding</em> the type mapping itself.
- * The returned iterator will return elements infinitely if the hierarchy
- * has a loop.
- */
- protected Iterable<TypeMapping> getAncestors() {
- return this.convertToMappings(this.getPersistentType().getAncestors());
- }
-
- protected Iterable<TypeMapping> convertToMappings(Iterable<PersistentType> types) {
- return new TransformationIterable<PersistentType, TypeMapping>(types) {
- @Override
- protected TypeMapping transform(PersistentType type) {
- return type.getMapping();
- }
- };
- }
-
- public InheritanceType getInheritanceStrategy() {
- return null;
- }
-
- public boolean isRootEntity() {
- return false;
- }
-
- public Entity getRootEntity() {
- return null;
- }
-
- // ********** text ranges **********
-
- public JpaStructureNode getStructureNode(int offset) {
- return this.xmlTypeMapping.containsOffset(offset) ? this.getPersistentType() : null;
- }
-
- public TextRange getSelectionTextRange() {
- return this.xmlTypeMapping.getSelectionTextRange();
- }
-
- public TextRange getClassTextRange() {
- return this.getValidationTextRange(this.xmlTypeMapping.getClassTextRange());
- }
-
- public TextRange getAttributesTextRange() {
- return this.getValidationTextRange(this.xmlTypeMapping.getAttributesTextRange());
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.xmlTypeMapping.getNameTextRange());
- }
-
- public boolean containsOffset(int textOffset) {
- return this.xmlTypeMapping.containsOffset(textOffset);
- }
-
-
- // ********** refactoring **********
-
- public DeleteEdit createDeleteEdit() {
- return this.xmlTypeMapping.createDeleteEdit();
- }
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return this.getPersistentType().isFor(originalType.getFullyQualifiedName('.')) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenameTypeEdit(originalType, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenameTypeEdit(IType originalType, String newName) {
- return this.xmlTypeMapping.createRenameTypeEdit(originalType, newName);
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return this.getPersistentType().isFor(originalType.getFullyQualifiedName('.')) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newPackage.getElementName())) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return this.getPersistentType().isIn(originalPackage) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenamePackageEdit(String newName) {
- return this.xmlTypeMapping.createRenamePackageEdit(newName);
- }
-
-
- // ********** generators **********
-
- public Iterable<Generator> getGenerators() {
- return new CompositeIterable<Generator>(this.getAttributeMappingGeneratorLists());
- }
-
- protected Iterable<Iterable<Generator>> getAttributeMappingGeneratorLists() {
- return new TransformationIterable<AttributeMapping, Iterable<Generator>>(this.getAttributeMappings()) {
- @Override
- protected Iterable<Generator> transform(AttributeMapping attributeMapping) {
- return attributeMapping.getGenerators();
- }
- };
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateClass(messages, reporter);
- }
-
- protected void validateClass(List<IMessage> messages, IReporter reporter) {
- if (StringTools.stringIsEmpty(this.class_)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_TYPE_UNSPECIFIED_CLASS,
- this,
- this.getClassTextRange()
- )
- );
- return;
- }
- this.buildTypeMappingValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildTypeMappingValidator() {
- return new GenericTypeMappingValidator(this, this.getJavaResourceType(), this.buildTextRangeResolver());
- }
-
- protected TypeMappingTextRangeResolver buildTextRangeResolver() {
- return new OrmTypeMappingTextRangeResolver(this);
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getPersistenceUnit().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange() {
- // this should never be null; also, the persistent type delegates
- // to here, so don't delegate back to it (or we will get a stack overflow) bug 355415
- TextRange textRange = this.xmlTypeMapping.getValidationTextRange();
- //*return an Empty text range because validation sometimes run concurrently
- //with the code adding the type mapping to xml; the IDOMNode might not
- //be set when this is called. Brian's batch update changes in 3.2 should
- //fix this problem. bug 358745
- return (textRange != null) ? textRange : TextRange.Empty.instance();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.classNameTouches(pos)) {
- return this.getCandidateClassNames();
- }
- return null;
- }
-
- private Iterable<String> getCandidateClassNames() {
- final String packageName = this.getEntityMappings().getPackage();
- if (!StringTools.stringIsEmpty(packageName)) {
- return new TransformationIterable<String, String>(this.getFilteredCandidateClassNames(packageName)) {
- @Override
- protected String transform(String className) {
- return className.substring(packageName.length()+1);
- }
- };
- }
- return this.getCandidateFullQulifiedClassNames();
- }
-
- private Iterable<String> getFilteredCandidateClassNames(final String packageName) {
- return new FilteringIterable<String>(this.getCandidateFullQulifiedClassNames()) {
- @Override
- protected boolean accept(String className) {
- return className.startsWith(packageName);
- }
- };
- }
-
- /**
- * @return names of the classes specified by class refs and jar files
- */
- // should return names of all the classes defined in the project?
- private Iterable<String> getCandidateFullQulifiedClassNames() {
- return new TransformationIterable<PersistentType, String>(
- this.getPersistenceUnit().getJavaPersistentTypes()) {
- @Override
- protected String transform(PersistentType pType) {
- return pType.getName();
- }
- };
- }
-
- private boolean classNameTouches(int pos) {
- return this.getXmlTypeMapping().classNameTouches(pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java
deleted file mode 100644
index 1e171a4207..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumnMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVersionMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> version mapping
- */
-public abstract class AbstractOrmVersionMapping<X extends XmlVersion>
- extends AbstractOrmAttributeMapping<X>
- implements OrmVersionMapping
-{
- protected final OrmColumn column;
-
- protected OrmConverter converter; // never null
-
-
- // the spec does not list Temporal explicitly,
- // but it is included in the orm.xml schema...
- protected static final OrmConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new OrmConverter.Adapter[] {
- OrmTemporalConverter.BasicAdapter.instance(),
- };
- protected static final Iterable<OrmConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<OrmConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractOrmVersionMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.column = this.buildColumn();
- this.converter = this.buildConverter();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- this.syncConverter();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- this.converter.update();
- }
-
-
- // ********** column **********
-
- public OrmColumn getColumn() {
- return this.column;
- }
-
- protected OrmColumn buildColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this);
- }
-
-
- // ********** converter **********
-
- public OrmConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- // note: we may also clear the XML value we want;
- // but if we leave it, the resulting sync will screw things up...
- this.clearXmlConverterValues();
- OrmConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.setConverter_(this.buildConverter(converterAdapter));
- this.converter.initialize();
- }
- }
-
- protected OrmConverter buildConverter(OrmConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getContextNodeFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(OrmConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- protected void clearXmlConverterValues() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- adapter.clearXmlValue(this.xmlAttributeMapping);
- }
- }
-
- protected OrmConverter buildConverter() {
- OrmXmlContextNodeFactory factory = this.getContextNodeFactory();
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- OrmConverter ormConverter = adapter.buildConverter(this, factory);
- if (ormConverter != null) {
- return ormConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- OrmConverter.Adapter adapter = this.getXmlConverterAdapter();
- if (adapter == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- if (this.converter.getType() == adapter.getConverterType()) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildNewConverter(this, this.getContextNodeFactory()));
- }
- }
- }
-
- /**
- * Return the first adapter whose converter value is set in the XML mapping.
- * Return <code>null</code> if there are no converter values in the XML.
- */
- protected OrmConverter.Adapter getXmlConverterAdapter() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.isActive(this.xmlAttributeMapping)) {
- return adapter;
- }
- }
- return null;
- }
-
- protected OrmConverter buildNullConverter() {
- return new NullOrmConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected OrmConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<OrmConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 30;
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmVersionMapping(this);
- }
-
- @Override
- protected void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
- super.initializeFromOrmColumnMapping(oldMapping);
- this.column.initializeFrom(oldMapping.getColumn());
- }
-
- public void addXmlAttributeMappingTo(Attributes xmlAttributes) {
- xmlAttributes.getVersions().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes xmlAttributes) {
- xmlAttributes.getVersions().remove(this.xmlAttributeMapping);
- }
-
-
- // ********** OrmColumn.Owner implementation **********
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.name;
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public XmlColumn getXmlColumn() {
- return this.xmlAttributeMapping.getColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.xmlAttributeMapping.setColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.xmlAttributeMapping.setColumn(null);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.column.validate(messages, reporter);
- this.converter.validate(messages, reporter);
- this.validateAttributeType(messages);
- }
-
- protected void validateAttributeType(List<IMessage> messages) {
- if (!ArrayTools.contains(SUPPORTED_TYPE_NAMES, this.getAttributeType())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE,
- new String[] {this.getName()},
- this,
- this.getNameTextRange()
- )
- );
- }
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.converter.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java
deleted file mode 100644
index e362a7160e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualBaseColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractOrmVirtualBaseColumn<O extends OrmReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
- extends AbstractOrmVirtualNamedColumn<O, C>
- implements VirtualBaseColumn, OrmReadOnlyBaseColumn
-{
- protected String specifiedTable;
- protected String defaultTable;
-
- protected Boolean specifiedUnique;
- protected boolean defaultUnique;
-
- protected Boolean specifiedNullable;
- protected boolean defaultNullable;
-
- protected Boolean specifiedInsertable;
- protected boolean defaultInsertable;
-
- protected Boolean specifiedUpdatable;
- protected boolean defaultUpdatable;
-
-
- protected AbstractOrmVirtualBaseColumn(XmlContextNode parent, O owner) {
- super(parent, owner);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedTable(this.buildSpecifiedTable());
- this.setDefaultTable(this.buildDefaultTable());
-
- this.setSpecifiedUnique(this.buildSpecifiedUnique());
- this.setDefaultUnique(this.buildDefaultUnique());
-
- this.setSpecifiedNullable(this.buildSpecifiedNullable());
- this.setDefaultNullable(this.buildDefaultNullable());
-
- this.setSpecifiedInsertable(this.buildSpecifiedInsertable());
- this.setDefaultInsertable(this.buildDefaultInsertable());
-
- this.setSpecifiedUpdatable(this.buildSpecifiedUpdatable());
- this.setDefaultUpdatable(this.buildDefaultUpdatable());
- }
-
-
- // ********** table **********
-
- public String getTable() {
- return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
- }
-
- public String getSpecifiedTable() {
- return this.specifiedTable;
- }
-
- protected void setSpecifiedTable(String table) {
- String old = this.specifiedTable;
- this.specifiedTable = table;
- this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
- }
-
- protected String buildSpecifiedTable() {
- return this.getOverriddenColumn().getSpecifiedTable();
- }
-
- public String getDefaultTable() {
- return this.defaultTable;
- }
-
- protected void setDefaultTable(String table) {
- String old = this.defaultTable;
- this.defaultTable = table;
- this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
- }
-
- protected String buildDefaultTable() {
- return this.owner.getDefaultTableName();
- }
-
-
- // ********** unique **********
-
- public boolean isUnique() {
- return (this.specifiedUnique != null) ? this.specifiedUnique.booleanValue() : this.isDefaultUnique();
- }
-
- public Boolean getSpecifiedUnique() {
- return this.specifiedUnique;
- }
-
- protected void setSpecifiedUnique(Boolean unique) {
- Boolean old = this.specifiedUnique;
- this.specifiedUnique = unique;
- this.firePropertyChanged(SPECIFIED_UNIQUE_PROPERTY, old, unique);
- }
-
- protected Boolean buildSpecifiedUnique() {
- return this.getOverriddenColumn().getSpecifiedUnique();
- }
-
- public boolean isDefaultUnique() {
- return this.defaultUnique;
- }
-
- protected void setDefaultUnique(boolean unique) {
- boolean old = this.defaultUnique;
- this.defaultUnique = unique;
- this.firePropertyChanged(DEFAULT_UNIQUE_PROPERTY, old, unique);
- }
-
- protected boolean buildDefaultUnique() {
- return DEFAULT_UNIQUE;
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return (this.specifiedNullable != null) ? this.specifiedNullable.booleanValue() : this.isDefaultNullable();
- }
-
- public Boolean getSpecifiedNullable() {
- return this.specifiedNullable;
- }
-
- protected void setSpecifiedNullable(Boolean nullable) {
- Boolean old = this.specifiedNullable;
- this.specifiedNullable = nullable;
- this.firePropertyChanged(SPECIFIED_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected Boolean buildSpecifiedNullable() {
- return this.getOverriddenColumn().getSpecifiedNullable();
- }
-
- public boolean isDefaultNullable() {
- return this.defaultNullable;
- }
-
- protected void setDefaultNullable(boolean nullable) {
- boolean old = this.defaultNullable;
- this.defaultNullable = nullable;
- this.firePropertyChanged(DEFAULT_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected boolean buildDefaultNullable() {
- return DEFAULT_NULLABLE;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return (this.specifiedInsertable != null) ? this.specifiedInsertable.booleanValue() : this.isDefaultInsertable();
- }
-
- public Boolean getSpecifiedInsertable() {
- return this.specifiedInsertable;
- }
-
- protected void setSpecifiedInsertable(Boolean insertable) {
- Boolean old = this.specifiedInsertable;
- this.specifiedInsertable = insertable;
- this.firePropertyChanged(SPECIFIED_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected Boolean buildSpecifiedInsertable() {
- return this.getOverriddenColumn().getSpecifiedInsertable();
- }
-
- public boolean isDefaultInsertable() {
- return this.defaultInsertable;
- }
-
- protected void setDefaultInsertable(boolean insertable) {
- boolean old = this.defaultInsertable;
- this.defaultInsertable = insertable;
- this.firePropertyChanged(DEFAULT_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected boolean buildDefaultInsertable() {
- return DEFAULT_INSERTABLE;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return (this.specifiedUpdatable != null) ? this.specifiedUpdatable.booleanValue() : this.isDefaultUpdatable();
- }
-
- public Boolean getSpecifiedUpdatable() {
- return this.specifiedUpdatable;
- }
-
- protected void setSpecifiedUpdatable(Boolean updatable) {
- Boolean old = this.specifiedUpdatable;
- this.specifiedUpdatable = updatable;
- this.firePropertyChanged(SPECIFIED_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected Boolean buildSpecifiedUpdatable() {
- return this.getOverriddenColumn().getSpecifiedUpdatable();
- }
-
- public boolean isDefaultUpdatable() {
- return this.defaultUpdatable;
- }
-
- protected void setDefaultUpdatable(boolean updatable) {
- boolean old = this.defaultUpdatable;
- this.defaultUpdatable = updatable;
- this.firePropertyChanged(DEFAULT_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected boolean buildDefaultUpdatable() {
- return DEFAULT_UPDATABLE;
- }
-
-
- // ********** misc **********
-
- public boolean tableNameIsInvalid() {
- return this.owner.tableNameIsInvalid(this.getTable());
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.owner.getCandidateTableNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getTableTextRange() {
- return this.getValidationTextRange();
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmTableColumnTextRangeResolver(this);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java
deleted file mode 100644
index 93ba7dc0a4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualNamedColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> virtual<ul>
- * <li>column
- * <li>join column
- * <li>primary key join column
- * </ul>
- * <strong>NB:</strong> all state is sync'ed/updated in {@link #update()}
- * because <em>all</em> of its derived from the context model (i.e. none of it
- * is derived from the resource model).
- */
-public abstract class AbstractOrmVirtualNamedColumn<O extends ReadOnlyNamedColumn.Owner, C extends ReadOnlyNamedColumn>
- extends AbstractOrmXmlContextNode
- implements VirtualNamedColumn, OrmReadOnlyNamedColumn
-{
- protected final O owner;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String columnDefinition;
-
-
- protected AbstractOrmVirtualNamedColumn(XmlContextNode parent, O owner) {
- super(parent);
- this.owner = owner;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedName(this.buildSpecifiedName());
- this.setDefaultName(this.buildDefaultName());
-
- this.setColumnDefinition(this.buildColumnDefinition());
- }
-
-
- // ********** column **********
-
- /**
- * This should never return <code>null</code>.
- */
- public abstract C getOverriddenColumn();
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- protected void setSpecifiedName(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- return this.getOverriddenColumn().getSpecifiedName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultName() {
- return this.owner.getDefaultColumnName(this);
- }
-
-
- // ********** column definition **********
-
- public String getColumnDefinition() {
- return this.columnDefinition;
- }
-
- protected void setColumnDefinition(String columnDefinition) {
- String old = this.columnDefinition;
- this.columnDefinition = columnDefinition;
- this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, columnDefinition);
- }
-
- protected String buildColumnDefinition() {
- return this.getOverriddenColumn().getColumnDefinition();
- }
-
-
- // ********** database stuff **********
-
- protected Column getDbColumn() {
- Table table = this.getDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getName());
- }
-
- public Table getDbTable() {
- return this.owner.resolveDbTable(this.getTable());
- }
-
- public boolean isResolved() {
- return this.getDbColumn() != null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.buildColumnValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildColumnValidator() {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver());
- }
-
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmNamedColumnTextRangeResolver(this);
- }
-
- public TextRange getValidationTextRange() {
- return this.getParent().getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange();
- }
-
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public boolean isVirtual() {
- return true;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- String table = this.getTable();
- if (table != null) {
- sb.append(table);
- sb.append('.');
- }
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java
deleted file mode 100644
index 2ab7e94013..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.VirtualNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedDiscriminatorColumn;
-
-public abstract class AbstractOrmVirtualNamedDiscriminatorColumn<O extends OrmReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
- extends AbstractOrmVirtualNamedColumn<O, C>
- implements VirtualNamedDiscriminatorColumn, OrmReadOnlyNamedDiscriminatorColumn
-{
- protected Integer specifiedLength;
- protected int defaultLength;
-
- protected DiscriminatorType specifiedDiscriminatorType;
- protected DiscriminatorType defaultDiscriminatorType;
-
-
- protected AbstractOrmVirtualNamedDiscriminatorColumn(XmlContextNode parent, O owner) {
- super(parent, owner);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedDiscriminatorType(this.buildSpecifiedDiscriminatorType());
- this.setDefaultDiscriminatorType(this.buildDefaultDiscriminatorType());
-
- this.setSpecifiedLength(this.buildSpecifiedLength());
- this.setDefaultLength(this.buildDefaultLength());
- }
-
-
-
- // ********** discriminator type **********
-
- public DiscriminatorType getDiscriminatorType() {
- return (this.specifiedDiscriminatorType != null) ? this.specifiedDiscriminatorType : this.defaultDiscriminatorType;
- }
-
- public DiscriminatorType getSpecifiedDiscriminatorType() {
- return this.specifiedDiscriminatorType;
- }
-
- protected void setSpecifiedDiscriminatorType(DiscriminatorType type) {
- DiscriminatorType old = this.specifiedDiscriminatorType;
- this.specifiedDiscriminatorType = type;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, old, type);
- }
-
- protected DiscriminatorType buildSpecifiedDiscriminatorType() {
- return this.getOverriddenColumn().getSpecifiedDiscriminatorType();
- }
-
- public DiscriminatorType getDefaultDiscriminatorType() {
- return this.defaultDiscriminatorType;
- }
-
- protected void setDefaultDiscriminatorType(DiscriminatorType type) {
- DiscriminatorType old = this.defaultDiscriminatorType;
- this.defaultDiscriminatorType = type;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, type);
- }
-
- protected DiscriminatorType buildDefaultDiscriminatorType() {
- return this.owner.getDefaultDiscriminatorType();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- protected void setSpecifiedLength(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- return this.getOverriddenColumn().getSpecifiedLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int length) {
- int old = this.defaultLength;
- this.defaultLength = length;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, length);
- }
-
- protected int buildDefaultLength() {
- return this.owner.getDefaultLength();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java
deleted file mode 100644
index 54bb896f70..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
-import org.eclipse.jpt.jpa.core.context.VirtualReferenceTable;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractOrmVirtualReferenceTable<T extends ReadOnlyReferenceTable>
- extends AbstractOrmVirtualTable<T>
- implements VirtualReferenceTable
-{
- protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected OrmVirtualJoinColumn defaultJoinColumn;
-
-
- protected AbstractOrmVirtualReferenceTable(XmlContextNode parent, Owner owner, T overridenTable) {
- super(parent, owner, overridenTable);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedJoinColumns();
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<OrmVirtualJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<OrmVirtualJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public OrmVirtualJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.update();
- }
-
- protected ListIterable<ReadOnlyJoinColumn> getOverriddenJoinColumns() {
- return new SuperListIterableWrapper<ReadOnlyJoinColumn>(this.getOverriddenTable().getSpecifiedJoinColumns());
- }
-
- protected void moveSpecifiedJoinColumn(int index, OrmVirtualJoinColumn joinColumn) {
- this.specifiedJoinColumnContainer.moveContextElement(index, joinColumn);
- }
-
- protected OrmVirtualJoinColumn addSpecifiedJoinColumn(int index, ReadOnlyJoinColumn joinColumn) {
- return this.specifiedJoinColumnContainer.addContextElement(index, joinColumn);
- }
-
- protected void removeSpecifiedJoinColumn(OrmVirtualJoinColumn joinColumn) {
- this.specifiedJoinColumnContainer.removeContextElement(joinColumn);
- }
-
- protected ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> buildSpecifiedJoinColumnContainer() {
- return new SpecifiedJoinColumnContainer();
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmVirtualJoinColumn buildContextElement(ReadOnlyJoinColumn resourceElement) {
- return AbstractOrmVirtualReferenceTable.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyJoinColumn> getResourceElements() {
- return AbstractOrmVirtualReferenceTable.this.getOverriddenJoinColumns();
- }
- @Override
- protected ReadOnlyJoinColumn getResourceElement(OrmVirtualJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
-
- // ********** default join column **********
-
- public OrmVirtualJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(OrmVirtualJoinColumn joinColumn) {
- OrmVirtualJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<OrmVirtualJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<OrmVirtualJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<OrmVirtualJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- if (this.buildsDefaultJoinColumn()) {
- if (this.defaultJoinColumn == null) {
- this.setDefaultJoinColumn(this.buildJoinColumn(this.getOverriddenTable().getDefaultJoinColumn()));
- } else {
- this.defaultJoinColumn.update();
- }
- } else {
- this.setDefaultJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultJoinColumn() {
- return ! this.hasSpecifiedJoinColumns();
- }
-
-
- // ********** misc **********
-
- protected OrmVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn joinColumn) {
- return this.buildJoinColumn(this.joinColumnOwner, joinColumn);
- }
-
- protected OrmVirtualJoinColumn buildJoinColumn(OrmReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
- return this.getContextNodeFactory().buildOrmVirtualJoinColumn(this, columnOwner, joinColumn);
- }
-
- protected abstract OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner();
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- this.validateJoinColumns(messages, reporter);
- }
- }
-
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
- this.validateNodes(this.getJoinColumns(), messages, reporter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java
deleted file mode 100644
index 6024883875..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.NameTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.VirtualTable;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractOrmVirtualTable<T extends ReadOnlyTable>
- extends AbstractOrmXmlContextNode
- implements VirtualTable, OrmReadOnlyTable
-{
- protected final Owner owner;
-
- protected final T overriddenTable;
-
- protected String specifiedName;
- protected String defaultName;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected final ContextListContainer<OrmVirtualUniqueConstraint, ReadOnlyUniqueConstraint> uniqueConstraintContainer;
-
-
- protected AbstractOrmVirtualTable(XmlContextNode parent, Owner owner, T overridenTable) {
- super(parent);
- this.owner = owner;
- this.overriddenTable = overridenTable;
- this.uniqueConstraintContainer = this.buildUniqueConstraintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedName(this.buildSpecifiedName());
- this.setDefaultName(this.buildDefaultName());
-
- this.setSpecifiedSchema(this.buildSpecifiedSchema());
- this.setDefaultSchema(this.buildDefaultSchema());
-
- this.setSpecifiedCatalog(this.buildSpecifiedCatalog());
- this.setDefaultCatalog(this.buildDefaultCatalog());
-
- this.updateUniqueConstraints();
- }
-
-
- // ********** table **********
-
- /**
- * This should never return <code>null</code>.
- */
- public T getOverriddenTable() {
- return this.overriddenTable;
- }
-
-
- // ********** name **********
-
- public String getName() {
- return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
- }
-
- public String getSpecifiedName() {
- return this.specifiedName;
- }
-
- protected void setSpecifiedName(String name) {
- String old = this.specifiedName;
- this.specifiedName = name;
- this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedName() {
- return this.getOverriddenTable().getSpecifiedName();
- }
-
- public String getDefaultName() {
- return this.defaultName;
- }
-
- protected void setDefaultName(String name) {
- String old = this.defaultName;
- this.defaultName = name;
- this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
- }
-
- protected abstract String buildDefaultName();
-
-
- // ********** schema **********
-
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- protected void setSpecifiedSchema(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildSpecifiedSchema() {
- return this.getOverriddenTable().getSchema();
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected abstract String buildDefaultSchema();
-
-
- // ********** catalog **********
-
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- protected void setSpecifiedCatalog(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildSpecifiedCatalog() {
- return this.getOverriddenTable().getCatalog();
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected abstract String buildDefaultCatalog();
-
-
- // ********** unique constraints **********
-
- public ListIterable<OrmVirtualUniqueConstraint> getUniqueConstraints() {
- return this.uniqueConstraintContainer.getContextElements();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintContainer.getContextElementsSize();
- }
-
- public OrmVirtualUniqueConstraint getUniqueConstraint(int index) {
- return this.uniqueConstraintContainer.getContextElement(index);
- }
-
- protected void updateUniqueConstraints() {
- this.uniqueConstraintContainer.update();
- }
-
- protected ListIterable<ReadOnlyUniqueConstraint> getOverriddenUniqueConstraints() {
- return new SuperListIterableWrapper<ReadOnlyUniqueConstraint>(this.getOverriddenTable().getUniqueConstraints());
- }
-
- protected void moveUniqueConstraint(int index, OrmVirtualUniqueConstraint constraint) {
- this.uniqueConstraintContainer.moveContextElement(index, constraint);
- }
-
- protected OrmVirtualUniqueConstraint addUniqueConstraint(int index, ReadOnlyUniqueConstraint uniqueConstraint) {
- return this.uniqueConstraintContainer.addContextElement(index, uniqueConstraint);
- }
-
- protected OrmVirtualUniqueConstraint buildUniqueConstraint(ReadOnlyUniqueConstraint uniqueConstraint) {
- return this.getContextNodeFactory().buildOrmVirtualUniqueConstraint(this, uniqueConstraint);
- }
-
- protected void removeUniqueConstraint(OrmVirtualUniqueConstraint constraint) {
- this.uniqueConstraintContainer.removeContextElement(constraint);
- }
-
- protected ContextListContainer<OrmVirtualUniqueConstraint, ReadOnlyUniqueConstraint> buildUniqueConstraintContainer() {
- return new UniqueConstraintContainer();
- }
-
- /**
- * unique constraint container
- */
- protected class UniqueConstraintContainer
- extends ContextListContainer<OrmVirtualUniqueConstraint, ReadOnlyUniqueConstraint>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected OrmVirtualUniqueConstraint buildContextElement(ReadOnlyUniqueConstraint resourceElement) {
- return AbstractOrmVirtualTable.this.buildUniqueConstraint(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyUniqueConstraint> getResourceElements() {
- return AbstractOrmVirtualTable.this.getOverriddenUniqueConstraints();
- }
- @Override
- protected ReadOnlyUniqueConstraint getResourceElement(OrmVirtualUniqueConstraint contextElement) {
- return contextElement.getOverriddenUniqueConstraint();
- }
- }
-
-
- // ********** database stuff **********
-
- public org.eclipse.jpt.jpa.db.Table getDbTable() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getName());
- }
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
- public boolean schemaIsResolved() {
- return this.getDbSchema() != null;
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public boolean catalogIsResolved() {
- String catalog = this.getCatalog();
- return (catalog == null) || (this.resolveDbCatalog(catalog) != null);
- }
-
- public boolean isResolved() {
- return this.getDbTable() != null;
- }
-
- protected boolean hasResolvedSchema() {
- return this.getDbSchema() != null;
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- protected boolean hasResolvedCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) || (this.resolveDbCatalog(catalog) != null);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.buildTableValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildTableValidator() {
- return this.owner.buildTableValidator(this, this.buildTextRangeResolver());
- }
-
- protected TableTextRangeResolver buildTextRangeResolver() {
- return new OrmTableTextRangeResolver(this);
- }
-
- public TextRange getValidationTextRange() {
- return this.getParent().getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange();
- }
-
- public TextRange getSchemaTextRange() {
- return this.getValidationTextRange();
- }
-
- public TextRange getCatalogTextRange() {
- return this.getValidationTextRange();
- }
-
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.buildQualifiedName());
- }
-
- protected String buildQualifiedName() {
- return NameTools.buildQualifiedDatabaseObjectName(this.getCatalog(), this.getSchema(), this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNode.java
deleted file mode 100644
index 75569ed57a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNode.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformFactory.SimpleVersion;
-import org.eclipse.jpt.jpa.core.internal.context.AbstractXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXml;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
-import org.eclipse.wst.common.project.facet.core.VersionFormatException;
-
-/**
- * Use this abstract class for context nodes that are part of an
- * <code>orm.xml</code> file.
- * This will not work for a pure {@link org.eclipse.jpt.jpa.core.context.MappingFile}
- * implementation.
- */
-public abstract class AbstractOrmXmlContextNode
- extends AbstractXmlContextNode
-{
- protected AbstractOrmXmlContextNode(JpaContextNode parent) {
- super(parent);
- }
-
-
- // ********** convenience methods **********
-
- @Override
- public EntityMappings getMappingFileRoot() {
- return (EntityMappings) super.getMappingFileRoot();
- }
-
- // TODO bjv need to cascade up containment hierarchy... (need public API:
- // JpaContextNode.getMappingFileDefinition() ?)
- protected OrmXmlDefinition getMappingFileDefinition() {
- OrmXml ormXml = this.getMappingFileRoot().getParent();
- if (ormXml instanceof GenericOrmXml) {
- return ((GenericOrmXml) ormXml).getMappingFileDefinition();
- }
- return (OrmXmlDefinition) this.getJpaPlatform().getResourceDefinition(this.getResourceType());
- }
-
- protected EFactory getResourceNodeFactory() {
- return this.getMappingFileDefinition().getResourceNodeFactory();
- }
-
- // TODO bjv need to add API and delegate to orm.xml/entity mappings interface...
- protected boolean isOrmXml2_0Compatible() {
- String version = this.getMappingFileRoot().getVersion();
- try {
- return (version != null) && SimpleVersion.VERSION_COMPARATOR.compare(version, "2.0") >= 0; //$NON-NLS-1$
- } catch (VersionFormatException ex) {
- return false;
- }
- }
-
- /**
- * Call {@link #isOrmXml2_0Compatible()} before calling this method.
- */
- protected OrmXml2_0ContextNodeFactory getContextNodeFactory2_0() {
- return (OrmXml2_0ContextNodeFactory) this.getContextNodeFactory();
- }
-
- protected OrmXmlContextNodeFactory getContextNodeFactory() {
- return this.getMappingFileDefinition().getContextNodeFactory();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
deleted file mode 100644
index bb750eb8f8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBasicMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratedValue;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToOneMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToManyMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOrderable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryHint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTableGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTransientMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVersionMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericEntityMappings;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmBasicMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmEmbeddable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmEntity;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmGeneratedValue;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmGeneratorContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmIdMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmJoinTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmLobConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmManyToManyMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmManyToOneMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmNamedQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmNullAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmOneToManyMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmOneToOneMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmOrderable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmQueryHint;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmTableGenerator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmTransientMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVersionMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.UnsupportedOrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlId;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
-
-public abstract class AbstractOrmXmlContextNodeFactory
- implements OrmXmlContextNodeFactory
-{
- public EntityMappings buildEntityMappings(OrmXml parent, XmlEntityMappings xmlEntityMappings) {
- return new GenericEntityMappings(parent, xmlEntityMappings);
- }
-
- public OrmPersistenceUnitMetadata buildOrmPersistenceUnitMetadata(EntityMappings parent) {
- return new GenericOrmPersistenceUnitMetadata(parent);
- }
-
- public OrmPersistenceUnitDefaults buildOrmPersistenceUnitDefaults(OrmPersistenceUnitMetadata parent) {
- return new GenericOrmPersistenceUnitDefaults(parent);
- }
-
- public OrmPersistentType buildOrmPersistentType(EntityMappings parent, XmlTypeMapping resourceMapping) {
- return new GenericOrmPersistentType(parent, resourceMapping);
- }
-
- public OrmEntity buildOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping) {
- return new GenericOrmEntity(parent, resourceMapping);
- }
-
- public OrmMappedSuperclass buildOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping) {
- return new GenericOrmMappedSuperclass(parent, resourceMapping);
- }
-
- public OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
- return new GenericOrmEmbeddable(parent, resourceMapping);
- }
-
- public OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentType parent, XmlAttributeMapping xmlMapping) {
- return new GenericOrmPersistentAttribute(parent, xmlMapping);
- }
-
- public OrmReadOnlyPersistentAttribute buildVirtualOrmPersistentField(OrmPersistentType parent, JavaResourceField javaResourceField) {
- return new VirtualOrmPersistentAttribute(parent, javaResourceField);
- }
-
- public OrmReadOnlyPersistentAttribute buildVirtualOrmPersistentProperty(OrmPersistentType parent, JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- return new VirtualOrmPersistentAttribute(parent, javaResourceGetter, javaResourceSetter);
- }
-
- public OrmTable buildOrmTable(OrmEntity parent, Table.Owner owner) {
- return new GenericOrmTable(parent, owner);
- }
-
- public OrmSecondaryTable buildOrmSecondaryTable(OrmEntity parent, Table.Owner owner, XmlSecondaryTable xmlSecondaryTable) {
- return new GenericOrmSecondaryTable(parent, owner, xmlSecondaryTable);
- }
-
- public OrmVirtualSecondaryTable buildOrmVirtualSecondaryTable(OrmEntity parent, ReadOnlyTable.Owner owner, JavaSecondaryTable javaSecondaryTable) {
- return new GenericOrmVirtualSecondaryTable(parent, owner, javaSecondaryTable);
- }
-
- public OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn) {
- return new GenericOrmPrimaryKeyJoinColumn(parent, owner, resourcePrimaryKeyJoinColumn);
- }
-
- public OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn) {
- return new GenericOrmVirtualPrimaryKeyJoinColumn(parent, owner, javaPrimaryKeyJoinColumn);
- }
-
- public OrmJoinTable buildOrmJoinTable(OrmJoinTableRelationshipStrategy parent, Table.Owner owner) {
- return new GenericOrmJoinTable(parent, owner);
- }
-
- public OrmVirtualJoinTable buildOrmVirtualJoinTable(OrmVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable) {
- return new GenericOrmVirtualJoinTable(parent, owner, overriddenTable);
- }
-
- public OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn xmlJoinColumn) {
- return new GenericOrmJoinColumn(parent, owner, xmlJoinColumn);
- }
-
- public OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
- return new GenericOrmVirtualJoinColumn(parent, owner, overriddenColumn);
- }
-
- public OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner) {
- return new GenericOrmAttributeOverrideContainer(parent, owner);
- }
-
- public OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner) {
- return new GenericOrmAssociationOverrideContainer(parent, owner);
- }
-
- public OrmAttributeOverride buildOrmAttributeOverride(OrmAttributeOverrideContainer parent, XmlAttributeOverride xmlOverride) {
- return new GenericOrmAttributeOverride(parent, xmlOverride);
- }
-
- public OrmVirtualAttributeOverride buildOrmVirtualAttributeOverride(OrmAttributeOverrideContainer parent, String name) {
- return new GenericOrmVirtualAttributeOverride(parent, name);
- }
-
- public OrmAssociationOverride buildOrmAssociationOverride(OrmAssociationOverrideContainer parent, XmlAssociationOverride xmlOverride) {
- return new GenericOrmAssociationOverride(parent, xmlOverride);
- }
-
- public OrmVirtualAssociationOverride buildOrmVirtualAssociationOverride(OrmAssociationOverrideContainer parent, String name) {
- return new GenericOrmVirtualAssociationOverride(parent, name);
- }
-
- public OrmOverrideRelationship buildOrmOverrideRelationship(OrmAssociationOverride parent) {
- return new GenericOrmOverrideRelationship(parent);
- }
-
- public OrmVirtualOverrideRelationship buildOrmVirtualOverrideRelationship(OrmVirtualAssociationOverride parent) {
- return new GenericOrmVirtualOverrideRelationship(parent);
- }
-
- public OrmDiscriminatorColumn buildOrmDiscriminatorColumn(OrmEntity parent, OrmDiscriminatorColumn.Owner owner) {
- return new GenericOrmDiscriminatorColumn(parent, owner);
- }
-
- public OrmColumn buildOrmColumn(XmlContextNode parent, OrmColumn.Owner owner) {
- return new GenericOrmColumn(parent, owner);
- }
-
- public OrmVirtualColumn buildOrmVirtualColumn(XmlContextNode parent, OrmVirtualColumn.Owner owner) {
- return new GenericOrmVirtualColumn(parent, owner);
- }
-
- public OrmGeneratedValue buildOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue resourceGeneratedValue) {
- return new GenericOrmGeneratedValue(parent, resourceGeneratedValue);
- }
-
- public OrmGeneratorContainer buildOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer resourceGeneratorContainer) {
- return new GenericOrmGeneratorContainer(parent, resourceGeneratorContainer);
- }
-
- public OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator) {
- return new GenericOrmSequenceGenerator(parent, resourceSequenceGenerator);
- }
-
- public OrmTableGenerator buildOrmTableGenerator(XmlContextNode parent, XmlTableGenerator resourceTableGenerator) {
- return new GenericOrmTableGenerator(parent, resourceTableGenerator);
- }
-
- public OrmQueryContainer buildOrmQueryContainer(XmlContextNode parent, XmlQueryContainer resourceQueryContainer) {
- return new GenericOrmQueryContainer(parent, resourceQueryContainer);
- }
-
- public OrmNamedNativeQuery buildOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery resourceNamedNativeQuery) {
- return new GenericOrmNamedNativeQuery(parent, resourceNamedNativeQuery);
- }
-
- public OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
- return new GenericOrmNamedQuery(parent, resourceNamedQuery);
- }
-
- public OrmQueryHint buildOrmQueryHint(OrmQuery parent, XmlQueryHint resourceQueryHint) {
- return new GenericOrmQueryHint(parent, resourceQueryHint);
- }
-
- public OrmBasicMapping buildOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic resourceMapping) {
- return new GenericOrmBasicMapping(parent, resourceMapping);
- }
-
- public OrmEmbeddedMapping buildOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded resourceMapping) {
- return new GenericOrmEmbeddedMapping(parent, resourceMapping);
- }
-
- public OrmEmbeddedIdMapping buildOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId resourceMapping) {
- return new GenericOrmEmbeddedIdMapping(parent, resourceMapping);
- }
-
- public OrmIdMapping buildOrmIdMapping(OrmPersistentAttribute parent, XmlId resourceMapping) {
- return new GenericOrmIdMapping(parent, resourceMapping);
- }
-
- public OrmManyToManyMapping buildOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany resourceMapping) {
- return new GenericOrmManyToManyMapping(parent, resourceMapping);
- }
-
- public OrmManyToOneMapping buildOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping) {
- return new GenericOrmManyToOneMapping(parent, resourceMapping);
- }
-
- public OrmOneToManyMapping buildOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping) {
- return new GenericOrmOneToManyMapping(parent, resourceMapping);
- }
-
- public OrmOneToOneMapping buildOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping) {
- return new GenericOrmOneToOneMapping(parent, resourceMapping);
- }
-
- public OrmTransientMapping buildOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient resourceMapping) {
- return new GenericOrmTransientMapping(parent, resourceMapping);
- }
-
- public OrmVersionMapping buildOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion resourceMapping) {
- return new GenericOrmVersionMapping(parent, resourceMapping);
- }
-
- public OrmAttributeMapping buildOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping) {
- return new GenericOrmNullAttributeMapping(parent, resourceMapping);
- }
-
- public OrmAttributeMapping buildUnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping) {
- return new UnsupportedOrmAttributeMapping(parent, resourceMapping);
- }
-
- public OrmUniqueConstraint buildOrmUniqueConstraint(XmlContextNode parent, UniqueConstraint.Owner owner, XmlUniqueConstraint resourceUniqueConstraint) {
- return new GenericOrmUniqueConstraint(parent, owner, resourceUniqueConstraint);
- }
-
- public OrmVirtualUniqueConstraint buildOrmVirtualUniqueConstraint(XmlContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint) {
- return new GenericOrmVirtualUniqueConstraint(parent, overriddenUniqueConstraint);
- }
-
- public OrmConverter buildOrmBaseEnumeratedConverter(OrmAttributeMapping parent, OrmBaseEnumeratedConverter.Owner owner) {
- return new GenericOrmBaseEnumeratedConverter(parent, owner);
- }
-
- public OrmConverter buildOrmLobConverter(OrmAttributeMapping parent, OrmConverter.Owner owner) {
- return new GenericOrmLobConverter(parent, owner);
- }
-
- public OrmConverter buildOrmBaseTemporalConverter(OrmAttributeMapping parent, OrmBaseTemporalConverter.Owner owner) {
- return new GenericOrmBaseTemporalConverter(parent, owner);
- }
-
- public OrmOrderable buildOrmOrderable(OrmAttributeMapping parent) {
- return new GenericOrmOrderable(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlDefinition.java
deleted file mode 100644
index 9bc92f0f24..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlDefinition.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.orm;
-
-import java.util.ArrayList;
-
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.UnsupportedOrmAttributeMappingDefinition;
-
-/**
- * All the state in the definition should be "static"
- * (i.e. unchanging once it is initialized).
- */
-public abstract class AbstractOrmXmlDefinition
- implements OrmXmlDefinition
-{
- protected final OrmXmlContextNodeFactory factory;
-
- protected ArrayList<OrmTypeMappingDefinition> typeMappingDefinitions;
-
- protected ArrayList<OrmAttributeMappingDefinition> attributeMappingDefinitions;
-
-
- /**
- * zero-argument constructor
- */
- protected AbstractOrmXmlDefinition() {
- super();
- this.factory = this.buildContextNodeFactory();
- }
-
-
- // ********** factory **********
-
- protected abstract OrmXmlContextNodeFactory buildContextNodeFactory();
-
- public OrmXmlContextNodeFactory getContextNodeFactory() {
- return this.factory;
- }
-
-
- // ********** type mapping definitions **********
-
- public OrmTypeMappingDefinition getTypeMappingDefinition(String mappingKey) {
- for (OrmTypeMappingDefinition definition : this.getTypeMappingDefinitions()) {
- if (Tools.valuesAreEqual(definition.getKey(), mappingKey)) {
- return definition;
- }
- }
- throw new IllegalArgumentException("Illegal type mapping key: " + mappingKey); //$NON-NLS-1$
- }
-
- /**
- * Return a list of mapping definitions to use for types in
- * <code>orm.xml</code> mapping files.
- * The order is unimportant.
- */
- protected synchronized ArrayList<OrmTypeMappingDefinition> getTypeMappingDefinitions() {
- if (this.typeMappingDefinitions == null) {
- this.typeMappingDefinitions = this.buildTypeMappingDefinitions();
- }
- return this.typeMappingDefinitions;
- }
-
- protected ArrayList<OrmTypeMappingDefinition> buildTypeMappingDefinitions() {
- ArrayList<OrmTypeMappingDefinition> definitions = new ArrayList<OrmTypeMappingDefinition>();
- this.addTypeMappingDefinitionsTo(definitions);
- return definitions;
- }
-
- protected void addTypeMappingDefinitionsTo(ArrayList<OrmTypeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, TYPE_MAPPING_DEFINITIONS);
- }
-
- /**
- * Order should not matter here; but we'll use the same order as for Java.
- * @see GenericJpaPlatformProvider
- */
- protected static final OrmTypeMappingDefinition[] TYPE_MAPPING_DEFINITIONS = new OrmTypeMappingDefinition[] {
- OrmEntityDefinition.instance(),
- OrmEmbeddableDefinition.instance(),
- OrmMappedSuperclassDefinition.instance()
- };
-
-
- // ********** attribute mapping definitions **********
-
- public OrmAttributeMappingDefinition getAttributeMappingDefinition(String mappingKey) {
- for (OrmAttributeMappingDefinition definition : this.getAttributeMappingDefinitions()) {
- if (Tools.valuesAreEqual(definition.getKey(), mappingKey)) {
- return definition;
- }
- }
- return UnsupportedOrmAttributeMappingDefinition.instance();
- }
-
- /**
- * Return a list of mapping definitions to use for attributes in
- * <code>orm.xml</code> mapping files.
- * The order is unimportant.
- */
- protected synchronized ArrayList<OrmAttributeMappingDefinition> getAttributeMappingDefinitions() {
- if (this.attributeMappingDefinitions == null) {
- this.attributeMappingDefinitions = this.buildAttributeMappingDefinitions();
- }
- return this.attributeMappingDefinitions;
- }
-
- protected ArrayList<OrmAttributeMappingDefinition> buildAttributeMappingDefinitions() {
- ArrayList<OrmAttributeMappingDefinition> definitions = new ArrayList<OrmAttributeMappingDefinition>();
- this.addAttributeMappingDefinitionsTo(definitions);
- return definitions;
- }
-
- protected abstract void addAttributeMappingDefinitionsTo(ArrayList<OrmAttributeMappingDefinition> definitions);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java
deleted file mode 100644
index 54f8074a48..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmIdClassReference;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AbstractXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> ID class reference
- */
-public class GenericOrmIdClassReference
- extends AbstractXmlContextNode
- implements OrmIdClassReference
-{
- protected final Owner owner;
-
- protected String specifiedIdClassName;
- protected String defaultIdClassName;
- protected String fullyQualifiedIdClassName;
- protected JavaPersistentType idClass;
-
-
- public GenericOrmIdClassReference(OrmTypeMapping parent, Owner owner) {
- super(parent);
- this.owner = owner;
- this.specifiedIdClassName = this.buildSpecifiedIdClassName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedIdClassName_(this.buildSpecifiedIdClassName());
- // sync the id class *after* we have the specified name
- this.syncIdClass();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultIdClassName(this.buildDefaultIdClassName());
- this.setFullyQualifiedIdClassName(this.buildFullyQualifiedIdClassName());
- // update the id class *after* we have the fully qualified name
- this.updateIdClass();
- }
-
-
- // ********** fully-qualified id class name **********
-
- public String getFullyQualifiedIdClassName() {
- return this.fullyQualifiedIdClassName;
- }
-
- /**
- * We clear out {@link #idClass} here because it needs to be rebuilt, the
- * fully qualified name has changed.
- */
- protected void setFullyQualifiedIdClassName(String name) {
- String old = this.fullyQualifiedIdClassName;
- this.fullyQualifiedIdClassName = name;
- if (this.firePropertyChanged(FULLY_QUALIFIED_ID_CLASS_PROPERTY, old, name)) {
- // clear out the Java id class here, it will be rebuilt during "update"
- if (this.idClass != null) {
- this.idClass.dispose();
- this.setIdClass(null);
- }
- }
- }
-
- protected String buildFullyQualifiedIdClassName() {
- return (this.specifiedIdClassName == null) ?
- //this is the fully qualified java id class name
- this.defaultIdClassName :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedIdClassName);
- }
-
-
- // ********** id class name **********
-
- public String getIdClassName() {
- return (this.specifiedIdClassName != null) ? this.specifiedIdClassName : this.defaultIdClassName;
- }
-
- public String getSpecifiedIdClassName() {
- return this.specifiedIdClassName;
- }
-
- public void setSpecifiedIdClassName(String name) {
- if (this.valuesAreDifferent(this.specifiedIdClassName, name)) {
- XmlClassReference xmlClassRef = this.getXmlIdClassRefForUpdate();
- this.setSpecifiedIdClassName_(name);
- xmlClassRef.setClassName(name);
- this.removeXmlIdClassRefIfUnset();
- }
- }
-
- protected void setSpecifiedIdClassName_(String name) {
- String old = this.specifiedIdClassName;
- this.specifiedIdClassName = name;
- this.firePropertyChanged(SPECIFIED_ID_CLASS_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedIdClassName() {
- XmlClassReference xmlIdClassRef = this.getXmlIdClassRef();
- return (xmlIdClassRef == null) ? null : xmlIdClassRef.getClassName();
- }
-
- public String getDefaultIdClassName() {
- return this.defaultIdClassName;
- }
-
- protected void setDefaultIdClassName(String name) {
- String old = this.defaultIdClassName;
- this.defaultIdClassName = name;
- this.firePropertyChanged(DEFAULT_ID_CLASS_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultIdClassName() {
- JavaIdClassReference javaRef = this.owner.getJavaIdClassReferenceForDefaults();
- return (javaRef == null) ? null : javaRef.getFullyQualifiedIdClassName();
- }
-
- public boolean isSpecified() {
- return this.getIdClassName() != null;
- }
-
-
- // ********** xml id class ref **********
-
- /**
- * Return null if the XML class ref does not exists.
- */
- protected XmlClassReference getXmlIdClassRef() {
- return this.getXmlIdClassContainer().getIdClass();
- }
-
- /**
- * Build the XML class ref if it does not exist.
- */
- protected XmlClassReference getXmlIdClassRefForUpdate() {
- XmlClassReference xmlClassRef = this.getXmlIdClassRef();
- return (xmlClassRef != null) ? xmlClassRef : this.buildXmlIdClassRef();
- }
-
- protected XmlClassReference buildXmlIdClassRef() {
- XmlClassReference ref = OrmFactory.eINSTANCE.createXmlClassReference();
- this.getXmlIdClassContainer().setIdClass(ref);
- return ref;
- }
-
- protected void removeXmlIdClassRefIfUnset() {
- if (this.getXmlIdClassRef().isUnset()) {
- this.removeXmlIdClassRef();
- }
- }
-
- protected void removeXmlIdClassRef() {
- this.getXmlIdClassContainer().setIdClass(null);
- }
-
-
- // ********** id class **********
-
- public JavaPersistentType getIdClass() {
- return this.idClass;
- }
-
- protected void setIdClass(JavaPersistentType idClass) {
- JavaPersistentType old = this.idClass;
- this.idClass = idClass;
- this.firePropertyChanged(ID_CLASS_PROPERTY, old, idClass);
- }
-
- /**
- * If the fully qualified ID class name changes during
- * <em>update</em>, the ID class will be cleared out in
- * {@link #setFullyQualifiedIdClassName(String)}. If we get here and
- * the ID class is still present, we can
- * <code>sync</code> it. In some circumstances it will be obsolete
- * since the name is changed during <em>update</em> (the id class name and
- * the entity mapping's package affect the fully qualified name)
- *
- * @see #updateIdClass()
- */
- protected void syncIdClass() {
- if (this.idClass != null) {
- this.idClass.synchronizeWithResourceModel();
- }
- }
-
- /**
- * @see #syncIdClass()
- */
- protected void updateIdClass() {
- if (this.fullyQualifiedIdClassName == null) {
- if (this.idClass != null) {
- this.idClass.dispose();
- this.setIdClass(null);
- }
- } else {
- if (this.idClass == null) {
- this.setIdClass(this.buildIdClass());
- } else {
- if (this.idClass.getName().equals(this.fullyQualifiedIdClassName)) {
- this.idClass.update();
- } else {
- this.idClass.dispose();
- this.setIdClass(this.buildIdClass());
- }
- }
- }
- }
-
- protected JavaResourceType resolveJavaResourceIdClass() {
- if (this.fullyQualifiedIdClassName == null) {
- return null;
- }
- JavaResourceType jrt = (JavaResourceType) this.getJpaProject().getJavaResourceType(this.fullyQualifiedIdClassName, Kind.TYPE);
- return jrt == null || jrt.isAnnotatedWithAnyOf(getJpaProject().getTypeMappingAnnotationNames()) ? null : jrt;
- }
-
- protected JavaPersistentType buildIdClass() {
- JavaResourceType jrt = this.resolveJavaResourceIdClass();
- return jrt != null ? this.buildIdClass(jrt) : null;
- }
-
- protected JavaPersistentType buildIdClass(JavaResourceType resourceIdClass) {
- return this.getJpaFactory().buildJavaPersistentType(this, resourceIdClass);
- }
-
- public char getIdClassEnclosingTypeSeparator() {
- return '$';
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmTypeMapping getParent() {
- return (OrmTypeMapping) super.getParent();
- }
-
- protected OrmTypeMapping getTypeMapping() {
- return this.getParent();
- }
-
- protected OrmPersistentType getPersistentType() {
- return this.getTypeMapping().getPersistentType();
- }
-
- protected XmlIdClassContainer getXmlIdClassContainer() {
- return this.owner.getXmlIdClassContainer();
- }
-
- protected EntityMappings getEntityMappings() {
- return (EntityMappings) this.getMappingFileRoot();
- }
-
-
- // ********** PersistentType.Owner implementation **********
-
- public AccessType getOverridePersistentTypeAccess() {
- return this.getPersistentType().getAccess();
- }
-
- public AccessType getDefaultPersistentTypeAccess() {
- // this shouldn't be needed, since we've specified an override access, but just to be safe ...
- return this.getPersistentType().getAccess();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return (this.getXmlIdClassRef() != null) && this.isFor(originalType.getFullyQualifiedName('.')) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenameEdit(originalType, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenameEdit(IType originalType, String newName) {
- return this.getXmlIdClassRef().createRenameEdit(originalType, newName);
- }
-
- protected boolean isFor(String typeName) {
- return (this.idClass != null) && this.idClass.isFor(typeName);
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return (this.getXmlIdClassRef() != null) && this.isFor(originalType.getFullyQualifiedName('.')) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newPackage.getElementName())) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return (this.getXmlIdClassRef() != null) && this.isIn(originalPackage) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenamePackageEdit(String newName) {
- return this.getXmlIdClassRef().createRenamePackageEdit(newName);
- }
-
- protected boolean isIn(IPackageFragment originalPackage) {
- return (this.idClass != null) && this.idClass.isIn(originalPackage);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // most validation is done "holistically" from the type mapping level
- this.validateIdClass(messages, reporter);
- }
-
- protected void validateIdClass(List<IMessage> messages, IReporter reporter) {
- if (this.isSpecified()) {
- if (StringTools.stringIsEmpty(this.getIdClassName())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NAME_EMPTY,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
- IType idClassJdtType = JDTTools.findType(this.getJavaProject(), this.getFullyQualifiedIdClassName());
- if (idClassJdtType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_EXIST,
- new String[] {this.getFullyQualifiedIdClassName()},
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
-
- JavaResourceType jrt = this.getIdClassJavaResourceType();
- if (jrt != null) {
-
- if (!jrt.isPublic()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
-
- if (!JDTTools.typeIsSubType(this.getJavaProject(), jrt.getQualifiedName(), JDTTools.SERIALIZABLE_CLASS_NAME)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
-
- if (!jrt.hasEqualsMethod()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
-
- if (!jrt.hasHashCodeMethod()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
- new String[] {jrt.getQualifiedName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- }
- }
-
- protected JavaResourceType getIdClassJavaResourceType() {
- return (JavaResourceType) getEntityMappings().resolveJavaResourceType(this.getIdClassName(), Kind.TYPE);
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlValidationTextRange();
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
- }
-
- protected TextRange getXmlValidationTextRange() {
- XmlClassReference xmlIdClassRef = this.getXmlIdClassRef();
- return (xmlIdClassRef == null) ? null : xmlIdClassRef.getClassNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToManyRelationship.java
deleted file mode 100644
index 793c82627e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToManyRelationship.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToManyRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmManyToManyRelationship
- extends AbstractOrmMappingRelationship<OrmManyToManyMapping>
- implements OrmManyToManyRelationship
-{
- protected final OrmMappingMappedByRelationshipStrategy2_0 mappedByStrategy;
-
- protected final OrmMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
-
- public GenericOrmManyToManyRelationship(OrmManyToManyMapping parent) {
- super(parent);
- this.mappedByStrategy = this.buildMappedByStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mappedByStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.mappedByStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected OrmMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.mappedByStrategy.getMappedByAttribute() != null) {
- return this.mappedByStrategy;
- }
- return this.joinTableStrategy;
- }
-
-
- // ********** mapped by strategy **********
-
- public OrmMappedByRelationshipStrategy getMappedByStrategy() {
- return this.mappedByStrategy;
- }
-
- public boolean strategyIsMappedBy() {
- return this.strategy == this.mappedByStrategy;
- }
-
- public void setStrategyToMappedBy() {
- this.mappedByStrategy.addStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayBeMappedBy(AttributeMapping mapping) {
- return mapping.getKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- protected OrmMappingMappedByRelationshipStrategy2_0 buildMappedByStrategy() {
- return new GenericOrmMappedByRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public OrmJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public void setStrategyToJoinTable() {
- // join table is the default strategy, so no need to add to resource
- this.mappedByStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- protected OrmMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return new GenericOrmMappingJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromMappedByRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- }
-
- @Override
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- super.initializeFromMappedByRelationship(oldRelationship);
- this.mappedByStrategy.initializeFrom(oldRelationship.getMappedByStrategy());
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- protected XmlManyToMany getXmlMapping() {
- return (XmlManyToMany) super.getXmlMapping();
- }
-
- public XmlManyToMany getXmlContainer() {
- return this.getXmlMapping();
- }
-
- public boolean isOwner() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return this.mappedByStrategy.relationshipIsOwnedBy(mapping);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.mappedByStrategy.validate(messages, reporter);
- this.joinTableStrategy.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mappedByStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinTableStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToOneRelationship.java
deleted file mode 100644
index 2aa0160f42..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmManyToOneRelationship.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToOneMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmManyToOneRelationship
- extends AbstractOrmMappingRelationship<OrmManyToOneMapping>
- implements OrmManyToOneRelationship2_0
-{
- protected final OrmMappingJoinColumnRelationshipStrategy2_0 joinColumnStrategy;
-
- // JPA 2.0
- protected final OrmMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
-
- public GenericOrmManyToOneRelationship(OrmManyToOneMapping parent) {
- super(parent);
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected OrmMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.isJpa2_0Compatible()) {
- if (this.joinTableStrategy.getJoinTable() != null){
- return this.joinTableStrategy;
- }
- }
- return this.joinColumnStrategy;
- }
-
-
- // ********** join table strategy **********
-
- public OrmJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public void setStrategyToJoinTable() {
- this.joinTableStrategy.addStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return false;
- }
-
- protected OrmMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return this.isJpa2_0Compatible() ?
- new GenericOrmMappingJoinTableRelationshipStrategy(this) :
- new NullOrmJoinTableRelationshipStrategy(this);
- }
-
-
-
- // ********** join column strategy **********
-
- public OrmJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- // join column strategy is the default; so no need to add stuff,
- // just remove all the others
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- return this.joinTableStrategy.getJoinTable() == null;
- }
-
- protected OrmMappingJoinColumnRelationshipStrategy2_0 buildJoinColumnStrategy() {
- return new GenericOrmMappingJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromJoinColumnRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- @Override
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- super.initializeFromJoinColumnRelationship(oldRelationship);
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- protected XmlManyToOne getXmlMapping() {
- return (XmlManyToOne) super.getXmlMapping();
- }
-
- public XmlManyToOne getXmlContainer() {
- return this.getXmlMapping();
- }
-
- public boolean isOwner() {
- return true;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return false;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.joinColumnStrategy.validate(messages, reporter);
- this.joinTableStrategy.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinColumnStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinTableStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappedByRelationshipStrategy.java
deleted file mode 100644
index e5141fd8a5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappedByRelationshipStrategy.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedByRelationship;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmMappedByRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmMappingMappedByRelationshipStrategy2_0
-{
- protected String mappedByAttribute;
-
-
- public GenericOrmMappedByRelationshipStrategy(OrmMappedByRelationship parent) {
- super(parent);
- this.mappedByAttribute = this.getXmlMappedByMapping().getMappedBy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setMappedByAttribute_(this.getXmlMappedByMapping().getMappedBy());
- }
-
-
- // ********** mapped by attribute **********
-
- public String getMappedByAttribute() {
- return this.mappedByAttribute;
- }
-
- public void setMappedByAttribute(String mappedByAttribute) {
- this.setMappedByAttribute_(mappedByAttribute);
- this.getXmlMappedByMapping().setMappedBy(mappedByAttribute);
- }
-
- protected void setMappedByAttribute_(String mappedByAttribute) {
- String old = this.mappedByAttribute;
- this.mappedByAttribute = mappedByAttribute;
- this.firePropertyChanged(MAPPED_BY_ATTRIBUTE_PROPERTY, old, mappedByAttribute);
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmMappedByRelationship getParent() {
- return (OrmMappedByRelationship) super.getParent();
- }
-
- public OrmMappedByRelationship getRelationship() {
- return this.getParent();
- }
-
- protected XmlMappedByMapping getXmlMappedByMapping() {
- return this.getRelationship().getXmlContainer();
- }
-
- public void initializeFrom(MappedByRelationshipStrategy oldStrategy) {
- this.setMappedByAttribute(oldStrategy.getMappedByAttribute());
- }
-
- public String getTableName() {
- RelationshipMapping owner = this.getRelationshipOwner();
- return (owner == null) ? null : owner.getRelationship().getStrategy().getTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- RelationshipMapping owner = this.getRelationshipOwner();
- return (owner == null) ? null : owner.getRelationship().getStrategy().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- RelationshipMapping owner = this.getRelationshipOwner();
- return (owner != null) && owner.getRelationship().getStrategy().tableNameIsInvalid(tableName);
- }
-
- public String getColumnTableNotValidDescription() {
- // this will not be called if getRelationshipOwner() returns null
- return this.getRelationshipOwner().getRelationship().getStrategy().getColumnTableNotValidDescription();
- }
-
- protected RelationshipMapping getRelationshipOwner() {
- return this.getRelationshipMapping().getRelationshipOwner();
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public boolean relationshipIsOwnedBy(RelationshipMapping otherMapping) {
- String thisEntityName = this.getEntityName();
- Entity otherEntity = otherMapping.getResolvedTargetEntity();
- String otherEntityName = (otherEntity == null) ? null : otherEntity.getName();
- return Tools.valuesAreEqual(thisEntityName, otherEntityName) &&
- Tools.valuesAreEqual(this.mappedByAttribute, otherMapping.getName());
- }
-
- protected String getEntityName() {
- Entity entity = this.getRelationship().getEntity();
- return (entity == null) ? null : entity.getName();
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null; // mapped-by strategies cannot be overridden
- }
-
- public void addStrategy() {
- if (this.mappedByAttribute == null) {
- this.setMappedByAttribute(""); //$NON-NLS-1$
- }
- }
-
- public void removeStrategy() {
- if (this.mappedByAttribute != null) {
- this.setMappedByAttribute(null);
- }
- }
-
- public Iterable<String> getCandidateMappedByAttributeNames() {
- return this.getRelationshipMapping().getTargetEntityNonTransientAttributeNames();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (this.mappedByAttribute == null) {
- return;
- }
-
- Entity targetEntity = this.getRelationshipMapping().getResolvedTargetEntity();
- if (targetEntity == null) {
- return; // null target entity is validated elsewhere
- }
-
- AttributeMapping mappedByMapping = targetEntity.resolveAttributeMapping(this.mappedByAttribute);
-
- if (mappedByMapping == null) {
- messages.add(
- this.buildMessage(
- JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
- new String[] {this.mappedByAttribute}
- )
- );
- return;
- }
-
- if ( ! this.getRelationship().mayBeMappedBy(mappedByMapping)) {
- messages.add(
- this.buildMessage(
- JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
- new String[] {this.mappedByAttribute}
- )
- );
- return;
- }
-
- // if mappedByMapping is not a relationship owner, then it should have
- // been flagged in above rule (mappedByIsValid)
- if ( ! ((RelationshipMapping) mappedByMapping).isRelationshipOwner()) {
- messages.add(
- this.buildMessage(
- JpaValidationMessages.MAPPING_MAPPED_BY_ON_BOTH_SIDES,
- new String[] {this.mappedByAttribute}
- )
- );
- }
- }
-
- protected IMessage buildMessage(String msgID, String[] parms) {
- PersistentAttribute attribute = this.getRelationshipMapping().getPersistentAttribute();
- String attributeDescription = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
- parms = ArrayTools.add(parms, 0, attributeDescription);
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- parms,
- this,
- this.getValidationTextRange()
- );
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlMappedByMapping().getMappedByTextRange();
- return (textRange != null) ? textRange : this.getRelationship().getValidationTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.mappedByTouches(pos)) {
- return this.getCandidateMappedByAttributeNames();
- }
- return null;
- }
-
- protected boolean mappedByTouches(int pos) {
- return this.getXmlMappedByMapping().mappedByTouches(pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 29557dd400..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.db.Table;
-
-public class GenericOrmMappingJoinColumnRelationshipStrategy
- extends AbstractOrmJoinColumnRelationshipStrategy
- implements OrmMappingJoinColumnRelationshipStrategy2_0
-{
- protected final boolean targetForeignKey;
-
-
- /**
- * The default strategy is for a "source" foreign key.
- */
- public GenericOrmMappingJoinColumnRelationshipStrategy(OrmMappingJoinColumnRelationship parent) {
- this(parent, false);
- }
-
- public GenericOrmMappingJoinColumnRelationshipStrategy(OrmMappingJoinColumnRelationship parent, boolean targetForeignKey) {
- super(parent);
- this.targetForeignKey = targetForeignKey;
- }
-
-
- @Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- public boolean isOverridable() {
- return true;
- }
-
- public TypeMapping getRelationshipSource() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return this.targetForeignKey ?
- mapping.getResolvedTargetEntity() :
- mapping.getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return this.targetForeignKey ?
- mapping.getTypeMapping() :
- mapping.getResolvedTargetEntity();
- }
-
- protected Entity getRelationshipTargetEntity() {
- TypeMapping target = this.getRelationshipTarget();
- return (target instanceof Entity) ? (Entity) target : null;
- }
-
- public boolean isTargetForeignKey() {
- return this.targetForeignKey;
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return overrideRelationship.getJoinColumnStrategy();
- }
-
-
- // ********** validation **********
-
- public String getColumnTableNotValidDescription() {
- return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
- }
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
-
- // ********** join column owner **********
-
- protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- /**
- * by default, the join column is in the type mapping's primary table
- */
- public String getDefaultTableName() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- public String getAttributeName() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getRelationshipMapping().getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getRelationshipMapping().getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getRelationshipTargetEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getReferencedColumnDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmMappingJoinColumnRelationshipStrategy.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java
deleted file mode 100644
index 38e575d0c0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.InverseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableValidator;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
-
-public class GenericOrmMappingJoinTableRelationshipStrategy
- extends AbstractOrmJoinTableRelationshipStrategy
- implements OrmMappingJoinTableRelationshipStrategy2_0
-{
- public GenericOrmMappingJoinTableRelationshipStrategy(OrmMappingJoinTableRelationship parent) {
- super(parent);
- }
-
-
- public boolean isOverridable() {
- return this.getJpaPlatformVariation().isJoinTableOverridable();
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return overrideRelationship.getJoinTableStrategy();
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationshipMapping().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return getRelationshipMapping().getPersistentAttribute();
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new InverseJoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new JoinTableValidator(this.getPersistentAttribute(), (ReadOnlyJoinTable) table, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java
deleted file mode 100644
index deb9dc59d7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToManyMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToManyRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmOneToManyRelationship
- extends AbstractOrmMappingRelationship<OrmOneToManyMapping>
- implements OrmOneToManyRelationship2_0
-{
- protected final OrmMappingMappedByRelationshipStrategy2_0 mappedByStrategy;
-
- protected final OrmMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
- // JPA 2.0 or EclipseLink
- protected final boolean supportsJoinColumnStrategy;
- protected final OrmMappingJoinColumnRelationshipStrategy2_0 joinColumnStrategy;
-
-
- public GenericOrmOneToManyRelationship(OrmOneToManyMapping parent, boolean supportsJoinColumnStrategy) {
- super(parent);
- this.mappedByStrategy = this.buildMappedByStrategy();
- this.supportsJoinColumnStrategy = supportsJoinColumnStrategy;
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
-
- // build join table strategy last since it's dependent on the other strategies
- this.joinTableStrategy = this.buildJoinTableStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mappedByStrategy.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.mappedByStrategy.update();
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected OrmMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.mappedByStrategy.getMappedByAttribute() != null) {
- return this.mappedByStrategy;
- }
- if (this.supportsJoinColumnStrategy) {
- if (this.joinColumnStrategy.hasSpecifiedJoinColumns()) {
- return this.joinColumnStrategy;
- }
- }
- return this.joinTableStrategy;
- }
-
-
- // ********** mapped by strategy **********
-
- public OrmMappedByRelationshipStrategy getMappedByStrategy() {
- return this.mappedByStrategy;
- }
-
- public boolean strategyIsMappedBy() {
- return this.strategy == this.mappedByStrategy;
- }
-
- public final void setStrategyToMappedBy() {
- this.mappedByStrategy.addStrategy();
- this.joinTableStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayBeMappedBy(AttributeMapping mapping) {
- String key = mapping.getKey();
- if (key == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) {
- return true;
- }
- if (this.supportsJoinColumnStrategy) {
- return key == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
- return false;
- }
-
- protected OrmMappingMappedByRelationshipStrategy2_0 buildMappedByStrategy() {
- return new GenericOrmMappedByRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public OrmJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public final void setStrategyToJoinTable() {
- // join table is default, so no need to add to resource
- this.mappedByStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return (this.mappedByStrategy.getMappedByAttribute() == null) &&
- ! this.joinColumnStrategy.hasSpecifiedJoinColumns();
- }
-
- protected OrmMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return new GenericOrmMappingJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** join column strategy **********
-
- public OrmJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- this.joinColumnStrategy.addStrategy();
- this.mappedByStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- return false;
- }
-
- protected OrmMappingJoinColumnRelationshipStrategy2_0 buildJoinColumnStrategy() {
- return this.supportsJoinColumnStrategy ?
- new GenericOrmMappingJoinColumnRelationshipStrategy(this, true) : // true = target foreign key
- new NullOrmJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromMappedByRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- }
-
- @Override
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- super.initializeFromMappedByRelationship(oldRelationship);
- this.mappedByStrategy.initializeFrom(oldRelationship.getMappedByStrategy());
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- @Override
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- super.initializeFromJoinColumnRelationship(oldRelationship);
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- protected XmlOneToMany getXmlMapping() {
- return (XmlOneToMany) super.getXmlMapping();
- }
-
- public XmlOneToMany getXmlContainer() {
- return this.getXmlMapping();
- }
-
- public boolean isOwner() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return this.mappedByStrategy.relationshipIsOwnedBy(mapping);
- }
-
- @Override
- public boolean isTargetForeignKey() {
- return this.joinColumnStrategy.isTargetForeignKey();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.mappedByStrategy.validate(messages, reporter);
- this.joinTableStrategy.validate(messages, reporter);
- this.joinColumnStrategy.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mappedByStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinTableStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinColumnStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToOneRelationship.java
deleted file mode 100644
index 53a4c7eddb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToOneRelationship.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedByRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingMappedByRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmOneToOneRelationship
- extends AbstractOrmMappingRelationship<OrmOneToOneMapping>
- implements OrmOneToOneRelationship2_0
-{
- protected final OrmMappingMappedByRelationshipStrategy2_0 mappedByStrategy;
-
- protected final OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0 primaryKeyJoinColumnStrategy;
-
- // JPA 2.0
- protected final OrmMappingJoinTableRelationshipStrategy2_0 joinTableStrategy;
-
- protected final OrmMappingJoinColumnRelationshipStrategy2_0 joinColumnStrategy;
-
-
- public GenericOrmOneToOneRelationship(OrmOneToOneMapping parent) {
- super(parent);
- this.mappedByStrategy = this.buildMappedByStrategy();
- this.primaryKeyJoinColumnStrategy = this.buildPrimaryKeyJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
-
- this.strategy = this.buildStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mappedByStrategy.synchronizeWithResourceModel();
- this.primaryKeyJoinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.mappedByStrategy.update();
- this.primaryKeyJoinColumnStrategy.update();
- this.joinTableStrategy.update();
- this.joinColumnStrategy.update();
- }
-
-
- // ********** strategy **********
-
- @Override
- protected OrmMappingRelationshipStrategy2_0 buildStrategy() {
- if (this.mappedByStrategy.getMappedByAttribute() != null) {
- return this.mappedByStrategy;
- }
- if (this.primaryKeyJoinColumnStrategy.hasPrimaryKeyJoinColumns()) {
- return this.primaryKeyJoinColumnStrategy;
- }
- if (this.isJpa2_0Compatible()) {
- if (this.joinTableStrategy.getJoinTable() != null){
- return this.joinTableStrategy;
- }
- }
- return this.joinColumnStrategy;
- }
-
-
- // ********** mapped by strategy **********
-
- public OrmMappedByRelationshipStrategy getMappedByStrategy() {
- return this.mappedByStrategy;
- }
-
- public boolean strategyIsMappedBy() {
- return this.strategy == this.mappedByStrategy;
- }
-
- public void setStrategyToMappedBy() {
- this.mappedByStrategy.addStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.primaryKeyJoinColumnStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayBeMappedBy(AttributeMapping mapping) {
- return mapping.getKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- protected OrmMappingMappedByRelationshipStrategy2_0 buildMappedByStrategy() {
- return new GenericOrmMappedByRelationshipStrategy(this);
- }
-
-
- // ********** primary key join column strategy **********
-
- public OrmPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy() {
- return this.primaryKeyJoinColumnStrategy;
- }
-
- public boolean strategyIsPrimaryKeyJoinColumn() {
- return this.strategy == this.primaryKeyJoinColumnStrategy;
- }
-
- public void setStrategyToPrimaryKeyJoinColumn() {
- this.primaryKeyJoinColumnStrategy.addStrategy();
- this.mappedByStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- protected OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0 buildPrimaryKeyJoinColumnStrategy() {
- return new GenericOrmPrimaryKeyJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public OrmJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public void setStrategyToJoinTable() {
- this.joinTableStrategy.addStrategy();
- this.mappedByStrategy.removeStrategy();
- this.joinColumnStrategy.removeStrategy();
- this.primaryKeyJoinColumnStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- return false;
- }
-
- protected OrmMappingJoinTableRelationshipStrategy2_0 buildJoinTableStrategy() {
- return this.isJpa2_0Compatible() ?
- new GenericOrmMappingJoinTableRelationshipStrategy(this) :
- new NullOrmJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** join column strategy **********
-
- public OrmJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- // join column strategy is the default; so no need to add stuff,
- // just remove all the others
- this.mappedByStrategy.removeStrategy();
- this.primaryKeyJoinColumnStrategy.removeStrategy();
- this.joinTableStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- return (this.mappedByStrategy.getMappedByAttribute() == null) &&
- (this.primaryKeyJoinColumnStrategy.getPrimaryKeyJoinColumnsSize() == 0) &&
- (this.joinTableStrategy.getJoinTable() == null);
- }
-
- protected OrmMappingJoinColumnRelationshipStrategy2_0 buildJoinColumnStrategy() {
- return new GenericOrmMappingJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromMappedByRelationship(this);
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- // no other pk join column relationships yet
- }
-
- @Override
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- super.initializeFromMappedByRelationship(oldRelationship);
- this.mappedByStrategy.initializeFrom(oldRelationship.getMappedByStrategy());
- }
-
- @Override
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- super.initializeFromJoinTableRelationship(oldRelationship);
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- @Override
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- super.initializeFromJoinColumnRelationship(oldRelationship);
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- protected XmlOneToOne getXmlMapping() {
- return (XmlOneToOne) super.getXmlMapping();
- }
-
- public XmlOneToOne getXmlContainer() {
- return this.getXmlMapping();
- }
-
- public boolean isOwner() {
- return this.mappedByStrategy.getMappedByAttribute() == null;
- }
-
- public boolean isOwnedBy(RelationshipMapping mapping) {
- return this.mappedByStrategy.relationshipIsOwnedBy(mapping);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.mappedByStrategy.validate(messages, reporter);
- this.primaryKeyJoinColumnStrategy.validate(messages, reporter);
- this.joinTableStrategy.validate(messages, reporter);
- this.joinColumnStrategy.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mappedByStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.primaryKeyJoinColumnStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinTableStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.joinColumnStrategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java
deleted file mode 100644
index a5e10e902c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Table;
-
-public class GenericOrmOverrideJoinColumnRelationshipStrategy
- extends AbstractOrmJoinColumnRelationshipStrategy
-{
- public GenericOrmOverrideJoinColumnRelationshipStrategy(OrmOverrideRelationship parent) {
- super(parent);
- }
-
- @Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- public boolean isTargetForeignKey() {
- RelationshipMapping relationshipMapping = this.getRelationshipMapping();
- return (relationshipMapping != null) &&
- relationshipMapping.getRelationship().isTargetForeignKey();
- }
-
- public TypeMapping getRelationshipSource() {
- return this.isTargetForeignKey() ?
- this.getRelationshipMapping().getResolvedTargetEntity() :
- this.getRelationship().getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- return this.isTargetForeignKey() ?
- this.getRelationship().getTypeMapping() :
- this.getRelationshipMappingTargetEntity();
- }
-
- protected TypeMapping getRelationshipMappingTargetEntity() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return (mapping == null) ? null : mapping.getResolvedTargetEntity();
- }
-
- protected Entity getRelationshipTargetEntity() {
- TypeMapping target = this.getRelationshipTarget();
- return (target instanceof Entity) ? (Entity) target : null;
- }
-
- @Override
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- protected String getAttributeName() {
- return this.getRelationship().getAttributeName();
- }
-
- @Override
- public String getTableName() {
- return this.isTargetForeignKey() ?
- super.getTableName() :
- this.getRelationship().getDefaultTableName();
- }
-
- @Override
- public Table resolveDbTable(String tableName) {
- return this.isTargetForeignKey() ?
- super.resolveDbTable(tableName) :
- this.getRelationship().resolveDbTable(tableName);
- }
-
- @Override
- public boolean tableNameIsInvalid(String tableName) {
- return this.isTargetForeignKey() ?
- super.tableNameIsInvalid(tableName) :
- this.getRelationship().tableNameIsInvalid(tableName);
- }
-
- @Override
- public Iterable<String> getCandidateTableNames() {
- return this.isTargetForeignKey() ?
- super.getCandidateTableNames() :
- this.getRelationship().getCandidateTableNames();
- }
-
- public String getColumnTableNotValidDescription() {
- return null;
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- @Override
- public OrmOverrideRelationship getRelationship() {
- return (OrmOverrideRelationship) super.getRelationship();
- }
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
-
- // ********** join column owner **********
-
- protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- public String getAttributeName() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getAttributeName();
- }
-
- public PersistentAttribute getPersistentAttribute() {
- RelationshipMapping relationshipMapping = GenericOrmOverrideJoinColumnRelationshipStrategy.this.getRelationshipMapping();
- return relationshipMapping == null ? null : relationshipMapping.getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getRelationshipTargetEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getReferencedColumnDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 053052e25d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmPrimaryKeyJoinColumnRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
-{
- protected final ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> primaryKeyJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
-
-
- public GenericOrmPrimaryKeyJoinColumnRelationshipStrategy(OrmPrimaryKeyJoinColumnRelationship parent) {
- super(parent);
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.primaryKeyJoinColumnContainer = this.buildPrimaryKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncPrimaryKeyJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getPrimaryKeyJoinColumns());
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<OrmPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.primaryKeyJoinColumnContainer.getContextElements();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.primaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasPrimaryKeyJoinColumns() {
- return this.getPrimaryKeyJoinColumnsSize() != 0;
- }
-
- public OrmPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index) {
- return this.primaryKeyJoinColumnContainer.getContextElement(index);
- }
-
- public OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn() {
- return this.addPrimaryKeyJoinColumn(this.getPrimaryKeyJoinColumnsSize());
- }
-
- public OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index) {
- XmlPrimaryKeyJoinColumn xmlJoinColumn = this.buildXmlPrimaryKeyJoinColumn();
- OrmPrimaryKeyJoinColumn joinColumn = this.primaryKeyJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- this.getXmlPrimaryKeyJoinColumnContainer().getPrimaryKeyJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- protected XmlPrimaryKeyJoinColumn buildXmlPrimaryKeyJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn();
- }
-
- public void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn joinColumn) {
- this.removePrimaryKeyJoinColumn(this.primaryKeyJoinColumnContainer.indexOfContextElement((OrmPrimaryKeyJoinColumn) joinColumn));
- }
-
- public void removePrimaryKeyJoinColumn(int index) {
- this.primaryKeyJoinColumnContainer.removeContextElement(index);
- this.getXmlPrimaryKeyJoinColumnContainer().getPrimaryKeyJoinColumns().remove(index);
- }
-
- public void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.primaryKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlPrimaryKeyJoinColumnContainer().getPrimaryKeyJoinColumns().move(targetIndex, sourceIndex);
- }
-
-
- protected void syncPrimaryKeyJoinColumns() {
- this.primaryKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlPrimaryKeyJoinColumn> getXmlPrimaryKeyJoinColumns() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlPrimaryKeyJoinColumn>(this.getXmlPrimaryKeyJoinColumnContainer().getPrimaryKeyJoinColumns());
- }
-
- /**
- * primary key join column container
- */
- protected class PrimaryKeyJoinColumnContainer
- extends ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmPrimaryKeyJoinColumn buildContextElement(XmlPrimaryKeyJoinColumn resourceElement) {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.buildPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlPrimaryKeyJoinColumn> getResourceElements() {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getXmlPrimaryKeyJoinColumns();
- }
- @Override
- protected XmlPrimaryKeyJoinColumn getResourceElement(OrmPrimaryKeyJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected OrmReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
- protected OrmPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(XmlPrimaryKeyJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, xmlJoinColumn);
- }
-
- protected ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> buildPrimaryKeyJoinColumnContainer() {
- PrimaryKeyJoinColumnContainer container = new PrimaryKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmPrimaryKeyJoinColumnRelationship getParent() {
- return (OrmPrimaryKeyJoinColumnRelationship) super.getParent();
- }
-
- public OrmPrimaryKeyJoinColumnRelationship getRelationship() {
- return this.getParent();
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- protected XmlPrimaryKeyJoinColumnContainer getXmlPrimaryKeyJoinColumnContainer() {
- return this.getRelationship().getXmlContainer();
- }
-
- public String getTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public String getColumnTableNotValidDescription() {
- return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getRelationshipMapping().getTypeMapping();
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null; // pk join column strategies cannot be overridden
- }
-
- public void addStrategy() {
- if (this.getPrimaryKeyJoinColumnsSize() == 0) {
- this.addPrimaryKeyJoinColumn();
- }
- }
-
- public void removeStrategy() {
- for (int i = this.getPrimaryKeyJoinColumnsSize(); i-- > 0; ) {
- this.removePrimaryKeyJoinColumn(i);
- }
- }
-
- public boolean isOverridable() {
- return false;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- for (OrmPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter);
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmPrimaryKeyJoinColumn column : this.getPrimaryKeyJoinColumns()) {
- result = column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** join column owner **********
-
- protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected PrimaryKeyJoinColumnOwner() {
- super();
- }
-
- /**
- * by default, the join column is in the type mapping's primary table
- */
- public String getDefaultTableName() {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public Entity getRelationshipTarget() {
- return this.getRelationshipMapping().getResolvedTargetEntity();
- }
-
- public String getAttributeName() {
- return this.getRelationshipMapping().getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- protected TypeMapping getTypeMapping() {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getTypeMapping();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return null;
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getRelationshipMapping();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java
deleted file mode 100644
index 7febe03324..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> virtual join table
- */
-public class GenericOrmVirtualJoinTable
- extends AbstractOrmVirtualReferenceTable<ReadOnlyJoinTable>
- implements OrmVirtualJoinTable
-{
-
- protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
-
- protected OrmVirtualJoinColumn defaultInverseJoinColumn;
-
-
- public GenericOrmVirtualJoinTable(OrmVirtualJoinTableRelationshipStrategy parent, Owner owner, ReadOnlyJoinTable overriddenTable) {
- super(parent, owner, overriddenTable);
- this.inverseJoinColumnOwner = this.buildInverseJoinColumnOwner();
- this.specifiedInverseJoinColumnContainer = this.buildSpecifiedInverseJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedInverseJoinColumns();
- this.updateDefaultInverseJoinColumn();
- }
-
-
- // ********** inverse join columns **********
-
- public ListIterable<OrmVirtualJoinColumn> getInverseJoinColumns() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumns() : this.getDefaultInverseJoinColumns();
- }
-
- public int getInverseJoinColumnsSize() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumnsSize() : this.getDefaultInverseJoinColumnsSize();
- }
-
-
- // ********** specified inverse join columns **********
-
- public ListIterable<OrmVirtualJoinColumn> getSpecifiedInverseJoinColumns() {
- return this.specifiedInverseJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedInverseJoinColumnsSize() {
- return this.specifiedInverseJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedInverseJoinColumns() {
- return this.getSpecifiedInverseJoinColumnsSize() != 0;
- }
-
- public OrmVirtualJoinColumn getSpecifiedInverseJoinColumn(int index) {
- return this.specifiedInverseJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedInverseJoinColumns() {
- this.specifiedInverseJoinColumnContainer.update();
- }
-
- protected ListIterable<ReadOnlyJoinColumn> getOverriddenInverseJoinColumns() {
- return new SuperListIterableWrapper<ReadOnlyJoinColumn>(this.getOverriddenTable().getSpecifiedInverseJoinColumns());
- }
-
- protected void moveSpecifiedInverseJoinColumn(int index, OrmVirtualJoinColumn joinColumn) {
- this.specifiedInverseJoinColumnContainer.moveContextElement(index, joinColumn);
- }
-
- protected OrmVirtualJoinColumn addSpecifiedInverseJoinColumn(int index, ReadOnlyJoinColumn joinColumn) {
- return this.specifiedInverseJoinColumnContainer.addContextElement(index, joinColumn);
- }
-
- protected void removeSpecifiedInverseJoinColumn(OrmVirtualJoinColumn joinColumn) {
- this.specifiedInverseJoinColumnContainer.removeContextElement(joinColumn);
- }
-
- protected ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> buildSpecifiedInverseJoinColumnContainer() {
- return new SpecifiedInverseJoinColumnContainer();
- }
-
- /**
- * specified inverse join column container
- */
- protected class SpecifiedInverseJoinColumnContainer
- extends ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_INVERSE_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmVirtualJoinColumn buildContextElement(ReadOnlyJoinColumn resourceElement) {
- return GenericOrmVirtualJoinTable.this.buildInverseJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyJoinColumn> getResourceElements() {
- return GenericOrmVirtualJoinTable.this.getOverriddenInverseJoinColumns();
- }
- @Override
- protected ReadOnlyJoinColumn getResourceElement(OrmVirtualJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
-
- // ********** default inverse join column **********
-
- public OrmVirtualJoinColumn getDefaultInverseJoinColumn() {
- return this.defaultInverseJoinColumn;
- }
-
- protected void setDefaultInverseJoinColumn(OrmVirtualJoinColumn joinColumn) {
- OrmVirtualJoinColumn old = this.defaultInverseJoinColumn;
- this.defaultInverseJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, old, joinColumn);
- }
-
- protected ListIterable<OrmVirtualJoinColumn> getDefaultInverseJoinColumns() {
- return (this.defaultInverseJoinColumn != null) ?
- new SingleElementListIterable<OrmVirtualJoinColumn>(this.defaultInverseJoinColumn) :
- EmptyListIterable.<OrmVirtualJoinColumn>instance();
- }
-
- protected int getDefaultInverseJoinColumnsSize() {
- return (this.defaultInverseJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultInverseJoinColumn() {
- if (this.buildsDefaultInverseJoinColumn()) {
- if (this.defaultInverseJoinColumn == null) {
- this.setDefaultInverseJoinColumn(this.buildInverseJoinColumn(this.getOverriddenTable().getDefaultInverseJoinColumn()));
- } else {
- this.defaultInverseJoinColumn.update();
- }
- } else {
- this.setDefaultInverseJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultInverseJoinColumn() {
- return ! this.hasSpecifiedInverseJoinColumns();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmVirtualJoinTableRelationshipStrategy getParent() {
- return (OrmVirtualJoinTableRelationshipStrategy) super.getParent();
- }
-
- protected OrmVirtualJoinTableRelationshipStrategy getRelationshipStrategy() {
- return this.getParent();
- }
-
- @Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- protected OrmReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
- return new InverseJoinColumnOwner();
- }
-
- protected OrmVirtualJoinColumn buildInverseJoinColumn(ReadOnlyJoinColumn joinColumn) {
- return this.buildJoinColumn(this.inverseJoinColumnOwner, joinColumn);
- }
-
- @Override
- protected String buildDefaultName() {
- return this.getRelationshipStrategy().getJoinTableDefaultName();
- }
-
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationshipStrategy().getRelationship().getMapping();
- }
-
- public PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
- super.validateJoinColumns(messages, reporter);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter);
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationshipStrategy().validatesAgainstDatabase();
- }
-
-
- // ********** join column owners **********
-
- /**
- * just a little common behavior
- */
- protected abstract class AbstractJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected AbstractJoinColumnOwner() {
- super();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. The table is always the join table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- /**
- * the join column can only be on the join table itself
- */
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return Tools.valuesAreEqual(GenericOrmVirtualJoinTable.this.getName(), tableName) ?
- GenericOrmVirtualJoinTable.this.getDbTable() :
- null;
- }
-
- /**
- * by default, the join column is, obviously, in the join table;
- * not sure whether it can be anywhere else...
- */
- public String getDefaultTableName() {
- return GenericOrmVirtualJoinTable.this.getName();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmVirtualJoinTable.this.getValidationTextRange();
- }
-
- protected OrmVirtualRelationship getRelationship() {
- return this.getRelationshipStrategy().getRelationship();
- }
-
- protected OrmVirtualJoinTableRelationshipStrategy getRelationshipStrategy() {
- return GenericOrmVirtualJoinTable.this.getRelationshipStrategy();
- }
- }
-
-
- /**
- * owner for "back-pointer" join columns;
- * these point at the source/owning entity
- */
- protected class JoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- return this.getRelationship().getEntity();
- }
-
- public String getAttributeName() {
- return MappingTools.getTargetAttributeName(GenericOrmVirtualJoinTable.this.getRelationshipMapping());
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- org.eclipse.jpt.jpa.db.Table dbTable = super.resolveDbTable(tableName);
- return (dbTable != null) ? dbTable : this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return this.getTypeMapping().getPrimaryDbTable();
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getRelationship().getTypeMapping();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmVirtualJoinTable.this.getJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-
-
- /**
- * owner for "forward-pointer" join columns;
- * these point at the target/inverse entity
- */
- protected class InverseJoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected InverseJoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- RelationshipMapping relationshipMapping = GenericOrmVirtualJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getResolvedTargetEntity();
- }
-
- public String getAttributeName() {
- RelationshipMapping relationshipMapping = GenericOrmVirtualJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getName();
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- org.eclipse.jpt.jpa.db.Table dbTable = super.resolveDbTable(tableName);
- if (dbTable != null) {
- return dbTable;
- }
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.resolveDbTable(tableName);
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmVirtualJoinTable.this.getInverseJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java
deleted file mode 100644
index fb73c1b27f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmVirtualOverrideJoinColumnRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmVirtualJoinColumnRelationshipStrategy
-{
- protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected OrmVirtualJoinColumn defaultJoinColumn;
-
-
- public GenericOrmVirtualOverrideJoinColumnRelationshipStrategy(OrmVirtualOverrideRelationship parent) {
- super(parent);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedJoinColumns();
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<OrmVirtualJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<OrmVirtualJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public OrmVirtualJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.update();
- }
-
- protected ListIterable<ReadOnlyJoinColumn> getOverriddenSpecifiedJoinColumns() {
- ReadOnlyJoinColumnRelationshipStrategy overriddenStrategy = this.getOverriddenStrategy();
- return (overriddenStrategy == null) ?
- EmptyListIterable.<ReadOnlyJoinColumn>instance() :
- new SuperListIterableWrapper<ReadOnlyJoinColumn>(overriddenStrategy.getSpecifiedJoinColumns());
- }
-
- protected ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> buildSpecifiedJoinColumnContainer() {
- return new SpecifiedJoinColumnContainer();
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmVirtualJoinColumn buildContextElement(ReadOnlyJoinColumn resourceElement) {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyJoinColumn> getResourceElements() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getOverriddenSpecifiedJoinColumns();
- }
- @Override
- protected ReadOnlyJoinColumn getResourceElement(OrmVirtualJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
-
- // ********** default join column **********
-
- public OrmVirtualJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(OrmVirtualJoinColumn joinColumn) {
- OrmVirtualJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<OrmVirtualJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<OrmVirtualJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<OrmVirtualJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- ReadOnlyJoinColumn overriddenDefaultJoinColumn = this.getOverriddenDefaultJoinColumn();
- if (overriddenDefaultJoinColumn == null) {
- if (this.defaultJoinColumn != null) {
- this.setDefaultJoinColumn(null);
- }
- } else {
- if ((this.defaultJoinColumn != null) && (this.defaultJoinColumn.getOverriddenColumn() == overriddenDefaultJoinColumn)) {
- this.defaultJoinColumn.update();
- } else {
- this.setDefaultJoinColumn(this.buildJoinColumn(overriddenDefaultJoinColumn));
- }
- }
- }
-
- protected ReadOnlyJoinColumn getOverriddenDefaultJoinColumn() {
- ReadOnlyJoinColumnRelationshipStrategy overriddenStrategy = this.getOverriddenStrategy();
- return (overriddenStrategy == null) ? null : overriddenStrategy.getDefaultJoinColumn();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmVirtualOverrideRelationship getParent() {
- return (OrmVirtualOverrideRelationship) super.getParent();
- }
-
- public OrmVirtualOverrideRelationship getRelationship() {
- return this.getParent();
- }
-
- protected ReadOnlyJoinColumnRelationshipStrategy getOverriddenStrategy() {
- ReadOnlyJoinColumnRelationship relationship = this.getOverriddenJoinColumnRelationship();
- return (relationship == null) ? null : relationship.getJoinColumnStrategy();
- }
-
- protected ReadOnlyJoinColumnRelationship getOverriddenJoinColumnRelationship() {
- ReadOnlyRelationship relationship = this.resolveOverriddenRelationship();
- return (relationship instanceof ReadOnlyJoinColumnRelationship) ? (ReadOnlyJoinColumnRelationship) relationship : null;
- }
-
- protected ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getRelationship().resolveOverriddenRelationship();
- }
-
- public boolean isTargetForeignKey() {
- RelationshipMapping relationshipMapping = this.getRelationshipMapping();
- return (relationshipMapping != null) &&
- relationshipMapping.getRelationship().isTargetForeignKey();
- }
-
- public TypeMapping getRelationshipSource() {
- return this.isTargetForeignKey() ?
- // relationship mapping is not null
- this.getRelationshipMapping().getResolvedTargetEntity() :
- this.getRelationship().getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- return this.isTargetForeignKey() ?
- this.getRelationship().getTypeMapping() :
- // relationship mapping may still be null
- this.getRelationshipMappingTargetEntity();
- }
-
- protected TypeMapping getRelationshipMappingTargetEntity() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return (mapping == null) ? null : mapping.getResolvedTargetEntity();
- }
-
- protected Entity getRelationshipTargetEntity() {
- TypeMapping target = this.getRelationshipTarget();
- return (target instanceof Entity) ? (Entity) target : null;
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public String getTableName() {
- return this.isTargetForeignKey() ?
- this.getTargetDefaultTableName() :
- this.getRelationship().getDefaultTableName();
- }
-
- protected String getTargetDefaultTableName() {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping == null) ? null : typeMapping.getPrimaryTableName();
- }
-
- protected Table resolveDbTable(String tableName) {
- return this.isTargetForeignKey() ?
- this.resolveTargetDbTable(tableName) :
- this.getRelationship().resolveDbTable(tableName);
- }
-
- protected Table resolveTargetDbTable(String tableName) {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping == null) ? null : typeMapping.resolveDbTable(tableName);
- }
-
- protected boolean tableNameIsInvalid(String tableName) {
- return this.isTargetForeignKey() ?
- this.targetTableNameIsInvalid(tableName) :
- this.getRelationship().tableNameIsInvalid(tableName);
- }
-
- protected boolean targetTableNameIsInvalid(String tableName) {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping != null) && typeMapping.tableNameIsInvalid(tableName);
- }
-
- protected Table getReferencedColumnDbTable() {
- TypeMapping relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- protected Iterable<String> getCandidateTableNames() {
- return this.isTargetForeignKey() ?
- this.getTargetCandidateTableNames() :
- this.getRelationship().getCandidateTableNames();
- }
-
- protected Iterable<String> getTargetCandidateTableNames() {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping != null) ? typeMapping.getAllAssociatedTableNames() : EmptyIterable.<String>instance();
- }
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- protected String getAttributeName() {
- return this.getRelationship().getAttributeName();
- }
-
- protected OrmVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn overriddenJoinColumn) {
- return this.getContextNodeFactory().buildOrmVirtualJoinColumn(this, this.joinColumnOwner, overriddenJoinColumn);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- for (OrmVirtualJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter);
- }
- }
-
-
- // ********** join column owner **********
-
- protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- public String getAttributeName() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getAttributeName();
- }
-
- public Entity getRelationshipTarget() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationshipTargetEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getReferencedColumnDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java
deleted file mode 100644
index dd57b2b8ae..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-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.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTablePrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> virtual secondary table
- */
-public class GenericOrmVirtualSecondaryTable
- extends AbstractOrmVirtualTable<JavaSecondaryTable>
- implements OrmVirtualSecondaryTable
-{
-
- protected final ContextListContainer<OrmVirtualPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumnContainer;
- protected final OrmReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
-
- protected OrmVirtualPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
-
-
- public GenericOrmVirtualSecondaryTable(OrmEntity parent, Owner owner, JavaSecondaryTable overriddenTable) {
- super(parent, owner, overriddenTable);
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.specifiedPrimaryKeyJoinColumnContainer = this.buildSpecifiedPrimaryKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedPrimaryKeyJoinColumns();
- this.updateDefaultPrimaryKeyJoinColumn();
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<OrmVirtualPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumns() : this.getDefaultPrimaryKeyJoinColumns();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumnsSize() : this.getDefaultPrimaryKeyJoinColumnsSize();
- }
-
-
- // ********** specified primary key join columns **********
-
- public ListIterable<OrmVirtualPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedPrimaryKeyJoinColumnsSize() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumnsSize() != 0;
- }
-
- public OrmVirtualPrimaryKeyJoinColumn getSpecifiedPrimaryKeyJoinColumn(int index) {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedPrimaryKeyJoinColumns() {
- this.specifiedPrimaryKeyJoinColumnContainer.update();
- }
-
- protected ListIterable<JavaPrimaryKeyJoinColumn> getOverriddenPrimaryKeyJoinColumns() {
- return this.getOverriddenTable().getSpecifiedPrimaryKeyJoinColumns();
- }
-
- protected void moveSpecifiedPrimaryKeyJoinColumn(int index, OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- this.specifiedPrimaryKeyJoinColumnContainer.moveContextElement(index, pkJoinColumn);
- }
-
- protected OrmVirtualPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index, JavaPrimaryKeyJoinColumn javaColumn) {
- return this.specifiedPrimaryKeyJoinColumnContainer.addContextElement(index, javaColumn);
- }
-
- protected void removeSpecifiedPrimaryKeyJoinColumn(OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- this.specifiedPrimaryKeyJoinColumnContainer.removeContextElement(pkJoinColumn);
- }
-
- protected ContextListContainer<OrmVirtualPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn> buildSpecifiedPrimaryKeyJoinColumnContainer() {
- return new SpecifiedPrimaryKeyJoinColumnContainer();
- }
-
- /**
- * specified primary key join column container
- */
- protected class SpecifiedPrimaryKeyJoinColumnContainer
- extends ContextListContainer<OrmVirtualPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmVirtualPrimaryKeyJoinColumn buildContextElement(JavaPrimaryKeyJoinColumn resourceElement) {
- return GenericOrmVirtualSecondaryTable.this.buildPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<JavaPrimaryKeyJoinColumn> getResourceElements() {
- return GenericOrmVirtualSecondaryTable.this.getOverriddenPrimaryKeyJoinColumns();
- }
- @Override
- protected JavaPrimaryKeyJoinColumn getResourceElement(OrmVirtualPrimaryKeyJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
-
- // ********** default primary key join column **********
-
- public OrmVirtualPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
- return this.defaultPrimaryKeyJoinColumn;
- }
-
- protected void setDefaultPrimaryKeyJoinColumn(OrmVirtualPrimaryKeyJoinColumn pkJoinColumn) {
- OrmVirtualPrimaryKeyJoinColumn old = this.defaultPrimaryKeyJoinColumn;
- this.defaultPrimaryKeyJoinColumn = pkJoinColumn;
- this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, old, pkJoinColumn);
- }
-
- protected ListIterable<OrmVirtualPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- return (this.defaultPrimaryKeyJoinColumn != null) ?
- new SingleElementListIterable<OrmVirtualPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn) :
- EmptyListIterable.<OrmVirtualPrimaryKeyJoinColumn>instance();
- }
-
- protected int getDefaultPrimaryKeyJoinColumnsSize() {
- return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultPrimaryKeyJoinColumn() {
- JavaPrimaryKeyJoinColumn overriddenColumn = this.getOverriddenTable().getDefaultPrimaryKeyJoinColumn();
- if (overriddenColumn == null) {
- this.setDefaultPrimaryKeyJoinColumn(null);
- } else {
- if ((this.defaultPrimaryKeyJoinColumn != null) && (this.defaultPrimaryKeyJoinColumn.getOverriddenColumn() == overriddenColumn)) {
- this.defaultPrimaryKeyJoinColumn.update();
- } else {
- this.setDefaultPrimaryKeyJoinColumn(this.buildPrimaryKeyJoinColumn(overriddenColumn));
- }
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmEntity getParent() {
- return (OrmEntity) super.getParent();
- }
-
- protected OrmEntity getEntity() {
- return this.getParent();
- }
-
- public boolean isVirtual() {
- return true;
- }
-
- protected OrmReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
- protected OrmVirtualPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn javaColumn) {
- return this.getContextNodeFactory().buildOrmVirtualPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, javaColumn);
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.connectionProfileIsActive();
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- this.validateNodes(this.getPrimaryKeyJoinColumns(), messages, reporter);
- }
- }
-
-
- // ********** defaults **********
-
- /**
- * a secondary table doesn't have a default name
- */
- @Override
- protected String buildDefaultName() {
- return null;
- }
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** primary key join column owner **********
-
- protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyBaseJoinColumn.Owner
- {
- protected OrmEntity getEntity() {
- return GenericOrmVirtualSecondaryTable.this.getEntity();
- }
-
- public String getDefaultTableName() {
- return GenericOrmVirtualSecondaryTable.this.getName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- if (this.getJoinColumnsSize() != 1) {
- return null;
- }
- Entity parentEntity = this.getEntity().getParentEntity();
- return (parentEntity != null) ?
- parentEntity.getPrimaryKeyColumnName() :
- this.getEntity().getPrimaryKeyColumnName();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericOrmVirtualSecondaryTable.this.getDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmVirtualSecondaryTable.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public Table getReferencedColumnDbTable() {
- return this.getEntity().getPrimaryDbTable();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmVirtualSecondaryTable.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericOrmVirtualSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java
deleted file mode 100644
index 4711bbc93a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.context.orm;
-
-
-public class GenericOrmXmlContextNodeFactory
- extends AbstractOrmXmlContextNodeFactory
-{
- // nothing
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java
deleted file mode 100644
index 9902535c1d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable;
-import org.eclipse.jpt.jpa.db.Table;
-
-public class NullOrmJoinTableRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmMappingJoinTableRelationshipStrategy2_0
-{
- public NullOrmJoinTableRelationshipStrategy(OrmJoinTableRelationship parent) {
- super(parent);
- }
-
-
- // ********** join table **********
-
- public OrmJoinTable getJoinTable() {
- return null;
- }
-
-
- // ********** XML join table **********
-
- public XmlJoinTable getXmlJoinTable() {
- return null;
- }
-
- public XmlJoinTable buildXmlJoinTable() {
- throw new UnsupportedOperationException();
- }
-
- public void removeXmlJoinTable() {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- throw new UnsupportedOperationException();
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmJoinTableRelationship getParent() {
- return (OrmJoinTableRelationship) super.getParent();
- }
-
- public OrmJoinTableRelationship getRelationship() {
- return this.getParent();
- }
-
- public void initializeFrom(ReadOnlyJoinTableRelationshipStrategy oldStrategy) {
- // NOP
- }
-
- public void initializeFromVirtual(ReadOnlyJoinTableRelationshipStrategy virtualStrategy) {
- // NOP
- }
-
- public String getTableName() {
- return null;
- }
-
- public Table resolveDbTable(String tableName) {
- return null;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return true;
- }
-
- public String getColumnTableNotValidDescription() {
- return null;
- }
-
- public String getJoinTableDefaultName() {
- return null;
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null;
- }
-
- public void addStrategy() {
- // NOP
- }
-
- public void removeStrategy() {
- // NOP
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- public boolean validatesAgainstDatabase() {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmBasicMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmBasicMappingDefinition.java
deleted file mode 100644
index 503127b997..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmBasicMappingDefinition.java
+++ /dev/null
@@ -1,64 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBasicMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmBasicMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmBasicMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmBasicMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlBasic(),
- XmlBasic.class);
- }
-
- public OrmBasicMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmBasicMapping(parent, (XmlBasic) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddableDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddableDefinition.java
deleted file mode 100644
index 44b9ef4904..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddableDefinition.java
+++ /dev/null
@@ -1,67 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-/**
- * default ORM Embeddable provider
- */
-public class OrmEmbeddableDefinition
- implements OrmTypeMappingDefinition
-{
- // singleton
- private static final OrmEmbeddableDefinition INSTANCE =
- new OrmEmbeddableDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmEmbeddableDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
- public XmlTypeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlEmbeddable(),
- XmlEmbeddable.class);
- }
-
- public OrmEmbeddable buildContextMapping(
- OrmPersistentType parent,
- XmlTypeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmEmbeddable(parent, (XmlEmbeddable) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java
deleted file mode 100644
index 5f73e84734..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmEmbeddedIdMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmEmbeddedIdMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmEmbeddedIdMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlEmbeddedId(),
- XmlEmbeddedId.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmEmbeddedIdMapping(parent, (XmlEmbeddedId) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedMappingDefinition.java
deleted file mode 100644
index 1f05a77656..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEmbeddedMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmEmbeddedMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmEmbeddedMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmEmbeddedMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlEmbedded(),
- XmlEmbedded.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmEmbeddedMapping(parent, (XmlEmbedded) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityDefinition.java
deleted file mode 100644
index ef4931f35b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityDefinition.java
+++ /dev/null
@@ -1,67 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-/**
- * default ORM Entity provider
- */
-public class OrmEntityDefinition
- implements OrmTypeMappingDefinition
-{
- // singleton
- private static final OrmEntityDefinition INSTANCE =
- new OrmEntityDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmEntityDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
- public XmlTypeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlEntity(),
- XmlEntity.class);
- }
-
- public OrmEntity buildContextMapping(
- OrmPersistentType parent,
- XmlTypeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmEntity(parent, (XmlEntity) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java
deleted file mode 100644
index af7d7c03c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java
+++ /dev/null
@@ -1,44 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-
-public class OrmEntityTextRangeResolver
- implements EntityTextRangeResolver
-{
- private OrmEntity entity;
-
-
- public OrmEntityTextRangeResolver(OrmEntity entity) {
- this.entity = entity;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.entity.getValidationTextRange();
- }
-
- public TextRange getIdClassTextRange() {
- return this.entity.getIdClassReference().getValidationTextRange();
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.getAttributeNamed(attributeName).getValidationTextRange();
- }
-
- protected OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName) {
- return this.entity.getPersistentType().getAttributeNamed(attributeName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmIdMappingDefinition.java
deleted file mode 100644
index e20a2a6f45..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmIdMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlId;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmIdMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmIdMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmIdMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlId(),
- XmlId.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmIdMapping(parent, (XmlId) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java
deleted file mode 100644
index 269baad85c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-
-public class OrmJoinColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyJoinColumn>
- implements JoinColumnTextRangeResolver
-{
-
- public OrmJoinColumnTextRangeResolver(OrmReadOnlyJoinColumn column) {
- super(column);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToManyMappingDefinition.java
deleted file mode 100644
index f3eac3d4cb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToManyMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmManyToManyMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmManyToManyMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmManyToManyMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlManyToMany(),
- XmlManyToMany.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmManyToManyMapping(parent, (XmlManyToMany) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToOneMappingDefinition.java
deleted file mode 100644
index a8a8a41efc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmManyToOneMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmManyToOneMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmManyToOneMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmManyToOneMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlManyToOne(),
- XmlManyToOne.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmManyToOneMapping(parent, (XmlManyToOne) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassDefinition.java
deleted file mode 100644
index e0328eb994..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassDefinition.java
+++ /dev/null
@@ -1,67 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-/**
- * default ORM MappedSuperclass definition
- */
-public class OrmMappedSuperclassDefinition
- implements OrmTypeMappingDefinition
-{
- // singleton
- private static final OrmMappedSuperclassDefinition INSTANCE =
- new OrmMappedSuperclassDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmMappedSuperclassDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
- public XmlTypeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlMappedSuperclass(),
- XmlMappedSuperclass.class);
- }
-
- public OrmMappedSuperclass buildContextMapping(
- OrmPersistentType parent,
- XmlTypeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmMappedSuperclass(parent, (XmlMappedSuperclass) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java
deleted file mode 100644
index 03c139a93e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java
+++ /dev/null
@@ -1,44 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-
-public class OrmMappedSuperclassTextRangeResolver
- implements PrimaryKeyTextRangeResolver
-{
- private OrmMappedSuperclass mappedSuperclass;
-
-
- public OrmMappedSuperclassTextRangeResolver(OrmMappedSuperclass mappedSuperclass) {
- this.mappedSuperclass = mappedSuperclass;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.mappedSuperclass.getValidationTextRange();
- }
-
- public TextRange getIdClassTextRange() {
- return this.mappedSuperclass.getIdClassReference().getValidationTextRange();
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.getAttributeNamed(attributeName).getValidationTextRange();
- }
-
- protected OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName) {
- return this.mappedSuperclass.getPersistentType().getAttributeNamed(attributeName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java
deleted file mode 100644
index 0b1cd614c1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-
-public class OrmNamedColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyNamedColumn>
-{
- public OrmNamedColumnTextRangeResolver(OrmReadOnlyNamedColumn column) {
- super(column);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToManyMappingDefinition.java
deleted file mode 100644
index ce0214dcd2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToManyMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmOneToManyMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmOneToManyMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmOneToManyMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlOneToMany(),
- XmlOneToMany.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmOneToManyMapping(parent, (XmlOneToMany) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToOneMappingDefinition.java
deleted file mode 100644
index 722738c39c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOneToOneMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmOneToOneMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmOneToOneMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmOneToOneMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlOneToOne(),
- XmlOneToOne.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmOneToOneMapping(parent, (XmlOneToOne) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java
deleted file mode 100644
index 5f90af8a8d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-
-public class OrmOverrideTextRangeResolver
- implements OverrideTextRangeResolver
-{
- protected final OrmReadOnlyOverride ormOverride;
-
- public OrmOverrideTextRangeResolver(OrmReadOnlyOverride ormOverride) {
- this.ormOverride = ormOverride;
- }
-
- public TextRange getNameTextRange() {
- return this.ormOverride.getNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java
deleted file mode 100644
index fe9b812e24..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,29 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-
-public class OrmPersistentAttributeTextRangeResolver
- implements PersistentAttributeTextRangeResolver
-{
- private OrmPersistentAttribute persistentAttribute;
-
- public OrmPersistentAttributeTextRangeResolver(OrmPersistentAttribute persistentAttribute) {
- this.persistentAttribute = persistentAttribute;
- }
-
- public TextRange getAttributeTextRange() {
- return this.persistentAttribute.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java
deleted file mode 100644
index 385aef2de5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-
-public class OrmPrimaryKeyJoinColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyBaseJoinColumn>
- implements BaseJoinColumnTextRangeResolver
-{
-
- public OrmPrimaryKeyJoinColumnTextRangeResolver(OrmReadOnlyBaseJoinColumn column) {
- super(column);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java
deleted file mode 100644
index dc950eb995..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTableColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-
-public class OrmTableColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyTableColumn>
- implements TableColumnTextRangeResolver
-{
-
- public OrmTableColumnTextRangeResolver(OrmReadOnlyTableColumn column) {
- super(column);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java
deleted file mode 100644
index 62ef537690..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-public class OrmTableTextRangeResolver
- implements TableTextRangeResolver
-{
- protected final OrmReadOnlyTable table;
-
-
- public OrmTableTextRangeResolver(OrmReadOnlyTable table) {
- super();
- this.table = table;
- }
-
- public TextRange getNameTextRange() {
- return this.table.getNameTextRange();
- }
-
- public TextRange getCatalogTextRange() {
- return this.table.getCatalogTextRange();
- }
-
- public TextRange getSchemaTextRange() {
- return this.table.getSchemaTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTransientMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTransientMappingDefinition.java
deleted file mode 100644
index 2f5e612f3a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTransientMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmTransientMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmTransientMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmTransientMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlTransient(),
- XmlTransient.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmTransientMapping(parent, (XmlTransient) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java
deleted file mode 100644
index 3a769597e7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,29 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-
-public class OrmTypeMappingTextRangeResolver
- implements TypeMappingTextRangeResolver
-{
- private OrmTypeMapping typeMapping;
-
- public OrmTypeMappingTextRangeResolver(OrmTypeMapping typeMapping) {
- this.typeMapping = typeMapping;
- }
-
- public TextRange getTypeMappingTextRange() {
- return this.typeMapping.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmVersionMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmVersionMappingDefinition.java
deleted file mode 100644
index cf82474d55..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmVersionMappingDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmVersionMappingDefinition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmVersionMappingDefinition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmVersionMappingDefinition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlVersion(),
- XmlVersion.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping resourceMapping,
- OrmXmlContextNodeFactory factory) {
- return factory.buildOrmVersionMapping(parent, (XmlVersion) resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java
deleted file mode 100644
index 62a378c3df..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.CollectionMapping;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <em>specified</em> <code>orm.xml</code> persistent attribute
- */
-public abstract class SpecifiedOrmPersistentAttribute
- extends AbstractOrmXmlContextNode
- implements OrmPersistentAttribute2_0
-{
- protected OrmAttributeMapping mapping; // never null
-
- /**
- * This will point to one of the following:<ul>
- * <li>an existing Java attribute (taken from the appropriate Java type)
- * <li>{@link #cachedJavaPersistentAttribute} if there is no such Java
- * attribute (i.e. the Java type's access type is different or it is
- * inherited from a non-persistent superclass)
- * <li><code>null</code> if there is no matching Java resource attribute
- * </ul>
- * @see #buildJavaPersistentAttribute()
- */
- protected JavaPersistentAttribute javaPersistentAttribute;
-
- /**
- * If present, this Java attribute's parent is the <code>orm.xml</code>
- * type.
- */
- protected JavaPersistentAttribute cachedJavaPersistentAttribute;
-
- protected AccessType specifiedAccess;
- protected AccessType defaultAccess;
-
-
- protected SpecifiedOrmPersistentAttribute(OrmPersistentType parent, XmlAttributeMapping xmlMapping) {
- super(parent);
- this.mapping = this.buildMapping(xmlMapping);
- this.specifiedAccess = this.buildSpecifiedAccess();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedAccess_(this.buildSpecifiedAccess());
- this.mapping.synchronizeWithResourceModel();
- if (this.cachedJavaPersistentAttribute != null) {
- this.cachedJavaPersistentAttribute.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultAccess(this.buildDefaultAccess());
- this.setJavaPersistentAttribute(this.buildJavaPersistentAttribute());
- this.mapping.update();
- if (this.cachedJavaPersistentAttribute != null) {
- this.cachedJavaPersistentAttribute.update();
- }
- }
-
-
- // ********** mapping **********
-
- public OrmAttributeMapping getMapping() {
- return this.mapping;
- }
-
- public String getMappingKey() {
- return this.mapping.getKey();
- }
-
- public OrmAttributeMapping setMappingKey(String mappingKey) {
- if (this.valuesAreDifferent(this.getMappingKey(), mappingKey)) {
- this.setMappingKey_(mappingKey);
- }
- return this.mapping;
- }
-
- protected void setMappingKey_(String mappingKey) {
- OrmAttributeMappingDefinition mappingDefinition = this.getMappingFileDefinition().getAttributeMappingDefinition(mappingKey);
- XmlAttributeMapping xmlAttributeMapping = mappingDefinition.buildResourceMapping(this.getResourceNodeFactory());
- this.setMapping(this.buildMapping(xmlAttributeMapping));
- }
-
- protected final OrmAttributeMapping buildMapping(XmlAttributeMapping xmlAttributeMapping) {
- OrmAttributeMappingDefinition md = this.getMappingFileDefinition().getAttributeMappingDefinition(xmlAttributeMapping.getMappingKey());
- return md.buildContextMapping(this, xmlAttributeMapping, this.getContextNodeFactory());
- }
-
- protected void setMapping(OrmAttributeMapping mapping) {
- OrmAttributeMapping old = this.mapping;
- this.mapping = mapping;
- this.firePropertyChanged(MAPPING_PROPERTY, old, mapping);
- this.getOwningPersistentType().changeMapping(this, old, mapping);
- }
-
- /**
- * <code>orm.xml</code> attributes do not have a default mapping;
- * they are always specified.
- */
- public String getDefaultMappingKey() {
- return null;
- }
-
- protected XmlAttributeMapping getXmlAttributeMapping() {
- return this.mapping.getXmlAttributeMapping();
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.mapping.getName();
- }
-
- public void nameChanged(String oldName, String newName) {
- this.firePropertyChanged(NAME_PROPERTY, oldName, newName);
- }
-
-
- // ********** Java persistent attribute **********
-
- public JavaPersistentAttribute getJavaPersistentAttribute() {
- return this.javaPersistentAttribute;
- }
-
- public JavaPersistentAttribute resolveJavaPersistentAttribute() {
- return this.getJavaPersistentAttribute();
- }
-
- public JavaResourceAttribute getJavaResourceAttribute() {
- return this.javaPersistentAttribute == null ? null : this.javaPersistentAttribute.getResourceAttribute();
- }
-
- public boolean isFor(JavaResourceField javaResourceField) {
- return getJavaPersistentAttribute() == null ? false : getJavaPersistentAttribute().isFor(javaResourceField);
- }
-
- public boolean isFor(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- return getJavaPersistentAttribute() == null ? false : getJavaPersistentAttribute().isFor(javaResourceGetter, javaResourceSetter);
- }
-
- protected void setJavaPersistentAttribute(JavaPersistentAttribute javaPersistentAttribute) {
- JavaPersistentAttribute old = this.javaPersistentAttribute;
- this.javaPersistentAttribute = javaPersistentAttribute;
- this.firePropertyChanged(JAVA_PERSISTENT_ATTRIBUTE_PROPERTY, old, javaPersistentAttribute);
- }
-
- protected JavaPersistentAttribute buildJavaPersistentAttribute() {
- String name = this.getName();
- if (name == null) {
- return null;
- }
- JavaPersistentType javaType = this.getOwningPersistentTypeJavaType();
- if (javaType == null) {
- return null;
- }
-
- ReadOnlyPersistentAttribute pAttribute = javaType.resolveAttribute(name);
- JavaPersistentAttribute javaAttribute = (pAttribute == null) ? null : pAttribute.getJavaPersistentAttribute();
- if ((javaAttribute != null) && (javaAttribute.getAccess() == this.getAccess())) {
- // we only want to cache the Java persistent attribute if we built it
- this.cachedJavaPersistentAttribute = null;
- return javaAttribute;
- }
-
- // If 'javaAttribute' is null, it might exist in a superclass that
- // is not persistent. In that case we need to build it ourselves.
- // If 'javaAttribute' access is different, 'javaType' will not hold
- // a corresponding Java persistent attribute. So, again, we need
- // to build it ourselves.
- return this.getCachedJavaAttribute();
- }
-
- protected JavaPersistentAttribute getCachedJavaAttribute() {
- JavaResourceType javaResourceType = this.getOwningPersistentTypeJavaType().getJavaResourceType();
- if (javaResourceType == null) {
- return null;
- }
- else if (getAccess() == AccessType.FIELD) {
- JavaResourceField javaResourceField = this.getJavaResourceField(javaResourceType);
- if (javaResourceField == null) {
- // nothing in the resource inheritance hierarchy matches our name *and* access type
- this.cachedJavaPersistentAttribute = null;
- } else {
- if ((this.cachedJavaPersistentAttribute == null) ||
- !(this.cachedJavaPersistentAttribute.isFor(javaResourceField))) {
- // cache is stale
- this.cachedJavaPersistentAttribute = this.buildJavaPersistentField(javaResourceField);
- }
- }
- }
- else if (getAccess() == AccessType.PROPERTY) {
- JavaResourceMethod javaResourceGetter = this.getJavaResourceGetter(javaResourceType);
- JavaResourceMethod javaResourceSetter = javaResourceGetter == null ? null : AbstractJavaPersistentType.getValidSiblingSetMethod(javaResourceGetter, javaResourceType.getMethods());
- if (javaResourceGetter == null && javaResourceSetter == null) {
- // nothing in the resource inheritance hierarchy matches our name *and* access type
- this.cachedJavaPersistentAttribute = null;
- } else {
- if ((this.cachedJavaPersistentAttribute == null) ||
- !(this.cachedJavaPersistentAttribute.isFor(javaResourceGetter, javaResourceSetter))) {
- // cache is stale
- this.cachedJavaPersistentAttribute = this.buildJavaPersistentProperty(javaResourceGetter, javaResourceSetter);
- }
- }
- }
- return this.cachedJavaPersistentAttribute;
- }
-
- /**
- * Search the specified Java resource type for the resource attribute
- * corresponding to this <code>orm.xml</code> attribute (i.e. the Java
- * resource attribute with the same name). If the specified Java resource
- * type does not have a corresponding attribute, search up its inheritance
- * hierarchy.
- */
- protected JavaResourceField getJavaResourceField(JavaResourceType javaResourceType) {
- if (javaResourceType == null) {//checking null here, had a VIRTUAL hierarchy, change AbstractModel to FIELD access, is there another way??
- return null;
- }
- for (JavaResourceField javaResourceField : this.getJavaResourceFields(javaResourceType)) {
- if (javaResourceField.getName().equals(this.getName())) {
- return javaResourceField;
- }
- }
- // climb up inheritance hierarchy
- String superclassName = javaResourceType.getSuperclassQualifiedName();
- if (superclassName == null) {
- return null;
- }
- JavaResourceType superclass = (JavaResourceType) this.getJpaProject().getJavaResourceType(superclassName, Kind.TYPE);
- if (superclass == null) {
- return null;
- }
- // recurse
- return this.getJavaResourceField(superclass);
- }
-
- /**
- * Return the resource attributes with compatible access types.
- */
- protected Iterable<JavaResourceField> getJavaResourceFields(JavaResourceType javaResourceType) {
- return javaResourceType.getFields();
- }
-
- /**
- * Search the specified Java resource type for the resource attribute
- * corresponding to this <code>orm.xml</code> attribute (i.e. the Java
- * resource attribute with the same name). If the specified Java resource
- * type does not have a corresponding attribute, search up its inheritance
- * hierarchy.
- */
- protected JavaResourceMethod getJavaResourceGetter(JavaResourceType javaResourceType) {
- for (JavaResourceMethod javaResourceGetter : this.getJavaResourceGetters(javaResourceType)) {
- if (javaResourceGetter.getName().equals(this.getName())) {
- return javaResourceGetter;
- }
- }
- // climb up inheritance hierarchy
- String superclassName = javaResourceType.getSuperclassQualifiedName();
- if (superclassName == null) {
- return null;
- }
- JavaResourceType superclass = (JavaResourceType) this.getJpaProject().getJavaResourceType(superclassName, Kind.TYPE);
- if (superclass == null) {
- return null;
- }
- // recurse
- return this.getJavaResourceGetter(superclass);
- }
-
- protected Iterable<JavaResourceMethod> getResourceMethods(final JavaResourceType javaResourceType, Filter<JavaResourceMethod> filter) {
- return new FilteringIterable<JavaResourceMethod>(javaResourceType.getMethods(), filter);
- }
-
- protected Filter<JavaResourceMethod> buildPersistablePropertyGetterMethodsFilter(final JavaResourceType javaResourceType) {
- return new Filter<JavaResourceMethod>() {
- public boolean accept(JavaResourceMethod resourceMethod) {
- return AbstractJavaPersistentType.methodIsPersistablePropertyGetter(resourceMethod, javaResourceType.getMethods());
- }
- };
- }
-
- /**
- * Return the resource attributes with compatible access types.
- */
- protected Iterable<JavaResourceMethod> getJavaResourceGetters(JavaResourceType javaResourceType) {
- return getResourceMethods(javaResourceType, buildPersistablePropertyGetterMethodsFilter(javaResourceType));
- }
-
- protected JavaPersistentAttribute buildJavaPersistentField(JavaResourceField javaResourceField) {
- // pass in our parent orm persistent type as the parent to the cached Java attribute...
- return this.getJpaFactory().buildJavaPersistentField(this.getOwningPersistentType(), javaResourceField);
- }
-
- protected JavaPersistentAttribute buildJavaPersistentProperty(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- // pass in our parent orm persistent type as the parent to the cached Java attribute...
- return this.getJpaFactory().buildJavaPersistentProperty(this.getOwningPersistentType(), javaResourceGetter, javaResourceSetter);
- }
-
-
- // ********** access **********
-
- public AccessType getAccess() {
- AccessType access = this.getSpecifiedAccess();
- return (access != null) ? access : this.defaultAccess;
- }
-
- public AccessType getDefaultAccess() {
- return this.defaultAccess;
- }
-
- protected void setDefaultAccess(AccessType access) {
- AccessType oldAccess = this.getAccess();
- AccessType oldDefaultAccess = this.defaultAccess;
- this.defaultAccess = access;
- this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, oldDefaultAccess, access);
- if (oldAccess != this.getAccess()) {
- //clear out the cached 'javaAttribute' is the access has changed, it will no longer apply
- if (this.cachedJavaPersistentAttribute != null) {
- this.setJavaPersistentAttribute(null);
- this.cachedJavaPersistentAttribute = null;
- }
- }
- }
-
- protected AccessType buildDefaultAccess() {
- return this.getOwningPersistentType().getAccess();
- }
-
- public AccessType getSpecifiedAccess() {
- return this.specifiedAccess;
- }
-
- public void setSpecifiedAccess(AccessType access) {
- this.setSpecifiedAccess_(access);
- this.getXmlAccessHolder().setAccess(AccessType.toOrmResourceModel(access));
- }
-
- protected void setSpecifiedAccess_(AccessType access) {
- AccessType oldAccess = this.getAccess();
- AccessType oldSpecifiedAccess = this.specifiedAccess;
- this.specifiedAccess = access;
- this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, oldSpecifiedAccess, access);
- if (oldAccess != this.getAccess()) {
- //clear out the cached 'javaAttribute' is the access has changed, it will no longer apply
- if (this.cachedJavaPersistentAttribute != null) {
- this.setJavaPersistentAttribute(null);
- this.cachedJavaPersistentAttribute = null;
- }
- }
- }
-
- protected AccessType buildSpecifiedAccess() {
- return AccessType.fromOrmResourceModel(this.getXmlAccessHolder().getAccess(), this.getJpaPlatform(), this.getResourceType());
- }
-
- protected XmlAccessHolder getXmlAccessHolder() {
- return this.getXmlAttributeMapping();
- }
-
-
- // ********** specified/default **********
-
- public boolean isVirtual() {
- return false;
- }
-
- public OrmReadOnlyPersistentAttribute removeFromXml() {
- return this.getOwningPersistentType().removeAttributeFromXml(this);
- }
-
- public OrmPersistentAttribute addToXml() {
- throw new UnsupportedOperationException();
- }
-
- public OrmPersistentAttribute addToXml(String mappingKey) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<OrmPersistentAttribute> getType() {
- return OrmPersistentAttribute.class;
- }
-
- public JpaStructureNode getStructureNode(int offset) {
- return this;
- }
-
- public boolean contains(int textOffset) {
- return this.mapping.contains(textOffset);
- }
-
- public TextRange getSelectionTextRange() {
- return this.mapping.getSelectionTextRange();
- }
-
- public void dispose() {
- // nothing to dispose
- }
-
-
- // ********** refactoring **********
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return this.mapping.createRenameTypeEdits(originalType, newName);
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return this.mapping.createMoveTypeEdits(originalType, newPackage);
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return this.mapping.createRenamePackageEdits(originalPackage, newName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateAttribute(messages, reporter);
- this.mapping.validate(messages, reporter);
- }
-
- protected void validateAttribute(List<IMessage> messages, IReporter reporter) {
- if (this.javaPersistentAttribute == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME,
- new String[] {
- this.getName(),
- this.getOwningTypeMapping().getClass_()
- },
- this.mapping,
- this.mapping.getNameTextRange()
- )
- );
- } else {
- this.buildAttibuteValidator().validate(messages, reporter);
- }
- }
-
- protected PersistentAttributeTextRangeResolver buildTextRangeResolver() {
- return new OrmPersistentAttributeTextRangeResolver(this);
- }
-
- protected abstract JptValidator buildAttibuteValidator();
-
- public TextRange getValidationTextRange() {
- return this.mapping.getValidationTextRange();
- }
-
-
- // ********** metamodel **********
-
- public String getMetamodelContainerFieldTypeName() {
- return this.getJpaContainerDefinition().getMetamodelContainerFieldTypeName();
- }
-
- public String getMetamodelContainerFieldMapKeyTypeName() {
- return this.getJpaContainerDefinition().getMetamodelContainerFieldMapKeyTypeName((CollectionMapping) this.mapping);
- }
-
- public String getMetamodelTypeName() {
- JavaPersistentAttribute2_0 javaAttribute = (JavaPersistentAttribute2_0) this.javaPersistentAttribute;
- return (javaAttribute != null) ?
- javaAttribute.getMetamodelTypeName() :
- MetamodelField.DEFAULT_TYPE_NAME;
- }
-
- protected JavaPersistentAttribute.JpaContainerDefinition getJpaContainerDefinition() {
- JavaPersistentAttribute2_0 javaAttribute = (JavaPersistentAttribute2_0) this.javaPersistentAttribute;
- return (javaAttribute != null) ?
- javaAttribute.getJpaContainerDefinition() :
- JavaPersistentAttribute.JpaContainerDefinition.Null.instance();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mapping.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** misc **********
-
- @Override
- public OrmPersistentType getParent() {
- return (OrmPersistentType) super.getParent();
- }
-
- public OrmPersistentType getOwningPersistentType() {
- return this.getParent();
- }
-
- protected JavaPersistentType getOwningPersistentTypeJavaType() {
- return this.getOwningPersistentType().getJavaPersistentType();
- }
-
- public OrmTypeMapping getOwningTypeMapping() {
- return this.getOwningPersistentType().getMapping();
- }
-
- public String getPrimaryKeyColumnName() {
- return this.mapping.getPrimaryKeyColumnName();
- }
-
- public String getTypeName() {
- return this.mapping.getAttributeType();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
deleted file mode 100644
index 6d0d60bee5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
+++ /dev/null
@@ -1,1365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.context.orm;
-
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.BodySourceWriter;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ChainIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.PropertyAccessor;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentType2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistentType2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * specified <code>orm.xml</code> persistent type:<ul>
- * <li>mapping
- * <li>access
- * <li>attributes
- * <li>super persistent type
- * <li>Java persistent type
- * </ul>
- */
-public abstract class SpecifiedOrmPersistentType
- extends AbstractOrmXmlContextNode
- implements OrmPersistentType2_0
-{
- protected OrmTypeMapping mapping; // never null
-
- protected String name;
-
- protected JavaPersistentType javaPersistentType;
-
- protected AccessType specifiedAccess;
- protected AccessType defaultAccess; // never null
-
- protected final Vector<OrmPersistentAttribute> specifiedAttributes = new Vector<OrmPersistentAttribute>();
- protected final SpecifiedAttributeContainerAdapter specifiedAttributeContainerAdapter = new SpecifiedAttributeContainerAdapter();
-
- protected final Vector<OrmReadOnlyPersistentAttribute> defaultAttributes = new Vector<OrmReadOnlyPersistentAttribute>();
-
- protected PersistentType superPersistentType;
-
- protected String declaringTypeName;
-
- protected final MetamodelSourceType.Synchronizer metamodelSynchronizer;
-
-
- protected SpecifiedOrmPersistentType(EntityMappings parent, XmlTypeMapping xmlTypeMapping) {
- super(parent);
- this.mapping = this.buildMapping(xmlTypeMapping);
- //initialize 'name' (if qualified, this will be the name), it will be resolved in the update
- this.name = this.getMappingClassName();
- // 'javaPersistentType' is resolved in the update
- this.specifiedAccess = this.buildSpecifiedAccess();
- this.defaultAccess = AccessType.FIELD; // keep this non-null
- this.initializeSpecifiedAttributes();
- this.metamodelSynchronizer = this.buildMetamodelSynchronizer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.mapping.synchronizeWithResourceModel();
- this.syncJavaPersistentType();
- this.setSpecifiedAccess_(this.buildSpecifiedAccess());
- this.syncSpecifiedAttributes();
- this.synchronizeNodesWithResourceModel(this.getDefaultAttributes());
- }
-
- @Override
- public void update() {
- super.update();
- this.mapping.update();
- this.setName(this.buildName());
- this.updateJavaPersistentType();
- this.setDefaultAccess(this.buildDefaultAccess());
- this.updateNodes(this.getSpecifiedAttributes());
- this.updateDefaultAttributes();
- this.setSuperPersistentType(this.buildSuperPersistentType());
- this.setDeclaringTypeName(this.buildDeclaringTypeName());
- }
-
-
- // ********** mapping **********
-
- public OrmTypeMapping getMapping() {
- return this.mapping;
- }
-
- public String getMappingKey() {
- return this.mapping.getKey();
- }
-
- public void setMappingKey(String mappingKey) {
- if (this.valuesAreDifferent(this.getMappingKey(), mappingKey)) {
- this.setMappingKey_(mappingKey);
- }
- }
-
- protected void setMappingKey_(String mappingKey) {
- OrmTypeMapping old = this.mapping;
- OrmTypeMappingDefinition mappingDefinition = this.getMappingFileDefinition().getTypeMappingDefinition(mappingKey);
- XmlTypeMapping xmlTypeMapping = mappingDefinition.buildResourceMapping(this.getResourceNodeFactory());
- this.mapping = this.buildMapping(xmlTypeMapping);
- this.getEntityMappings().changeMapping(this, old, this.mapping);
- this.firePropertyChanged(MAPPING_PROPERTY, old, this.mapping);
- }
-
- protected OrmTypeMapping buildMapping(XmlTypeMapping xmlTypeMapping) {
- OrmTypeMappingDefinition md = this.getMappingFileDefinition().getTypeMappingDefinition(xmlTypeMapping.getMappingKey());
- return md.buildContextMapping(this, xmlTypeMapping, this.getContextNodeFactory());
- }
-
- protected XmlTypeMapping getXmlTypeMapping() {
- return this.mapping.getXmlTypeMapping();
- }
-
- public boolean isMapped() {
- return true;
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- protected void setName(String name) {
- String old = this.name;
- this.name = name;
- if (this.firePropertyChanged(NAME_PROPERTY, old, name)) {
- // clear out the Java persistent type here, it will be rebuilt during "update"
- if (this.javaPersistentType != null) {
- this.javaPersistentType.dispose();
- this.setJavaPersistentType(null);
- }
- }
- }
-
- protected String buildName() {
- return this.getEntityMappings().getFullyQualifiedName(this.getMappingClassName());
- }
-
- public String getSimpleName(){
- String className = this.getName();
- return StringTools.stringIsEmpty(className) ? null : ClassName.getSimpleName(className);
- }
-
- protected String getMappingClassName() {
- return this.mapping.getClass_();
- }
-
- // ********** Java persistent type **********
-
- public JavaPersistentType getJavaPersistentType() {
- return this.javaPersistentType;
- }
-
- protected void setJavaPersistentType(JavaPersistentType javaPersistentType) {
- JavaPersistentType old = this.javaPersistentType;
- this.javaPersistentType = javaPersistentType;
- this.firePropertyChanged(JAVA_PERSISTENT_TYPE_PROPERTY, old, javaPersistentType);
- }
-
- /**
- * If the persistent type's name changes during <em>update</em>,
- * the Java persistent type will be cleared out in
- * {@link #setName(String)}. If we get here and
- * the Java persistent type is present, we can
- * <em>sync</em> it. In some circumstances it will be obsolete
- * since the name is changed during update (the mapping class name or
- * the entity mapping's package affect the name)
- *
- * @see #updateJavaPersistentType()
- */
- protected void syncJavaPersistentType() {
- if (this.javaPersistentType != null) {
- this.javaPersistentType.synchronizeWithResourceModel();
- }
- }
-
- /**
- * @see #syncJavaPersistentType()
- */
- protected void updateJavaPersistentType() {
- String name = this.getName();
- if (name == null) {
- if (this.javaPersistentType != null) {
- this.javaPersistentType.dispose();
- this.setJavaPersistentType(null);
- }
- }
- else {
- if (this.javaPersistentType == null) {
- this.setJavaPersistentType(this.buildJavaPersistentType());
- }
- else {
- if (this.javaPersistentType.getName().equals(name)) {
- this.javaPersistentType.update();
- } else {
- this.javaPersistentType.dispose();
- this.setJavaPersistentType(this.buildJavaPersistentType());
- }
- }
- }
- }
-
- /**
- * Return null it's an enum; don't build a JavaPersistentType
- * @see #updateJavaPersistentType()
- */
- protected JavaResourceType resolveJavaResourceType() {
- if (this.name == null) {
- return null;
- }
- return (JavaResourceType) this.getJpaProject().getJavaResourceType(this.name, Kind.TYPE);
- }
-
- protected JavaPersistentType buildJavaPersistentType() {
- JavaResourceType jrt = this.resolveJavaResourceType();
- return jrt != null ? this.buildJavaPersistentType(jrt) : null;
- }
-
- protected JavaPersistentType buildJavaPersistentType(JavaResourceType jrt) {
- return this.getJpaFactory().buildJavaPersistentType(this, jrt);
- }
-
-
- // ********** access **********
-
- public AccessType getAccess() {
- return (this.specifiedAccess != null) ? this.specifiedAccess : this.defaultAccess;
- }
-
- public AccessType getSpecifiedAccess() {
- return this.specifiedAccess;
- }
-
- public void setSpecifiedAccess(AccessType access) {
- this.setSpecifiedAccess_(access);
- this.getXmlTypeMapping().setAccess(AccessType.toOrmResourceModel(access));
- }
-
- protected void setSpecifiedAccess_(AccessType access) {
- AccessType old = this.specifiedAccess;
- this.specifiedAccess = access;
- this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildSpecifiedAccess() {
- return AccessType.fromOrmResourceModel(this.getXmlTypeMapping().getAccess(), this.getJpaPlatform(), this.getResourceType());
- }
-
- public AccessType getDefaultAccess() {
- return this.defaultAccess;
- }
-
- protected void setDefaultAccess(AccessType access) {
- AccessType old = this.defaultAccess;
- this.defaultAccess = access;
- this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildDefaultAccess() {
- if ( ! this.mapping.isMetadataComplete()) {
- if (this.javaPersistentType != null) {
- if (this.javaPersistentTypeHasSpecifiedAccess()) {
- return this.javaPersistentType.getAccess();
- }
- }
- if (this.superPersistentType != null) {
- return this.superPersistentType.getAccess();
- }
- }
- AccessType access = this.getMappingFileRoot().getAccess();
- return (access != null) ? access : AccessType.FIELD; // default to FIELD if no specified access found
- }
-
- /**
- * pre-condition: {@link #javaPersistentType} is not <code>null</code>
- */
- protected boolean javaPersistentTypeHasSpecifiedAccess() {
- return (this.javaPersistentType.getSpecifiedAccess() != null) ||
- this.javaPersistentType.hasAnyAnnotatedAttributes();
- }
-
- public AccessType getOwnerOverrideAccess() {
- return this.getEntityMappings().getOverridePersistentTypeAccess();
- }
-
- public AccessType getOwnerDefaultAccess() {
- return this.getEntityMappings().getDefaultPersistentTypeAccess();
- }
-
-
- // ********** attributes **********
-
- @SuppressWarnings("unchecked")
- public ListIterable<OrmReadOnlyPersistentAttribute> getAttributes() {
- return new CompositeListIterable<OrmReadOnlyPersistentAttribute>(this.getReadOnlySpecifiedAttributes(), this.getDefaultAttributes());
- }
-
- public int getAttributesSize() {
- return this.getSpecifiedAttributesSize() + this.getDefaultAttributesSize();
- }
-
- public Iterable<String> getAttributeNames() {
- return this.convertToNames(this.getAttributes());
- }
-
- public OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName) {
- Iterator<OrmReadOnlyPersistentAttribute> stream = this.getAttributesNamed(attributeName).iterator();
- return stream.hasNext() ? stream.next() : null;
- }
-
- public Iterable<ReadOnlyPersistentAttribute> getAllAttributes() {
- return new CompositeIterable<ReadOnlyPersistentAttribute>(
- new TransformationIterable<PersistentType, Iterable<ReadOnlyPersistentAttribute>>(this.getInheritanceHierarchy()) {
- @Override
- protected Iterable<ReadOnlyPersistentAttribute> transform(PersistentType pt) {
- return new SuperListIterableWrapper<ReadOnlyPersistentAttribute>(pt.getAttributes());
- }
- }
- );
- }
-
- public Iterable<String> getAllAttributeNames() {
- return this.convertToNames(this.getAllAttributes());
- }
-
- protected Iterable<OrmReadOnlyPersistentAttribute> getAttributesNamed(final String attributeName) {
- return new FilteringIterable<OrmReadOnlyPersistentAttribute>(this.getAttributes()) {
- @Override
- protected boolean accept(OrmReadOnlyPersistentAttribute attribute) {
- return Tools.valuesAreEqual(attributeName, attribute.getName());
- }
- };
- }
-
- public ReadOnlyPersistentAttribute resolveAttribute(String attributeName) {
- Iterator<OrmReadOnlyPersistentAttribute> attributes = this.getAttributesNamed(attributeName).iterator();
- if (attributes.hasNext()) {
- OrmReadOnlyPersistentAttribute attribute = attributes.next();
- return attributes.hasNext() ? null /* more than one */: attribute;
- }
- // recurse
- return (this.superPersistentType == null) ? null : this.superPersistentType.resolveAttribute(attributeName);
- }
-
- protected Iterable<String> convertToNames(Iterable<? extends ReadOnlyPersistentAttribute> attributes) {
- return new TransformationIterable<ReadOnlyPersistentAttribute, String>(attributes) {
- @Override
- protected String transform(ReadOnlyPersistentAttribute attribute) {
- return attribute.getName();
- }
- };
- }
-
-
- // ********** attribute conversions **********
-
- public OrmPersistentAttribute addAttributeToXml(OrmReadOnlyPersistentAttribute defaultAttribute) {
- return this.addAttributeToXml(defaultAttribute, defaultAttribute.getMappingKey());
- }
-
- public OrmPersistentAttribute addAttributeToXml(OrmReadOnlyPersistentAttribute defaultAttribute, String mappingKey) {
- if ( ! defaultAttribute.isVirtual()) {
- throw new IllegalArgumentException("Attribute is already specified: " + defaultAttribute); //$NON-NLS-1$
- }
- if (mappingKey == null) {
- // this typically happens when the default attribute does not have a mapping
- throw new IllegalArgumentException("Use convertAttributeToSpecified(OrmReadOnlyPersistentAttribute, String) instead and specify a mapping key"); //$NON-NLS-1$
- }
- return this.convertAttributeToSpecified_(defaultAttribute, mappingKey);
- }
-
- /**
- * <em>Silently</em> remove the default attribute and add specified
- * attribute before triggering an <em>update</em> or the dangling
- * default attribute will be removed preemptively.
- */
- protected OrmPersistentAttribute convertAttributeToSpecified_(OrmReadOnlyPersistentAttribute defaultAttribute, String mappingKey) {
- // silently remove the default attribute
- int defaultIndex = this.defaultAttributes.indexOf(defaultAttribute);
- this.defaultAttributes.remove(defaultIndex);
- defaultAttribute.dispose();
-
- // silently add the specified attribute
- OrmAttributeMappingDefinition md = this.getMappingFileDefinition().getAttributeMappingDefinition(mappingKey);
- XmlAttributeMapping xmlMapping = md.buildResourceMapping(this.getResourceNodeFactory());
-
- OrmPersistentAttribute specifiedAttribute = this.buildSpecifiedAttribute(xmlMapping);
- // we need to add the attribute to the right spot in the list - stupid spec...
- int specifiedIndex = this.getSpecifiedAttributeInsertionIndex(specifiedAttribute);
- this.specifiedAttributes.add(specifiedIndex, specifiedAttribute);
-
- // this will trigger the initial update;
- // no changes to either collection (default or specified) should be detected at this point
- specifiedAttribute.getMapping().setName(defaultAttribute.getName());
-
- // fire the list change events
- this.fireItemRemoved(DEFAULT_ATTRIBUTES_LIST, defaultIndex, defaultAttribute);
- this.fireItemAdded(SPECIFIED_ATTRIBUTES_LIST, specifiedIndex, specifiedAttribute);
-
- // it should be safe to update the XML now
- Attributes xmlAttributes = this.getXmlAttributesForUpdate();
- specifiedAttribute.getMapping().addXmlAttributeMappingTo(xmlAttributes);
- // possibly a NOP, but needed when we trigger the creation of a new 'attributes'
- this.getXmlTypeMapping().setAttributes(xmlAttributes);
-
- // copy over the specified access(?)
- AccessType oldAccess = defaultAttribute.getJavaPersistentAttribute().getSpecifiedAccess();
- if (oldAccess != null) {
- specifiedAttribute.setSpecifiedAccess(oldAccess);
- }
- return specifiedAttribute;
- }
-
- protected int getSpecifiedAttributeInsertionIndex(OrmPersistentAttribute attribute) {
- return CollectionTools.insertionIndexOf(this.specifiedAttributes, attribute, this.getAttributeComparator());
- }
-
- protected Comparator<OrmPersistentAttribute> getAttributeComparator() {
- return ATTRIBUTE_COMPARATOR;
- }
-
- protected static final Comparator<OrmPersistentAttribute> ATTRIBUTE_COMPARATOR =
- new Comparator<OrmPersistentAttribute>() {
- public int compare(OrmPersistentAttribute attribute1, OrmPersistentAttribute attribute2) {
- int seq1 = attribute1.getMapping().getXmlSequence();
- int seq2 = attribute2.getMapping().getXmlSequence();
- return (seq1 == seq2) ? 0 : (seq1 < seq2) ? -1 : 1;
- }
- };
-
- /**
- * <em>Silently</em> add the new default attribute before removing the
- * specified attribute, or the <em>update</em> will discover the missing
- * default attribute and add it preemptively.
- */
- public OrmReadOnlyPersistentAttribute removeAttributeFromXml(OrmPersistentAttribute specifiedAttribute) {
- if (specifiedAttribute.isVirtual()) {
- throw new IllegalArgumentException("Attribute is not specified: " + specifiedAttribute); //$NON-NLS-1$
- }
-
- int defaultIndex = this.defaultAttributes.size();
- OrmReadOnlyPersistentAttribute defaultAttribute = null;
- // make sure the corresponding resource Java attribute actually exists in the *current* type;
- // do *not* take the context Java attribute directly from the specified ORM
- // attribute we are converting since it may have come from a superclass;
- // instead, use its resource Java attribute (which will match both name and access type,
- // but we still need to check its parent type)
- if (specifiedAttribute.getJavaResourceAttribute() != null) {
- if (specifiedAttribute.getJavaResourceAttribute().getKind() == Kind.FIELD) {
- JavaResourceField javaResourceField = (JavaResourceField) specifiedAttribute.getJavaResourceAttribute();
- if (this.javaResourceFieldWillBeDefault(javaResourceField, specifiedAttribute)) {
- defaultAttribute = this.buildDefaultAttribute(javaResourceField);
- this.defaultAttributes.add(defaultIndex, defaultAttribute);
- }
- }
- else {
- PropertyAccessor propertyAccessor = (PropertyAccessor) specifiedAttribute.getJavaPersistentAttribute().getAccessor();
- JavaResourceMethod resourceGetter = propertyAccessor.getResourceGetter();
- JavaResourceMethod resourceSetter = propertyAccessor.getResourceSetter();
-
- if (this.javaResourcePropertyWillBeDefault(resourceGetter, resourceSetter, specifiedAttribute)) {
- defaultAttribute = this.buildVirtualAttribute(resourceGetter, resourceSetter);
- this.defaultAttributes.add(defaultIndex, defaultAttribute);
- }
- }
- }
-
- this.removeSpecifiedAttribute(specifiedAttribute); // trigger update
-
- if (defaultAttribute != null) {
- this.fireItemAdded(DEFAULT_ATTRIBUTES_LIST, defaultIndex, defaultAttribute);
- }
- return defaultAttribute;
- }
-
- /**
- * Return whether the specified Java resource attribute will be a
- * <em>default</em> attribute when the specified specified attribute is
- * removed from the type. The Java resource attribute must be among the
- * valid Java resource attributes and it must not correspond to any of the
- * remaining specified attributes.
- */
- protected boolean javaResourceFieldWillBeDefault(JavaResourceField javaResourceField, OrmPersistentAttribute specifiedAttributeToBeRemoved) {
- return CollectionTools.contains(this.getJavaResourceFields(), javaResourceField) &&
- (this.getSpecifiedAttributeFor(javaResourceField, specifiedAttributeToBeRemoved) == null);
- }
-
- /**
- * Return whether the specified Java resource attribute will be a
- * <em>default</em> attribute when the specified specified attribute is
- * removed from the type. The Java resource attribute must be among the
- * valid Java resource attributes and it must not correspond to any of the
- * remaining specified attributes.
- */
- protected boolean javaResourcePropertyWillBeDefault(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter, OrmPersistentAttribute specifiedAttributeToBeRemoved) {
- return CollectionTools.contains(this.getJavaResourceMethods(), javaResourceGetter) &&
- CollectionTools.contains(this.getJavaResourceMethods(), javaResourceSetter) &&
- (this.getSpecifiedAttributeFor(javaResourceGetter, javaResourceSetter, specifiedAttributeToBeRemoved) == null);
- }
-
-
- // ********** xml attributes **********
-
- /**
- * Return <code>null</code> if the <code>attributes</code> element is missing.
- */
- protected Attributes getXmlAttributes() {
- return this.getXmlTypeMapping().getAttributes();
- }
-
- /**
- * Build a new <code>attributes</code> element if it is not present;
- * but do <em>not</em> add it to the XML type mapping. Callers will have
- * to add it to the XML type mapping when appropriate.
- */
- protected Attributes getXmlAttributesForUpdate() {
- Attributes xmlAttributes = this.getXmlAttributes();
- return (xmlAttributes != null) ? xmlAttributes : this.buildXmlAttributes();
- }
-
- protected Attributes buildXmlAttributes() {
- return EmfTools.create(this.getResourceNodeFactory(), OrmPackage.eINSTANCE.getAttributes(), Attributes.class);
- }
-
- protected void removeXmlAttributesIfUnset() {
- if (this.getXmlAttributes().isUnset()) {
- this.getXmlTypeMapping().setAttributes(null);
- }
- }
-
-
- // ********** specified attributes **********
-
- public ListIterable<OrmPersistentAttribute> getSpecifiedAttributes() {
- return new LiveCloneListIterable<OrmPersistentAttribute>(this.specifiedAttributes);
- }
-
- protected ListIterable<OrmReadOnlyPersistentAttribute> getReadOnlySpecifiedAttributes() {
- return new SuperListIterableWrapper<OrmReadOnlyPersistentAttribute>(this.getSpecifiedAttributes());
- }
-
- public int getSpecifiedAttributesSize() {
- return this.specifiedAttributes.size();
- }
-
- protected void removeSpecifiedAttribute(OrmPersistentAttribute attribute) {
- this.removeSpecifiedAttribute_(attribute);
- attribute.getMapping().removeXmlAttributeMappingFrom(this.getXmlAttributes());
- this.removeXmlAttributesIfUnset();
- }
-
- public void changeMapping(OrmPersistentAttribute attribute, OrmAttributeMapping oldMapping, OrmAttributeMapping newMapping) {
- // keep the context model in sync with each change to the resource model
- int sourceIndex = this.specifiedAttributes.indexOf(attribute);
- this.specifiedAttributes.remove(sourceIndex);
- oldMapping.removeXmlAttributeMappingFrom(this.getXmlAttributes());
-
- int targetIndex = this.getSpecifiedAttributeInsertionIndex(attribute);
- this.specifiedAttributes.add(targetIndex, attribute);
- newMapping.addXmlAttributeMappingTo(this.getXmlAttributes());
-
- oldMapping.initializeOn(newMapping);
-
- this.fireItemMoved(SPECIFIED_ATTRIBUTES_LIST, targetIndex, sourceIndex);
- }
-
- protected void initializeSpecifiedAttributes() {
- for (XmlAttributeMapping xmlMapping : this.getXmlAttributeMappings()) {
- this.specifiedAttributes.add(this.buildSpecifiedAttribute(xmlMapping));
- }
- }
-
- protected Iterable<XmlAttributeMapping> getXmlAttributeMappings() {
- Attributes xmlAttributes = this.getXmlAttributes();
- return (xmlAttributes != null) ? xmlAttributes.getAttributeMappings() : EmptyIterable.<XmlAttributeMapping>instance();
- }
-
- protected OrmPersistentAttribute buildSpecifiedAttribute(XmlAttributeMapping xmlMapping) {
- return this.getContextNodeFactory().buildOrmPersistentAttribute(this, xmlMapping);
- }
-
- protected void syncSpecifiedAttributes() {
- ContextContainerTools.synchronizeWithResourceModel(this.specifiedAttributeContainerAdapter);
- }
-
- protected void moveSpecifiedAttribute_(int index, OrmPersistentAttribute attribute) {
- this.moveItemInList(index, attribute, this.specifiedAttributes, SPECIFIED_ATTRIBUTES_LIST);
- }
-
- protected void addSpecifiedAttribute_(int index, XmlAttributeMapping xmlMapping) {
- OrmPersistentAttribute attribute = this.buildSpecifiedAttribute(xmlMapping);
- this.addItemToList(index, attribute, this.specifiedAttributes, SPECIFIED_ATTRIBUTES_LIST);
- }
-
- protected void removeSpecifiedAttribute_(OrmPersistentAttribute attribute) {
- this.removeItemFromList(attribute, this.specifiedAttributes, SPECIFIED_ATTRIBUTES_LIST);
- }
-
- /**
- * specified attribute container adapter
- */
- protected class SpecifiedAttributeContainerAdapter
- implements ContextContainerTools.Adapter<OrmPersistentAttribute, XmlAttributeMapping>
- {
- public Iterable<OrmPersistentAttribute> getContextElements() {
- return SpecifiedOrmPersistentType.this.getSpecifiedAttributes();
- }
- public Iterable<XmlAttributeMapping> getResourceElements() {
- return SpecifiedOrmPersistentType.this.getXmlAttributeMappings();
- }
- public XmlAttributeMapping getResourceElement(OrmPersistentAttribute contextElement) {
- return contextElement.getMapping().getXmlAttributeMapping();
- }
- public void moveContextElement(int index, OrmPersistentAttribute element) {
- SpecifiedOrmPersistentType.this.moveSpecifiedAttribute_(index, element);
- }
- public void addContextElement(int index, XmlAttributeMapping resourceElement) {
- SpecifiedOrmPersistentType.this.addSpecifiedAttribute_(index, resourceElement);
- }
- public void removeContextElement(OrmPersistentAttribute element) {
- SpecifiedOrmPersistentType.this.removeSpecifiedAttribute_(element);
- }
- }
-
-
- // ********** default attributes **********
-
- public ListIterable<OrmReadOnlyPersistentAttribute> getDefaultAttributes() {
- return new LiveCloneListIterable<OrmReadOnlyPersistentAttribute>(this.defaultAttributes);
- }
-
- public int getDefaultAttributesSize() {
- return this.defaultAttributes.size();
- }
-
- /**
- * The attributes are synchronized during the <em>update</em> because
- * the list of resource attributes is determined by the access type
- * which can be controlled in a number of different places....
- */
- protected void updateDefaultAttributes() {
- if (getDefaultJavaAccess() == AccessType.FIELD) {
- this.syncFieldAccessDefaultAttributes();
- }
- else if (getDefaultJavaAccess() == AccessType.PROPERTY) {
- this.syncPropertyAccessDefaultAttributes();
- }
- }
-
- /**
- * Initialize the attributes for AccessType.FIELD
- * 1. all non-transient, non-static fields
- * 2. all annotated methods(getters/setters)
- */
- private void syncFieldAccessDefaultAttributes() {
- HashSet<OrmReadOnlyPersistentAttribute> contextAttributes = CollectionTools.set(this.getDefaultAttributes());
-
- this.syncFieldDefaultAttributes(contextAttributes, buildNonTransientNonStaticResourceFieldsFilter());
- if (!getMapping().isMetadataComplete()) {
- this.syncAnnotatedPropertyDefaultAttributes(contextAttributes);
- }
-
- // remove any leftover context attributes
- for (OrmReadOnlyPersistentAttribute contextAttribute : contextAttributes) {
- this.removeDefaultAttribute(contextAttribute);
- }
- }
-
- /**
- * Initialize the attributes for XmlAccessType.PROPERTY
- * 1. all getter/setter javabeans pairs
- * 2. all annotated fields
- * 3. all annotated methods getters/setters that don't have a matching pair
- */
- private void syncPropertyAccessDefaultAttributes() {
- HashSet<OrmReadOnlyPersistentAttribute> contextAttributes = CollectionTools.set(this.getDefaultAttributes());
-
- if (!getMapping().isMetadataComplete()) {
- this.syncFieldDefaultAttributes(contextAttributes, AbstractJavaPersistentType.ANNOTATED_RESOURCE_FIELDS_FILTER);
- }
-
- Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getJavaResourceMethods());
- //iterate through all resource methods searching for persistable getters
- for (JavaResourceMethod getterMethod : this.getJavaResourceMethods(this.buildPersistablePropertyGetterMethodsFilter())) {
- JavaResourceMethod setterMethod = AbstractJavaPersistentType.getValidSiblingSetMethod(getterMethod, resourceMethods);
- if (javaResourcePropertyIsDefault(getterMethod, setterMethod)) {
- if (AbstractJavaPersistentType.methodsArePersistableProperties(getterMethod, setterMethod)) {
- boolean match = false;
- for (Iterator<OrmReadOnlyPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext();) {
- OrmReadOnlyPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(getterMethod, setterMethod)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- this.addDefaultAttribute(getDefaultAttributesSize(), this.buildVirtualAttribute(getterMethod, setterMethod));
- }
- }
- }
- resourceMethods.remove(getterMethod);
- resourceMethods.remove(setterMethod);
- }
- this.syncRemainingResourceDefaultMethods(contextAttributes, resourceMethods);
-
- // remove any leftover context attributes
- for (OrmReadOnlyPersistentAttribute contextAttribute : contextAttributes) {
- this.removeDefaultAttribute(contextAttribute);
- }
- }
-
- private void syncAnnotatedPropertyDefaultAttributes(HashSet<OrmReadOnlyPersistentAttribute> contextAttributes) {
- Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getJavaResourceMethods());
- //iterate through all resource methods searching for persistable getters
- for (JavaResourceMethod getterMethod : this.getJavaResourceMethods(buildPersistablePropertyGetterMethodsFilter())) {
- JavaResourceMethod setterMethod = AbstractJavaPersistentType.getValidSiblingSetMethod(getterMethod, resourceMethods);
- if (javaResourcePropertyIsDefault(getterMethod, setterMethod)) {
- if (getterMethod.isAnnotated() || (setterMethod != null && setterMethod.isAnnotated())) {
- boolean match = false;
- for (Iterator<OrmReadOnlyPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext();) {
- OrmReadOnlyPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(getterMethod, setterMethod)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- this.addDefaultAttribute(getDefaultAttributesSize(), this.buildVirtualAttribute(getterMethod, setterMethod));
- }
- }
- }
- resourceMethods.remove(getterMethod);
- resourceMethods.remove(setterMethod);
- }
- this.syncRemainingResourceDefaultMethods(contextAttributes, resourceMethods);
- }
-
- private void syncFieldDefaultAttributes(HashSet<OrmReadOnlyPersistentAttribute> contextAttributes, Filter<JavaResourceField> filter) {
- for (JavaResourceField resourceField : this.getDefaultJavaResourceFields(filter)) {
- boolean match = false;
- for (Iterator<OrmReadOnlyPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext(); ) {
- OrmReadOnlyPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(resourceField)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- // added elements are sync'ed during construction or will be
- // updated during the next "update" (which is triggered by
- // their addition to the model)
- this.addDefaultAttribute(this.getDefaultAttributesSize(), this.buildDefaultAttribute(resourceField));
- }
- }
- }
-
- private void syncRemainingResourceDefaultMethods(HashSet<OrmReadOnlyPersistentAttribute> contextAttributes, Collection<JavaResourceMethod> resourceMethods) {
- //iterate through remaining resource methods and search for those that are annotated.
- //all getter methods will already be used.
- for (JavaResourceMethod resourceMethod : resourceMethods) {
- if (resourceMethod.isAnnotated()) {
- boolean match = false;
- //annotated setter(or other random method) with no corresponding getter, bring into context model for validation purposes
- for (Iterator<OrmReadOnlyPersistentAttribute> stream = contextAttributes.iterator(); stream.hasNext();) {
- OrmReadOnlyPersistentAttribute contextAttribute = stream.next();
- if (contextAttribute.isFor(null, resourceMethod)) {
- match = true;
- contextAttribute.update();
- stream.remove();
- break;
- }
- }
- if (!match) {
- this.addDefaultAttribute(getDefaultAttributesSize(), this.buildVirtualAttribute(null, resourceMethod));
- }
- }
- }
- }
-
- /**
- * Return all the Java resource fields that do not have a
- * corresponding <code>orm.xml</code> mapping currently
- * specified in the <code>orm.xml</code> persistent type.
- */
- protected Iterable<JavaResourceField> getDefaultJavaResourceFields() {
- return new FilteringIterable<JavaResourceField>(this.getJavaResourceFields()) {
- @Override
- protected boolean accept(JavaResourceField javaResourceField) {
- return SpecifiedOrmPersistentType.this.javaResourceFieldIsDefault(javaResourceField);
- }
- };
- }
-
- protected Iterable<JavaResourceField> getJavaResourceFields() {
- JavaResourceType javaResourceType = this.getJavaResourceType();
- if (javaResourceType == null) {
- return EmptyListIterable.instance();
- }
- return javaResourceType.getFields();
- }
-
- protected Iterable<JavaResourceField> getDefaultJavaResourceFields(Filter<JavaResourceField> filter) {
- return new FilteringIterable<JavaResourceField>(getDefaultJavaResourceFields(), filter);
- }
-
- protected Iterable<JavaResourceMethod> getJavaResourceMethods(Filter<JavaResourceMethod> filter) {
- return new FilteringIterable<JavaResourceMethod>(getJavaResourceMethods(), filter);
- }
-
- protected Iterable<JavaResourceMethod> getJavaResourceMethods() {
- JavaResourceType javaResourceType = this.getJavaResourceType();
- if (javaResourceType == null) {
- return EmptyListIterable.instance();
- }
- return javaResourceType.getMethods();
- }
-
- public static Filter<JavaResourceField> buildNonTransientNonStaticResourceFieldsFilter() {
- return AbstractJavaPersistentType.buildNonTransientNonStaticResourceFieldsFilter();
- }
-
- protected Filter<JavaResourceMethod> buildPersistablePropertyGetterMethodsFilter() {
- return new Filter<JavaResourceMethod>() {
- public boolean accept(JavaResourceMethod resourceMethod) {
- return AbstractJavaPersistentType.methodIsPersistablePropertyGetter(resourceMethod, getJavaResourceMethods());
- }
- };
- }
-
- protected JavaResourceType getJavaResourceType() {
- return (this.javaPersistentType == null) ? null : this.javaPersistentType.getJavaResourceType();
- }
-
- /**
- * Return the access type that determines which Java attributes are to be
- * used for the <code>orm.xml</code> type's <em>default</em> attributes.
- */
- protected AccessType getDefaultJavaAccess() {
- if (this.specifiedAccess != null) {
- return this.specifiedAccess;
- }
- if (this.mapping.isMetadataComplete()) {
- return this.defaultAccess;
- }
- AccessType javaAccess = this.javaPersistentType == null ? null : this.javaPersistentType.getSpecifiedAccess();
- return (javaAccess != null) ? javaAccess : this.defaultAccess;
- }
-
- protected boolean javaResourceFieldIsDefault(JavaResourceField javaResourceField) {
- return this.getSpecifiedAttributeFor(javaResourceField) == null;
- }
-
- protected OrmPersistentAttribute getSpecifiedAttributeFor(JavaResourceField javaResourceField) {
- return this.getSpecifiedAttributeFor(javaResourceField, null);
- }
-
- /**
- * Return the specified attribute corresponding to the specified Java
- * resource field, ignoring the specified excluded attribute (since
- * there can be more than one specified attribute per Java resource
- * attribute; albeit erroneously).
- */
- protected OrmPersistentAttribute getSpecifiedAttributeFor(JavaResourceField javaResourceField, OrmPersistentAttribute exclude) {
- for (OrmPersistentAttribute ormAttribute : this.getSpecifiedAttributes()) {
- if (ormAttribute == exclude) {
- continue; // skip
- }
- if (ormAttribute.isFor(javaResourceField)) {
- return ormAttribute;
- }
- }
- return null;
- }
-
- protected boolean javaResourcePropertyIsDefault(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- return this.getSpecifiedAttributeFor(javaResourceGetter, javaResourceSetter) == null;
- }
-
- protected OrmPersistentAttribute getSpecifiedAttributeFor(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- return this.getSpecifiedAttributeFor(javaResourceGetter, javaResourceSetter, null);
- }
-
- /**
- * Return the specified attribute corresponding to the specified Java
- * resource field, ignoring the specified excluded attribute (since
- * there can be more than one specified attribute per Java resource
- * attribute; albeit erroneously).
- */
- protected OrmPersistentAttribute getSpecifiedAttributeFor(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter, OrmPersistentAttribute exclude) {
- for (OrmPersistentAttribute ormAttribute : this.getSpecifiedAttributes()) {
- if (ormAttribute == exclude) {
- continue; // skip
- }
- if (ormAttribute.isFor(javaResourceGetter, javaResourceSetter)) {
- return ormAttribute;
- }
- }
- return null;
- }
-
- protected void moveDefaultAttribute(int index, OrmReadOnlyPersistentAttribute defaultAttribute) {
- this.moveItemInList(index, defaultAttribute, this.defaultAttributes, DEFAULT_ATTRIBUTES_LIST);
- }
-
- protected void addDefaultAttribute(int index, OrmReadOnlyPersistentAttribute defaultAttribute) {
- this.addItemToList(index, defaultAttribute, this.defaultAttributes, DEFAULT_ATTRIBUTES_LIST);
- }
-
- protected OrmReadOnlyPersistentAttribute buildDefaultAttribute(JavaResourceField javaResourceField) {
- return this.getContextNodeFactory().buildVirtualOrmPersistentField(this, javaResourceField);
- }
-
- protected OrmReadOnlyPersistentAttribute buildVirtualAttribute(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- return this.getContextNodeFactory().buildVirtualOrmPersistentProperty(this, javaResourceGetter, javaResourceSetter);
- }
-
- protected void removeDefaultAttribute(OrmReadOnlyPersistentAttribute defaultAttribute) {
- defaultAttribute.dispose();
- this.removeItemFromList(defaultAttribute, this.defaultAttributes, DEFAULT_ATTRIBUTES_LIST);
- }
-
-
- // ********** super persistent type **********
-
- public PersistentType getSuperPersistentType() {
- return this.superPersistentType;
- }
-
- protected void setSuperPersistentType(PersistentType persistentType) {
- PersistentType old = this.superPersistentType;
- this.superPersistentType = persistentType;
- this.firePropertyChanged(SUPER_PERSISTENT_TYPE_PROPERTY, old, persistentType);
- }
-
- protected PersistentType buildSuperPersistentType() {
- PersistentType spt = this.buildSuperPersistentType_();
- if (spt == null) {
- return null;
- }
- // check for circular inheritance
- return CollectionTools.contains(spt.getInheritanceHierarchy(), this) ? null : spt;
- }
-
- protected PersistentType buildSuperPersistentType_() {
- return (this.javaPersistentType == null) ? null : this.javaPersistentType.getSuperPersistentType();
- }
-
-
- // ********** inheritance **********
-
- public Iterable<PersistentType> getInheritanceHierarchy() {
- return this.getInheritanceHierarchyOf(this);
- }
-
- public Iterable<PersistentType> getAncestors() {
- return this.getInheritanceHierarchyOf(this.superPersistentType);
- }
-
- protected Iterable<PersistentType> getInheritanceHierarchyOf(PersistentType start) {
- // using a chain iterable to traverse up the inheritance tree
- return new ChainIterable<PersistentType>(start) {
- @Override
- protected PersistentType nextLink(PersistentType persistentType) {
- return persistentType.getSuperPersistentType();
- }
- };
- }
-
-
- // ********** declaring type name **********
-
- public String getDeclaringTypeName() {
- return this.declaringTypeName;
- }
-
- protected void setDeclaringTypeName(String name) {
- String old = this.declaringTypeName;
- this.declaringTypeName = name;
- this.firePropertyChanged(DECLARING_TYPE_NAME_PROPERTY, old, name);
- }
-
- protected String buildDeclaringTypeName() {
- return this.isJpa2_0Compatible() ? this.buildDeclaringTypeName_() : null;
- }
-
- protected String buildDeclaringTypeName_() {
- return (this.javaPersistentType == null) ?
- null : ((JavaPersistentType2_0) this.javaPersistentType).getDeclaringTypeName();
- }
-
-
- // ********** metamodel **********
-
- protected MetamodelSourceType.Synchronizer buildMetamodelSynchronizer() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildMetamodelSynchronizer(this) :
- null;
- }
-
- public IFile getMetamodelFile() {
- return (this.javaPersistentType == null) ? null : this.metamodelSynchronizer.getFile();
- }
-
- public void initializeMetamodel() {
- // do nothing - probably shouldn't be called...
- }
-
- public boolean isManaged() {
- return true;
- }
-
- /**
- * All <code>orm.xml</code> persistent types must be able to generate a static metamodel
- * because 1.0 <code>orm.xml</code> files can be referenced from 2.0 persistence.xml files.
- */
- public void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- if (this.javaPersistentType != null) {
- this.metamodelSynchronizer.synchronize(memberTypeTree);
- }
- }
-
- public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- if (this.javaPersistentType != null) {
- this.metamodelSynchronizer.printBodySourceOn(pw, memberTypeTree);
- }
- }
-
- public void disposeMetamodel() {
- // do nothing - probably shouldn't be called...
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<OrmPersistentType> getType() {
- return OrmPersistentType.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- for (OrmPersistentAttribute attribute : this.getSpecifiedAttributes()) {
- if (attribute.contains(textOffset)) {
- return attribute;
- }
- }
- return this;
- }
-
- public TextRange getSelectionTextRange() {
- return this.mapping.getSelectionTextRange();
- }
-
- public void dispose() {
- if (this.javaPersistentType != null) {
- this.javaPersistentType.dispose();
- }
- for (OrmReadOnlyPersistentAttribute defaultAttribute : this.getDefaultAttributes()) {
- defaultAttribute.dispose();
- }
- }
-
-
- // ********** PersistentType.Owner implementation **********
-
- public AccessType getOverridePersistentTypeAccess() {
- if (this.specifiedAccess != null) {
- return this.specifiedAccess;
- }
-
- if (this.superPersistentType instanceof OrmPersistentType) {
- AccessType accessType = ((OrmPersistentType) this.superPersistentType).getSpecifiedAccess();
- if (accessType != null) {
- return accessType;
- }
- }
-
- if (this.mapping.isMetadataComplete()) {
- AccessType accessType = this.getOwnerDefaultAccess();
- if (accessType != null) {
- return accessType;
- }
- }
-
- // no override access type
- return null;
- }
-
- public AccessType getDefaultPersistentTypeAccess() {
- if (this.superPersistentType instanceof OrmPersistentType) {
- AccessType accessType = ((OrmPersistentType) this.superPersistentType).getDefaultAccess();
- if (accessType != null) {
- return accessType;
- }
- }
-
- return this.getOwnerDefaultAccess();
- }
-
-
- //*********** refactoring ***********
-
- public Iterable<DeleteEdit> createDeleteTypeEdits(IType type) {
- return this.isFor(type.getFullyQualifiedName('.')) ?
- new SingleElementIterable<DeleteEdit>(this.mapping.createDeleteEdit()) :
- EmptyIterable.<DeleteEdit>instance();
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- this.mapping.createRenameTypeEdits(originalType, newName),
- this.createSpecifiedAttributesRenameTypeEdits(originalType, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createSpecifiedAttributesRenameTypeEdits(final IType originalType, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<OrmPersistentAttribute, Iterable<ReplaceEdit>>(this.getSpecifiedAttributes()) {
- @Override
- protected Iterable<ReplaceEdit> transform(OrmPersistentAttribute persistentAttribute) {
- return persistentAttribute.createRenameTypeEdits(originalType, newName);
- }
- }
- );
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- this.mapping.createMoveTypeEdits(originalType, newPackage),
- this.createSpecifiedAttributesMoveTypeEdits(originalType, newPackage)
- );
- }
-
- protected Iterable<ReplaceEdit> createSpecifiedAttributesMoveTypeEdits(final IType originalType, final IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<OrmPersistentAttribute, Iterable<ReplaceEdit>>(this.getSpecifiedAttributes()) {
- @Override
- protected Iterable<ReplaceEdit> transform(OrmPersistentAttribute persistentAttribute) {
- return persistentAttribute.createMoveTypeEdits(originalType, newPackage);
- }
- }
- );
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- this.mapping.createRenamePackageEdits(originalPackage, newName),
- this.createSpecifiedAttributesRenamePackageEdits(originalPackage, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createSpecifiedAttributesRenamePackageEdits(final IPackageFragment originalPackage, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<OrmPersistentAttribute, Iterable<ReplaceEdit>>(this.getSpecifiedAttributes()) {
- @Override
- protected Iterable<ReplaceEdit> transform(OrmPersistentAttribute persistentAttribute) {
- return persistentAttribute.createRenamePackageEdits(originalPackage, newName);
- }
- }
- );
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateClass(messages);
- this.validateMapping(messages, reporter);
- this.validateAttributes(messages, reporter);
- }
-
- protected void validateClass(List<IMessage> messages) {
- if (this.javaPersistentType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_TYPE_UNRESOLVED_CLASS,
- new String[] {this.getName()},
- this,
- this.mapping.getClassTextRange()
- )
- );
- }
- }
-
- protected void validateMapping(List<IMessage> messages, IReporter reporter) {
- try {
- this.mapping.validate(messages, reporter);
- } catch(Throwable t) {
- JptJpaCorePlugin.log(t);
- }
- }
-
- protected void validateAttributes(List<IMessage> messages, IReporter reporter) {
- for (OrmReadOnlyPersistentAttribute attribute : this.getAttributes()) {
- this.validateAttribute(attribute, messages, reporter);
- }
- }
-
- protected void validateAttribute(OrmReadOnlyPersistentAttribute attribute, List<IMessage> messages, IReporter reporter) {
- try {
- attribute.validate(messages, reporter);
- } catch(Throwable t) {
- JptJpaCorePlugin.log(t);
- }
- }
-
- public TextRange getValidationTextRange() {
- return this.mapping.getValidationTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mapping.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmPersistentAttribute attribute : this.getSpecifiedAttributes()) {
- result = attribute.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** misc **********
-
- @Override
- public EntityMappings getParent() {
- return (EntityMappings) super.getParent();
- }
-
- protected EntityMappings getEntityMappings() {
- return this.getParent();
- }
-
- public String getDefaultPackage() {
- return this.getEntityMappings().getDefaultPersistentTypePackage();
- }
-
- public boolean isFor(String typeName) {
- return Tools.valuesAreEqual(typeName, this.getName());
- }
-
- public boolean isIn(IPackageFragment packageFragment) {
- String packageName = this.getPackageName();
- if (Tools.valuesAreEqual(packageName, packageFragment.getElementName())) {
- return true;
- }
- return false;
- }
-
- protected String getPackageName() {
- String className = this.getMappingClassName();
- if (className == null) {
- return null;
- }
- int lastPeriod = className.lastIndexOf('.');
- return (lastPeriod == -1) ? this.getDefaultPackage() : className.substring(0, lastPeriod);
- }
-
- public boolean contains(int textOffset) {
- return this.mapping.containsOffset(textOffset);
- }
-
- public PersistentType getOverriddenPersistentType() {
- return this.mapping.isMetadataComplete() ? null : this.javaPersistentType;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java
deleted file mode 100644
index 51ff7b94ac..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.model.event.StateChangeEvent;
-import org.eclipse.jpt.common.utility.model.listener.StateChangeListener;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.java.Accessor;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.FieldAccessor;
-import org.eclipse.jpt.jpa.core.internal.context.java.PropertyAccessor;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmReadOnlyPersistentAttribute2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <em>virtual</em> <code>orm.xml</code> persistent attribute
- */
-public class VirtualOrmPersistentAttribute
- extends AbstractOrmXmlContextNode
- implements OrmReadOnlyPersistentAttribute2_0
-{
- protected final Accessor javaAccessor;
-
- /**
- * This is an "annotated" Java persistent attribute whose state is
- * determined by its annotations (just like a "normal" Java attribute).
- * Its parent is an <code>orm.xml</code> persistent type. This is necessary
- * because the Java attribute's <em>context</em> is the <code>orm.xml</code>
- * type (e.g. the Java attribute's default table is the table set in the
- * <code>orm.xml</code> type, not the Java type).
- * The {@link #originalJavaAttributeListener} keeps this attribute in sync
- * with any changes made via the Java context model.
- */
- protected final JavaPersistentAttribute annotatedJavaAttribute;
-
- /**
- * This is the "original" Java persistent attribute corresponding to
- * {@link #javaResourceAttribute} from the Java context model.
- * If it is found (it can be <code>null</code> if the <code>orm.xml</code>
- * access type differs from the Java access type), we need to listen to it
- * for changes so we can refresh our "local" Java attributes (since the
- * Java resource model does not fire change events, and trigger a
- * <em>sync</em>, when it is modified by the Java context model - if there
- * is no Java context attribute, the Java resource model can only be
- * modified via source code editing and we will <em>sync</em> appropriately).
- */
- protected JavaPersistentAttribute originalJavaAttribute;
- protected StateChangeListener originalJavaAttributeListener;
-
- /**
- * This is a simulated "unannotated" Java persistent attribute. It is built
- * only if necessary (i.e. when the <code>orm.xml</code> persistent type
- * has been tagged <em>metadata complete</em>). Like
- * {@link #annotatedJavaAttribute}, its parent is an
- * <code>orm.xml</code> persistent type.
- * The {@link #originalJavaAttributeListener} keeps this attribute in sync
- * with any changes made via the Java context model.
- */
- protected JavaPersistentAttribute unannotatedJavaAttribute;
-
- protected JavaAttributeMapping mapping; // never null
-
-
- public VirtualOrmPersistentAttribute(OrmPersistentType parent, JavaResourceField resourceField) {
- super(parent);
- this.javaAccessor = new FieldAccessor(this, resourceField);
- this.annotatedJavaAttribute = this.buildAnnotatedJavaAttribute();
- this.mapping = this.buildMapping();
- }
-
- public VirtualOrmPersistentAttribute(OrmPersistentType parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- super(parent);
- this.javaAccessor = new PropertyAccessor(this, resourceGetter, resourceSetter);
- this.annotatedJavaAttribute = this.buildAnnotatedJavaAttribute();
- this.mapping = this.buildMapping();
- }
-
- public VirtualOrmPersistentAttribute(OrmPersistentType parent, Accessor javaAccessor) {
- super(parent);
- this.javaAccessor = javaAccessor;
- this.annotatedJavaAttribute = this.buildAnnotatedJavaAttribute();
- this.mapping = this.buildMapping();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncLocalJavaAttributes();
- // 'mapping' belongs to one of the "local" Java persistent attributes
- }
-
- @Override
- public void update() {
- super.update();
- this.updateOriginalJavaAttribute();
- this.updateLocalJavaAttributes();
- this.setMapping(this.buildMapping());
- }
-
-
- // ********** mapping **********
-
- public JavaAttributeMapping getMapping() {
- return this.mapping;
- }
-
- protected void setMapping(JavaAttributeMapping mapping) {
- JavaAttributeMapping old = this.mapping;
- this.mapping = mapping;
- this.firePropertyChanged(DEFAULT_MAPPING_KEY_PROPERTY, old, mapping);
- }
-
- protected JavaAttributeMapping buildMapping() {
- return this.getJavaPersistentAttribute().getMapping();
- }
-
- public String getMappingKey() {
- return this.mapping.getKey();
- }
-
- public String getDefaultMappingKey() {
- return this.mapping.getKey();
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.mapping.getName();
- }
-
-
- // ********** Java persistent attribute **********
-
- public JavaPersistentAttribute getJavaPersistentAttribute() {
- return this.getOwningTypeMapping().isMetadataComplete() ?
- this.getUnannotatedJavaAttribute() :
- this.annotatedJavaAttribute;
- }
-
- public JavaPersistentAttribute resolveJavaPersistentAttribute() {
- JavaPersistentType javaType = this.getOwningPersistentType().getJavaPersistentType();
- return (javaType == null) ? null : javaType.getAttributeFor(this.getJavaResourceAttribute());
- }
-
- protected JavaPersistentAttribute2_0 getJavaPersistentAttribute2_0() {
- return (JavaPersistentAttribute2_0) this.getJavaPersistentAttribute();
- }
-
- protected JavaPersistentAttribute buildAnnotatedJavaAttribute() {
- return buildJavaAttribute(this.javaAccessor);
- }
-
- protected JavaPersistentAttribute getUnannotatedJavaAttribute() {
- if (this.unannotatedJavaAttribute == null) {
- this.unannotatedJavaAttribute = this.buildUnannotatedJavaAttribute();
- }
- return this.unannotatedJavaAttribute;
- }
-
- protected JavaPersistentAttribute buildUnannotatedJavaAttribute() {
- // pass in the orm persistent type as the parent...
- return this.javaAccessor.buildUnannotatedJavaAttribute(this.getOwningPersistentType());
- }
-
- protected JavaPersistentAttribute buildJavaAttribute(Accessor accessor) {
- // pass in the orm persistent type as the parent...
- return this.getJpaFactory().buildJavaPersistentAttribute(this.getOwningPersistentType(), accessor);
- }
-
- protected void syncLocalJavaAttributes() {
- this.annotatedJavaAttribute.synchronizeWithResourceModel();
- if (this.unannotatedJavaAttribute != null) {
- this.unannotatedJavaAttribute.synchronizeWithResourceModel();
- }
- }
-
- protected void updateLocalJavaAttributes() {
- this.annotatedJavaAttribute.update();
- if (this.unannotatedJavaAttribute != null) {
- this.unannotatedJavaAttribute.update();
- }
- }
-
- public Accessor getJavaAccessor() {
- return this.javaAccessor;
- }
-
- public JavaResourceAttribute getJavaResourceAttribute() {
- return this.javaAccessor.getResourceAttribute();
- }
-
- public boolean isFor(JavaResourceField javaResourceField) {
- return this.javaAccessor.isFor(javaResourceField);
- }
-
- public boolean isFor(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter) {
- return this.javaAccessor.isFor(javaResourceGetter, javaResourceSetter);
- }
-
- // ********** original Java persistent attribute **********
-
- protected void updateOriginalJavaAttribute() {
- JavaPersistentAttribute newJavaAttribute = this.resolveJavaPersistentAttribute();
- if (newJavaAttribute != this.originalJavaAttribute) {
- if (newJavaAttribute == null) {
- this.originalJavaAttribute.removeStateChangeListener(this.getOriginalJavaAttributeListener());
- this.originalJavaAttribute = null;
- } else {
- if (this.originalJavaAttribute != null) {
- this.originalJavaAttribute.removeStateChangeListener(this.getOriginalJavaAttributeListener());
- }
- this.originalJavaAttribute = newJavaAttribute;
- this.originalJavaAttribute.addStateChangeListener(this.getOriginalJavaAttributeListener());
- }
- }
- }
-
- protected StateChangeListener getOriginalJavaAttributeListener() {
- if (this.originalJavaAttributeListener == null) {
- this.originalJavaAttributeListener = this.buildOriginalJavaAttributeListener();
- }
- return this.originalJavaAttributeListener;
- }
-
- protected StateChangeListener buildOriginalJavaAttributeListener() {
- return new StateChangeListener() {
- public void stateChanged(StateChangeEvent event) {
- VirtualOrmPersistentAttribute.this.originalJavaAttributeChanged();
- }
- };
- }
-
- /**
- * If the "original" Java persistent attribute (or any of its parts) changes
- * we need to sync our "local" Java persistent attributes with any possible
- * changes to the Java resource model. This is necessary for when the Java
- * context model is modifying the Java resource model, but is redundant when
- * the Java resource model is triggering a <em>sync</em>.
- */
- protected void originalJavaAttributeChanged() {
- this.syncLocalJavaAttributes();
- }
-
-
- // ********** access **********
-
- public AccessType getAccess() {
- return this.getJavaPersistentAttribute().getAccess();
- }
-
-
- // ********** specified/default **********
-
- public boolean isVirtual() {
- return true;
- }
-
- public OrmPersistentAttribute addToXml() {
- if (this.mapping.getKey() == null) {
- throw new IllegalStateException("Use convertToSpecified(String) instead and specify a mapping type"); //$NON-NLS-1$
- }
- return this.getOwningPersistentType().addAttributeToXml(this);
- }
-
- public OrmPersistentAttribute addToXml(String mappingKey) {
- return this.getOwningPersistentType().addAttributeToXml(this, mappingKey);
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<OrmPersistentAttribute> getType() {
- return OrmPersistentAttribute.class;
- }
-
- public JpaStructureNode getStructureNode(int offset) {
- return this;
- }
-
- public boolean contains(int textOffset) {
- return false;
- }
-
- public TextRange getSelectionTextRange() {
- return null;
- }
-
- public void dispose() {
- if (this.originalJavaAttribute != null) {
- this.originalJavaAttribute.removeStateChangeListener(this.getOriginalJavaAttributeListener());
- }
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // the Java attribute should not need an AST for validation from here
- this.getJavaPersistentAttribute().validate(messages, reporter, null);
- }
-
- public TextRange getValidationTextRange() {
- return this.getOwningTypeMapping().getAttributesTextRange();
- }
-
-
- // ********** metamodel **********
-
- public String getMetamodelContainerFieldTypeName() {
- return this.getJavaPersistentAttribute2_0().getMetamodelContainerFieldTypeName();
- }
-
- public String getMetamodelContainerFieldMapKeyTypeName() {
- return this.getJavaPersistentAttribute2_0().getMetamodelContainerFieldMapKeyTypeName();
- }
-
- public String getMetamodelTypeName() {
- return this.getJavaPersistentAttribute2_0().getMetamodelTypeName();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmPersistentType getParent() {
- return (OrmPersistentType) super.getParent();
- }
-
- public OrmPersistentType getOwningPersistentType() {
- return this.getParent();
- }
-
- public OrmTypeMapping getOwningTypeMapping() {
- return this.getOwningPersistentType().getMapping();
- }
-
- public String getPrimaryKeyColumnName() {
- return this.mapping.getPrimaryKeyColumnName();
- }
-
- public String getTypeName() {
- return this.getJavaPersistentAttribute().getTypeName();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractJarFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractJarFileRef.java
deleted file mode 100644
index cb65b89725..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractJarFileRef.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.context.persistence;
-
-import java.util.List;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JarFile;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.persistence.JarFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>persistence.xml</code> file
- * <br>
- * <code>jar-file</code> element
- */
-public abstract class AbstractJarFileRef
- extends AbstractPersistenceXmlContextNode
- implements JarFileRef
-{
- protected final XmlJarFileRef xmlJarFileRef;
-
- protected String fileName;
-
- /**
- * the jar file corresponding to the ref's file name;
- * this can be null if the name is invalid
- */
- protected JarFile jarFile;
-
-
- // ********** construction/initialization **********
-
- public AbstractJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef) {
- super(parent);
- this.xmlJarFileRef = xmlJarFileRef;
- this.fileName = xmlJarFileRef.getFileName();
- this.jarFile = this.buildJarFile();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setFileName_(this.xmlJarFileRef.getFileName());
- this.syncJarFile();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJarFile();
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<JarFileRef> getType() {
- return JarFileRef.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- return this;
- }
-
- public TextRange getSelectionTextRange() {
- return (this.xmlJarFileRef == null) ? null : this.xmlJarFileRef.getSelectionTextRange();
- }
-
- public void dispose() {
- if (this.jarFile != null) {
- this.jarFile.dispose();
- }
- }
-
-
- // ********** file name **********
-
- public String getFileName() {
- return this.fileName;
- }
-
- public void setFileName(String fileName) {
- this.setFileName_(fileName);
- this.xmlJarFileRef.setFileName(fileName);
- }
-
- /**
- * We clear out {@link #jarFile} here because we cannot compare its file
- * name to the ref's file name, since it may have been munged (see
- * {@link #resolveJavaResourcePackageFragmentRoot_()}).
- */
- protected void setFileName_(String fileName) {
- String old = this.fileName;
- this.fileName = fileName;
- if (this.firePropertyChanged(FILE_NAME_PROPERTY, old, fileName)) {
- // clear out the jar file here, it will be rebuilt during "update"
- if (this.jarFile != null) {
- this.jarFile.dispose();
- this.setJarFile(null);
- }
- }
- }
-
-
- // ********** jar file **********
-
- public JarFile getJarFile() {
- return this.jarFile;
- }
-
- protected void setJarFile(JarFile jarFile) {
- JarFile old = this.jarFile;
- this.jarFile = jarFile;
- this.firePropertyChanged(JAR_FILE_PROPERTY, old, jarFile);
- }
-
- protected JarFile buildJarFile() {
- JavaResourcePackageFragmentRoot jrpfr = this.resolveJavaResourcePackageFragmentRoot();
- return (jrpfr == null) ? null : this.buildJarFile(jrpfr);
- }
-
- /**
- * If the file name changes during <em>sync</em>, the jar file will be
- * cleared out in {@link #setFileName_(String)}. If we get here and the jar
- * file is still present, we can <code>sync</code> it. Of course, it might
- * still be obsolete if other things have changed....
- *
- * @see #updateJarFile()
- */
- protected void syncJarFile() {
- if (this.jarFile != null) {
- this.jarFile.synchronizeWithResourceModel();
- }
- }
-
- /**
- * @see #syncJarFile()
- */
- protected void updateJarFile() {
- JavaResourcePackageFragmentRoot jrpfr = this.resolveJavaResourcePackageFragmentRoot();
- if (jrpfr == null) {
- if (this.jarFile != null) {
- this.jarFile.dispose();
- this.setJarFile(null);
- }
- } else {
- if (this.jarFile == null) {
- this.setJarFile(this.buildJarFile(jrpfr));
- } else {
- if (this.jarFile.getJarResourcePackageFragmentRoot() == jrpfr) {
- this.jarFile.update();
- } else {
- this.jarFile.dispose();
- this.setJarFile(this.buildJarFile(jrpfr));
- }
- }
- }
- }
-
- protected JavaResourcePackageFragmentRoot resolveJavaResourcePackageFragmentRoot() {
- return StringTools.stringIsEmpty(this.fileName) ? null : this.resolveJavaResourcePackageFragmentRoot_();
- }
-
- /**
- * pre-condition: 'fileName' is neither null nor empty
- */
- protected JavaResourcePackageFragmentRoot resolveJavaResourcePackageFragmentRoot_() {
- // first, attempt to resolve location specifically...
- JavaResourcePackageFragmentRoot jrpfr = this.resolveJrpfrOnDeploymentPath();
- // ...then guess, basically
- return (jrpfr != null) ? jrpfr : this.resolveJrpfrBestMatch();
- }
-
- /**
- * pre-condition: 'fileName' is neither null nor empty
- */
- protected JavaResourcePackageFragmentRoot resolveJrpfrOnDeploymentPath() {
- for (IPath runtimePath : this.buildRuntimeJarFilePath(new Path(this.fileName))) {
- IVirtualFile virtualJar = ComponentCore.createFile(this.getProject(), runtimePath);
- IFile realJar = virtualJar.getUnderlyingFile();
- if (realJar.exists() && realJar.getProject().equals(this.getProject())) {
- return this.getJpaProject().getJavaResourcePackageFragmentRoot(realJar.getProjectRelativePath().toString());
- }
- }
- return null;
- }
-
- /**
- * Return an array of runtime paths that may correspond
- * to the given persistence.xml jar file entry
- */
- protected IPath[] buildRuntimeJarFilePath(IPath jarFilePath) {
- IPath root = this.getJarRuntimeRootPath();
- return this.projectHasWebFacet() ?
- this.buildRuntimeJarFilePathWeb(root, jarFilePath) :
- this.buildRuntimeJarFilePathNonWeb(root, jarFilePath);
- }
-
- protected IPath getJarRuntimeRootPath() {
- return JptJpaCorePlugin.getJarRuntimeRootPath(this.getProject());
- }
-
- protected boolean projectHasWebFacet() {
- return JptJpaCorePlugin.projectHasWebFacet(this.getProject());
- }
-
- protected IPath[] buildRuntimeJarFilePathWeb(IPath root, IPath jarFilePath) {
- return new IPath[] {
- // first path entry assumes form "../lib/other.jar"
- root.append(jarFilePath.removeFirstSegments(1)),
- // second path entry assumes form of first, without ".." ("lib/other.jar")
- root.append(jarFilePath)
- };
- }
-
- protected IPath[] buildRuntimeJarFilePathNonWeb(IPath root, IPath jarFilePath) {
- return new IPath[] {
- // assumes form "../lib/other.jar"
- root.append(jarFilePath)
- };
- }
-
- protected IProject getProject() {
- return this.getJpaProject().getProject();
- }
-
- /**
- * pre-condition: 'fileName' is neither null nor empty
- */
- protected JavaResourcePackageFragmentRoot resolveJrpfrBestMatch() {
- String jarFileName = new Path(this.fileName).lastSegment();
- for (JpaFile jpaFile : this.getJpaProject().getJarJpaFiles()) {
- if (jpaFile.getFile().getName().equals(jarFileName)) {
- return (JavaResourcePackageFragmentRoot) jpaFile.getResourceModel();
- }
- }
- return null;
- }
-
- /**
- * pre-condition: 'jrpfr' is not null
- */
- protected JarFile buildJarFile(JavaResourcePackageFragmentRoot jrpfr) {
- return this.getContextNodeFactory().buildJarFile(this, jrpfr);
- }
-
-
- // ********** JarFileRef implementation **********
-
- public XmlJarFileRef getXmlJarFileRef() {
- return this.xmlJarFileRef;
- }
-
- public PersistentType getPersistentType(String typeName) {
- return (this.jarFile == null) ? null : this.jarFile.getPersistentType(typeName);
- }
-
- public boolean containsOffset(int textOffset) {
- return (this.xmlJarFileRef != null) && this.xmlJarFileRef.containsOffset(textOffset);
- }
-
-
- // ********** PersistentTypeContainer implementation **********
-
- public Iterable<? extends PersistentType> getPersistentTypes() {
- return (this.jarFile != null) ? this.jarFile.getPersistentTypes() : EmptyIterable.<JavaPersistentType>instance();
- }
-
-
- // ********** XmlContextNode implementation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlJarFileRefTextRange();
- return (textRange != null) ? textRange : this.getPersistenceUnit().getValidationTextRange();
- }
-
- protected TextRange getXmlJarFileRefTextRange() {
- return (this.xmlJarFileRef == null) ? null : this.xmlJarFileRef.getValidationTextRange();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<ReplaceEdit> createReplaceFolderEdits(IFolder originalFolder, String newName) {
- return this.isIn(originalFolder) ?
- new SingleElementIterable<ReplaceEdit>(this.createReplaceFolderEdit(originalFolder, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createReplaceFolderEdit(IFolder originalFolder, String newName) {
- return this.xmlJarFileRef.createReplaceFolderEdit(originalFolder, newName);
- }
-
- protected boolean isIn(IFolder folder) {
- return (this.jarFile != null) && this.jarFile.isIn(folder);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (StringTools.stringIsEmpty(this.xmlJarFileRef.getFileName())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE,
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
-
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING,
- this,
- this.getValidationTextRange()
- )
- );
-
- if (this.jarFile == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE,
- new String[] {this.xmlJarFileRef.getFileName()},
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
-
- this.jarFile.validate(messages, reporter);
- }
-
-
- // ********** overrides **********
-
- @Override
- public PersistenceUnit getParent() {
- return (PersistenceUnit) super.getParent();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- super.toString(sb);
- sb.append(this.fileName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractMappingFileRef.java
deleted file mode 100644
index 213cf0dbdf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractMappingFileRef.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.persistence;
-
-import java.util.List;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.MappingFile;
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.context.MappingFileRoot;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>persistence.xml</code> file
- * <br>
- * <code>mapping-file</code> element
- */
-public abstract class AbstractMappingFileRef
- extends AbstractPersistenceXmlContextNode
- implements MappingFileRef
-{
- protected String fileName;
-
- /**
- * The mapping file corresponding to the ref's file name.
- * This can be <code>null</code> if the name is invalid.
- */
- protected MappingFile mappingFile;
-
-
- // ********** construction/initialization **********
-
- protected AbstractMappingFileRef(PersistenceUnit parent, String fileName) {
- super(parent);
- this.fileName = fileName;
- this.mappingFile = this.buildMappingFile();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncMappingFile();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateMappingFile();
- }
-
-
- // ********** file name **********
-
- public String getFileName() {
- return this.fileName;
- }
-
- public boolean isFor(IFile file) {
- return (this.mappingFile != null) && file.equals(this.mappingFile.getXmlResource().getFile());
- }
-
- protected boolean isIn(IFolder folder) {
- return (this.mappingFile != null) && this.mappingFile.isIn(folder);
- }
-
-
- // ********** mapping file **********
-
- public MappingFile getMappingFile() {
- return this.mappingFile;
- }
-
- protected void setMappingFile(MappingFile mappingFile) {
- MappingFile old = this.mappingFile;
- this.mappingFile = mappingFile;
- this.firePropertyChanged(MAPPING_FILE_PROPERTY, old, mappingFile);
- }
-
- protected MappingFile buildMappingFile() {
- JpaXmlResource xmlResource = this.resolveMappingFileXmlResource();
- return (xmlResource == null) ? null : this.buildMappingFile(xmlResource);
- }
-
- protected void syncMappingFile() {
- this.syncMappingFile(true);
- }
-
- /**
- * We call this method from both {@link #syncMappingFile()} and
- * {@link #updateMappingFile()} because<ul>
- * <li>a <em>sync</em> will occur when the file is edited directly;
- * and the user could modify something (e.g. the version number) that
- * triggers the file being "resolved" or not;
- * see {@link #resolveMappingFileXmlResource()}
- * <li>an <em>update</em> will occur whenever the entire file is added or
- * removed
- * </ul>
- */
- protected void syncMappingFile(boolean sync) {
- JpaXmlResource newXmlResource = this.resolveMappingFileXmlResource();
- if (newXmlResource == null) {
- if (this.mappingFile != null) {
- this.mappingFile.dispose();
- this.setMappingFile(null);
- }
- } else {
- if (this.mappingFile == null) {
- this.setMappingFile(this.buildMappingFile(newXmlResource));
- } else {
- if (this.mappingFile.getXmlResource() == newXmlResource) {
- if (sync) {
- this.mappingFile.synchronizeWithResourceModel();
- } else {
- this.mappingFile.update();
- }
- } else {
- // [seems like we should never get here; since if the file's
- // content type changed, the JPA project would return null... ~bjv]
- // if the resource's content type has changed, we completely rebuild the mapping file
- this.mappingFile.dispose();
- this.setMappingFile(this.buildMappingFile(newXmlResource));
- }
- }
- }
- }
-
- /**
- * The mapping file ref resource is in the persistence xml resource
- * (<code>persistence.xml</code>). This returns the resource of
- * the mapping file itself (<code>orm.xml</code>).
- */
- protected JpaXmlResource resolveMappingFileXmlResource() {
- if (this.fileName == null) {
- return null;
- }
- JpaXmlResource xmlResource = this.getJpaProject().getMappingFileXmlResource(new Path(this.fileName));
- if (xmlResource == null) {
- return null;
- }
- if (xmlResource.isReverting()) {
- // 308254 - this can happen when orm.xml is closed without saving;
- // the model is completely whacked in another thread - so wipe our model(?)
- return null;
- }
- JptResourceType resourceType = xmlResource.getResourceType();
- if (resourceType == null) {
- return null;
- }
- if ( ! this.getJpaPlatform().supportsResourceType(resourceType)) {
- return null;
- }
- return xmlResource;
- }
-
- /**
- * pre-condition: 'xmlResource' is not <code>null</code>
- */
- protected MappingFile buildMappingFile(JpaXmlResource xmlResource) {
- return this.getJpaFactory().buildMappingFile(this, xmlResource);
- }
-
- protected void updateMappingFile() {
- this.syncMappingFile(false);
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<MappingFileRef> getType() {
- return MappingFileRef.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- return this;
- }
-
- public void dispose() {
- if (this.mappingFile != null) {
- this.mappingFile.dispose();
- }
- }
-
-
- // ********** queries/generators **********
-
- public Iterable<Query> getMappingFileQueries() {
- return (this.mappingFile != null) ? this.mappingFile.getMappingFileQueries() : EmptyIterable.<Query>instance();
- }
-
- public Iterable<Generator> getMappingFileGenerators() {
- return (this.mappingFile != null) ? this.mappingFile.getMappingFileGenerators() : EmptyIterable.<Generator>instance();
- }
-
-
- // ********** misc **********
-
- public boolean persistenceUnitMetadataExists() {
- MappingFilePersistenceUnitMetadata metadata = this.getPersistenceUnitMetadata();
- return (metadata != null) && metadata.resourceExists();
- }
-
- public MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata() {
- MappingFileRoot root = this.getChildMappingFileRoot();
- return (root == null) ? null : root.getPersistenceUnitMetadata();
- }
-
- /**
- * The method {@link #getMappingFileRoot()} is already defined by
- * {@link org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode}
- * for getting what would be the "mapping file root" that <em>contains</em>
- * the context node. We want something slightly different here: i.e. the
- * "mapping file root" contained by the mapping file ref (since, actually,
- * the mapping file ref is not even contained by a "mapping file root").
- */
- protected MappingFileRoot getChildMappingFileRoot() {
- return (this.mappingFile == null) ? null : this.mappingFile.getRoot();
- }
-
- public PersistentType getPersistentType(String typeName) {
- return (this.mappingFile == null) ? null : this.mappingFile.getPersistentType(typeName);
- }
-
- @Override
- public PersistenceUnit getParent() {
- return (PersistenceUnit) super.getParent();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- super.toString(sb);
- sb.append(this.fileName);
- }
-
- public Iterable<? extends PersistentType> getPersistentTypes() {
- return (this.mappingFile != null) ? this.mappingFile.getPersistentTypes() : EmptyIterable.<JavaPersistentType>instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (StringTools.stringIsEmpty(this.fileName)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE,
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
-
- if (this.mappingFile == null) {
- messages.add(this.buildMappingFileValidationMessage());
- return;
- }
-
- this.mappingFile.validate(messages, reporter);
- }
-
- protected IMessage buildMappingFileValidationMessage() {
- int severity = IMessage.HIGH_SEVERITY;
- IFile file = this.getPlatformFile();
- if ( ! file.exists()) {
- return DefaultJpaValidationMessages.buildMessage(
- severity,
- JpaValidationMessages.PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE,
- new String[] {this.fileName},
- this,
- this.getValidationTextRange()
- );
- }
- String msgText = this.mappingFileContentIsUnsupported() ?
- JpaValidationMessages.PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT :
- JpaValidationMessages.PERSISTENCE_UNIT_INVALID_MAPPING_FILE;
- return DefaultJpaValidationMessages.buildMessage(
- severity,
- msgText,
- new String[] {file.getName()},
- file
- );
- }
-
- protected IFile getPlatformFile() {
- return this.getJpaProject().getPlatformFile(new Path(this.fileName));
- }
-
- /**
- * pre-condition: {@link #getPlatformFile()} exists
- */
- protected boolean mappingFileContentIsUnsupported() {
- JpaXmlResource xmlResource = this.getJpaProject().getMappingFileXmlResource(new Path(this.fileName));
- return (xmlResource != null) && ! this.getJpaPlatform().supportsResourceType(xmlResource.getResourceType());
- }
-
-
- // ********** refactoring **********
-
- public Iterable<DeleteEdit> createDeleteTypeEdits(IType type) {
- return (this.mappingFile != null) ?
- this.mappingFile.createDeleteTypeEdits(type) :
- EmptyIterable.<DeleteEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return (this.mappingFile != null) ?
- this.mappingFile.createRenameTypeEdits(originalType, newName) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return (this.mappingFile != null) ?
- this.mappingFile.createMoveTypeEdits(originalType, newPackage) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return (this.mappingFile != null) ?
- this.mappingFile.createRenamePackageEdits(originalPackage, newName) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenameMappingFileEdits(IFile originalFile, String newName) {
- return this.isFor(originalFile) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenameEdit(originalFile, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected abstract ReplaceEdit createRenameEdit(IFile originalFile, String newName);
-
- public Iterable<ReplaceEdit> createMoveMappingFileEdits(IFile originalFile, IPath runtineDestination) {
- return this.isFor(originalFile) ?
- new SingleElementIterable<ReplaceEdit>(this.createMoveEdit(originalFile, runtineDestination)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected abstract ReplaceEdit createMoveEdit(IFile originalFile, IPath runtineDestination);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
deleted file mode 100644
index 7c0b6b4088..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
+++ /dev/null
@@ -1,2933 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.context.persistence;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.BodySourceWriter;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.NonEmptyStringFilter;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.MappingFile;
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.context.persistence.ClassRef;
-import org.eclipse.jpt.jpa.core.context.persistence.JarFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitTransactionType;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
-import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingFilePersistenceUnitDefaults2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
-import org.eclipse.jpt.jpa.core.jpa2.context.PersistentType2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.SharedCacheMode;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.ValidationMode;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>persistence.xml</code> file
- * <br>
- * <code>persistence-unit</code> element
- */
-public abstract class AbstractPersistenceUnit
- extends AbstractPersistenceXmlContextNode
- implements PersistenceUnit2_0
-{
- protected final XmlPersistenceUnit xmlPersistenceUnit;
-
- protected String name;
-
- protected Boolean specifiedExcludeUnlistedClasses;
-
- protected PersistenceUnitTransactionType specifiedTransactionType;
- protected PersistenceUnitTransactionType defaultTransactionType;
-
- protected String description;
-
- protected String provider;
-
- protected String jtaDataSource;
- protected String nonJtaDataSource;
-
- protected final ContextListContainer<MappingFileRef, XmlMappingFileRef> specifiedMappingFileRefContainer;
- protected MappingFileRef impliedMappingFileRef;
-
- protected final ContextListContainer<JarFileRef, XmlJarFileRef> jarFileRefContainer;
-
- protected final ContextListContainer<ClassRef, XmlJavaClassRef> specifiedClassRefContainer;
-
- protected final ContextCollectionContainer<ClassRef, String> impliedClassRefContainer;
-
- protected final ContextListContainer<Property, XmlProperty> propertyContainer;
-
- /* global generator definitions, defined elsewhere in model */
- protected final Vector<Generator> generators = new Vector<Generator>();
-
- /* global query definitions, defined elsewhere in model */
- protected final Vector<Query> queries = new Vector<Query>();
-
- protected boolean xmlMappingMetadataComplete;
- protected AccessType defaultAccess;
- protected String defaultCatalog;
- protected String defaultSchema;
- protected boolean defaultCascadePersist;
- protected boolean defaultDelimitedIdentifiers;
-
- //****** JPA 2.0 features
- protected PersistenceUnitProperties connection;
- protected PersistenceUnitProperties options;
-
- protected SharedCacheMode specifiedSharedCacheMode;
- protected SharedCacheMode defaultSharedCacheMode;
-
- protected ValidationMode specifiedValidationMode;
- protected ValidationMode defaultValidationMode;
-
- protected final Set<IFile> metamodelFiles = Collections.synchronizedSet(new HashSet<IFile>());
-
-
- // ********** construction/initialization **********
-
- /**
- * NB: Be careful changing the order of the statements in this method
- * (bug 258701 is one reason).
- */
- protected AbstractPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) {
- super(parent);
- this.xmlPersistenceUnit = xmlPersistenceUnit;
- this.name = xmlPersistenceUnit.getName();
- this.specifiedExcludeUnlistedClasses = xmlPersistenceUnit.getExcludeUnlistedClasses();
- this.specifiedTransactionType = this.buildSpecifiedTransactionType();
- this.description = xmlPersistenceUnit.getDescription();
- this.provider = xmlPersistenceUnit.getProvider();
- this.jtaDataSource = xmlPersistenceUnit.getJtaDataSource();
- this.nonJtaDataSource = xmlPersistenceUnit.getNonJtaDataSource();
-
- // initialize the properties early because other things will need them...(?)
- this.propertyContainer = this.buildPropertyContainer();
- this.initializeProperties();
-
- this.specifiedMappingFileRefContainer = this.buildSpecifiedMappingFileRefContainer();
- this.jarFileRefContainer = this.buildJarFileRefContainer();
- this.specifiedClassRefContainer = this.buildSpecifiedClassRefContainer();
- this.impliedClassRefContainer = this.buildImpliedClassRefContainer();
-
- this.specifiedSharedCacheMode = this.buildSpecifiedSharedCacheMode();
- this.specifiedValidationMode = this.buildSpecifiedValidationMode();
-
- this.initializeMetamodelFiles();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
-
- this.setName_(this.xmlPersistenceUnit.getName());
- this.setSpecifiedExcludeUnlistedClasses_(this.xmlPersistenceUnit.getExcludeUnlistedClasses());
- this.setSpecifiedTransactionType_(this.buildSpecifiedTransactionType());
- this.setDescription_(this.xmlPersistenceUnit.getDescription());
- this.setProvider_(this.xmlPersistenceUnit.getProvider());
- this.setJtaDataSource_(this.xmlPersistenceUnit.getJtaDataSource());
- this.setNonJtaDataSource_(this.xmlPersistenceUnit.getNonJtaDataSource());
-
- this.syncSpecifiedMappingFileRefs();
- this.syncImpliedMappingFileRef();
-
- this.syncJarFileRefs();
-
- this.syncSpecifiedClassRefs();
- this.synchronizeNodesWithResourceModel(this.getImpliedClassRefs());
-
- this.syncProperties();
-
- this.setSpecifiedSharedCacheMode_(this.buildSpecifiedSharedCacheMode());
- this.setSpecifiedValidationMode_(this.buildSpecifiedValidationMode());
- }
-
- @Override
- public void update() {
- super.update();
-
- this.setDefaultTransactionType(this.buildDefaultTransactionType());
-
- // update specified class refs before mapping file refs because of
- // JpaFile root structure nodes - we want the mapping file to "win",
- // as it would in a JPA runtime implementation
- this.updateNodes(this.getSpecifiedClassRefs());
-
- this.updateNodes(this.getSpecifiedMappingFileRefs());
- this.updateImpliedMappingFileRef();
-
- this.updateNodes(this.getJarFileRefs());
-
- // update the implied class refs after all the other types, both
- // specified here and specified in the mapping files, are in place
- this.updateImpliedClassRefs();
-
- this.updateNodes(this.getProperties());
-
- this.updatePersistenceUnitMetadata();
-
- this.setGenerators(this.buildGenerators());
- this.setQueries(this.buildQueries());
-
- this.setDefaultSharedCacheMode(this.buildDefaultSharedCacheMode());
- this.setDefaultValidationMode(this.buildDefaultValidationMode());
- }
-
-
- // ********** JpaContextNode implementation **********
-
- @Override
- public Persistence getParent() {
- return (Persistence) super.getParent();
- }
-
- protected Persistence getPersistence() {
- return this.getParent();
- }
-
- @Override
- public PersistenceUnit getPersistenceUnit() {
- return this;
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<PersistenceUnit> getType() {
- return PersistenceUnit.class;
- }
-
- public TextRange getSelectionTextRange() {
- return this.xmlPersistenceUnit.getSelectionTextRange();
- }
-
- public void dispose() {
- for (ClassRef classRef : this.getClassRefs()) {
- classRef.dispose();
- }
- for (JarFileRef jarFileRef : this.getJarFileRefs()) {
- jarFileRef.dispose();
- }
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- mappingFileRef.dispose();
- }
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlPersistenceUnit.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** transaction type **********
-
- public PersistenceUnitTransactionType getTransactionType() {
- return (this.specifiedTransactionType != null) ? this.specifiedTransactionType : this.defaultTransactionType;
- }
-
- public PersistenceUnitTransactionType getSpecifiedTransactionType() {
- return this.specifiedTransactionType;
- }
-
- public void setSpecifiedTransactionType(PersistenceUnitTransactionType transactionType) {
- this.setSpecifiedTransactionType_(transactionType);
- this.xmlPersistenceUnit.setTransactionType(PersistenceUnitTransactionType.toXmlResourceModel(transactionType));
- }
-
- protected void setSpecifiedTransactionType_(PersistenceUnitTransactionType transactionType) {
- PersistenceUnitTransactionType old = this.specifiedTransactionType;
- this.specifiedTransactionType = transactionType;
- this.firePropertyChanged(SPECIFIED_TRANSACTION_TYPE_PROPERTY, old, transactionType);
- }
-
- public PersistenceUnitTransactionType getDefaultTransactionType() {
- return this.defaultTransactionType;
- }
-
- protected void setDefaultTransactionType(PersistenceUnitTransactionType transactionType) {
- PersistenceUnitTransactionType old = this.defaultTransactionType;
- this.defaultTransactionType = transactionType;
- this.firePropertyChanged(DEFAULT_TRANSACTION_TYPE_PROPERTY, old, transactionType);
- }
-
- protected PersistenceUnitTransactionType buildSpecifiedTransactionType() {
- return PersistenceUnitTransactionType.fromXmlResourceModel(this.xmlPersistenceUnit.getTransactionType());
- }
-
- /**
- * TODO - calculate default
- * From the JPA spec: "In a Java EE environment, if this element is not
- * specified, the default is JTA. In a Java SE environment, if this element
- * is not specified, a default of RESOURCE_LOCAL may be assumed."
- */
- protected PersistenceUnitTransactionType buildDefaultTransactionType() {
- return PersistenceUnitTransactionType.JTA; //return JTA for now, fixing regression in bug 277524
- }
-
-
- // ********** description **********
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.setDescription_(description);
- this.xmlPersistenceUnit.setDescription(description);
- }
-
- protected void setDescription_(String description) {
- String old = this.description;
- this.description = description;
- this.firePropertyChanged(DESCRIPTION_PROPERTY, old, description);
- }
-
-
- // ********** provider **********
-
- public String getProvider() {
- return this.provider;
- }
-
- public void setProvider(String provider) {
- this.setProvider_(provider);
- this.xmlPersistenceUnit.setProvider(provider);
- }
-
- protected void setProvider_(String provider) {
- String old = this.provider;
- this.provider = provider;
- this.firePropertyChanged(PROVIDER_PROPERTY, old, provider);
- }
-
-
- // ********** JTA data source **********
-
- public String getJtaDataSource() {
- return this.jtaDataSource;
- }
-
- public void setJtaDataSource(String jtaDataSource) {
- this.setJtaDataSource_(jtaDataSource);
- this.xmlPersistenceUnit.setJtaDataSource(jtaDataSource);
- }
-
- protected void setJtaDataSource_(String jtaDataSource) {
- String old = this.jtaDataSource;
- this.jtaDataSource = jtaDataSource;
- this.firePropertyChanged(JTA_DATA_SOURCE_PROPERTY, old, jtaDataSource);
- }
-
-
- // ********** non-JTA data source **********
-
- public String getNonJtaDataSource() {
- return this.nonJtaDataSource;
- }
-
- public void setNonJtaDataSource(String nonJtaDataSource) {
- this.setNonJtaDataSource_(nonJtaDataSource);
- this.xmlPersistenceUnit.setNonJtaDataSource(nonJtaDataSource);
- }
-
- protected void setNonJtaDataSource_(String nonJtaDataSource) {
- String old = this.nonJtaDataSource;
- this.nonJtaDataSource = nonJtaDataSource;
- this.firePropertyChanged(NON_JTA_DATA_SOURCE_PROPERTY, old, nonJtaDataSource);
- }
-
-
- // ********** mapping file refs **********
-
- public ListIterable<MappingFileRef> getMappingFileRefs() {
- return (this.impliedMappingFileRef == null) ?
- this.getSpecifiedMappingFileRefs() :
- this.getCombinedMappingFileRefs();
- }
-
- protected ListIterable<MappingFileRef> getCombinedMappingFileRefs() {
- return new CompositeListIterable<MappingFileRef>(
- this.getSpecifiedMappingFileRefs(),
- this.impliedMappingFileRef
- );
- }
-
- public int getMappingFileRefsSize() {
- return (this.impliedMappingFileRef == null) ?
- this.getSpecifiedMappingFileRefsSize() :
- this.getCombinedMappingFileRefsSize();
- }
-
- protected int getCombinedMappingFileRefsSize() {
- return this.getSpecifiedMappingFileRefsSize() + 1;
- }
-
- public Iterable<MappingFileRef> getMappingFileRefsContaining(final String typeName) {
- return new FilteringIterable<MappingFileRef> (this.getMappingFileRefs()) {
- @Override
- protected boolean accept(MappingFileRef mappingFileRef) {
- return mappingFileRef.getPersistentType(typeName) != null;
- }
- };
- }
-
- protected Iterable<MappingFile> getMappingFiles() {
- return new FilteringIterable<MappingFile>(this.getMappingFiles_(), NotNullFilter.<MappingFile>instance());
- }
-
- protected Iterable<MappingFile> getMappingFiles_() {
- return new TransformationIterable<MappingFileRef, MappingFile>(this.getMappingFileRefs()) {
- @Override
- protected MappingFile transform(MappingFileRef ref) {
- return ref.getMappingFile();
- }
- };
- }
-
-
- // ********** specified mapping file refs **********
-
- public ListIterable<MappingFileRef> getSpecifiedMappingFileRefs() {
- return this.specifiedMappingFileRefContainer.getContextElements();
- }
-
- public int getSpecifiedMappingFileRefsSize() {
- return this.specifiedMappingFileRefContainer.getContextElementsSize();
- }
-
- public MappingFileRef addSpecifiedMappingFileRef(String fileName) {
- return this.addSpecifiedMappingFileRef(this.getSpecifiedMappingFileRefsSize(), fileName);
- }
-
- public MappingFileRef addSpecifiedMappingFileRef(int index, String fileName) {
- XmlMappingFileRef xmlMappingFileRef = this.buildXmlMappingFileRef(fileName);
- MappingFileRef mappingFileRef = this.specifiedMappingFileRefContainer.addContextElement(index, xmlMappingFileRef);
- this.xmlPersistenceUnit.getMappingFiles().add(index, xmlMappingFileRef);
- return mappingFileRef;
- }
-
- protected XmlMappingFileRef buildXmlMappingFileRef(String fileName) {
- XmlMappingFileRef ref = PersistenceFactory.eINSTANCE.createXmlMappingFileRef();
- ref.setFileName(fileName);
- return ref;
- }
-
- protected MappingFileRef buildSpecifiedMappingFileRef(XmlMappingFileRef xmlMappingFileRef) {
- return this.getContextNodeFactory().buildMappingFileRef(this, xmlMappingFileRef);
- }
-
- public void removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef) {
- this.removeSpecifiedMappingFileRef(this.specifiedMappingFileRefContainer.indexOfContextElement(mappingFileRef));
- }
-
- public void removeSpecifiedMappingFileRef(int index) {
- this.removeSpecifiedMappingFileRef_(index);
- this.xmlPersistenceUnit.getMappingFiles().remove(index);
- }
-
- /**
- * dispose the mapping file ref
- */
- protected void removeSpecifiedMappingFileRef_(int index) {
- this.specifiedMappingFileRefContainer.removeContextElement(index).dispose();
- }
-
- protected void syncSpecifiedMappingFileRefs() {
- this.specifiedMappingFileRefContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlMappingFileRef> getXmlMappingFileRefs() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlMappingFileRef>(this.xmlPersistenceUnit.getMappingFiles());
- }
-
- protected ContextListContainer<MappingFileRef, XmlMappingFileRef> buildSpecifiedMappingFileRefContainer() {
- SpecifiedMappingFileRefContainer container = new SpecifiedMappingFileRefContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified mapping file ref container
- */
- protected class SpecifiedMappingFileRefContainer
- extends ContextListContainer<MappingFileRef, XmlMappingFileRef>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_MAPPING_FILE_REFS_LIST;
- }
- @Override
- protected MappingFileRef buildContextElement(XmlMappingFileRef resourceElement) {
- return AbstractPersistenceUnit.this.buildSpecifiedMappingFileRef(resourceElement);
- }
- @Override
- protected ListIterable<XmlMappingFileRef> getResourceElements() {
- return AbstractPersistenceUnit.this.getXmlMappingFileRefs();
- }
- @Override
- protected XmlMappingFileRef getResourceElement(MappingFileRef contextElement) {
- return contextElement.getXmlMappingFileRef();
- }
- }
-
-
- // ********** implied mapping file ref **********
-
- public MappingFileRef getImpliedMappingFileRef() {
- return this.impliedMappingFileRef;
- }
-
- protected MappingFileRef addImpliedMappingFileRef() {
- if (this.impliedMappingFileRef != null) {
- throw new IllegalStateException("The implied mapping file ref is already set: " + this.impliedMappingFileRef); //$NON-NLS-1$
- }
- this.impliedMappingFileRef = this.buildImpliedMappingFileRef();
- this.firePropertyChanged(IMPLIED_MAPPING_FILE_REF_PROPERTY, null, this.impliedMappingFileRef);
- return this.impliedMappingFileRef;
- }
-
- protected MappingFileRef buildImpliedMappingFileRef() {
- return this.getContextNodeFactory().buildImpliedMappingFileRef(this);
- }
-
- protected void removeImpliedMappingFileRef() {
- if (this.impliedMappingFileRef == null) {
- throw new IllegalStateException("The implied mapping file ref is already unset."); //$NON-NLS-1$
- }
- MappingFileRef old = this.impliedMappingFileRef;
- this.impliedMappingFileRef = null;
- old.dispose();
- this.firePropertyChanged(IMPLIED_MAPPING_FILE_REF_PROPERTY, old, null);
- }
-
- protected void syncImpliedMappingFileRef() {
- if (this.impliedMappingFileRef != null) {
- this.impliedMappingFileRef.synchronizeWithResourceModel();
- }
- }
-
- protected void updateImpliedMappingFileRef() {
- if (this.buildsImpliedMappingFile()) {
- if (this.impliedMappingFileRef == null) {
- this.addImpliedMappingFileRef();
- } else {
- this.impliedMappingFileRef.update();
- }
- } else {
- if (this.impliedMappingFileRef != null) {
- this.removeImpliedMappingFileRef();
- }
- }
- }
-
- protected boolean buildsImpliedMappingFile() {
- return this.impliedMappingFileIsNotSpecified() && this.impliedMappingFileExists();
- }
-
- protected boolean impliedMappingFileIsNotSpecified() {
- return ! this.impliedMappingFileIsSpecified();
- }
-
- protected boolean impliedMappingFileIsSpecified() {
- return this.mappingFileIsSpecified(JptJpaCorePlugin.DEFAULT_ORM_XML_RUNTIME_PATH.toString());
- }
-
- protected boolean mappingFileIsSpecified(String impliedMappingFileName) {
- for (MappingFileRef specifiedMappingFileRef : this.getSpecifiedMappingFileRefs()) {
- if (Tools.valuesAreEqual(specifiedMappingFileRef.getFileName(), impliedMappingFileName)) {
- return true;
- }
- }
- return false;
- }
-
- protected boolean impliedMappingFileExists() {
- return this.getJpaProject().getDefaultOrmXmlResource() != null;
- }
-
-
- // ********** JAR file refs **********
-
- public ListIterable<JarFileRef> getJarFileRefs() {
- return this.jarFileRefContainer.getContextElements();
- }
-
- public int getJarFileRefsSize() {
- return this.jarFileRefContainer.getContextElementsSize();
- }
-
- public JarFileRef addJarFileRef(String fileName) {
- return this.addJarFileRef(this.getJarFileRefsSize(), fileName);
- }
-
- public JarFileRef addJarFileRef(int index, String fileName) {
- XmlJarFileRef xmlJarFileRef = this.buildXmlJarFileRef(fileName);
- JarFileRef jarFileRef = this.jarFileRefContainer.addContextElement(index, xmlJarFileRef);
- this.xmlPersistenceUnit.getJarFiles().add(index, xmlJarFileRef);
- return jarFileRef;
- }
-
- protected XmlJarFileRef buildXmlJarFileRef(String fileName) {
- XmlJarFileRef ref = PersistenceFactory.eINSTANCE.createXmlJarFileRef();
- ref.setFileName(fileName);
- return ref;
- }
-
- protected JarFileRef buildJarFileRef(XmlJarFileRef xmlJarFileRef) {
- return this.getContextNodeFactory().buildJarFileRef(this, xmlJarFileRef);
- }
-
- public void removeJarFileRef(JarFileRef jarFileRef) {
- this.removeJarFileRef(this.jarFileRefContainer.indexOfContextElement(jarFileRef));
- }
-
- public void removeJarFileRef(int index) {
- this.removeJarFileRef_(index);
- this.xmlPersistenceUnit.getJarFiles().remove(index);
- }
-
- /**
- * dispose the JAR file ref
- */
- protected void removeJarFileRef_(int index) {
- this.jarFileRefContainer.removeContextElement(index).dispose();
- }
-
- protected void syncJarFileRefs() {
- this.jarFileRefContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJarFileRef> getXmlJarFileRefs() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlJarFileRef>(this.xmlPersistenceUnit.getJarFiles());
- }
-
- protected ContextListContainer<JarFileRef, XmlJarFileRef> buildJarFileRefContainer() {
- JarFileRefContainer container = new JarFileRefContainer();
- container.initialize();
- return container;
- }
-
- /**
- * JAR file ref container
- */
- protected class JarFileRefContainer
- extends ContextListContainer<JarFileRef, XmlJarFileRef>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return JAR_FILE_REFS_LIST;
- }
- @Override
- protected JarFileRef buildContextElement(XmlJarFileRef resourceElement) {
- return AbstractPersistenceUnit.this.buildJarFileRef(resourceElement);
- }
- @Override
- protected ListIterable<XmlJarFileRef> getResourceElements() {
- return AbstractPersistenceUnit.this.getXmlJarFileRefs();
- }
- @Override
- protected XmlJarFileRef getResourceElement(JarFileRef contextElement) {
- return contextElement.getXmlJarFileRef();
- }
- }
-
- // ********** class refs **********
-
- @SuppressWarnings("unchecked")
- public Iterable<ClassRef> getClassRefs() {
- return new CompositeIterable<ClassRef>(
- this.getSpecifiedClassRefs(),
- this.getImpliedClassRefs()
- );
- }
-
- public int getClassRefsSize() {
- return this.getSpecifiedClassRefsSize() + this.getImpliedClassRefsSize();
- }
-
- // ********** specified class refs **********
-
- public ListIterable<ClassRef> getSpecifiedClassRefs() {
- return this.specifiedClassRefContainer.getContextElements();
- }
-
- public int getSpecifiedClassRefsSize() {
- return this.specifiedClassRefContainer.getContextElementsSize();
- }
-
- public ClassRef addSpecifiedClassRef(String className) {
- return this.addSpecifiedClassRef(this.getSpecifiedClassRefsSize(), className);
- }
-
- public ClassRef addSpecifiedClassRef(int index, String className) {
- XmlJavaClassRef xmlClassRef = this.buildXmlJavaClassRef(className);
- ClassRef classRef = this.specifiedClassRefContainer.addContextElement(index, xmlClassRef);
- this.xmlPersistenceUnit.getClasses().add(index, xmlClassRef);
- return classRef;
- }
-
- protected Iterable<ClassRef> addSpecifiedClassRefs(Iterable<String> classNames) {
- return this.addSpecifiedClassRefs(this.getSpecifiedClassRefsSize(), classNames);
- }
-
- protected Iterable<ClassRef> addSpecifiedClassRefs(int index, Iterable<String> classNames) {
- ArrayList<XmlJavaClassRef> xmlClassRefs = new ArrayList<XmlJavaClassRef>();
- for (String className : classNames) {
- xmlClassRefs.add(this.buildXmlJavaClassRef(className));
- }
- Iterable<ClassRef> classRefs = this.specifiedClassRefContainer.addContextElements(index, xmlClassRefs);
- this.xmlPersistenceUnit.getClasses().addAll(index, xmlClassRefs);
- return classRefs;
- }
-
- protected XmlJavaClassRef buildXmlJavaClassRef(String className) {
- XmlJavaClassRef ref = PersistenceFactory.eINSTANCE.createXmlJavaClassRef();
- ref.setJavaClass(className);
- return ref;
- }
-
- protected ClassRef buildClassRef(XmlJavaClassRef xmlClassRef) {
- return this.getContextNodeFactory().buildClassRef(this, xmlClassRef);
- }
-
- public void removeSpecifiedClassRef(ClassRef classRef) {
- this.removeSpecifiedClassRef(this.specifiedClassRefContainer.indexOfContextElement(classRef));
- }
-
- public void removeSpecifiedClassRef(int index) {
- this.removeSpecifiedClassRef_(index);
- this.xmlPersistenceUnit.getClasses().remove(index);
- }
-
- /**
- * dispose the class ref
- */
- protected void removeSpecifiedClassRef_(int index) {
- this.specifiedClassRefContainer.removeContextElement(index).dispose();
- }
-
- protected void removeSpecifiedClassRefs(Iterable<ClassRef> classRefs) {
- ArrayList<XmlJavaClassRef> xmlClassRefs = new ArrayList<XmlJavaClassRef>();
- for (ClassRef classRef : classRefs) {
- xmlClassRefs.add(classRef.getXmlClassRef());
- }
- this.specifiedClassRefContainer.removeAll(classRefs);
- for (ClassRef classRef : classRefs) {
- classRef.dispose();
- }
- this.xmlPersistenceUnit.getClasses().removeAll(xmlClassRefs);
- }
-
- protected void syncSpecifiedClassRefs() {
- this.specifiedClassRefContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJavaClassRef> getXmlClassRefs() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlJavaClassRef>(this.xmlPersistenceUnit.getClasses());
- }
-
- protected ContextListContainer<ClassRef, XmlJavaClassRef> buildSpecifiedClassRefContainer() {
- SpecifiedClassRefContainer container = new SpecifiedClassRefContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified class ref container
- */
- protected class SpecifiedClassRefContainer
- extends ContextListContainer<ClassRef, XmlJavaClassRef>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_CLASS_REFS_LIST;
- }
- @Override
- protected ClassRef buildContextElement(XmlJavaClassRef resourceElement) {
- return AbstractPersistenceUnit.this.buildClassRef(resourceElement);
- }
- @Override
- protected ListIterable<XmlJavaClassRef> getResourceElements() {
- return AbstractPersistenceUnit.this.getXmlClassRefs();
- }
- @Override
- protected XmlJavaClassRef getResourceElement(ClassRef contextElement) {
- return contextElement.getXmlClassRef();
- }
- }
-
-
- // ********** virtual class refs **********
-
- public Iterable<ClassRef> getImpliedClassRefs() {
- return this.impliedClassRefContainer.getContextElements();
- }
-
- public int getImpliedClassRefsSize() {
- return this.impliedClassRefContainer.getContextElementsSize();
- }
-
- protected ClassRef addImpliedClassRef(String className) {
- return this.impliedClassRefContainer.addContextElement(getImpliedClassRefsSize(), className);
- }
-
- protected ClassRef buildClassRef(String className) {
- return this.getContextNodeFactory().buildClassRef(this, className);
- }
-
- protected void updateImpliedClassRefs() {
- this.impliedClassRefContainer.update();
- }
-
- protected Iterable<String> getImpliedClassNames() {
- return this.excludesUnlistedClasses() ?
- EmptyIterable.<String>instance() :
- this.getImpliedClassNames_();
- }
-
- /**
- * Return the names of all the Java classes in the JPA project that are
- * mapped (i.e. have the appropriate annotation etc.) but not specified
- * in the persistence unit or any of its mapping files.
- */
- protected Iterable<String> getImpliedClassNames_() {
- return new FilteringIterable<String>(this.getJpaProject().getMappedJavaSourceClassNames()) {
- @Override
- protected boolean accept(String mappedClassName) {
- return ! AbstractPersistenceUnit.this.specifiesPersistentType(mappedClassName);
- }
- };
- }
-
- protected ContextCollectionContainer<ClassRef, String> buildImpliedClassRefContainer() {
- return new ImpliedClassRefContainer();
- }
-
- /**
- * Virtual class ref container adapter.
- * <p>
- * <strong>NB:</strong> The context class ref is matched with a resource
- * class by name.
- * <p>
- * This is used during <strong>both</strong> <em>sync</em> and
- * <em>update</em> because the list of implied class refs can be modified
- * in either situation. In particular, we cannot simply rely on
- * <em>update</em> because there are situations where a <em>sync</em> is
- * triggered but a follow-up <em>update</em> is not. (Of course, any
- * change discovered here will trigger an <em>update</em>.)
- * <p>
- * The most obvious example is when the JPA project is configured to
- * discover annotated classes and a Java class is annotated for the first
- * time (via code editing, not via the context model). This will trigger
- * a <em>sync</em>; but, since the unannotated class is not yet in the
- * context model and, as a result, the context model's state is untouched,
- * an <em>update</em> will not be triggered.
- * <p>
- * Obviously, other context model changes can change this collection (e.g.
- * setting whether the persistence unit excludes unlisted classes); o the
- * collection must also be synchronized during <em>update</em>.
- */
- protected class ImpliedClassRefContainer
- extends ContextCollectionContainer<ClassRef, String>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return IMPLIED_CLASS_REFS_COLLECTION;
- }
- @Override
- protected ClassRef buildContextElement(String resourceElement) {
- return AbstractPersistenceUnit.this.buildClassRef(resourceElement);
- }
- @Override
- protected Iterable<String> getResourceElements() {
- return AbstractPersistenceUnit.this.getImpliedClassNames();
- }
- @Override
- protected String getResourceElement(ClassRef contextElement) {
- return contextElement.getClassName();
- }
- @Override
- public void removeContextElement(ClassRef element) {
- super.removeContextElement(element);
- element.dispose();
- }
- }
-
-
- // ********** exclude unlisted classes **********
-
- public boolean excludesUnlistedClasses() {
- return (this.specifiedExcludeUnlistedClasses != null) ? this.specifiedExcludeUnlistedClasses.booleanValue() : this.getDefaultExcludeUnlistedClasses();
- }
-
- public Boolean getSpecifiedExcludeUnlistedClasses() {
- return this.specifiedExcludeUnlistedClasses;
- }
-
- public void setSpecifiedExcludeUnlistedClasses(Boolean specifiedExcludeUnlistedClasses) {
- this.setSpecifiedExcludeUnlistedClasses_(specifiedExcludeUnlistedClasses);
- this.xmlPersistenceUnit.setExcludeUnlistedClasses(this.specifiedExcludeUnlistedClasses);
- }
-
- protected void setSpecifiedExcludeUnlistedClasses_(Boolean excludeUnlistedClasses) {
- Boolean old = this.specifiedExcludeUnlistedClasses;
- this.specifiedExcludeUnlistedClasses = excludeUnlistedClasses;
- this.firePropertyChanged(SPECIFIED_EXCLUDE_UNLISTED_CLASSES_PROPERTY, old, excludeUnlistedClasses);
- }
-
- public boolean getDefaultExcludeUnlistedClasses() {
- return false; // ???
- }
-
-
- // ********** properties **********
-
- public ListIterable<Property> getProperties() {
- return this.propertyContainer.getContextElements();
- }
-
- public int getPropertiesSize() {
- return this.propertyContainer.getContextElementsSize();
- }
-
- public Property getProperty(String propertyName) {
- if (propertyName == null) {
- throw new NullPointerException();
- }
- for (Property property : this.getProperties()) {
- if (propertyName.equals(property.getName())) {
- return property;
- }
- }
- return null;
- }
-
- public Iterable<Property> getPropertiesNamed(final String propertyName) {
- if (propertyName == null) {
- throw new NullPointerException();
- }
- return new FilteringIterable<Property>(this.getProperties()) {
- @Override
- protected boolean accept(Property property) {
- return Tools.valuesAreEqual(property.getName(), propertyName);
- }
- };
- }
-
- public Iterable<Property> getPropertiesWithNamePrefix(final String propertyNamePrefix) {
- if (propertyNamePrefix == null) {
- throw new NullPointerException();
- }
- return new FilteringIterable<Property>(this.getProperties()) {
- @Override
- protected boolean accept(Property property) {
- String pName = property.getName();
- return (pName != null) && pName.startsWith(propertyNamePrefix);
- }
- };
- }
-
- public Property addProperty() {
- return this.addProperty(this.getPropertiesSize());
- }
-
- public Property addProperty(int index) {
- XmlProperty xmlProperty = this.buildXmlProperty();
- Property property = this.addProperty_(index, xmlProperty);
-
- XmlProperties xmlProperties = this.xmlPersistenceUnit.getProperties();
- if (xmlProperties == null) {
- xmlProperties = this.buildXmlProperties();
- this.xmlPersistenceUnit.setProperties(xmlProperties);
- }
-
- xmlProperties.getProperties().add(index, xmlProperty);
- if (property.getName() != null) {
- this.propertyAdded(property.getName(), property.getValue());
- }
- return property;
- }
-
- protected XmlProperty buildXmlProperty() {
- return PersistenceFactory.eINSTANCE.createXmlProperty();
- }
-
- protected Property buildProperty(XmlProperty xmlProperty) {
- return this.getContextNodeFactory().buildProperty(this, xmlProperty);
- }
-
- protected XmlProperties buildXmlProperties() {
- return PersistenceFactory.eINSTANCE.createXmlProperties();
- }
-
- public void setProperty(String propertyName, String value) {
- this.setProperty(propertyName, value, false);
- }
-
- public void setProperty(String propertyName, String value, boolean duplicatePropertyNamesAllowed) {
- Property prev = this.getProperty(propertyName);
- if (prev == null) {
- if (value != null) {
- this.addProperty(propertyName, value); // add [first] property
- }
- } else {
- if (duplicatePropertyNamesAllowed) {
- if (value == null) {
- // do nothing?
- } else {
- this.addProperty(propertyName, value); // add [duplicate] property
- }
- } else {
- if (value == null) {
- this.removeProperty(prev); // remove existing property
- } else {
- prev.setValue(value); // change existing property
- }
- }
- }
- }
-
- protected void addProperty(String propertyName, String value) {
- Property property = this.addProperty();
- property.setName(propertyName);
- property.setValue(value);
- }
-
- public void removeProperty(Property property) {
- this.removeProperty(this.propertyContainer.indexOfContextElement(property));
- }
-
- public void removeProperty(String propertyName) {
- if (propertyName == null) {
- throw new NullPointerException();
- }
- for (Property property : this.getProperties()) {
- if (propertyName.equals(property.getName())) {
- this.removeProperty(property);
- return;
- }
- }
- throw new IllegalArgumentException("invalid property name: " + propertyName); //$NON-NLS-1$
- }
-
- public void removeProperty(String propertyName, String value) {
- if ((propertyName == null) || (value == null)) {
- throw new NullPointerException();
- }
- for (Property property : this.getProperties()) {
- if (propertyName.equals(property.getName()) && value.equals(property.getValue())) {
- this.removeProperty(property);
- return;
- }
- }
- throw new IllegalArgumentException("invalid property name/value pair: " + propertyName + " = " + value); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected void removeProperty(int index) {
- Property removedProperty = this.propertyContainer.removeContextElement(index);
- this.xmlPersistenceUnit.getProperties().getProperties().remove(index);
-
- if (this.xmlPersistenceUnit.getProperties().getProperties().isEmpty()) {
- this.xmlPersistenceUnit.setProperties(null);
- }
-
- if (removedProperty.getName() != null) {
- this.propertyRemoved(removedProperty.getName());
- }
- }
-
- public void propertyNameChanged(String oldPropertyName, String newPropertyName, String value) {
- if ((oldPropertyName == null) && (value == null)) {
- //this is a property that is currently being added, we don't need to deal with it until the value is set
- return;
- }
- if (oldPropertyName != null) {
- this.propertyRemoved(oldPropertyName);
- }
- if (newPropertyName != null) {
- this.propertyAdded(newPropertyName, value);
- }
- }
-
- public void propertyValueChanged(String propertyName, String newValue) {
- this.connection.propertyValueChanged(propertyName, newValue);
- this.options.propertyValueChanged(propertyName, newValue);
- }
-
- protected void propertyAdded(String propertyName, String value) {
- this.propertyValueChanged(propertyName, value);
- }
-
- protected void propertyRemoved(String propertyName) {
- this.connection.propertyRemoved(propertyName);
- this.options.propertyRemoved(propertyName);
- }
-
- protected void initializeProperties() {
- this.connection = this.getContextNodeFactory().buildConnection(this);
- this.options = this.getContextNodeFactory().buildOptions(this);
- }
-
- protected void syncProperties() {
- this.propertyContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlProperty> getXmlProperties() {
- XmlProperties xmlProperties = this.xmlPersistenceUnit.getProperties();
- // clone to reduce chance of concurrency problems
- return (xmlProperties == null) ?
- EmptyListIterable.<XmlProperty>instance() :
- new LiveCloneListIterable<XmlProperty>(xmlProperties.getProperties());
- }
-
- protected Property addProperty_(int index, XmlProperty xmlProperty) {
- Property property = this.propertyContainer.addContextElement(index, xmlProperty);
- if (property.getName() != null) {
- this.propertyAdded(property.getName(), property.getValue());
- }
- return property;
- }
-
- protected void removeProperty_(Property property) {
- this.propertyContainer.removeContextElement(property);
- if (property.getName() != null) {
- this.propertyRemoved(property.getName());
- }
- }
-
- protected ContextListContainer<Property, XmlProperty> buildPropertyContainer() {
- PropertyContainer container = new PropertyContainer();
- container.initialize();
- return container;
- }
-
- /**
- * property container
- */
- protected class PropertyContainer
- extends ContextListContainer<Property, XmlProperty>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return PROPERTIES_LIST;
- }
- @Override
- protected Property buildContextElement(XmlProperty resourceElement) {
- return AbstractPersistenceUnit.this.buildProperty(resourceElement);
- }
- @Override
- protected ListIterable<XmlProperty> getResourceElements() {
- return AbstractPersistenceUnit.this.getXmlProperties();
- }
- @Override
- protected XmlProperty getResourceElement(Property contextElement) {
- return contextElement.getXmlProperty();
- }
- @Override
- protected Property addContextElement_(int index, Property contextElement) {
- super.addContextElement_(index, contextElement);
- if (contextElement.getName() != null) {
- propertyAdded(contextElement.getName(), contextElement.getValue());
- }
- return contextElement;
- }
- @Override
- public void removeContextElement(Property contextElement) {
- super.removeContextElement(contextElement);
- if (contextElement.getName() != null) {
- propertyRemoved(contextElement.getName());
- }
- }
- }
-
- // ********** mapping file (orm.xml) persistence unit metadata & defaults **********
-
- public boolean isXmlMappingMetadataComplete() {
- return this.xmlMappingMetadataComplete;
- }
-
- protected void setXmlMappingMetadataComplete(boolean xmlMappingMetadataComplete) {
- boolean old = this.xmlMappingMetadataComplete;
- this.xmlMappingMetadataComplete = xmlMappingMetadataComplete;
- this.firePropertyChanged(XML_MAPPING_METADATA_COMPLETE_PROPERTY, old, xmlMappingMetadataComplete);
- }
-
- protected boolean buildXmlMappingMetadataComplete(MappingFilePersistenceUnitMetadata metadata) {
- return (metadata == null) ? false : metadata.isXmlMappingMetadataComplete();
- }
-
- public AccessType getDefaultAccess() {
- return this.defaultAccess;
- }
-
- protected void setDefaultAccess(AccessType access) {
- AccessType old = this.defaultAccess;
- this.defaultAccess = access;
- this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, access);
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog(MappingFilePersistenceUnitDefaults defaults) {
- String catalog = (defaults == null) ? null : defaults.getCatalog();
- return (catalog != null) ? catalog : this.getJpaProject().getDefaultCatalog();
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema(MappingFilePersistenceUnitDefaults defaults) {
- String schema = (defaults == null) ? null : defaults.getSchema();
- return (schema != null) ? schema : this.getJpaProject().getDefaultSchema();
- }
-
- public boolean getDefaultCascadePersist() {
- return this.defaultCascadePersist;
- }
-
- protected void setDefaultCascadePersist(boolean cascadePersist) {
- boolean old = this.defaultCascadePersist;
- this.defaultCascadePersist = cascadePersist;
- this.firePropertyChanged(DEFAULT_CASCADE_PERSIST_PROPERTY, old, cascadePersist);
- }
-
- protected boolean buildDefaultCascadePersist(MappingFilePersistenceUnitDefaults defaults) {
- return (defaults == null) ? false : defaults.isCascadePersist();
- }
-
- public boolean getDefaultDelimitedIdentifiers() {
- return this.defaultDelimitedIdentifiers;
- }
-
- protected void setDefaultDelimitedIdentifiers(boolean delimitedIdentifiers) {
- boolean old = this.defaultDelimitedIdentifiers;
- this.defaultDelimitedIdentifiers = delimitedIdentifiers;
- this.firePropertyChanged(DEFAULT_DELIMITED_IDENTIFIERS_PROPERTY, old, delimitedIdentifiers);
- }
-
- protected boolean buildDefaultDelimitedIdentifiers(MappingFilePersistenceUnitDefaults defaults) {
- return ( ! this.isJpa2_0Compatible()) ? false :
- (defaults == null) ? false : ((MappingFilePersistenceUnitDefaults2_0) defaults).isDelimitedIdentifiers();
- }
-
- protected void updatePersistenceUnitMetadata() {
- MappingFilePersistenceUnitMetadata metadata = this.getMetadata();
- this.setXmlMappingMetadataComplete(this.buildXmlMappingMetadataComplete(metadata));
-
- MappingFilePersistenceUnitDefaults defaults = (metadata == null) ? null : metadata.getPersistenceUnitDefaults();
- this.setDefaultAccess((defaults == null) ? null : defaults.getAccess());
- this.setDefaultCatalog(this.buildDefaultCatalog(defaults));
- this.setDefaultSchema(this.buildDefaultSchema(defaults));
- this.setDefaultDelimitedIdentifiers(this.buildDefaultDelimitedIdentifiers(defaults));
- }
-
- /**
- * return the first persistence unit metadata we encounter
- * in a mapping file
- */
- protected MappingFilePersistenceUnitMetadata getMetadata() {
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- if (mappingFileRef.persistenceUnitMetadataExists()) {
- return mappingFileRef.getPersistenceUnitMetadata();
- }
- }
- return null;
- }
-
-
- // ********** PersistenceUnit2_0 implementation **********
-
- public PersistenceUnitProperties getConnection() {
- return this.connection;
- }
-
- public PersistenceUnitProperties getOptions() {
- return this.options;
- }
-
-
- // ********** shared cache mode **********
-
- public SharedCacheMode getSharedCacheMode() {
- return (this.specifiedSharedCacheMode != null) ? this.specifiedSharedCacheMode : this.defaultSharedCacheMode;
- }
-
- public SharedCacheMode getSpecifiedSharedCacheMode() {
- return this.specifiedSharedCacheMode;
- }
-
- public void setSpecifiedSharedCacheMode(SharedCacheMode specifiedSharedCacheMode) {
- this.setSpecifiedSharedCacheMode_(specifiedSharedCacheMode);
- this.xmlPersistenceUnit.setSharedCacheMode(SharedCacheMode.toXmlResourceModel(specifiedSharedCacheMode));
- }
-
- protected void setSpecifiedSharedCacheMode_(SharedCacheMode sharedCacheMode) {
- SharedCacheMode old = this.specifiedSharedCacheMode;
- this.specifiedSharedCacheMode = sharedCacheMode;
- this.firePropertyChanged(SPECIFIED_SHARED_CACHE_MODE_PROPERTY, old, sharedCacheMode);
- }
-
- public SharedCacheMode getDefaultSharedCacheMode() {
- return this.defaultSharedCacheMode;
- }
-
- protected void setDefaultSharedCacheMode(SharedCacheMode defaultSharedCacheMode) {
- SharedCacheMode old = this.defaultSharedCacheMode;
- this.defaultSharedCacheMode = defaultSharedCacheMode;
- this.firePropertyChanged(DEFAULT_SHARED_CACHE_MODE_PROPERTY, old, defaultSharedCacheMode);
- }
-
- public boolean calculateDefaultCacheable() {
- SharedCacheMode sharedCacheMode = this.getSharedCacheMode();
- if (sharedCacheMode == null) {
- return false; // this can happen during initial update...
- }
- switch (sharedCacheMode) {
- case NONE:
- case ENABLE_SELECTIVE:
- case UNSPECIFIED:
- return false;
- case ALL:
- case DISABLE_SELECTIVE:
- return true;
- default:
- throw new IllegalStateException("unknown mode: " + sharedCacheMode); //$NON-NLS-1$
- }
- }
-
- protected SharedCacheMode buildSpecifiedSharedCacheMode() {
- return SharedCacheMode.fromXmlResourceModel(this.xmlPersistenceUnit.getSharedCacheMode());
- }
-
- protected SharedCacheMode buildDefaultSharedCacheMode() {
- return SharedCacheMode.UNSPECIFIED;
- }
-
- // ********** validation mode **********
-
- public ValidationMode getValidationMode() {
- return (this.specifiedValidationMode != null) ? this.specifiedValidationMode : this.defaultValidationMode;
- }
-
- public ValidationMode getSpecifiedValidationMode() {
- return this.specifiedValidationMode;
- }
-
- public void setSpecifiedValidationMode(ValidationMode specifiedValidationMode) {
- this.setSpecifiedValidationMode_(specifiedValidationMode);
- this.xmlPersistenceUnit.setValidationMode(ValidationMode.toXmlResourceModel(specifiedValidationMode));
- }
-
- protected void setSpecifiedValidationMode_(ValidationMode validationMode) {
- ValidationMode old = this.specifiedValidationMode;
- this.specifiedValidationMode = validationMode;
- this.firePropertyChanged(SPECIFIED_VALIDATION_MODE_PROPERTY, old, validationMode);
- }
-
- public ValidationMode getDefaultValidationMode() {
- return this.defaultValidationMode;
- }
-
- protected void setDefaultValidationMode(ValidationMode defaultValidationMode) {
- ValidationMode old = this.defaultValidationMode;
- this.defaultValidationMode = defaultValidationMode;
- this.firePropertyChanged(DEFAULT_VALIDATION_MODE_PROPERTY, old, defaultValidationMode);
- }
-
- protected ValidationMode buildSpecifiedValidationMode() {
- return ValidationMode.fromXmlResourceModel(this.xmlPersistenceUnit.getValidationMode());
- }
-
- protected ValidationMode buildDefaultValidationMode() {
- return DEFAULT_VALIDATION_MODE;
- }
-
-
- // ********** generators **********
-
- public Iterable<Generator> getGenerators() {
- return new LiveCloneIterable<Generator>(this.generators);
- }
-
- public int getGeneratorsSize() {
- return this.generators.size();
- }
-
- public Iterable<String> getUniqueGeneratorNames() {
- return CollectionTools.set(this.getNonEmptyGeneratorNames(), this.getGeneratorsSize());
- }
-
- protected Iterable<String> getNonEmptyGeneratorNames() {
- return new FilteringIterable<String>(this.getGeneratorNames(), NonEmptyStringFilter.instance());
- }
-
- protected Iterable<String> getGeneratorNames() {
- return new TransformationIterable<Generator, String>(this.getGenerators(), JpaNamedContextNode.NameTransformer.<Generator>instance());
- }
-
- protected void setGenerators(Iterable<Generator> generators) {
- this.synchronizeCollection(generators, this.generators, GENERATORS_COLLECTION);
- }
-
- /**
- * Generators are much like queries.
- * @see #buildQueries()
- */
- protected Iterable<Generator> buildGenerators() {
- ArrayList<Generator> result = CollectionTools.list(this.getMappingFileGenerators());
-
- HashSet<String> mappingFileGeneratorNames = this.convertToNames(result);
- HashMap<String, ArrayList<JavaGenerator>> allJavaGenerators = this.mapByName(this.getAllJavaGenerators());
- for (Map.Entry<String, ArrayList<JavaGenerator>> entry : allJavaGenerators.entrySet()) {
- if ( ! mappingFileGeneratorNames.contains(entry.getKey())) {
- result.addAll(entry.getValue());
- }
- }
-
- return result;
- }
-
- protected Iterable<Generator> getMappingFileGenerators() {
- return new CompositeIterable<Generator>(this.getMappingFileGeneratorLists());
- }
-
- protected Iterable<Iterable<Generator>> getMappingFileGeneratorLists() {
- return new TransformationIterable<MappingFileRef, Iterable<Generator>>(this.getMappingFileRefs()) {
- @Override
- protected Iterable<Generator> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.getMappingFileGenerators();
- }
- };
- }
-
- /**
- * Include "overridden" Java generators.
- */
- protected Iterable<JavaGenerator> getAllJavaGenerators() {
- return new CompositeIterable<JavaGenerator>(this.getAllJavaTypeMappingGeneratorLists());
- }
-
- protected Iterable<Iterable<JavaGenerator>> getAllJavaTypeMappingGeneratorLists() {
- return new TransformationIterable<TypeMapping, Iterable<JavaGenerator>>(this.getAllJavaTypeMappingsUnique()) {
- @Override
- protected Iterable<JavaGenerator> transform(TypeMapping typeMapping) {
- return new SubIterableWrapper<Generator, JavaGenerator>(this.transform_(typeMapping));
- }
- protected Iterable<Generator> transform_(TypeMapping typeMapping) {
- return typeMapping.getGenerators();
- }
- };
- }
-
- // ***** metadata conversion
- public boolean hasConvertibleJavaGenerators() {
- return ! this.getConvertibleJavaGenerators().isEmpty();
- }
-
- public void convertJavaGenerators(EntityMappings entityMappings, IProgressMonitor monitor) {
- ArrayList<JavaGenerator> convertibleJavaGenerators = this.getConvertibleJavaGenerators();
- SubMonitor subMonitor = SubMonitor.convert(monitor, JptCoreMessages.JPA_METADATA_CONVERSION_CONVERTING, convertibleJavaGenerators.size());
- for (JavaGenerator generator : convertibleJavaGenerators) {
- this.convertJavaGenerator(entityMappings, generator, subMonitor.newChild(1));
- }
- subMonitor.setTaskName(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_COMPLETE);
- }
-
- protected void convertJavaGenerator(EntityMappings entityMappings, JavaGenerator generator, SubMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_CANCELED);
- }
- monitor.setTaskName(NLS.bind(JptCoreMessages.JPA_METADATA_CONVERSION_CONVERT_GENERATOR, generator.getName()));
- generator.convertTo(entityMappings);
- generator.delete(); // delete any converted generators
- }
-
- protected ArrayList<JavaGenerator> getConvertibleJavaGenerators() {
- return this.extractConvertibleJavaNodes(this.getAllJavaGenerators(), this.getMappingFileGenerators());
- }
-
-
- // ********** queries **********
-
- public Iterable<Query> getQueries() {
- return new LiveCloneIterable<Query>(this.queries);
- }
-
- public int getQueriesSize() {
- return this.queries.size();
- }
-
- public void addQuery(Query query) {
- this.queries.add(query);
- }
-
- protected void setQueries(Iterable<Query> queries) {
- this.synchronizeCollection(queries, this.queries, QUERIES_COLLECTION);
- }
-
- /**
- * The persistence unit holds only <em>active</em> queries;
- * i.e. the mapping file queries and the Java queries that are not
- * "overridden" by mapping file queries (by query name).
- * <p>
- * <strong>NB:</strong> The list can contain queries with duplicate names;
- * either when there are multiple mapping file queries with the same name
- * or multiple, non-overridden Java queries with the same name.
- */
- protected Iterable<Query> buildQueries() {
- ArrayList<Query> result = CollectionTools.list(this.getMappingFileQueries());
-
- HashSet<String> mappingFileQueryNames = this.convertToNames(result);
- HashMap<String, ArrayList<JavaQuery>> allJavaQueries = this.mapByName(this.getAllJavaQueries());
- for (Map.Entry<String, ArrayList<JavaQuery>> entry : allJavaQueries.entrySet()) {
- if ( ! mappingFileQueryNames.contains(entry.getKey())) {
- result.addAll(entry.getValue());
- }
- }
-
- return result;
- }
-
- protected Iterable<Query> getMappingFileQueries() {
- return new CompositeIterable<Query>(this.getMappingFileQueryLists());
- }
-
- protected Iterable<Iterable<Query>> getMappingFileQueryLists() {
- return new TransformationIterable<MappingFileRef, Iterable<Query>>(this.getMappingFileRefs()) {
- @Override
- protected Iterable<Query> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.getMappingFileQueries();
- }
- };
- }
-
- /**
- * Include "overridden" Java queries.
- */
- protected Iterable<JavaQuery> getAllJavaQueries() {
- return new CompositeIterable<JavaQuery>(this.getAllJavaTypeMappingQueryLists());
- }
-
- protected Iterable<Iterable<JavaQuery>> getAllJavaTypeMappingQueryLists() {
- return new TransformationIterable<TypeMapping, Iterable<JavaQuery>>(this.getAllJavaTypeMappingsUnique()) {
- @Override
- protected Iterable<JavaQuery> transform(TypeMapping typeMapping) {
- return new SubIterableWrapper<Query, JavaQuery>(this.transform_(typeMapping));
- }
- protected Iterable<Query> transform_(TypeMapping typeMapping) {
- return typeMapping.getQueries();
- }
- };
- }
-
- protected Iterable<TypeMapping> getAllJavaTypeMappingsUnique() {
- return new TransformationIterable<PersistentType, TypeMapping>(this.getAllJavaPersistentTypesUnique()) {
- @Override
- protected TypeMapping transform(PersistentType persistentType) {
- return persistentType.getMapping();
- }
- };
- }
-
- // ***** metadata conversion
- public boolean hasConvertibleJavaQueries() {
- return ! this.getConvertibleJavaQueries().isEmpty();
- }
-
- public void convertJavaQueries(EntityMappings entityMappings, IProgressMonitor monitor) {
- OrmQueryContainer queryContainer = entityMappings.getQueryContainer();
- ArrayList<JavaQuery> convertibleJavaQueries = this.getConvertibleJavaQueries();
- SubMonitor subMonitor = SubMonitor.convert(monitor, JptCoreMessages.JPA_METADATA_CONVERSION_CONVERTING, convertibleJavaQueries.size());
- for (JavaQuery query : convertibleJavaQueries) {
- this.convertJavaQuery(queryContainer, query, subMonitor.newChild(1));
- }
- subMonitor.setTaskName(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_COMPLETE);
- }
-
- protected void convertJavaQuery(OrmQueryContainer queryContainer, JavaQuery query, SubMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_CANCELED);
- }
- monitor.setTaskName(NLS.bind(JptCoreMessages.JPA_METADATA_CONVERSION_CONVERT_QUERY, query.getName()));
- query.convertTo(queryContainer);
- query.delete(); // delete any converted queries
- }
-
- protected ArrayList<JavaQuery> getConvertibleJavaQueries() {
- return this.extractConvertibleJavaNodes(this.getAllJavaQueries(), this.getMappingFileQueries());
- }
-
-
- // ********** persistent types **********
-
- @SuppressWarnings("unchecked")
- public Iterable<PersistentType> getPersistentTypes() {
- return new CompositeIterable<PersistentType>(
- this.getMappingFilePersistentTypes(),
- this.getJavaPersistentTypes()
- );
- }
-
- protected Iterable<PersistentType> getMappingFilePersistentTypes() {
- return new CompositeIterable<PersistentType>(this.getMappingFilePersistentTypeLists());
- }
-
- protected Iterable<Iterable<? extends PersistentType>> getMappingFilePersistentTypeLists() {
- return new TransformationIterable<PersistentTypeContainer, Iterable<? extends PersistentType>>(
- this.getMappingFileRefs(),
- PersistentTypeContainer.TRANSFORMER
- );
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<PersistentType> getJavaPersistentTypes() {
- return new CompositeIterable<PersistentType>(
- this.getClassRefPersistentTypes(),
- this.getJarFilePersistentTypes()
- );
- }
-
- /**
- * Return the non-<code>null</code> class ref persistent types,
- * both specified and implied.
- */
- protected Iterable<PersistentType> getClassRefPersistentTypes() {
- return new FilteringIterable<PersistentType>(
- this.getClassRefPersistentTypes_(),
- NotNullFilter.<PersistentType>instance()
- );
- }
-
- /**
- * Both specified and implied. May contain <code>null</code>s.
- * @see #getClassRefPersistentTypes()
- */
- protected Iterable<PersistentType> getClassRefPersistentTypes_() {
- return new TransformationIterable<ClassRef, PersistentType>(this.getClassRefs()) {
- @Override
- protected PersistentType transform(ClassRef classRef) {
- return classRef.getJavaPersistentType();
- }
- };
- }
-
- /**
- * We only get <em>annotated</em> types from jar files.
- */
- protected Iterable<PersistentType> getJarFilePersistentTypes() {
- return new CompositeIterable<PersistentType>(this.getJarFilePersistentTypeLists());
- }
-
- /**
- * We only get <em>annotated</em> types from jar files.
- */
- protected Iterable<Iterable<? extends PersistentType>> getJarFilePersistentTypeLists() {
- return new TransformationIterable<PersistentTypeContainer, Iterable<? extends PersistentType>>(
- this.getJarFileRefs(),
- PersistentTypeContainer.TRANSFORMER
- );
- }
-
- public PersistentType getPersistentType(String typeName) {
- if (typeName == null) {
- return null;
- }
- // search order is significant(?)
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- PersistentType persistentType = mappingFileRef.getPersistentType(typeName);
- if (persistentType != null) {
- return persistentType;
- }
- }
- for (ClassRef classRef : this.getClassRefs()) {
- if (classRef.isFor(typeName)) {
- return classRef.getJavaPersistentType();
- }
- }
- for (JarFileRef jarFileRef : this.getJarFileRefs()) {
- PersistentType persistentType = jarFileRef.getPersistentType(typeName);
- if (persistentType != null) {
- return persistentType;
- }
- }
- return null;
- }
-
- /**
- * Ignore implied class refs and jar files.
- */
- public boolean specifiesPersistentType(String typeName) {
- for (ClassRef classRef : this.getSpecifiedClassRefs()) {
- if (classRef.isFor(typeName)) {
- return true;
- }
- }
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- if (mappingFileRef.getPersistentType(typeName) != null) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return a list of <em>all</em> the persistence unit's Java persistent
- * types (including those referenced by the mapping files that are not
- * marked "metadata complete") with those with duplicate names removed.
- * Although this may not always be true, assume persistent types with
- * the same name reference the same Java type. (<strong>NB:</strong>
- * It's possible that a Java class in a jar file has the same name as a
- * Java class in the project and they be different....)
- * <p>
- * This is really only useful for the calculation of generators and queries,
- * which can be defined in Java annotations but still be "active" even
- * though their corresponding Java types/attributes have been overridden in
- * a mapping file.
- * <p>
- * The order of precedence:<ul>
- * <li>mapping files
- * <li>persistence unit class refs
- * <li>jar files
- * </ul>
- */
- protected Iterable<PersistentType> getAllJavaPersistentTypesUnique() {
- // order is significant(?)
- HashMap<String, PersistentType> map = new HashMap<String, PersistentType>();
- this.addPersistentTypesTo(this.getJarFilePersistentTypes(), map);
- this.addPersistentTypesTo(this.getClassRefPersistentTypes(), map);
- this.addPersistentTypesTo(this.getMappingFileJavaPersistentTypes(), map);
- return map.values();
- }
-
- /**
- * Add the specified persistent types to
- * the specified map keyed by persistent type name.
- */
- protected void addPersistentTypesTo(Iterable<? extends PersistentType> persistentTypes, HashMap<String, PersistentType> persistentTypeMap) {
- for (PersistentType pt : persistentTypes) {
- String ptName = pt.getName();
- if (ptName != null) {
- persistentTypeMap.put(ptName, pt);
- }
- }
- }
-
- /**
- * Return the non-<code>null</code> mapping file Java persistent types;
- * i.e. the Java persistent types corresponding to the mapping file
- * persistent types that are not marked "metadata complete".
- * @see #getAllJavaPersistentTypesUnique()
- */
- protected Iterable<PersistentType> getMappingFileJavaPersistentTypes() {
- return new FilteringIterable<PersistentType>(
- this.getMappingFileJavaPersistentTypes_(),
- NotNullFilter.<PersistentType>instance()
- );
- }
-
- /**
- * The returned list will contain a <code>null</code> for each mapping file
- * persistent type that does not correspond to an existing Java type or is
- * marked "metadata complete".
- * @see #getMappingFileJavaPersistentTypes()
- */
- protected Iterable<PersistentType> getMappingFileJavaPersistentTypes_() {
- return new TransformationIterable<PersistentType, PersistentType>(this.getMappingFilePersistentTypes()) {
- @Override
- protected PersistentType transform(PersistentType mappingFilePersistentType) {
- return mappingFilePersistentType.getOverriddenPersistentType();
- }
- };
- }
-
-
- // ********** type mappings **********
-
- public Entity getEntity(String typeName) {
- TypeMapping typeMapping = this.getTypeMapping(typeName);
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public Embeddable getEmbeddable(String typeName) {
- TypeMapping typeMapping = this.getTypeMapping(typeName);
- return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
- }
-
- // TODO bjv - this should probably *not* return Java type mappings when PU is "metadata complete"...
- protected TypeMapping getTypeMapping(String typeName) {
- PersistentType persistentType = this.getPersistentType(typeName);
- return (persistentType == null) ? null : persistentType.getMapping();
- }
-
- public Iterable<Entity> getEntities() {
- return this.filterToEntities(this.getTypeMappings());
- }
-
- protected Iterable<Entity> filterToEntities(Iterable<TypeMapping> typeMappings) {
- return new SubIterableWrapper<TypeMapping, Entity>(this.filterToEntities_(typeMappings));
- }
-
- protected Iterable<TypeMapping> filterToEntities_(Iterable<TypeMapping> typeMappings) {
- return new FilteringIterable<TypeMapping>(typeMappings) {
- @Override
- protected boolean accept(TypeMapping typeMapping) {
- return typeMapping instanceof Entity;
- }
- };
- }
-
- // TODO bjv - this should probably *not* return Java type mappings when PU is "metadata complete"...
- protected Iterable<TypeMapping> getTypeMappings() {
- return new TransformationIterable<PersistentType, TypeMapping>(this.getPersistentTypes()) {
- @Override
- protected TypeMapping transform(PersistentType persistentType) {
- return persistentType.getMapping(); // the mapping should never be null
- }
- };
- }
-
- /**
- * Return the "active" entities.
- * @see #getActiveTypeMappings()
- */
- protected Iterable<Entity> getActiveEntities() {
- return this.filterToEntities(this.getActiveTypeMappings());
- }
-
- /**
- * Return the "active" type mappings, i.e. the mapping file type mappings and
- * the Java type mappings that are not "overridden" by mapping file
- * type mappings (by full qualified class name).
- */
- protected Iterable<TypeMapping> getActiveTypeMappings(){
- ArrayList<TypeMapping> result = CollectionTools.list(this.getMappingFileTypeMappings());
-
- HashSet<String> mappingFileClassNames = this.convertToClassNames(result);
- HashMap<String, ArrayList<TypeMapping>> javaTypeMappings = this.mapTypeMappingsByClassName(this.getJavaTypeMappings());
- for (Map.Entry<String, ArrayList<TypeMapping>> entry : javaTypeMappings.entrySet()) {
- if ( ! mappingFileClassNames.contains(entry.getKey())) {
- result.addAll(entry.getValue());
- }
- }
-
- return result;
- }
-
- /**
- * Return all the type mappings defined in the persistence unit's mapping
- * files (i.e. excluding the Java type mappings).
- */
- protected Iterable<TypeMapping> getMappingFileTypeMappings() {
- return new TransformationIterable<PersistentType, TypeMapping>(this.getMappingFilePersistentTypes()) {
- @Override
- protected TypeMapping transform(PersistentType persistentType) {
- return persistentType.getMapping();
- }
- };
- }
-
- protected HashSet<String> convertToClassNames(Collection<? extends TypeMapping> typeMappings) {
- HashSet<String> classNames = new HashSet<String>(typeMappings.size());
- for (TypeMapping typeMapping : typeMappings) {
- classNames.add(typeMapping.getPersistentType().getName());
- }
- return classNames;
- }
-
- /**
- * Return a map of the type mappings keyed by full qualified class name.
- * Since there can be duplicate (erroneously) class names,
- * each class name is mapped to a <em>list</em> of type mappings.
- */
- protected <M extends TypeMapping> HashMap<String, ArrayList<M>> mapTypeMappingsByClassName(Iterable<M> typeMappings) {
- HashMap<String, ArrayList<M>> map = new HashMap<String, ArrayList<M>>();
- for (M typeMapping : typeMappings) {
- String typeMappingName = typeMapping.getPersistentType().getName();
- ArrayList<M> list = map.get(typeMappingName);
- if (list == null) {
- list = new ArrayList<M>();
- map.put(typeMappingName, list);
- }
- list.add(typeMapping);
- }
- return map;
- }
-
- /**
- * These may be overridden in the mapping files.
- * @see #getJavaPersistentTypes()
- */
- protected Iterable<TypeMapping> getJavaTypeMappings() {
- return new TransformationIterable<PersistentType, TypeMapping>(this.getJavaPersistentTypes()) {
- @Override
- protected TypeMapping transform(PersistentType persistentType) {
- return persistentType.getMapping();
- }
- };
- }
-
-
- // ********** synchronize classes **********
-
- public void synchronizeClasses(IProgressMonitor monitor) {
- SubMonitor sm = SubMonitor.convert(monitor, 3);
-
- // calculate the refs to remove and add
- HashSet<String> newTypeNames = CollectionTools.set(this.getJpaProject().getMappedJavaSourceClassNames());
- ArrayList<ClassRef> deadClassRefs = new ArrayList<ClassRef>();
- HashSet<String> mappingFileTypeNames = this.getMappingFileTypeNames();
-
- for (ClassRef classRef : this.getSpecifiedClassRefs()) {
- JavaPersistentType specifiedJPT = classRef.getJavaPersistentType();
- if (specifiedJPT == null) {
- // Java type cannot be resolved
- deadClassRefs.add(classRef);
- } else {
- String specifiedName = specifiedJPT.getName();
- if ( ! newTypeNames.remove(specifiedName)) {
- // Java type is not annotated
- deadClassRefs.add(classRef);
- } else if (mappingFileTypeNames.contains(specifiedName)) {
- // type is also listed in a mapping file
- deadClassRefs.add(classRef);
- }
- }
- }
- if (sm.isCanceled()) {
- return;
- }
- sm.worked(1);
-
- this.removeSpecifiedClassRefs(deadClassRefs);
- if (sm.isCanceled()) {
- return;
- }
- sm.worked(1);
-
- this.addSpecifiedClassRefs(newTypeNames);
- sm.worked(1);
- }
-
- /**
- * Return the names of all the types specified in the persistence unit's
- * mapping files.
- */
- protected HashSet<String> getMappingFileTypeNames() {
- HashSet<String> result = new HashSet<String>();
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- for (PersistentType persistentType : mappingFileRef.getPersistentTypes()) {
- result.add(persistentType.getName());
- }
- }
- return result;
- }
-
-
- // ********** misc **********
-
- public XmlPersistenceUnit getXmlPersistenceUnit() {
- return this.xmlPersistenceUnit;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- for (JarFileRef jarFileRef : this.getJarFileRefs()) {
- if (jarFileRef.containsOffset(textOffset)) {
- return jarFileRef;
- }
- }
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- if (mappingFileRef.containsOffset(textOffset)) {
- return mappingFileRef;
- }
- }
- for (ClassRef classRef : this.getClassRefs()) {
- if (classRef.containsOffset(textOffset)) {
- return classRef;
- }
- }
- return this;
- }
-
- public boolean containsOffset(int textOffset) {
- return (this.xmlPersistenceUnit != null) && this.xmlPersistenceUnit.containsOffset(textOffset);
- }
-
- protected HashSet<String> convertToNames(Collection<? extends JpaNamedContextNode> nodes) {
- HashSet<String> names = new HashSet<String>(nodes.size());
- for (JpaNamedContextNode node : nodes) {
- names.add(node.getName());
- }
- return names;
- }
-
- protected <N extends JpaNamedContextNode> HashMap<String, ArrayList<N>> mapByName(Iterable<N> nodes) {
- HashMap<String, ArrayList<N>> map = new HashMap<String, ArrayList<N>>();
- for (N node : nodes) {
- String nodeName = node.getName();
- ArrayList<N> list = map.get(nodeName);
- if (list == null) {
- list = new ArrayList<N>();
- map.put(nodeName, list);
- }
- list.add(node);
- }
- return map;
- }
-
- /**
- * Return the Java nodes that are neither overridden nor duplicated
- * (by default any Java nodes with the same name are "duplicates").
- */
- protected <N extends JpaNamedContextNode> ArrayList<N> extractConvertibleJavaNodes(Iterable<N> allJavaNodes, Iterable<? extends JpaNamedContextNode> mappingFileNodes) {
- ArrayList<N> convertibleNodes = new ArrayList<N>();
-
- HashSet<String> mappingFileNodeNames = this.convertToNames(CollectionTools.list(mappingFileNodes));
- HashMap<String, ArrayList<N>> allJavaNodesByName = this.mapByName(allJavaNodes);
- for (Map.Entry<String, ArrayList<N>> entry : allJavaNodesByName.entrySet()) {
- String javaNodeName = entry.getKey();
- if (StringTools.stringIsEmpty(javaNodeName)) {
- continue; // ignore any nodes with an empty name(?)
- }
- ArrayList<N> javaNodesWithSameName = entry.getValue();
- if ((javaNodesWithSameName.size() == 1) && ! mappingFileNodeNames.contains(javaNodeName)) {
- convertibleNodes.add(javaNodesWithSameName.get(0));
- }
- }
-
- return convertibleNodes;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- super.toString(sb);
- sb.append(this.name);
- }
-
- public Iterable<String> getPackageNames() {
- Set<String> packageNames = new HashSet<String>();
- for (PersistentType pType : this.getJavaPersistentTypes()) {
- JavaResourceType jrt = ((JavaPersistentType)pType).getJavaResourceType();
- packageNames.add(jrt.getPackageName());
- }
- return packageNames;
- }
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateMappingFiles(messages, reporter);
- this.validateClassRefs(messages, reporter);
- this.validateJarFileRefs(messages, reporter);
- this.validateProperties(messages, reporter);
- this.validateGenerators(messages, reporter);
- this.validateQueries(messages, reporter);
- this.validateEntityNames(messages);
- }
-
- protected void validateMappingFiles(List<IMessage> messages, IReporter reporter) {
- this.checkForMultiplePersistenceUnitMetadata(messages);
- this.checkForDuplicateMappingFileRefs(messages);
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- mappingFileRef.validate(messages, reporter);
- }
- this.checkForDuplicateMappingFileClasses(messages);
- }
-
- protected void checkForMultiplePersistenceUnitMetadata(List<IMessage> messages) {
- ArrayList<MappingFileRef> pumdMappingFileRefs = CollectionTools.list(this.getPersistenceUnitMetadataMappingFileRefs());
- if (pumdMappingFileRefs.size() > 1) {
- for (MappingFileRef mappingFileRef : pumdMappingFileRefs) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_METADATA,
- new String[] {mappingFileRef.getFileName()},
- mappingFileRef.getMappingFile(),
- mappingFileRef.getPersistenceUnitMetadata().getValidationTextRange()
- )
- );
- }
- }
- }
-
- protected Iterable<MappingFileRef> getPersistenceUnitMetadataMappingFileRefs() {
- return new FilteringIterable<MappingFileRef>(this.getMappingFileRefs()) {
- @Override
- protected boolean accept(MappingFileRef mappingFileRef) {
- return mappingFileRef.persistenceUnitMetadataExists();
- }
- };
- }
-
- protected void checkForDuplicateMappingFileRefs(List<IMessage> messages) {
- for (Map.Entry<String, ArrayList<MappingFileRef>> entry : this.mapMappingFileRefsByFileName().entrySet()) {
- String fileName = entry.getKey();
- if (StringTools.stringIsNotEmpty(fileName)) {
- ArrayList<MappingFileRef> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {fileName};
- for (MappingFileRef dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE,
- parms,
- dup,
- dup.getValidationTextRange()
- )
- );
- }
- }
- }
- }
- }
-
- /**
- * Return the persistence unit's mapping file refs, both default and
- * specified, keyed by their file names.
- */
- protected HashMap<String, ArrayList<MappingFileRef>> mapMappingFileRefsByFileName() {
- HashMap<String, ArrayList<MappingFileRef>> map = new HashMap<String, ArrayList<MappingFileRef>>(this.getMappingFileRefsSize());
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- String fileName = mappingFileRef.getFileName();
- ArrayList<MappingFileRef> list = map.get(fileName);
- if (list == null) {
- list = new ArrayList<MappingFileRef>();
- map.put(fileName, list);
- }
- list.add(mappingFileRef);
- }
- return map;
- }
-
- protected void checkForDuplicateMappingFileClasses(List<IMessage> messages) {
- for (Map.Entry<String, ArrayList<PersistentType>> entry : this.mapMappingFilePersistentTypesByName().entrySet()) {
- String ptName = entry.getKey();
- if (StringTools.stringIsNotEmpty(ptName)) {
- ArrayList<PersistentType> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {ptName};
- for (PersistentType dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENT_TYPE_DUPLICATE_CLASS,
- parms,
- dup,
- dup.getValidationTextRange()
- )
- );
- }
- }
- }
- }
- }
-
- /**
- * Return the persistence unit's mapping file persistent types
- * keyed by their class names.
- */
- protected HashMap<String, ArrayList<PersistentType>> mapMappingFilePersistentTypesByName() {
- HashMap<String, ArrayList<PersistentType>> map = new HashMap<String, ArrayList<PersistentType>>();
- for (PersistentType persistentType : this.getMappingFilePersistentTypes()) {
- String ptName = persistentType.getName();
- ArrayList<PersistentType> list = map.get(ptName);
- if (list == null) {
- list = new ArrayList<PersistentType>();
- map.put(ptName, list);
- }
- list.add(persistentType);
- }
- return map;
- }
-
- protected void validateClassRefs(List<IMessage> messages, IReporter reporter) {
- this.checkForDuplicateClassRefs(messages);
- for (ClassRef classRef : this.getClassRefs()) {
- classRef.validate(messages, reporter);
- }
- }
-
- protected void checkForDuplicateClassRefs(List<IMessage> messages) {
- for (Map.Entry<String, ArrayList<ClassRef>> entry : this.mapClassRefsByName().entrySet()) {
- String className = entry.getKey();
- if (StringTools.stringIsNotEmpty(className)) {
- ArrayList<ClassRef> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {className};
- for (ClassRef dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_CLASS,
- parms,
- dup,
- dup.getValidationTextRange()
- )
- );
- }
- }
- }
- }
- }
-
- /**
- * Return the persistence unit's class refs, both specified and implied,
- * keyed by their class names.
- */
- protected HashMap<String, ArrayList<ClassRef>> mapClassRefsByName() {
- HashMap<String, ArrayList<ClassRef>> map = new HashMap<String, ArrayList<ClassRef>>(this.getClassRefsSize());
- for (ClassRef classRef : this.getClassRefs()) {
- String refName = classRef.getClassName();
- ArrayList<ClassRef> list = map.get(refName);
- if (list == null) {
- list = new ArrayList<ClassRef>();
- map.put(refName, list);
- }
- list.add(classRef);
- }
- return map;
- }
-
- protected void validateJarFileRefs(List<IMessage> messages, IReporter reporter) {
- this.checkForDuplicateJarFileRefs(messages);
- for (JarFileRef jarFileRef : this.getJarFileRefs()) {
- jarFileRef.validate(messages, reporter);
- }
- }
-
- protected void checkForDuplicateJarFileRefs(List<IMessage> messages) {
- for (Map.Entry<String, ArrayList<JarFileRef>> entry : this.mapJarFileRefsByName().entrySet()) {
- String fileName = entry.getKey();
- if (StringTools.stringIsNotEmpty(fileName)) {
- ArrayList<JarFileRef> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {fileName};
- for (JarFileRef dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_JAR_FILE,
- parms,
- dup,
- dup.getValidationTextRange()
- )
- );
- }
- }
- }
- }
- }
-
- /**
- * Return the persistence unit's jar file refs
- * keyed by their file names.
- */
- protected HashMap<String, ArrayList<JarFileRef>> mapJarFileRefsByName() {
- HashMap<String, ArrayList<JarFileRef>> map = new HashMap<String, ArrayList<JarFileRef>>(this.getJarFileRefsSize());
- for (JarFileRef jarFileRef : this.getJarFileRefs()) {
- String refName = jarFileRef.getFileName();
- ArrayList<JarFileRef> list = map.get(refName);
- if (list == null) {
- list = new ArrayList<JarFileRef>();
- map.put(refName, list);
- }
- list.add(jarFileRef);
- }
- return map;
- }
-
- protected abstract void validateProperties(List<IMessage> messages, IReporter reporter);
-
- /**
- * We validate generators here because Java persistent types that are
- * overridden in the <code>orm.xml</code> file are
- * not validated, but they may contain generators that are still "active"
- * and need to be validated
- * (i.e. a generator is <em>not</em> overridden when its entity or ID
- * mapping is overridden in the <code>orm.xml</code> file).
- * <p>
- * <strong>NB:</strong> <em>Any</em> <code>orm.xml</code> generator can
- * override <em>any</em> Java generator with the same name; they need not
- * be defined on the same entity or ID mapping. Just a bit inconsistent with
- * the typical "override" in JPA....
- */
- protected void validateGenerators(List<IMessage> messages, IReporter reporter) {
- this.checkForDuplicateGenerators(messages);
- for (Generator generator : this.getGenerators()) {
- this.validate(generator, messages, reporter);
- }
- }
-
- protected void checkForDuplicateGenerators(List<IMessage> messages) {
- HashMap<String, ArrayList<Generator>> generatorsByName = this.mapByName(this.getGenerators());
- for (Map.Entry<String, ArrayList<Generator>> entry : generatorsByName.entrySet()) {
- String generatorName = entry.getKey();
- if (StringTools.stringIsNotEmpty(generatorName)) { // ignore empty names
- ArrayList<Generator> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {generatorName};
- for (Generator dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.GENERATOR_DUPLICATE_NAME,
- parms,
- dup,
- this.extractNameTextRange(dup)
- )
- );
- }
- }
- }
- }
- }
-
- // TODO bjv isn't it obvious?
- protected TextRange extractNameTextRange(Generator generator) {
- return (generator instanceof OrmGenerator) ?
- ((OrmGenerator) generator).getNameTextRange() :
- ((JavaGenerator) generator).getNameTextRange(null);
- }
-
- // TODO bjv isn't it obvious?
- protected void validate(Generator generator, List<IMessage> messages, IReporter reporter) {
- if (generator instanceof OrmGenerator) {
- ((OrmGenerator) generator).validate(messages, reporter);
- } else {
- ((JavaGenerator) generator).validate(messages, reporter, null);
- }
- }
-
- /**
- * <strong>NB:</strong> We validate queries here.
- * @see #validateGenerators(List, IReporter)
- */
- protected void validateQueries(List<IMessage> messages, IReporter reporter) {
- this.checkForDuplicateQueries(messages);
-
- JpaJpqlQueryHelper queryHelper = this.createJpqlQueryHelper();
-
- for (Query query : this.getQueries()) {
- this.validate(query, queryHelper, messages, reporter);
- }
- }
-
- protected void checkForDuplicateQueries(List<IMessage> messages) {
- HashMap<String, ArrayList<Query>> queriesByName = this.mapByName(this.getQueries());
- for (Map.Entry<String, ArrayList<Query>> entry : queriesByName.entrySet()) {
- String queryName = entry.getKey();
- if (StringTools.stringIsNotEmpty(queryName)) { // ignore empty names
- ArrayList<Query> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {queryName};
- for (Query dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.QUERY_DUPLICATE_NAME,
- parms,
- dup,
- this.extractNameTextRange(dup)
- )
- );
- }
- }
- }
- }
- }
-
- // TODO bjv isn't it obvious?
- protected TextRange extractNameTextRange(Query query) {
- return (query instanceof OrmQuery) ?
- ((OrmQuery) query).getNameTextRange() :
- ((JavaQuery) query).getNameTextRange(null);
- }
-
- // TODO bjv isn't it obvious?
- protected void validate(Query query, JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- if (query instanceof OrmQuery) {
- ((OrmQuery) query).validate(queryHelper, messages, reporter);
- }
- else {
- ((JavaQuery) query).validate(queryHelper, messages, reporter, null);
- }
- }
-
- protected void validateEntityNames(List<IMessage> messages) {
- for (Map.Entry<String, ArrayList<Entity>> entry : this.mapTypeMappingsByName(this.getActiveEntities()).entrySet()) {
- String entityName = entry.getKey();
- if (StringTools.stringIsNotEmpty(entityName)) {
- ArrayList<Entity> dups = entry.getValue();
- if (dups.size() > 1) {
- String[] parms = new String[] {entityName};
- for (Entity dup : dups) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NAME_DUPLICATED,
- parms,
- dup,
- this.extractNameTextRange(dup)
- )
- );
- }
-
- }
- }
- }
- }
-
- /**
- * Return a map of the type mappings keyed by type mapping name (typically
- * the short class name).
- * Since there can be (erroneously) duplicate type mapping names,
- * each type mapping name is mapped to a <em>list</em> of type mappings.
- */
- protected <M extends TypeMapping> HashMap<String, ArrayList<M>> mapTypeMappingsByName(Iterable<M> typeMappings) {
- HashMap<String, ArrayList<M>> map = new HashMap<String, ArrayList<M>>();
- for (M typeMapping : typeMappings) {
- String typeMappingName = typeMapping.getName();
- ArrayList<M> list = map.get(typeMappingName);
- if (list == null) {
- list = new ArrayList<M>();
- map.put(typeMappingName, list);
- }
- list.add(typeMapping);
- }
- return map;
- }
-
- protected TextRange extractNameTextRange(Entity entity) {
- return (entity instanceof OrmEntity) ?
- ((OrmEntity) entity).getXmlTypeMapping().getNameTextRange():
- ((JavaEntity) entity).getMappingAnnotation().getNameTextRange();
- }
-
- public boolean validatesAgainstDatabase() {
- return this.connectionProfileIsActive();
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlPersistenceUnit.getValidationTextRange();
- return (textRange != null) ? textRange : this.getPersistence().getValidationTextRange();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<DeleteEdit> createDeleteTypeEdits(final IType type) {
- return new CompositeIterable<DeleteEdit>(
- new TransformationIterable<ClassRef, Iterable<DeleteEdit>>(this.getSpecifiedClassRefs()) {
- @Override
- protected Iterable<DeleteEdit> transform(ClassRef classRef) {
- return classRef.createDeleteTypeEdits(type);
- }
- }
- );
- }
-
- public Iterable<DeleteEdit> createDeleteMappingFileEdits(final IFile file) {
- return new CompositeIterable<DeleteEdit>(
- new TransformationIterable<MappingFileRef, Iterable<DeleteEdit>>(this.getSpecifiedMappingFileRefs()) {
- @Override
- protected Iterable<DeleteEdit> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.createDeleteMappingFileEdits(file);
- }
- }
- );
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- this.createSpecifiedClassRefRenameTypeEdits(originalType, newName),
- this.createPersistenceUnitPropertiesRenameTypeEdits(originalType, newName));
- }
-
- protected Iterable<ReplaceEdit> createSpecifiedClassRefRenameTypeEdits(final IType originalType, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<ClassRef, Iterable<ReplaceEdit>>(this.getSpecifiedClassRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(ClassRef classRef) {
- return classRef.createRenameTypeEdits(originalType, newName);
- }
- }
- );
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenameTypeEdits(IType originalType, String newName) {
- return this.options.createRenameTypeEdits(originalType, newName);
- }
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- this.createSpecifiedClassRefMoveTypeEdits(originalType, newPackage),
- this.createPersistenceUnitPropertiesMoveTypeEdits(originalType, newPackage));
- }
-
- protected Iterable<ReplaceEdit> createSpecifiedClassRefMoveTypeEdits(final IType originalType, final IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<ClassRef, Iterable<ReplaceEdit>>(this.getSpecifiedClassRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(ClassRef classRef) {
- return classRef.createMoveTypeEdits(originalType, newPackage);
- }
- }
- );
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return this.options.createMoveTypeEdits(originalType, newPackage);
- }
-
-
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- this.createSpecifiedClassRefRenamePackageEdits(originalPackage, newName),
- this.createPersistenceUnitPropertiesRenamePackageEdits(originalPackage, newName));
- }
-
- protected Iterable<ReplaceEdit> createSpecifiedClassRefRenamePackageEdits(final IPackageFragment originalPackage, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<ClassRef, Iterable<ReplaceEdit>>(this.getSpecifiedClassRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(ClassRef classRef) {
- return classRef.createRenamePackageEdits(originalPackage, newName);
- }
- }
- );
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return this.options.createRenamePackageEdits(originalPackage, newName);
- }
-
- public Iterable<ReplaceEdit> createRenameFolderEdits(final IFolder originalFolder, final String newName) {
- return this.createMappingFileRefRenameFolderEdits(originalFolder, newName);
- }
-
- protected Iterable<ReplaceEdit> createMappingFileRefRenameFolderEdits(final IFolder originalFolder, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<MappingFileRef, Iterable<ReplaceEdit>>(this.getSpecifiedMappingFileRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.createRenameFolderEdits(originalFolder, newName);
- }
- }
- );
- }
-
- public Iterable<ReplaceEdit> createRenameMappingFileEdits(final IFile originalFile, final String newName) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<MappingFileRef, Iterable<ReplaceEdit>>(this.getMappingFileRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.createRenameMappingFileEdits(originalFile, newName);
- }
- }
- );
- }
-
- public int findInsertLocationForMappingFileRef() {
- return this.xmlPersistenceUnit.getLocationToInsertMappingFileRef();
- }
-
- public Iterable<ReplaceEdit> createMoveMappingFileEdits(final IFile originalFile, final IPath runtineDestination) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<MappingFileRef, Iterable<ReplaceEdit>>(this.getMappingFileRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.createMoveMappingFileEdits(originalFile, runtineDestination);
- }
- }
- );
- }
-
- public Iterable<ReplaceEdit> createMoveFolderEdits(final IFolder originalFolder, final IPath runtimeDestination) {
- return this.createMappingFileRefMoveFolderReplaceEdits(originalFolder, runtimeDestination);
- }
-
- protected Iterable<ReplaceEdit> createMappingFileRefMoveFolderReplaceEdits(final IFolder originalFolder, final IPath runtimeDestination) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<MappingFileRef, Iterable<ReplaceEdit>>(this.getSpecifiedMappingFileRefs()) {
- @Override
- protected Iterable<ReplaceEdit> transform(MappingFileRef mappingFileRef) {
- return mappingFileRef.createMoveFolderEdits(originalFolder, runtimeDestination);
- }
- }
- );
- }
-
-
- // ********** metamodel **********
- // put metamodel stuff here so it can be shared by Generic and EclipseLink implementations
-
- public void initializeMetamodel() {
- this.initializeMetamodelFiles_();
- }
-
- protected void initializeMetamodelFiles() {
- if (this.isJpa2_0Compatible()) {
- this.initializeMetamodelFiles_();
- }
- }
-
- protected void initializeMetamodelFiles_() {
- CollectionTools.addAll(this.metamodelFiles, this.getGeneratedMetamodelFiles());
- }
-
- protected Iterable<IFile> getGeneratedMetamodelFiles() {
- return new TransformationIterable<JavaResourceAbstractType, IFile>(this.getGeneratedMetamodelTopLevelTypes()) {
- @Override
- protected IFile transform(JavaResourceAbstractType jrpt) {
- return jrpt.getFile();
- }
- };
- }
-
- protected Iterable<JavaResourceAbstractType> getGeneratedMetamodelTopLevelTypes() {
- return ((JpaProject2_0) this.getJpaProject()).getGeneratedMetamodelTopLevelTypes();
- }
-
- /**
- * Not the prettiest code....
- */
- // TODO check monitor for cancel
- public IStatus synchronizeMetamodel(IProgressMonitor monitor) {
- // gather up the persistent unit's types, eliminating duplicates;
- // if we have persistent types with the same name in multiple locations,
- // the last one we encounter wins (i.e. the classes in the orm.xml take
- // precedence)
- HashMap<String, PersistentType> allPersistentTypes = new HashMap<String, PersistentType>();
- this.addPersistentTypesTo(this.getJarFilePersistentTypes(), allPersistentTypes);
- this.addPersistentTypesTo(this.getClassRefPersistentTypes(), allPersistentTypes);
- this.addPersistentTypesTo(this.getMappingFilePersistentTypes(), allPersistentTypes);
-
- // build a list of the top-level types and a tree of their associated
- // member types etc.
- ArrayList<MetamodelSourceType> topLevelTypes = new ArrayList<MetamodelSourceType>(allPersistentTypes.size());
- HashMap<String, Collection<MetamodelSourceType>> memberTypeTree = new HashMap<String, Collection<MetamodelSourceType>>();
- for (PersistentType type1_0 : allPersistentTypes.values()) {
- PersistentType2_0 type = (PersistentType2_0) type1_0;
- String declaringTypeName = type.getDeclaringTypeName();
- MetamodelSourceType memberType = type;
- while (true) {
- if (declaringTypeName == null) {
- topLevelTypes.add(memberType);
- break; // stop at the top-level type
- }
-
- // associate the member type with its declaring type
- Collection<MetamodelSourceType> memberTypes = memberTypeTree.get(declaringTypeName);
- if (memberTypes == null) {
- memberTypes = new ArrayList<MetamodelSourceType>();
- memberTypeTree.put(declaringTypeName, memberTypes);
- }
- memberTypes.add(memberType);
-
- // move out to the member type's declaring type
- String memberTypeName = declaringTypeName;
- // check for a context persistent type
- memberType = (PersistentType2_0) allPersistentTypes.get(memberTypeName);
- if (memberType != null) {
- break; // stop - this will be processed in the outer 'for' loop
- }
- // check for a Java resource persistent type
- JavaResourceAbstractType jrat = this.getJpaProject().getJavaResourceType(memberTypeName);
- if (jrat != null) {
- declaringTypeName = jrat.getDeclaringTypeName();
- } else {
- // check for a JDT type
- IType jdtType = this.findJdtType(memberTypeName);
- if (jdtType != null) {
- IType jdtDeclaringType = jdtType.getDeclaringType();
- declaringTypeName = (jdtDeclaringType == null) ? null : jdtDeclaringType.getFullyQualifiedName('.');
- } else {
- // assume we have a non-persistent top-level type...?
- declaringTypeName = null;
- }
- }
- if (declaringTypeName == null) {
- memberType = this.selectSourceType(topLevelTypes, memberTypeName);
- } else {
- memberType = this.selectSourceType(memberTypeTree.get(declaringTypeName), memberTypeName);
- }
- if (memberType != null) {
- break; // stop - this type has already been processed
- }
- memberType = this.buildNonPersistentMetamodelSourceType(memberTypeName);
- }
- }
-
- // remove any top-level type whose name differs from another only by case,
- // since, on Windows, file names are case-insensitive :-(
- // sort the original list so we end up with the same top-level type
- // remaining every time (i.e. the one that sorts out first)
- Collections.sort(topLevelTypes, MetamodelSourceType.COMPARATOR);
- HashSet<String> names = new HashSet<String>(topLevelTypes.size());
- for (Iterator<MetamodelSourceType> stream = topLevelTypes.iterator(); stream.hasNext(); ) {
- MetamodelSourceType topLevelType = stream.next();
- // hopefully this is case-insensitive enough...
- if ( ! names.add(topLevelType.getName().toLowerCase())) {
- stream.remove();
- }
- }
-
- // copy the list of metamodel files...
- HashSet<IFile> deadMetamodelFiles = new HashSet<IFile>(this.metamodelFiles);
- this.metamodelFiles.clear();
- for (MetamodelSourceType topLevelType : topLevelTypes) {
- IFile metamodelFile = topLevelType.getMetamodelFile();
- // ...remove whatever files are still present...
- deadMetamodelFiles.remove(metamodelFile);
- // ...rebuild the list of metamodel files...
- if (this.fileIsGeneratedMetamodel(metamodelFile)) { // only add files with the Dali tag
- this.metamodelFiles.add(metamodelFile);
- }
- }
- // ...delete the files that are now gone
- // [perform the deletes first - this is critical when a file has been
- // renamed by only altering its name's case; since we will try to write
- // out a new file that, on Windows, collides with the old file :-( ]
- for (IFile deadMetamodelFile : deadMetamodelFiles) {
- this.deleteMetamodelFile(deadMetamodelFile);
- }
-
- // now generate the metamodel classes
- for (MetamodelSourceType topLevelType : topLevelTypes) {
- topLevelType.synchronizeMetamodel(memberTypeTree);
- }
- return Status.OK_STATUS;
- }
-
- protected MetamodelSourceType selectSourceType(Iterable<MetamodelSourceType> types, String typeName) {
- if (types != null) {
- for (MetamodelSourceType type : types) {
- if (type.getName().equals(typeName)) {
- return type;
- }
- }
- }
- return null;
- }
-
- protected MetamodelSourceType buildNonPersistentMetamodelSourceType(String nonPersistentTypeName) {
- return new NonPersistentMetamodelSourceType(nonPersistentTypeName, this.getJpaProject());
- }
-
- protected IType findJdtType(String typeName) {
- try {
- return this.getJpaProject().getJavaProject().findType(typeName);
- } catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- return null;
- }
- }
-
- protected void deleteMetamodelFile(IFile file) {
- try {
- this.deleteMetamodelFile_(file);
- } catch (CoreException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- protected void deleteMetamodelFile_(IFile file) throws CoreException {
- if (this.fileIsGeneratedMetamodel(file)) {
- file.delete(true, null); // true = force
- }
- }
-
- protected boolean fileIsGeneratedMetamodel(IFile file) {
- return ((JpaProject2_0) this.getJpaProject()).getGeneratedMetamodelTopLevelType(file) != null;
- }
-
- public void disposeMetamodel() {
- this.metamodelFiles.clear();
- }
-
-
- // ***** Metamodel source for non-persistent types
- protected static class NonPersistentMetamodelSourceType
- implements MetamodelSourceType
- {
- protected final String name;
- protected final JpaProject jpaProject;
- protected final MetamodelSourceType.Synchronizer metamodelSynchronizer;
-
- protected NonPersistentMetamodelSourceType(String name, JpaProject jpaProject) {
- super();
- this.name = name;
- this.jpaProject = jpaProject;
- this.metamodelSynchronizer = this.buildMetamodelSynchronizer();
- }
-
- protected MetamodelSourceType.Synchronizer buildMetamodelSynchronizer() {
- return this.getJpaFactory().buildMetamodelSynchronizer(this);
- }
-
- protected JpaFactory2_0 getJpaFactory() {
- return (JpaFactory2_0) this.getJpaProject().getJpaPlatform().getJpaFactory();
- }
-
- public String getName() {
- return this.name;
- }
-
- public boolean isManaged() {
- return false;
- }
-
- public PersistentType getSuperPersistentType() {
- return null;
- }
-
- public ListIterable<? extends ReadOnlyPersistentAttribute> getAttributes() {
- return EmptyListIterable.instance();
- }
-
- public IFile getMetamodelFile() {
- return this.metamodelSynchronizer.getFile();
- }
-
- public JpaProject getJpaProject() {
- return this.jpaProject;
- }
-
- public void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- this.metamodelSynchronizer.synchronize(memberTypeTree);
- }
-
- public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- this.metamodelSynchronizer.printBodySourceOn(pw, memberTypeTree);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnitProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnitProperties.java
deleted file mode 100644
index 43aa9ebe19..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnitProperties.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2012 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.core.internal.context.persistence;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.model.AbstractModel;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * AbstractPersistenceUnitProperties
- */
-public abstract class AbstractPersistenceUnitProperties extends AbstractModel
- implements PersistenceUnitProperties
-{
- private PersistenceUnit persistenceUnit;
-
- // key = PersistenceUnit property key; value = property id
- private Map<String, String> propertyNames;
-
- public static final String PROPERTY_VALUE_DELIMITER = ","; //$NON-NLS-1$
- private static final long serialVersionUID = 1L;
-
- // ********** constructors / initialization **********
- protected AbstractPersistenceUnitProperties(PersistenceUnit parent) {
- super();
- this.initialize();
- this.initialize(parent);
- this.postInitialize();
- }
-
- /**
- * Base initialization.
- */
- protected void initialize() {
- this.propertyNames = new HashMap<String, String>();
- }
-
- /**
- * Initialization based on the persistence unit.
- */
- protected void initialize(PersistenceUnit parent) {
- this.persistenceUnit = parent;
-
- this.initializePropertyNames();
- this.initializeProperties();
- }
-
- protected void initializePropertyNames() {
- this.addPropertyNames(this.propertyNames);
- }
-
- /**
- * Initializes properties with values from the persistence unit.
- */
- protected abstract void initializeProperties();
-
- /**
- * Does all post treatment in this method after the properties are initialized
- */
- protected void postInitialize() {
- // do nothing by default
- }
-
- // ********** behavior **********
- public PersistenceUnit getPersistenceUnit() {
- return this.persistenceUnit;
- }
-
- public JpaProject getJpaProject() {
- return this.persistenceUnit.getJpaProject();
- }
-
- /**
- * Adds property names key/value pairs, used by the methods: itemIsProperty
- * and propertyIdFor.
- *
- * key = property key; value = property id
- */
- protected abstract void addPropertyNames(Map<String, String> pNames);
-
- /**
- * Method used for identifying the given property.
- */
- public boolean itemIsProperty(PersistenceUnit.Property item) {
- if (item == null) {
- throw new NullPointerException();
- }
- return this.propertyNames().keySet().contains(item.getName());
- }
-
- /**
- * Returns the property name used for change notification of the given
- * property.
- */
- public String propertyIdOf(PersistenceUnit.Property property) {
- String propertyId = this.propertyNames().get(property.getName());
- if (propertyId == null) {
- throw new IllegalArgumentException("Illegal property: " + property); //$NON-NLS-1$
- }
- return propertyId;
- }
-
- public String propertyIdOf(String eclipseLinkkey) {
- String propertyId = this.propertyNames().get(eclipseLinkkey);
- if (propertyId == null) {
- throw new IllegalArgumentException("Illegal property: " + eclipseLinkkey); //$NON-NLS-1$
- }
- return propertyId;
- }
-
- /*
- * Get the PersistenceUnit property key of the given property
- */
- protected String persistenceUnitKeyOf(String propertyId) {
- for (String persistenceUnitKey : this.propertyNames().keySet()) {
- if (this.propertyNames().get(persistenceUnitKey).equals(propertyId)) {
- return persistenceUnitKey;
- }
- }
- throw new IllegalArgumentException("Illegal property ID: " + propertyId); //$NON-NLS-1$
- }
-
- // ******** Convenience methods ********
- /**
- * Put into persistenceUnit properties.
- *
- * @param propertyId -
- * property name
- * @param value -
- * property value
- */
- protected void putProperty(String propertyId, String value) {
- this.putProperty(propertyId, value, false);
- }
-
- protected void putProperty(String propertyId, String value, boolean allowDuplicates) {
- String persistenceUnitKey = this.persistenceUnitKeyOf(propertyId);
- this.putPersistenceUnitProperty(persistenceUnitKey, null, value, allowDuplicates);
- }
-
- protected void putProperty(String propertyId, Boolean value) {
- this.putProperty(propertyId, value, false);
- }
-
- protected void putProperty(String propertyId, Boolean value, boolean allowDuplicates) {
- this.putProperty(propertyId, this.getPropertyStringValueOf(value), allowDuplicates);
- }
-
- protected void putProperty(String propertyId, Integer value) {
- this.putProperty(propertyId, value, false);
- }
-
- protected void putProperty(String propertyId, Integer value, boolean allowDuplicates) {
- this.putProperty(propertyId, this.getPropertyStringValueOf(value), allowDuplicates);
- }
-
- protected void putProperty(String propertyId, PersistenceXmlEnumValue value) {
- this.putProperty(propertyId, value, false);
- }
-
- protected void putProperty(String propertyId, PersistenceXmlEnumValue value, boolean allowDuplicates) {
- this.putProperty(propertyId, this.getPropertyStringValueOf(value), allowDuplicates);
- }
-
- /**
- * Removes a persistenceUnit property.
- *
- * @param propertyId -
- * property name
- * @param value -
- * property value
- */
- protected void removeProperty(String propertyId, String value) {
- String persistenceUnitKey = this.persistenceUnitKeyOf(propertyId);
- this.getPersistenceUnit().removeProperty(persistenceUnitKey, value);
- }
-
- /**
- * Returns true when the given key exits in the PersistenceXml.
- */
- protected boolean persistenceUnitKeyExists(String persistenceUnitKey) {
- return (this.getStringValue(persistenceUnitKey) != null);
- }
-
- // ****** get/set String convenience methods *******
- /**
- * Returns the String value of the given Property from the PersistenceXml.
- */
- protected String getStringValue(String persistenceUnitKey) {
- PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
- return (p == null) ? null : p.getValue();
- }
-
- protected String getStringValue(String key, String keySuffix) {
- return this.getStringValue((keySuffix == null) ? key : key + keySuffix);
- }
-
- /**
- * Put the given String value into the PersistenceXml.
- * @param key -
- * property key
- * @param newValue
- * value to be associated with the key
- */
- protected void putStringValue(String key, String newValue) {
- this.putStringValue(key, null, newValue, false);
- }
-
- /**
- * Put the given String value into the PersistenceXml.
- * @param key
- * property key
- * @param newValue
- * value to be associated with the key
- * @param allowDuplicate
- */
- protected void putStringValue(String key, String newValue, boolean allowDuplicate) {
- this.putStringValue(key, null, newValue, allowDuplicate);
- }
-
- /**
- * Put the given String value into the PersistenceXml.
- * @param key
- * property key
- * @param keySuffix
- * e.g. entity name
- * @param newValue
- * value to be associated with the key
- * @param allowDuplicate
- */
- protected void putStringValue(String key, String keySuffix, String newValue, boolean allowDuplicate) {
- this.putPersistenceUnitProperty(key, keySuffix, newValue, allowDuplicate);
- }
-
- // ****** Integer convenience methods *******
- /**
- * Returns the Integer value of the given Property from the PersistenceXml.
- */
- protected Integer getIntegerValue(String persistenceUnitKey) {
- PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
- return (p == null) ? null : getIntegerValueOf(p.getValue());
- }
-
- protected Integer getIntegerValueOf(String puStringValue) {
- if (StringTools.stringIsEmpty(puStringValue)) {
- return null;
- }
- try {
- return Integer.valueOf(puStringValue);
- }
- catch (NumberFormatException nfe) {
- return null;
- }
- }
-
- protected Integer getIntegerValue(String key, String keySuffix) {
- return this.getIntegerValue((keySuffix == null) ? key : key + keySuffix);
- }
-
- /**
- * Put the given Integer value into the PersistenceXml.
- * @param key -
- * property key
- * @param newValue
- * value to be associated with the key
- */
- protected void putIntegerValue(String key, Integer newValue) {
- this.putIntegerValue(key, null, newValue, false);
- }
-
- /**
- * Put the given Integer value into the PersistenceXml.
- * @param key
- * property key
- * @param newValue
- * value to be associated with the key
- * @param allowDuplicate
- */
- protected void putIntegerValue(String key, Integer newValue, boolean allowDuplicate) {
- this.putIntegerValue(key, null, newValue, allowDuplicate);
- }
-
- /**
- * Put the given Integer value into the PersistenceXml.
- * @param key
- * property key
- * @param keySuffix
- * e.g. entity name
- * @param newValue
- * value to be associated with the key
- * @param allowDuplicate
- */
- protected void putIntegerValue(String key, String keySuffix, Integer newValue, boolean allowDuplicate) {
- this.putPersistenceUnitProperty(key, keySuffix, this.getPropertyStringValueOf(newValue), allowDuplicate);
- }
-
- // ****** Boolean convenience methods *******
- /**
- * Returns the Boolean value of the given Property from the PersistenceXml.
- */
- protected Boolean getBooleanValue(String persistenceUnitKey) {
- PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
- return (p == null) ? null : this.getBooleanValueOf(p.getValue());
- }
-
- protected Boolean getBooleanValueOf(String puStringValue) {
- if (StringTools.stringIsEmpty(puStringValue)) {
- return null;
- }
- return Boolean.valueOf(puStringValue);
- }
-
- protected Boolean getBooleanValue(String key, String keySuffix) {
- return this.getBooleanValue((keySuffix == null) ? key : key + keySuffix);
- }
-
- /**
- * Put the given Boolean value into the PersistenceXml.
- * @param key
- * property key
- * @param newValue
- * value to be associated with the key
- */
- protected void putBooleanValue(String key, Boolean newValue) {
- this.putBooleanValue(key, null, newValue, false);
- }
-
- /**
- * Put the given Boolean value into the PersistenceXml.
- * @param key
- * property key
- * @param newValue
- * value to be associated with the key
- * @param allowDuplicate
- */
- protected void putBooleanValue(String key, Boolean newValue, boolean allowDuplicate) {
- this.putBooleanValue(key, null, newValue, allowDuplicate);
- }
-
- /**
- * Put the given Boolean value into the PersistenceXml.
- * @param key
- * property key
- * @param keySuffix
- * e.g. entity name
- * @param newValue
- * value to be associated with the key
- * @param allowDuplicate
- */
- protected void putBooleanValue(String key, String keySuffix, Boolean newValue, boolean allowDuplicate) {
- this.putPersistenceUnitProperty(key, keySuffix, this.getPropertyStringValueOf(newValue), allowDuplicate);
- }
-
- // ****** Enum convenience methods *******
- /**
- * Returns the Enum value of the given Property from the PersistenceXml.
- */
- protected <T extends PersistenceXmlEnumValue> T getEnumValue(String persistenceUnitKey, T[] enumValues) {
- PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
- return (p == null) ? null : getEnumValueOf(p.getValue(), enumValues);
- }
-
- protected <T extends PersistenceXmlEnumValue> T getEnumValue(String key, String keySuffix, T[] enumValues) {
- return this.getEnumValue((keySuffix == null) ? key : key + keySuffix, enumValues);
- }
-
- /**
- * Put the given Enum value into the PersistenceXml.
- *
- * @param key -
- * property key
- */
- protected <T extends PersistenceXmlEnumValue> void putEnumValue(String key, T newValue) {
- this.putEnumValue(key, null, newValue, false);
- }
-
- protected <T extends PersistenceXmlEnumValue> void putEnumValue(String key, T newValue, boolean allowDuplicate) {
- this.putEnumValue(key, null, newValue, allowDuplicate);
- }
-
- protected <T extends PersistenceXmlEnumValue> void putEnumValue(String key, String keySuffix, T newValue, boolean allowDuplicate) {
- this.putPersistenceUnitProperty(key, keySuffix, getPropertyStringValueOf(newValue), allowDuplicate);
- }
-
- // ****** get/set CompositeValue convenience methods *******
- /**
- * Returns the String values of the given Property from the PersistenceXml.
- */
- protected List<String> getCompositeValue(String persistenceUnitKey) {
- String values = this.getStringValue(persistenceUnitKey);
- return this.extractCompositeValue(values);
- }
-
- /**
- * Put into persistenceUnit properties. If the property already exists,
- * it appends the given value at the end of the property value.
- *
- * @param key
- * @param valueToAppend
- */
- protected void putPropertyCompositeValue(String key, String valueToAppend) {
- String persistenceUnitKey = this.persistenceUnitKeyOf(key);
-
- String persistenceUnitValue = this.buildCompositeValue(
- this.getStringValue(persistenceUnitKey), valueToAppend);
-
- this.putPersistenceUnitProperty(persistenceUnitKey, null, persistenceUnitValue, false);
- }
-
- /**
- * Removes a value from a property with composite values.
- * If the resulting value is empty, the property is removed from the persistenceUnit.
- *
- * @param key -
- * property name
- * @param valueToRemove -
- * value to remove from the property
- */
- protected void removePropertyCompositeValue(String key, String valueToRemove) {
- String persistenceUnitKey = this.persistenceUnitKeyOf(key);
-
- String persistenceUnitValue = this.removeValueFrom(
- this.getStringValue(persistenceUnitKey), valueToRemove.trim());
-
- this.putPersistenceUnitProperty(persistenceUnitKey, null, persistenceUnitValue, false);
- }
-
- /**
- * Returns the enum constant of the specified enum type with the specified
- * Property string value.
- */
- protected <T extends PersistenceXmlEnumValue> T getEnumValueOf(String puStringValue, T[] enumValues) {
- for (T enumValue : enumValues) {
- if (getPropertyStringValueOf(enumValue).equals(puStringValue)) {
- return enumValue;
- }
- }
- return null;
- }
-
- /**
- * Returns the Property string value of the given property value.
- */
- protected String getPropertyStringValueOf(PersistenceXmlEnumValue value) {
- if (value == null) {
- return null;
- }
- return value.getPropertyValue();
- }
-
- /**
- * Returns the Property string value of the given property value.
- */
- protected String getPropertyStringValueOf(Boolean value) {
- if (value == null) {
- return null;
- }
- return value.toString();
- }
-
- /**
- * Returns the Property string value of the given property value.
- */
- protected String getPropertyStringValueOf(Integer value) {
- if (value == null) {
- return null;
- }
- return value.toString();
- }
-
- // ********** internal methods **********
-
- private Map<String, String> propertyNames() {
- return this.propertyNames;
- }
-
- private void putPersistenceUnitProperty(String key, String keySuffix, String stringValue, boolean allowDuplicates) {
- String persistenceUnitKey = (keySuffix == null) ? key : key + keySuffix;
- this.getPersistenceUnit().setProperty(persistenceUnitKey, stringValue, allowDuplicates);
- }
-
- private String buildCompositeValue(String value, String valueToAppend) {
- if((StringTools.stringIsEmpty(valueToAppend)) ) {
- return value;
- }
- return (StringTools.stringIsEmpty(value)) ?
- valueToAppend :
- (value + PROPERTY_VALUE_DELIMITER + valueToAppend);
- }
-
- protected List<String> extractCompositeValue(String compositeValue) {
- if(StringTools.stringIsEmpty(compositeValue)) {
- return new ArrayList<String>(0);
- }
- String[] values = compositeValue.split(PROPERTY_VALUE_DELIMITER);
- List<String> results = new ArrayList<String>(values.length);
- for(String value : values) {
- results.add(value.trim());
- }
- return results;
- }
-
- private String removeValueFrom(String compositeValue, String valueToRemove) {
- if((StringTools.stringIsEmpty(valueToRemove))) {
- return compositeValue;
- }
- String[] values = compositeValue.split(PROPERTY_VALUE_DELIMITER);
- ArrayList<String> results = new ArrayList<String>(values.length);
-
- for(String value : values) {
- if(value.trim().equals(valueToRemove)) {
- continue;
- }
- results.add(value);
- }
- if(results.isEmpty()) {
- return null;
- }
- StringBuilder sb = new StringBuilder(values.length);
- for(String value : results) {
- sb.append(value).append(PROPERTY_VALUE_DELIMITER);
- }
- sb.deleteCharAt(sb.length() - 1); // remove the last delimiter
- return sb.toString();
- }
-
-
- // ********** refactoring ************
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return EmptyIterable.instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return EmptyIterable.instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java
deleted file mode 100644
index 11431d2f8b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.context.persistence;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.AbstractXmlContextNode;
-
-/**
- * Use this abstract class for context nodes that are part of an
- * <code>orm.xml</code> file.
- * This will not work for a pure {@link org.eclipse.jpt.jpa.core.context.MappingFile}
- * implementation.
- */
-public abstract class AbstractPersistenceXmlContextNode
- extends AbstractXmlContextNode
-{
- // ********** constructor **********
-
- protected AbstractPersistenceXmlContextNode(JpaContextNode parent) {
- super(parent);
- }
-
-
- // ********** convenience methods **********
-
- protected PersistenceXmlDefinition getPersistenceXmlDefinition() {
- return (PersistenceXmlDefinition) this.getJpaPlatform().getResourceDefinition(this.getResourceType());
- }
-
- protected EFactory getResourceNodeFactory() {
- return this.getPersistenceXmlDefinition().getResourceNodeFactory();
- }
-
- protected PersistenceXmlContextNodeFactory getContextNodeFactory() {
- return this.getPersistenceXmlDefinition().getContextNodeFactory();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java
deleted file mode 100644
index 46e333c58d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.context.persistence;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.java.JarFile;
-import org.eclipse.jpt.jpa.core.context.persistence.ClassRef;
-import org.eclipse.jpt.jpa.core.context.persistence.JarFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJarFile;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericClassRef;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericJarFileRef;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericMappingFileRef;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistence;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceUnitProperty;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.ImpliedMappingFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-
-public abstract class AbstractPersistenceXmlContextNodeFactory implements PersistenceXmlContextNodeFactory
-{
-
- public Persistence buildPersistence(PersistenceXml parent, XmlPersistence xmlPersistence) {
- return new GenericPersistence(parent, xmlPersistence);
- }
-
- public PersistenceUnit buildPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) {
- return new GenericPersistenceUnit(parent, xmlPersistenceUnit);
- }
-
- public MappingFileRef buildMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef) {
- return new GenericMappingFileRef(parent, xmlMappingFileRef);
- }
-
- public MappingFileRef buildImpliedMappingFileRef(PersistenceUnit parent) {
- return new ImpliedMappingFileRef(parent, JptJpaCorePlugin.DEFAULT_ORM_XML_RUNTIME_PATH.toString());
- }
-
- public ClassRef buildClassRef(PersistenceUnit parent, XmlJavaClassRef classRef) {
- return new GenericClassRef(parent, classRef);
- }
-
- public ClassRef buildClassRef(PersistenceUnit parent, String className) {
- return new GenericClassRef(parent, className);
- }
-
- public JarFileRef buildJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef) {
- return new GenericJarFileRef(parent, xmlJarFileRef);
- }
-
- public JarFile buildJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot) {
- return new GenericJarFile(parent, jarResourcePackageFragmentRoot);
- }
-
- public PersistenceUnit.Property buildProperty(PersistenceUnit parent, XmlProperty xmlProperty) {
- return new GenericPersistenceUnitProperty(parent, xmlProperty);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java
deleted file mode 100644
index 712ef7e546..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlDefinition;
-
-/**
- * All the state in the definition should be "static"
- * (i.e. unchanging once it is initialized).
- */
-public abstract class AbstractPersistenceXmlDefinition
- implements PersistenceXmlDefinition
-{
- private final PersistenceXmlContextNodeFactory factory;
-
-
- /**
- * zero-argument constructor
- */
- protected AbstractPersistenceXmlDefinition() {
- super();
- this.factory = this.buildContextNodeFactory();
- }
-
- protected abstract PersistenceXmlContextNodeFactory buildContextNodeFactory();
-
- public PersistenceXmlContextNodeFactory getContextNodeFactory() {
- return this.factory;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java
deleted file mode 100644
index 3f329ec9bd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.connection.NullConnection2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.options.NullOptions2_0;
-
-
-public class GenericPersistenceXmlContextNodeFactory extends AbstractPersistenceXmlContextNodeFactory
-{
-
- public PersistenceUnitProperties buildConnection(PersistenceUnit parent) {
- return new NullConnection2_0(parent);
- }
-
- public PersistenceUnitProperties buildOptions(PersistenceUnit parent) {
- return new NullOptions2_0(parent);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/FacetTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/FacetTools.java
deleted file mode 100644
index a34318fd10..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/FacetTools.java
+++ /dev/null
@@ -1,39 +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.jpa.core.internal.facet;
-
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
-import org.eclipse.wst.common.project.facet.core.IGroup;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public class FacetTools {
-
- public static IGroup MODULES_GROUP = ProjectFacetsManager.getGroup("modules"); //$NON-NLS-1$
-
-
- public static boolean hasModuleFacet(IFacetedProjectBase fproj) {
- for (IProjectFacetVersion fv : fproj.getProjectFacets()) {
- if (MODULES_GROUP.getMembers().contains(fv)) {
- return true;
- }
- }
- return false;
- }
-
- public static IProjectFacetVersion getModuleFacet(IFacetedProjectBase fproj) {
- for (IProjectFacetVersion fv : fproj.getProjectFacets()) {
- if (MODULES_GROUP.getMembers().contains(fv)) {
- return fv;
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetActionDelegate.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetActionDelegate.java
deleted file mode 100644
index 69485c5d54..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetActionDelegate.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * Performs things common to install, version change
- */
-public abstract class JpaFacetActionDelegate
- implements IDelegate, JpaFacetDataModelProperties
-{
- public final void execute(
- IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException {
-
- this.execute_(project, fv, config, monitor);
- }
-
- protected void execute_(
- IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException {
-
- SubMonitor subMonitor = SubMonitor.convert(monitor, 7);
-
- IDataModel dataModel = (IDataModel) config;
-
- // project settings
- JpaPlatformDescription platform = (JpaPlatformDescription) dataModel.getProperty(PLATFORM);
- JptJpaCorePlugin.setJpaPlatformId(project, platform.getId());
- subMonitor.worked(1);
-
- // do NOT use IDataModel.getStringProperty(String) - or the connection profile name can
- // be set to an empty string - we want it to be null
- JptJpaCorePlugin.setConnectionProfileName(project, (String) dataModel.getProperty(CONNECTION));
- subMonitor.worked(1);
-
- if (dataModel.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
- JptJpaCorePlugin.setUserOverrideDefaultCatalog(project, dataModel.getStringProperty(USER_OVERRIDE_DEFAULT_CATALOG));
- }
- subMonitor.worked(1);
-
- if (dataModel.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
- JptJpaCorePlugin.setUserOverrideDefaultSchema(project, dataModel.getStringProperty(USER_OVERRIDE_DEFAULT_SCHEMA));
- }
- subMonitor.worked(1);
-
- JptJpaCorePlugin.setDiscoverAnnotatedClasses(project, dataModel.getBooleanProperty(DISCOVER_ANNOTATED_CLASSES));
- subMonitor.worked(1);
-
- // defaults settings
- JptJpaCorePlugin.setDefaultJpaPlatformId(fv.getVersionString(), platform.getId());
- subMonitor.worked(1);
-
- //Delegate to LibraryInstallDelegate to configure the project classpath
- ((LibraryInstallDelegate) dataModel.getProperty(JpaFacetDataModelProperties.LIBRARY_PROVIDER_DELEGATE)).execute(subMonitor.newChild(1));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java
deleted file mode 100644
index 9b3c1b5b0a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
-
-public interface JpaFacetDataModelProperties
- extends IDataModelProperties
-{
- String PREFIX = "JpaFacetDataModelProperties";
- String PREFIX_ = PREFIX + '.';
-
- /**
- * Internal, type IRuntime, identifies runtime associated with project
- * Used only in conjunction with validation of other properties, because this information
- * is otherwise inaccessible to this data model
- */
- String RUNTIME = PREFIX_ + "RUNTIME";
-
- /**
- * Required, type JpaPlatformDescription, identifies Jpa Platform
- */
- String PLATFORM = PREFIX_ + "PLATFORM";
-
- /**
- * Required, type LibraryInstallDelegate, the library install delegate used to configure JPA provider library
- */
- String LIBRARY_PROVIDER_DELEGATE = PREFIX_ + "LIBRARY_PROVIDER_DELEGATE";
-
- /**
- * Not required, type String, identifies database connection
- */
- String CONNECTION = PREFIX_ + "CONNECTION";
-
- /**
- * Required, type Boolean, identifies whether database connection is active
- */
- String CONNECTION_ACTIVE = PREFIX_ + "CONNECTION_ACTIVE";
-
- /**
- * Required, type Boolean, identifies if the user wishes to override default Catalog name
- */
- String USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG = PREFIX_ + "USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG";
-
- /**
- * Not required, type String, identifies the user overridden default Catalog name
- */
- String USER_OVERRIDE_DEFAULT_CATALOG = PREFIX_ + "USER_OVERRIDE_DEFAULT_CATALOG";
-
- /**
- * Required, type Boolean, identifies if the user wishes to override default schema name
- */
- String USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA = PREFIX_ + "USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA";
-
- /**
- * Not required, type String, identifies the user overridden default schema name
- */
- String USER_OVERRIDE_DEFAULT_SCHEMA = PREFIX_ + "USER_OVERRIDE_DEFAULT_SCHEMA";
-
- /**
- * Required, type boolean, opposite of LIST_ANNOTATED_CLASSES, identifies
- * whether all annotated classes are to be automatically included as part of
- * all persistence units
- */
- String DISCOVER_ANNOTATED_CLASSES = PREFIX_ + "DISCOVER_ANNOTATED_CLASSES";
-
- /**
- * Required, type boolean, opposite of DISCOVER_ANNOTATED_CLASSES, identifies
- * if annotated classes should be listed in the persistence.xml in order to
- * be considered part of a persistence unit
- * (This additional setting is necessary in order to use synchHelper within
- * the wizard - there must be a unique property for each radio button. Stupid
- * but true)
- */
- String LIST_ANNOTATED_CLASSES = PREFIX_ + "LIST_ANNOTATED_CLASSES";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java
deleted file mode 100644
index 9c20df0ae4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java
+++ /dev/null
@@ -1,747 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.facet;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.jpt.jpa.core.libprov.JpaLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.ConnectionProfile;
-import org.eclipse.jpt.jpa.db.ConnectionProfileFactory;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.DatabaseIdentifierAdapter;
-import org.eclipse.jpt.jpa.db.JptJpaDbPlugin;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
-import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-public abstract class JpaFacetDataModelProvider
- extends FacetInstallDataModelProvider
- implements JpaFacetDataModelProperties
-{
- protected static final String EJB_FACET_ID = IModuleConstants.JST_EJB_MODULE;
-
- protected static final IStatus PLATFORM_NOT_SPECIFIED_STATUS =
- buildErrorStatus(JptCoreMessages.VALIDATE_PLATFORM_NOT_SPECIFIED);
-
- protected static final IStatus CONNECTION_NOT_CONNECTED_STATUS =
- buildInfoStatus(JptCoreMessages.VALIDATE_CONNECTION_NOT_CONNECTED);
-
- protected static final IStatus USER_OVERRIDE_DEFAULT_CATALOG_NOT_SPECIFIED_STATUS =
- buildErrorStatus(JptCoreMessages.VALIDATE_DEFAULT_CATALOG_NOT_SPECIFIED);
-
- protected static final IStatus USER_OVERRIDE_DEFAULT_SCHEMA_NOT_SPECIFIED_STATUS =
- buildErrorStatus(JptCoreMessages.VALIDATE_DEFAULT_SCHEMA_NOT_SPECIFIED);
-
-
- private LibraryInstallDelegate defaultLibraryProvider;
-
- private IPropertyChangeListener libraryProviderListener;
-
- /** cache the connection profile - change it whenever the user selects a different name */
- private ConnectionProfile connectionProfile;
-
-
- /**
- * required default constructor
- */
- protected JpaFacetDataModelProvider() {
- super();
- }
-
-
- @Override
- public Set<String> getPropertyNames() {
- @SuppressWarnings("unchecked") Set<String> propertyNames = super.getPropertyNames();
- propertyNames.add(RUNTIME);
- propertyNames.add(PLATFORM);
- propertyNames.add(LIBRARY_PROVIDER_DELEGATE);
- propertyNames.add(CONNECTION);
- propertyNames.add(CONNECTION_ACTIVE);
- propertyNames.add(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG);
- propertyNames.add(USER_OVERRIDE_DEFAULT_CATALOG);
- propertyNames.add(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA);
- propertyNames.add(USER_OVERRIDE_DEFAULT_SCHEMA);
- propertyNames.add(DISCOVER_ANNOTATED_CLASSES);
- propertyNames.add(LIST_ANNOTATED_CLASSES);
- return propertyNames;
- }
-
-
- // ********** properties **********
-
- protected IFacetedProjectWorkingCopy getFacetedProjectWorkingCopy() {
- return (IFacetedProjectWorkingCopy) this.getProperty(FACETED_PROJECT_WORKING_COPY);
- }
-
- protected IProjectFacetVersion getProjectFacetVersion() {
- return (IProjectFacetVersion) this.getProperty(FACET_VERSION);
- }
-
- protected IRuntime getRuntime() {
- return (IRuntime) this.getProperty(RUNTIME);
- }
-
- protected JpaPlatformDescription getPlatform() {
- return (JpaPlatformDescription) getProperty(PLATFORM);
- }
-
- protected LibraryInstallDelegate getLibraryInstallDelegate() {
- return (LibraryInstallDelegate) this.getProperty(LIBRARY_PROVIDER_DELEGATE);
- }
-
- protected String getConnectionName() {
- return (String) this.getProperty(CONNECTION);
- }
-
- protected boolean userWantsToOverrideDefaultCatalog() {
- return this.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG);
- }
-
- protected String getUserOverrideDefaultCatalog() {
- return (String) this.getProperty(USER_OVERRIDE_DEFAULT_CATALOG);
- }
-
- protected boolean userWantsToOverrideDefaultSchema() {
- return this.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA);
- }
-
- protected String getUserOverrideDefaultSchema() {
- return (String) this.getProperty(USER_OVERRIDE_DEFAULT_SCHEMA);
- }
-
- protected boolean discoverAnnotatedClasses() {
- return this.getBooleanProperty(DISCOVER_ANNOTATED_CLASSES);
- }
-
-
- // ********** enabled **********
-
- @Override
- public boolean isPropertyEnabled(String propertyName) {
- if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
- return this.connectionIsActive() && this.databaseSupportsCatalogs();
- }
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
- return this.userWantsToOverrideDefaultCatalog();
- }
- if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
- return this.connectionIsActive();
- }
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
- return this.userWantsToOverrideDefaultSchema();
- }
-
- return super.isPropertyEnabled(propertyName);
- }
-
-
- // ********** defaults **********
-
- @Override
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(FACET_ID)) {
- return JpaFacet.ID;
- }
- if (propertyName.equals(RUNTIME)) {
- return null;
- }
- if (propertyName.equals(PLATFORM)) {
- return getDefaultPlatform();
- }
- if (propertyName.equals(LIBRARY_PROVIDER_DELEGATE)) {
- return getDefaultLibraryProvider();
- }
- if (propertyName.equals(CONNECTION)) {
- return getDefaultConnection();
- }
- if (propertyName.equals(CONNECTION_ACTIVE)) {
- return Boolean.valueOf(this.connectionIsActive());
- }
- if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
- return getDefaultUserWantsToOverrideDefaultCatalog();
- }
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
- return getDefaultCatalogIdentifier();
- }
- if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
- return getDefaultUserWantsToOverrideDefaultSchema();
- }
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
- return getDefaultSchemaIdentifier();
- }
- if (propertyName.equals(DISCOVER_ANNOTATED_CLASSES)) {
- return getDefaultDiscoverAnnotatedClasses();
- }
- if (propertyName.equals(LIST_ANNOTATED_CLASSES)) {
- return getDefaultListAnnotatedClasses();
- }
-
- return super.getDefaultProperty(propertyName);
- }
-
- protected abstract JpaPlatformDescription getDefaultPlatform();
-
- protected LibraryInstallDelegate getDefaultLibraryProvider() {
- // delegate itself changes only when facet version changes
- if (this.defaultLibraryProvider == null) {
- this.defaultLibraryProvider = buildDefaultLibraryProvider();
- }
- else if (! this.defaultLibraryProvider.getProjectFacetVersion().equals(getProjectFacetVersion())) {
- this.defaultLibraryProvider.removeListener(this.libraryProviderListener);
- this.defaultLibraryProvider.dispose();
- this.defaultLibraryProvider = buildDefaultLibraryProvider();
- }
- return defaultLibraryProvider;
- }
-
- protected LibraryInstallDelegate buildDefaultLibraryProvider() {
- IFacetedProjectWorkingCopy fpjwc = this.getFacetedProjectWorkingCopy();
- if (fpjwc == null) {
- return null;
- }
- IProjectFacetVersion pfv = this.getProjectFacetVersion();
- if (pfv == null) {
- return null;
- }
-
- Map<String, Object> customEnablementVariables = new HashMap<String, Object>();
- JpaPlatformDescription jpaPlatform = getPlatform();
- String jpaPlatformId = (jpaPlatform == null) ? "" : jpaPlatform.getId();
- customEnablementVariables.put(
- JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_ENABLEMENT_EXP, jpaPlatformId);
- customEnablementVariables.put(
- JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_DESCRIPTION_ENABLEMENT_EXP, jpaPlatform);
-
- LibraryInstallDelegate lp = new LibraryInstallDelegate(fpjwc, pfv, customEnablementVariables);
- this.libraryProviderListener = buildLibraryProviderListener();
- lp.addListener(this.libraryProviderListener);
- return lp;
- }
-
- protected IPropertyChangeListener buildLibraryProviderListener() {
- return new IPropertyChangeListener() {
- public void propertyChanged(String property, Object oldValue, Object newValue ) {
- if (LibraryInstallDelegate.PROP_AVAILABLE_PROVIDERS.equals(property)) {
- adjustLibraryProviders();
- }
- JpaFacetDataModelProvider.this.getDataModel().notifyPropertyChange(
- LIBRARY_PROVIDER_DELEGATE, IDataModel.VALUE_CHG);
- }
- };
- }
-
- protected abstract String getDefaultConnection();
-
- protected abstract Boolean getDefaultUserWantsToOverrideDefaultCatalog();
-
- protected abstract String getDefaultCatalogIdentifier();
-
- protected abstract Boolean getDefaultUserWantsToOverrideDefaultSchema();
-
- protected abstract String getDefaultSchemaIdentifier();
-
- protected abstract Boolean getDefaultDiscoverAnnotatedClasses();
-
- protected Boolean getDefaultListAnnotatedClasses() {
- return Boolean.valueOf( ! this.discoverAnnotatedClasses());
- }
-
- protected boolean runtimeSupportsEjb30() {
- IRuntime runtime = this.getRuntime();
- return (runtime != null) && runtime.supports(this.getEJB30());
- }
-
- protected IProjectFacetVersion getEJB30() {
- return ProjectFacetsManager.getProjectFacet(EJB_FACET_ID).getVersion("3.0"); //$NON-NLS-1$
- }
-
-
- // ********** synchronize data model **********
-
- /**
- * The specified property's value has changed to the specified value.
- * Return whether to fire a VALUE_CHG DataModelEvent.
- */
- @Override
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean ok = super.propertySet(propertyName, propertyValue);
-
- if (propertyName.equals(FACETED_PROJECT_WORKING_COPY)) {
- //no-op
- }
- else if (propertyName.equals(FACET_VERSION)) {
- adjustLibraryProviders();
- this.model.notifyPropertyChange(PLATFORM, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(LIBRARY_PROVIDER_DELEGATE, IDataModel.DEFAULT_CHG);
- }
- else if (propertyName.equals(RUNTIME)) {
- LibraryInstallDelegate lid = this.getLibraryInstallDelegate();
- if (lid != null) {
- // may be null while model is being built up
- // ... or in tests
- lid.refresh();
- }
- this.model.notifyPropertyChange(DISCOVER_ANNOTATED_CLASSES, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(LIST_ANNOTATED_CLASSES, IDataModel.DEFAULT_CHG);
- }
- else if (propertyName.equals(PLATFORM)) {
- adjustLibraryProviders();
- }
- else if (propertyName.equals(CONNECTION)) {
- this.setBooleanProperty(CONNECTION_ACTIVE, this.connectionIsActive());
-
- // JpaFacetWizardPage sets the connection when the user adds a new connection
- // implying that there is a new set of valid connections to choose from
- this.model.notifyPropertyChange(CONNECTION, IDataModel.VALID_VALUES_CHG);
-
- // catalog
- if ((propertyValue != null) && this.databaseSupportsCatalogs()) { // connection set to something that supports catalogs
- this.setProperty(USER_OVERRIDE_DEFAULT_CATALOG, this.getDefaultCatalogIdentifier());
- } else { // connection either '<None>' or non-catalog database
- this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, false);
- }
- this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, IDataModel.ENABLE_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.VALID_VALUES_CHG);
-
- // schema
- if (propertyValue == null) { // connection set to '<None>'
- this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, false);
- } else {
- this.setProperty(USER_OVERRIDE_DEFAULT_SCHEMA, this.getDefaultSchemaIdentifier());
- }
- this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, IDataModel.ENABLE_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.VALID_VALUES_CHG);
- }
- else if (propertyName.equals(CONNECTION_ACTIVE)) {
- // catalog
- if (this.propertyValueIsFalse(propertyValue)) { // connection is inactive
- this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, false);
- }
- this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, IDataModel.ENABLE_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.VALID_VALUES_CHG);
-
- // schema
- if (this.propertyValueIsFalse(propertyValue)) { // connection is inactive
- this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, false);
- }
- this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, IDataModel.ENABLE_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.VALID_VALUES_CHG);
- }
- else if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.ENABLE_CHG);
- if (this.propertyValueIsFalse(propertyValue)) {
- this.setProperty(USER_OVERRIDE_DEFAULT_CATALOG, null);
- }
- }
- else if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
- this.setProperty(USER_OVERRIDE_DEFAULT_SCHEMA, this.getDefaultSchemaIdentifier());
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.VALID_VALUES_CHG);
- }
- else if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
- this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.ENABLE_CHG);
- if (this.propertyValueIsFalse(propertyValue)) {
- this.setProperty(USER_OVERRIDE_DEFAULT_SCHEMA, null);
- }
- }
- else if (propertyName.equals(DISCOVER_ANNOTATED_CLASSES)) {
- this.setBooleanProperty(LIST_ANNOTATED_CLASSES, this.propertyValueIsFalse(propertyValue));
- }
- else if (propertyName.equals(LIST_ANNOTATED_CLASSES)) {
- this.setBooleanProperty(DISCOVER_ANNOTATED_CLASSES, this.propertyValueIsFalse(propertyValue));
- }
- return ok;
- }
-
- protected boolean propertyValueIsFalse(Object propertyValue) {
- return ! this.propertyValueIsTrue(propertyValue);
- }
-
- protected boolean propertyValueIsTrue(Object propertyValue) {
- return ((Boolean) propertyValue).booleanValue();
- }
-
- protected void adjustLibraryProviders() {
- LibraryInstallDelegate lid = this.getLibraryInstallDelegate();
-
- if (lid != null) {
- JpaPlatformDescription jpaPlatform = getPlatform();
- String jpaPlatformId = (jpaPlatform == null) ? "" : jpaPlatform.getId();
-
- lid.setEnablementContextVariable(
- JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_ENABLEMENT_EXP, jpaPlatformId);
- lid.setEnablementContextVariable(
- JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_DESCRIPTION_ENABLEMENT_EXP, jpaPlatform);
-
- List<JpaLibraryProviderInstallOperationConfig> jpaConfigs
- = new ArrayList<JpaLibraryProviderInstallOperationConfig>();
- // add the currently selected one first
- JpaLibraryProviderInstallOperationConfig currentJpaConfig = null;
- LibraryProviderOperationConfig config = lid.getLibraryProviderOperationConfig();
- if (config instanceof JpaLibraryProviderInstallOperationConfig) {
- currentJpaConfig = (JpaLibraryProviderInstallOperationConfig) config;
- jpaConfigs.add(currentJpaConfig);
- }
- for (ILibraryProvider lp : lid.getLibraryProviders()) {
- config = lid.getLibraryProviderOperationConfig(lp);
- if (config instanceof JpaLibraryProviderInstallOperationConfig
- && ! config.equals(currentJpaConfig)) {
- jpaConfigs.add((JpaLibraryProviderInstallOperationConfig) config);
- }
- }
- for (JpaLibraryProviderInstallOperationConfig jpaConfig : jpaConfigs) {
- jpaConfig.setJpaPlatform(getPlatform());
- }
- }
- }
-
-
- // ********** property descriptors **********
-
- @Override
- public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
- if (propertyName.equals(PLATFORM)) {
- return this.buildValidPlatformDescriptors();
- }
- if (propertyName.equals(CONNECTION)) {
- return this.buildValidConnectionDescriptors();
- }
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
- return this.buildValidCatalogDescriptors();
- }
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
- return this.buildValidSchemaDescriptors();
- }
-
- return super.getValidPropertyDescriptors(propertyName);
- }
-
- protected DataModelPropertyDescriptor[] buildValidPlatformDescriptors() {
- Iterable<JpaPlatformDescription> validPlatformDescriptions = buildValidPlatformDescriptions();
- Iterable<DataModelPropertyDescriptor> validPlatformDescriptors =
- new TransformationIterable<JpaPlatformDescription, DataModelPropertyDescriptor>(validPlatformDescriptions) {
- @Override
- protected DataModelPropertyDescriptor transform(JpaPlatformDescription desc) {
- return buildPlatformDescriptor(desc);
- }
- };
- return ArrayTools.sort(ArrayTools.array(validPlatformDescriptors, EMPTY_DMPD_ARRAY), DESCRIPTOR_COMPARATOR);
- }
-
- protected Iterable<JpaPlatformDescription> buildValidPlatformDescriptions() {
- return new FilteringIterable<JpaPlatformDescription>(
- JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatforms()) {
- @Override
- protected boolean accept(JpaPlatformDescription o) {
- return o.supportsJpaFacetVersion(getProjectFacetVersion());
- }
- };
- }
-
- protected static final Comparator<DataModelPropertyDescriptor> DESCRIPTOR_COMPARATOR =
- new Comparator<DataModelPropertyDescriptor>() {
- public int compare(DataModelPropertyDescriptor dmpd1, DataModelPropertyDescriptor dmpd2) {
- return dmpd1.getPropertyDescription().compareTo(dmpd2.getPropertyDescription());
- }
- };
-
- protected DataModelPropertyDescriptor[] buildValidConnectionDescriptors() {
- List<String> connectionNames = this.buildValidConnectionNames();
- DataModelPropertyDescriptor[] descriptors = new DataModelPropertyDescriptor[connectionNames.size()];
- for (int i = 0; i < descriptors.length; i++) {
- descriptors[i] = this.buildConnectionDescriptor(connectionNames.get(i));
- }
- return descriptors;
- }
-
- /**
- * put a null entry at the top of the list (for <none>)
- */
- protected List<String> buildValidConnectionNames() {
- List<String> connectionNames = CollectionTools.sort(CollectionTools.list(this.getConnectionProfileNames()));
- connectionNames.add(0, null);
- return connectionNames;
- }
-
- protected DataModelPropertyDescriptor[] buildValidCatalogDescriptors() {
- Database db = this.getDatabase();
- return (db == null) ? EMPTY_DMPD_ARRAY : this.buildDescriptors(this.buildValidCatalogIdentifiers(db));
- }
-
- /**
- * pre-condition: 'db' is not null
- */
- protected List<String> buildValidCatalogIdentifiers(Database db) {
- // use catalog *identifiers* since the string ends up being the "default" for various text entries
- return this.buildValidStrings(db.getSortedCatalogIdentifiers(), this.getDefaultCatalogIdentifier());
- }
-
- protected DataModelPropertyDescriptor[] buildValidSchemaDescriptors() {
- Database db = this.getDatabase();
- return (db == null) ? EMPTY_DMPD_ARRAY : this.buildDescriptors(this.buildValidSchemaIdentifiers());
- }
-
- protected List<String> buildValidSchemaIdentifiers() {
- return this.buildValidStrings(this.getSchemaIdentifiers(), this.getDefaultSchemaIdentifier());
- }
-
- protected Iterable<String> getSchemaIdentifiers() {
- SchemaContainer sc = this.getSchemaContainer();
- // use schema *identifiers* since the string ends up being the "default" for various text entries
- return (sc != null) ? sc.getSortedSchemaIdentifiers() : EmptyIterable.<String>instance();
- }
-
- /**
- * put an entry for the default at the top of the list
- */
- protected List<String> buildValidStrings(Iterable<String> strings, String defaultString) {
- List<String> validStrings = CollectionTools.list(strings);
- if ((defaultString != null) && ! validStrings.contains(defaultString)) {
- validStrings.add(0, defaultString);
- }
- return validStrings;
- }
-
- protected DataModelPropertyDescriptor[] buildDescriptors(List<String> strings) {
- DataModelPropertyDescriptor[] descriptors = new DataModelPropertyDescriptor[strings.size()];
- for (int i = 0; i < descriptors.length; i++) {
- descriptors[i] = new DataModelPropertyDescriptor(strings.get(i));
- }
- return descriptors;
- }
-
- protected static final DataModelPropertyDescriptor[] EMPTY_DMPD_ARRAY = new DataModelPropertyDescriptor[0];
-
- /**
- * platform and connection have 'description's (in addition to 'value's)
- */
- @Override
- public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
- if (propertyName.equals(PLATFORM)) {
- return buildPlatformDescriptor(this.getPlatform());
- }
- if (propertyName.equals(CONNECTION)) {
- return buildConnectionDescriptor(this.getConnectionName());
- }
- return super.getPropertyDescriptor(propertyName);
- }
-
- protected DataModelPropertyDescriptor buildPlatformDescriptor(JpaPlatformDescription platform) {
- return new DataModelPropertyDescriptor(platform, platform.getLabel());
- }
-
- protected String getPlatformLabel(String platformId) {
- return JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatform(platformId).getLabel();
- }
-
- protected DataModelPropertyDescriptor buildConnectionDescriptor(String connectionName) {
- String description = (connectionName == null) ? JptCoreMessages.NONE : null;
- return new DataModelPropertyDescriptor(connectionName, description);
- }
-
-
- // ********** database **********
-
- protected SchemaContainer getSchemaContainer() {
- return this.databaseSupportsCatalogs() ? this.getCatalog() : this.getDatabase();
- }
-
- protected Catalog getCatalog() {
- String name = this.getUserOverrideDefaultCatalog();
- return (name == null) ? null : this.getCatalog(name);
- }
-
- /**
- * pre-condition: 'name' is not null
- */
- protected Catalog getCatalog(String name) {
- Database db = this.getDatabase();
- return (db == null) ? null : db.getCatalogForIdentifier(name);
- }
-
- protected boolean databaseSupportsCatalogs() {
- Database db = this.getDatabase();
- return (db != null) && db.supportsCatalogs();
- }
-
- protected Database getDatabase() {
- ConnectionProfile cp = this.getConnectionProfile();
- return (cp == null) ? null : cp.getDatabase();
- }
-
- protected boolean connectionIsActive() {
- ConnectionProfile cp = this.getConnectionProfile();
- return (cp != null) && cp.isActive();
- }
-
- protected ConnectionProfile getConnectionProfile() {
- String name = this.getConnectionName();
- return (name == null) ? null : this.getConnectionProfile(name);
- }
-
- /**
- * pre-condition: 'name' is not null
- */
- protected ConnectionProfile getConnectionProfile(String name) {
- if (this.cachedConnectionProfileIsStale(name)) {
- this.connectionProfile = this.buildConnectionProfile(name);
- }
- return this.connectionProfile;
- }
-
- protected boolean cachedConnectionProfileIsStale(String name) {
- return (this.connectionProfile == null) || ! this.connectionProfile.getName().equals(name);
- }
-
- protected ConnectionProfile buildConnectionProfile(String name) {
- return this.getConnectionProfileFactory().buildConnectionProfile(name, DatabaseIdentifierAdapter.Default.instance());
- }
-
- protected Iterable<String> getConnectionProfileNames() {
- return this.getConnectionProfileFactory().getConnectionProfileNames();
- }
-
- protected ConnectionProfileFactory getConnectionProfileFactory() {
- // we don't have a JPA project yet, so go to the db plug-in directly to get the factory
- return JptJpaDbPlugin.getConnectionProfileFactory();
- }
-
-
- // ********** validation **********
-
- @Override
- public IStatus validate(String propertyName) {
- if (propertyName.equals(PLATFORM)) {
- return this.validatePlatform();
- }
- if (propertyName.equals(LIBRARY_PROVIDER_DELEGATE)) {
- return this.getLibraryInstallDelegate().validate();
- }
- if (propertyName.equals(CONNECTION)) {
- return this.validateConnection();
- }
- if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)
- || propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
- return this.validateUserOverrideDefaultCatalog();
- }
- if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)
- || propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
- return this.validateUserOverrideDefaultSchema();
- }
- if (propertyName.equals(DISCOVER_ANNOTATED_CLASSES)) {
- return this.validatePersistentClassManagement();
- }
-
- return super.validate(propertyName);
- }
-
- protected IStatus validatePlatform() {
- return (this.getPlatform() == null) ? PLATFORM_NOT_SPECIFIED_STATUS : OK_STATUS;
- }
-
- protected IStatus validateConnection() {
- String connectionName = this.getConnectionName();
- return (connectionName == null) ? OK_STATUS : this.validateNonNullConnection(connectionName);
- }
-
- protected IStatus validateNonNullConnection(String connectionName) {
- ConnectionProfile cp = this.getConnectionProfile(connectionName);
- if (cp == null) {
- return buildErrorStatus(NLS.bind(JptCoreMessages.VALIDATE_CONNECTION_INVALID, connectionName));
- }
- if ( ! cp.isActive()) {
- return CONNECTION_NOT_CONNECTED_STATUS;
- }
- return OK_STATUS;
- }
-
- protected IStatus validateUserOverrideDefaultCatalog() {
- if (this.userWantsToOverrideDefaultCatalog()) {
- if (this.getUserOverrideDefaultCatalog() == null) {
- return USER_OVERRIDE_DEFAULT_CATALOG_NOT_SPECIFIED_STATUS;
- }
- }
- return OK_STATUS;
- }
-
- protected IStatus validateUserOverrideDefaultSchema() {
- if (this.userWantsToOverrideDefaultSchema()) {
- if (this.getUserOverrideDefaultSchema() == null) {
- return USER_OVERRIDE_DEFAULT_SCHEMA_NOT_SPECIFIED_STATUS;
- }
- }
- return OK_STATUS;
- }
-
- protected IStatus validatePersistentClassManagement() {
- // TODO warning if "discovery" is used, but no runtime specified ??
- // boolean discoverAnnotatedClasses = this.discoverAnnotatedClasses();
- return OK_STATUS;
- }
-
-
- // ********** static methods **********
-
- protected static IStatus buildInfoStatus(String message) {
- return buildStatus(IStatus.INFO, message);
- }
-
-// private static IStatus buildWarningStatus(String message) {
-// return buildStatus(IStatus.WARNING, message);
-// }
-
- protected static IStatus buildErrorStatus(String message) {
- return buildStatus(IStatus.ERROR, message);
- }
-
- protected static IStatus buildStatus(int severity, String message) {
- return new Status(severity, JptJpaCorePlugin.PLUGIN_ID, message);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- this.defaultLibraryProvider.removeListener(this.libraryProviderListener);
- this.defaultLibraryProvider.dispose();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProperties.java
deleted file mode 100644
index a72c4206a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProperties.java
+++ /dev/null
@@ -1,33 +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.jpa.core.internal.facet;
-
-@SuppressWarnings("nls")
-public interface JpaFacetInstallDataModelProperties
- extends JpaFacetDataModelProperties
-{
- String PREFIX = "JpaFacetInstallDataModelProperties";
- String PREFIX_ = PREFIX + '.';
-
- /**
- * Required, type Boolean, identifies if the user wishes to add the database driver jars to the classpath
- */
- String USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH = PREFIX_ + "USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH";
-
- /**
- * Not required, type String, identifies the database driver library added to the classpath
- */
- String DB_DRIVER_NAME = PREFIX_ + "DB_DRIVER_NAME";
-
- /**
- * Required, type boolean, details whether orm.xml should be created
- */
- String CREATE_ORM_XML = PREFIX_ + "CREATE_ORM_XML";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java
deleted file mode 100644
index a70e069003..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.facet;
-
-import java.util.Set;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.db.ConnectionProfile;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class JpaFacetInstallDataModelProvider
- extends JpaFacetDataModelProvider
- implements JpaFacetInstallDataModelProperties
-{
- /**
- * required default constructor
- */
- public JpaFacetInstallDataModelProvider() {
- super();
- }
-
- @Override
- public Set<String> getPropertyNames() {
- Set<String> propertyNames = super.getPropertyNames();
- propertyNames.add(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH);
- propertyNames.add(DB_DRIVER_NAME);
- propertyNames.add(CREATE_ORM_XML);
- return propertyNames;
- }
-
-
- // ********** properties **********
-
- protected boolean userWantsToAddDbDriverJarsToClasspath() {
- return this.getBooleanProperty(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH);
- }
-
- protected String getDriverName() {
- return (String) this.getProperty(DB_DRIVER_NAME);
- }
-
-
- // ********** enabled **********
-
- @Override
- public boolean isPropertyEnabled(String propertyName) {
- if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
- return (this.getConnectionProfile() != null);
- }
- if (propertyName.equals(DB_DRIVER_NAME)) {
- return this.userWantsToAddDbDriverJarsToClasspath();
- }
-
- return super.isPropertyEnabled(propertyName);
- }
-
-
- // ********** defaults **********
-
- @Override
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
- return Boolean.FALSE;
- }
- if (propertyName.equals(DB_DRIVER_NAME)) {
- return this.getDefaultDriverName();
- }
- if (propertyName.equals(CREATE_ORM_XML)) {
- return Boolean.FALSE;
- }
-
- return super.getDefaultProperty(propertyName);
- }
-
- @Override
- protected JpaPlatformDescription getDefaultPlatform() {
- return JptJpaCorePlugin.getDefaultJpaPlatform(getProjectFacetVersion());
- }
-
- @Override
- protected String getDefaultConnection() {
- return null;
- }
-
- @Override
- protected Boolean getDefaultUserWantsToOverrideDefaultCatalog() {
- return Boolean.FALSE;
- }
-
- @Override
- protected String getDefaultCatalogIdentifier() {
- Database db = this.getDatabase();
- return (db == null) ? null : db.getDefaultCatalogIdentifier();
- }
-
- @Override
- protected Boolean getDefaultUserWantsToOverrideDefaultSchema() {
- return Boolean.FALSE;
- }
-
- @Override
- protected String getDefaultSchemaIdentifier() {
- SchemaContainer sc = this.getSchemaContainer();
- return (sc == null) ? null : sc.getDefaultSchemaIdentifier();
- }
-
- protected String getDefaultDriverName() {
- ConnectionProfile cp = this.getConnectionProfile();
- return (cp == null) ? null : cp.getDriverName();
- }
-
- @Override
- protected Boolean getDefaultDiscoverAnnotatedClasses() {
- return Boolean.valueOf(this.runtimeSupportsEjb30());
- }
-
-
- // ********** synchronize data model **********
-
- /**
- * The specified property's value has changed to the specified value.
- * Return whether to fire a VALUE_CHG DataModelEvent.
- */
- @Override
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean ok = super.propertySet(propertyName, propertyValue);
-
- if (propertyName.equals(CONNECTION)) {
- // db driver
- if (propertyValue == null) { // connection set to '<None>'
- this.setBooleanProperty(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH, false);
- }
- this.model.notifyPropertyChange(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH, IDataModel.ENABLE_CHG);
- this.model.notifyPropertyChange(DB_DRIVER_NAME, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(DB_DRIVER_NAME, IDataModel.VALID_VALUES_CHG);
- }
- else if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
- this.model.notifyPropertyChange(DB_DRIVER_NAME, IDataModel.ENABLE_CHG);
- if (this.propertyValueIsFalse(propertyValue)) {
- this.setProperty(DB_DRIVER_NAME, null);
- }
- }
-
- return ok;
- }
-
-
- // ********** property descriptors **********
-
- @Override
- public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
- if (propertyName.equals(PLATFORM)) {
- return this.buildValidPlatformDescriptors();
- }
-
- if (propertyName.equals(CONNECTION)) {
- return this.buildValidConnectionDescriptors();
- }
-
- if (propertyName.equals(DB_DRIVER_NAME)) {
- return this.buildValidDriverDescriptors();
- }
-
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
- return this.buildValidCatalogDescriptors();
- }
-
- if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
- return this.buildValidSchemaDescriptors();
- }
-
- return super.getValidPropertyDescriptors(propertyName);
- }
-
- protected DataModelPropertyDescriptor[] buildValidDriverDescriptors() {
- return new DataModelPropertyDescriptor[] { new DataModelPropertyDescriptor(this.getDriverName()) };
- }
-
-
- // ********** validation **********
-
- @Override
- public IStatus validate(String propertyName) {
- if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)
- || propertyName.equals(DB_DRIVER_NAME)) {
- return this.validateDbDriverName();
- }
-
- return super.validate(propertyName);
- }
-
- protected IStatus validateDbDriverName() {
- return OK_STATUS;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDelegate.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDelegate.java
deleted file mode 100644
index 81073a58a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDelegate.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.facet;
-
-import static org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties.CONTAINER_PATH;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.core.internal.operations.PersistenceFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.db.JptJpaDbPlugin;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.validation.ValidationFramework;
-
-/**
- * We don't really "install" the JPA facet here. We simply store all the various
- * data model properties in the appropriate preferences. These settings will
- * used in the POST_INSTALL event listener to build the JPA project.
- */
-public class JpaFacetInstallDelegate
- extends JpaFacetActionDelegate
- implements JpaFacetInstallDataModelProperties
-{
- @Override
- protected void execute_(
- IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException {
-
- SubMonitor sm = SubMonitor.convert(monitor, 10);
-
- ValidationFramework.getDefault().addValidationBuilder(project);
-
- super.execute_(project, fv, config, sm.newChild(1));
-
- IJavaProject javaProject = JavaCore.create(project);
- IDataModel dataModel = (IDataModel) config;
-
- // project settings
- this.addDbDriverLibraryToClasspath(javaProject, dataModel, sm.newChild(1));
-
- // create project XML files
- this.createProjectXml(project, dataModel.getBooleanProperty(CREATE_ORM_XML), sm.newChild(8));
- }
-
- protected void addDbDriverLibraryToClasspath(
- IJavaProject javaProject, IDataModel dataModel,
- IProgressMonitor monitor) throws CoreException {
-
- if( ! dataModel.getBooleanProperty(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
- return;
- }
- String driverName = dataModel.getStringProperty(DB_DRIVER_NAME);
-
- IClasspathContainer container = JptJpaDbPlugin.instance().buildDriverClasspathContainerFor(driverName);
- IClasspathEntry entry = JavaCore.newContainerEntry(container.getPath());
- this.addClasspathEntryToProject(entry, javaProject, monitor);
- }
-
- private void addClasspathEntryToProject(
- IClasspathEntry classpathEntry, IJavaProject javaProject, IProgressMonitor monitor)
- throws CoreException {
-
- // if the classpathEntry is already there, do nothing
- IClasspathEntry[] classpath = javaProject.getRawClasspath();
- if (ArrayTools.contains(classpath, classpathEntry)) {
- return;
- }
-
- // add the given classpathEntry to the project classpath
- int len = classpath.length;
- IClasspathEntry[] newClasspath = new IClasspathEntry[len + 1];
- System.arraycopy(classpath, 0, newClasspath, 0, len);
- newClasspath[len] = classpathEntry;
- javaProject.setRawClasspath(newClasspath, monitor);
- }
-
- private void createProjectXml(IProject project, boolean buildOrmXml, IProgressMonitor monitor) {
- int tasks = 1 + (buildOrmXml ? 1 : 0);
- SubMonitor sm = SubMonitor.convert(monitor, tasks);
-
- this.createPersistenceXml(project, sm.newChild(1));
- if (buildOrmXml) {
- this.createOrmXml(project, sm.newChild(1));
- }
- }
-
- private void createPersistenceXml(IProject project, IProgressMonitor monitor) {
- SubMonitor sm = SubMonitor.convert(monitor, 5);
-
- IDataModel config = DataModelFactory.createDataModel(new PersistenceFileCreationDataModelProvider());
- config.setProperty(CONTAINER_PATH, defaultResourceLocation(project));
- sm.worked(1);
- // default values for all other properties should suffice
- try {
- config.getDefaultOperation().execute(sm.newChild(4), null);
- } catch (ExecutionException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- private void createOrmXml(IProject project, IProgressMonitor monitor) {
- SubMonitor sm = SubMonitor.convert(monitor, 5);
-
- IDataModel config = DataModelFactory.createDataModel(new OrmFileCreationDataModelProvider());
- config.setProperty(CONTAINER_PATH, defaultResourceLocation(project));
- sm.worked(1);
- // default values for all other properties should suffice
- try {
- config.getDefaultOperation().execute(sm.newChild(4), null);
- } catch (ExecutionException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- protected IPath defaultResourceLocation(IProject project) {
- ProjectResourceLocator resourceLocator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
- if (resourceLocator == null) {
- JptJpaCorePlugin.log("No resource locator for project: " + project); //$NON-NLS-1$
- return null;
- }
- return resourceLocator.getDefaultResourceLocation().getFullPath();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java
deleted file mode 100644
index e269f96989..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.prefs.JpaValidationPreferencesManager;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class JpaFacetUninstallDelegate
- implements IDelegate
-{
- public void execute(IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException {
-
- (new JpaValidationPreferencesManager(project)).clearProjectPreferences();
- JptJpaCorePlugin.clearProjectPersistentProperties(project);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
deleted file mode 100644
index e7540f9fa3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-public class JpaFacetVersionChangeDataModelProvider
- extends JpaFacetDataModelProvider
-{
- protected static final IStatus PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION_STATUS =
- buildErrorStatus(JptCoreMessages.VALIDATE_PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION);
-
-
- /**
- * required default constructor
- */
- public JpaFacetVersionChangeDataModelProvider() {
- super();
- }
-
-
- protected String getProjectName() {
- return getStringProperty(FACET_PROJECT_NAME);
- }
-
- protected JpaProject getJpaProject() {
- try {
- return this.getJpaProjectReference().getValue();
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- return null;
- }
- }
-
- protected JpaProject.Reference getJpaProjectReference() {
- return (JpaProject.Reference) this.getProject().getAdapter(JpaProject.Reference.class);
- }
-
- protected IProject getProject() {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(this.getProjectName());
- }
-
-
- // **************** defaults **********************************************
-
- @Override
- protected JpaPlatformDescription getDefaultPlatform() {
- return getJpaProject().getJpaPlatform().getDescription();
- }
-
- @Override
- protected String getDefaultConnection() {
- return getJpaProject().getDataSource().getConnectionProfileName();
- }
-
- @Override
- protected Boolean getDefaultUserWantsToOverrideDefaultCatalog() {
- return Boolean.valueOf(this.getDefaultUserWantsToOverrideDefaultCatalog_());
- }
-
- protected boolean getDefaultUserWantsToOverrideDefaultCatalog_() {
- return this.getJpaProject().getUserOverrideDefaultCatalog() != null;
- }
-
- @Override
- protected String getDefaultCatalogIdentifier() {
- return getJpaProject().getUserOverrideDefaultCatalog();
- }
-
- @Override
- protected Boolean getDefaultUserWantsToOverrideDefaultSchema() {
- return Boolean.valueOf(this.getDefaultUserWantsToOverrideDefaultSchema_());
- }
-
- protected boolean getDefaultUserWantsToOverrideDefaultSchema_() {
- return this.getJpaProject().getUserOverrideDefaultSchema() != null;
- }
-
- @Override
- protected String getDefaultSchemaIdentifier() {
- return getJpaProject().getDefaultSchema();
- }
-
- @Override
- protected Boolean getDefaultDiscoverAnnotatedClasses() {
- return Boolean.valueOf(this.getDefaultDiscoverAnnotatedClasses_());
- }
-
- protected boolean getDefaultDiscoverAnnotatedClasses_() {
- return getJpaProject().discoversAnnotatedClasses();
- }
-
-
- // **************** valid property descriptors ****************************
-
- @Override
- protected Iterable<JpaPlatformDescription> buildValidPlatformDescriptions() {
- // add existing platform to list of choices
- Iterable<JpaPlatformDescription> validPlatformDescs = super.buildValidPlatformDescriptions();
- if (! CollectionTools.contains(validPlatformDescs, getDefaultPlatform())) {
- validPlatformDescs = new CompositeIterable<JpaPlatformDescription>(getDefaultPlatform(), validPlatformDescs);
- }
- return validPlatformDescs;
- }
-
-
- // **************** validation ********************************************
-
- @Override
- protected IStatus validatePlatform() {
- IStatus status = super.validatePlatform();
-
- if (status.isOK()) {
- if (! getPlatform().supportsJpaFacetVersion(getProjectFacetVersion())) {
- status = PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION_STATUS;
- }
- }
-
- return status;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDelegate.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDelegate.java
deleted file mode 100644
index c4a3e907a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetVersionChangeDelegate.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class JpaFacetVersionChangeDelegate
- extends JpaFacetActionDelegate
-{
- @Override
- protected void execute_(
- IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException
- {
- SubMonitor sm = SubMonitor.convert(monitor, 2);
- super.execute_(project, fv, config, sm.newChild(1));
- this.rebuildJpaProject(project);
- sm.worked(1);
- // nothing further to do here *just* yet
- }
-
- protected void rebuildJpaProject(IProject project) throws CoreException {
- try {
- this.rebuildJpaProject_(project);
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- throw new CoreException(new Status(IStatus.CANCEL, JptJpaCorePlugin.PLUGIN_ID, null, ex));
- }
- }
-
- protected void rebuildJpaProject_(IProject project) throws InterruptedException {
- ((JpaProject.Reference) project.getAdapter(JpaProject.Reference.class)).rebuild();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/RuntimeChangedListener.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/RuntimeChangedListener.java
deleted file mode 100644
index 6a58138938..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/RuntimeChangedListener.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.facet;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.libprov.JpaLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
-import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
-
-public class RuntimeChangedListener
- implements IFacetedProjectListener
-{
- public void handleEvent(IFacetedProjectEvent facetedProjectEvent) {
-
- IFacetedProjectBase fpb = facetedProjectEvent.getWorkingCopy();
- if (fpb == null) {
- fpb = facetedProjectEvent.getProject();
- }
- IProjectFacetVersion pfv = fpb.getProjectFacetVersion(JpaFacet.FACET);
- if (pfv != null) {
- Map<String, Object> enablementVariables = new HashMap<String, Object>();
- enablementVariables.put(JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_ENABLEMENT_EXP, getJpaPlatformId(fpb.getProject()));
- enablementVariables.put(JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_DESCRIPTION_ENABLEMENT_EXP, getJpaPlatformDescription(fpb.getProject()));
- LibraryInstallDelegate lp = new LibraryInstallDelegate(fpb, pfv, enablementVariables);
- try {
- lp.execute(new NullProgressMonitor());
- }
- catch (CoreException ce) {
- JptJpaCorePlugin.log(ce);
- }
- }
- }
-
- protected String getJpaPlatformId(IProject project) {
- JpaProject jpaProject = this.getJpaProject(project);
- return (jpaProject == null) ? null : jpaProject.getJpaPlatform().getId();
- }
-
- protected JpaPlatformDescription getJpaPlatformDescription(IProject project) {
- JpaProject jpaProject = this.getJpaProject(project);
- return (jpaProject == null) ? null : jpaProject.getJpaPlatform().getDescription();
- }
-
- protected JpaProject getJpaProject(IProject project) {
- try {
- return this.getJpaProject_(project);
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- return null;
- }
- }
-
- protected JpaProject getJpaProject_(IProject project) throws InterruptedException {
- return this.getJpaProjectReference(project).getValue();
- }
-
- protected JpaProject.Reference getJpaProjectReference(IProject project) {
- return ((JpaProject.Reference) project.getAdapter(JpaProject.Reference.class));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaDataSource.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaDataSource.java
deleted file mode 100644
index a35e675b89..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaDataSource.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1;
-
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaNode;
-import org.eclipse.jpt.jpa.db.ConnectionAdapter;
-import org.eclipse.jpt.jpa.db.ConnectionListener;
-import org.eclipse.jpt.jpa.db.ConnectionProfile;
-import org.eclipse.jpt.jpa.db.ConnectionProfileFactory;
-import org.eclipse.jpt.jpa.db.ConnectionProfileListener;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.DatabaseIdentifierAdapter;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * GenericJpaDataSource
- */
-public class GenericJpaDataSource
- extends AbstractJpaNode
- implements JpaDataSource
-{
- /**
- * cache the connection profile name so we can detect when
- * it changes and notify listeners
- */
- protected String connectionProfileName;
-
- protected transient ConnectionProfile connectionProfile;
-
- /**
- * listen for the connection to be added or removed or its name changed
- */
- protected final ConnectionProfileListener connectionProfileListener;
-
- /**
- * listen for the connection to be opened or closed
- */
- protected final ConnectionListener connectionListener;
-
-
- // ********** constructor/initialization **********
-
- public GenericJpaDataSource(JpaProject jpaProject, String connectionProfileName) {
- super(jpaProject);
- //moving the building of the connection profile before the connectionProfileListener
- //is added. Need to make sure the loading of db profiles is completed before
- //listening, otherwise we get notifications before our model is finished being built.
- //this means our updater is called before it is set which results in an IllegalStateException.
- //Hopefully this change is temporary and DTP will fix bug 246270 where I suggest they
- //not fire events when building profiles.
- this.connectionProfileName = connectionProfileName;
- this.connectionProfile = this.buildConnectionProfile(connectionProfileName);
-
- this.connectionProfileListener = this.buildConnectionProfileListener();
- this.getConnectionProfileFactory().addConnectionProfileListener(this.connectionProfileListener);
-
- this.connectionListener = this.buildConnectionListener();
- if (this.connectionProfile != null) {
- this.connectionProfile.addConnectionListener(this.connectionListener);
- }
- }
-
- protected ConnectionProfileFactory getConnectionProfileFactory() {
- return this.getJpaPlatform().getConnectionProfileFactory();
- }
-
- protected ConnectionProfileListener buildConnectionProfileListener() {
- return new LocalConnectionProfileListener();
- }
-
- protected ConnectionListener buildConnectionListener() {
- return new LocalConnectionListener();
- }
-
-
- // ********** JpaDataSource implementation **********
-
- public String getConnectionProfileName() {
- return this.connectionProfileName;
- }
-
- public void setConnectionProfileName(String name) {
- String old = this.connectionProfileName;
- this.connectionProfileName = name;
- if (this.firePropertyChanged(CONNECTION_PROFILE_NAME_PROPERTY, old, name)) {
- // sync the connection profile when the name changes
- this.setConnectionProfile(this.buildConnectionProfile(name));
- JptJpaCorePlugin.setConnectionProfileName(this.getJpaProject().getProject(), name);
- }
- }
-
- public ConnectionProfile getConnectionProfile() {
- return this.connectionProfile;
- }
-
- @Override
- public boolean connectionProfileIsActive() {
- ConnectionProfile cp = this.connectionProfile;
- return (cp != null) && cp.isActive();
- }
-
- @Override
- public Database getDatabase() {
- ConnectionProfile cp = this.connectionProfile;
- return (cp == null) ? null : cp.getDatabase();
- }
-
- public Table selectTableForIdentifier(Iterable<Table> tables, String identifier) {
- Database db = this.getDatabase();
- return (db == null) ? null : db.selectTableForIdentifier(tables, identifier);
- }
-
- public void dispose() {
- if (this.connectionProfile != null) {
- this.connectionProfile.removeConnectionListener(this.connectionListener);
- }
- this.getConnectionProfileFactory().removeConnectionProfileListener(this.connectionProfileListener);
- }
-
-
- // ********** internal methods **********
-
- protected ConnectionProfile buildConnectionProfile(String name) {
- return this.getConnectionProfileFactory().buildConnectionProfile(name, this.buildDatabaseIdentifierAdapter());
- }
-
- protected DatabaseIdentifierAdapter buildDatabaseIdentifierAdapter() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildDatabaseIdentifierAdapter(this) :
- DatabaseIdentifierAdapter.Default.instance();
- }
-
- protected void setConnectionProfile(ConnectionProfile connectionProfile) {
- ConnectionProfile old = this.connectionProfile;
- if (old != null) {
- old.removeConnectionListener(this.connectionListener);
- }
- this.connectionProfile = connectionProfile;
- if (connectionProfile != null) {
- connectionProfile.addConnectionListener(this.connectionListener);
- }
- this.firePropertyChanged(CONNECTION_PROFILE_PROPERTY, old, connectionProfile);
- }
-
-
- // ********** overrides **********
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.connectionProfileName);
- }
-
-
- // ********** member classes **********
-
- /**
- * Listen for a connection profile with our name being removed.
- * Also listen for our connection's name being changed.
- */
- protected class LocalConnectionProfileListener
- implements ConnectionProfileListener
- {
- protected LocalConnectionProfileListener() {
- super();
- }
-
- public void connectionProfileAdded(String name) {
- // check to see if a connection profile with our name was added
- // (assume our connection profile is null)
- if (GenericJpaDataSource.this.connectionProfile == null) {
- if (name.equals(GenericJpaDataSource.this.getConnectionProfileName())) {
- GenericJpaDataSource.this.setConnectionProfileName(name); // this will trigger creation of CP
- }
- }
- }
-
- public void connectionProfileRemoved(String name) {
- if (GenericJpaDataSource.this.connectionProfile == null) {
- return;
- }
- if (name.equals(GenericJpaDataSource.this.connectionProfile.getName())) {
- GenericJpaDataSource.this.setConnectionProfile(null);
- }
- }
-
- public void connectionProfileRenamed(String oldName, String newName) {
- if (GenericJpaDataSource.this.connectionProfile == null) {
- if (newName.equals(GenericJpaDataSource.this.connectionProfileName)) {
- GenericJpaDataSource.this.setConnectionProfileName(newName);
- }
- return;
- }
- // the connection profile will already have the new name,
- // we just need to sync the name held by the data source
- if (newName.equals(GenericJpaDataSource.this.connectionProfile.getName())) {
- GenericJpaDataSource.this.setConnectionProfileName(newName);
- }
- }
- }
-
-
- /**
- * Whenever the connection is opened or closed trigger a project update.
- */
- protected class LocalConnectionListener
- extends ConnectionAdapter
- {
- @Override
- public void opened(ConnectionProfile profile) {
- GenericJpaDataSource.this.stateChanged();
- }
-
- @Override
- public void closed(ConnectionProfile profile) {
- GenericJpaDataSource.this.stateChanged();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFactory.java
deleted file mode 100644
index 5c44239337..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1;
-
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaFactory;
-
-/**
- * Generic JPA
- */
-public class GenericJpaFactory
- extends AbstractJpaFactory
-{
- public GenericJpaFactory() {
- super();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFile.java
deleted file mode 100644
index 0316462b02..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaFile.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1;
-
-import java.util.Hashtable;
-import java.util.Set;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaNode;
-
-/**
- * The transition between a JPA project and the resource model associated
- * with a file.
- * Hold the associated root structure nodes, which are hooks to the
- * context model.
- */
-public class GenericJpaFile
- extends AbstractJpaNode
- implements JpaFile
-{
- /**
- * typically a .java or .xml file.
- */
- protected final IFile file;
-
- /**
- * cache the content type - if the content type changes, the JPA project
- * will throw out the JPA file and build a new one
- */
- protected final IContentType contentType;
-
- /**
- * the resource model corresponding to the file
- */
- protected final JptResourceModel resourceModel;
-
- /**
- * the root structure (context model) nodes corresponding to the resource
- * model
- */
- protected final Hashtable<Object, JpaStructureNode> rootStructureNodes = new Hashtable<Object, JpaStructureNode>();
-
-
- // ********** construction **********
-
- public GenericJpaFile(JpaProject jpaProject, IFile file, IContentType contentType, JptResourceModel resourceModel) {
- super(jpaProject);
- this.file = file;
- this.contentType = contentType;
- this.resourceModel = resourceModel;
- }
-
- /**
- * Changes to {@link #ROOT_STRUCTURE_NODES_COLLECTION} do not need to trigger a
- * project update. Only the UI cares about the root structure nodes.
- * If a project update is allowed to happen, an infinite loop will result
- * if any Java class is specified in more than one location in the
- * persistence unit.
- */
- @Override
- protected void addNonUpdateAspectNamesTo(Set<String> nonUpdateAspectNames) {
- super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
- nonUpdateAspectNames.add(ROOT_STRUCTURE_NODES_COLLECTION);
- }
-
-
- // ********** file **********
-
- public IFile getFile() {
- return this.file;
- }
-
- public IContentType getContentType() {
- return this.contentType;
- }
-
- public JptResourceModel getResourceModel() {
- return this.resourceModel;
- }
-
- public JptResourceModel getResourceModel(IContentType ct) {
- return this.contentType.isKindOf(ct) ? this.resourceModel : null;
- }
-
-
- // ********** root structure nodes **********
-
- public Iterable<JpaStructureNode> getRootStructureNodes() {
- return new LiveCloneIterable<JpaStructureNode>(this.rootStructureNodes.values());
- }
-
- public int getRootStructureNodesSize() {
- return this.rootStructureNodes.size();
- }
-
- public void addRootStructureNode(Object key, JpaStructureNode rootStructureNode) {
- JpaStructureNode old = this.rootStructureNodes.put(key, rootStructureNode);
- if (rootStructureNode != old) {
- if (old != null) {
- this.fireItemRemoved(ROOT_STRUCTURE_NODES_COLLECTION, old);
- }
- this.fireItemAdded(ROOT_STRUCTURE_NODES_COLLECTION, rootStructureNode);
- }
- }
-
- public void removeRootStructureNode(Object key, JpaStructureNode rootStructureNode) {
- if (Tools.valuesAreEqual(rootStructureNode, this.rootStructureNodes.get(key))) {
- this.fireItemRemoved(ROOT_STRUCTURE_NODES_COLLECTION, this.rootStructureNodes.remove(key));
- }
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- for (JpaStructureNode rootNode : this.getRootStructureNodes()) {
- JpaStructureNode node = rootNode.getStructureNode(textOffset);
- if (node != null) {
- return node;
- }
- }
- return null;
- }
-
-
- // ********** misc **********
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.file);
- sb.append('[');
- sb.append(this.contentType.getName());
- sb.append(']');
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaProject.java
deleted file mode 100644
index 2502f19457..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/GenericJpaProject.java
+++ /dev/null
@@ -1,28 +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.jpa.core.internal.jpa1;
-
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaProject;
-
-/**
- * Not much different from the abstract JPA project.
- */
-public class GenericJpaProject
- extends AbstractJpaProject
-{
-
- // ********** constructor/initialization **********
-
- public GenericJpaProject(JpaProject.Config config) {
- super(config);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
deleted file mode 100644
index 6cb8ecdbf1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa1.context;
-
-import java.util.List;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractEntityPrimaryKeyValidator extends
- AbstractPrimaryKeyValidator {
-
- protected AbstractEntityPrimaryKeyValidator(Entity entity,
- PrimaryKeyTextRangeResolver textRangeResolver) {
- super(entity, textRangeResolver);
- }
-
- protected Entity entity() {
- return (Entity) this.typeMapping();
- }
-
- @Override
- protected IdClassReference idClassReference() {
- return entity().getIdClassReference();
- }
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- // if an entity is non-root, it is not allowed to define primary keys
- if (! entity().isRootEntity()) {
- validatePrimaryKeyForNonRoot(messages, reporter);
- }
- else {
- validatePrimaryKeyForRoot(messages, reporter);
- }
- return true;
- }
-
- protected void validatePrimaryKeyForNonRoot(List<IMessage> messages, IReporter reporter) {
- validateNonRootEntityDoesNotSpecifyIdClass(messages, reporter);
- validateNonRootEntityDoesNotSpecifyPrimaryKeyAttributes(messages, reporter);
- }
-
- protected void validatePrimaryKeyForRoot(List<IMessage> messages, IReporter reporter) {
- validatePrimaryKeyIsNotRedefined(messages, reporter);
- validateIdClassIsUsedIfNecessary(messages, reporter);
-
- // if the primary key is not defined on an ancestor, it must be defined here
- if (! definesPrimaryKey(typeMapping())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NO_PK,
- EMPTY_STRING_ARRAY,
- entity(),
- textRangeResolver().getTypeMappingTextRange()));
- }
-
- // if primary key is composite, it may either use an id class or embedded id, not both
- validateOneOfIdClassOrEmbeddedIdIsUsed(messages, reporter);
- // ... and only one embedded id
- validateOneEmbeddedId(messages, reporter);
- // ... and not both id and embedded id
- validateOneOfEmbeddedOrIdIsUsed(messages, reporter);
-
- validateMapsIdMappings(messages, reporter);
-
- if (specifiesIdClass()) {
- validateIdClass(idClassReference().getIdClass(), messages, reporter);
- }
- }
-
- protected void validateNonRootEntityDoesNotSpecifyIdClass(List<IMessage> messages, IReporter reporter) {
- if (idClassReference().isSpecified()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NON_ROOT_ID_CLASS_SPECIFIED,
- EMPTY_STRING_ARRAY,
- entity(),
- textRangeResolver().getIdClassTextRange()));
- }
- }
-
- protected void validateNonRootEntityDoesNotSpecifyPrimaryKeyAttributes(List<IMessage> messages, IReporter reporter) {
- for (AttributeMapping each : getPrimaryKeyMappingsDefinedLocally(typeMapping())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED,
- EMPTY_STRING_ARRAY,
- each,
- textRangeResolver().getAttributeMappingTextRange(each.getName())));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java
deleted file mode 100644
index 56d9ae3421..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public abstract class AbstractJoinTableValidator
- extends AbstractTableValidator
-{
- protected AbstractJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
- }
-
- protected AbstractJoinTableValidator(ReadOnlyPersistentAttribute persistentAttribute, ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
- }
-
- @Override
- protected String getUnresolvedCatalogMessage() {
- return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_CATALOG;
- }
-
- @Override
- protected String getUnresolvedSchemaMessage() {
- return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_SCHEMA;
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
deleted file mode 100644
index 48440aac5e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractMappedSuperclassPrimaryKeyValidator
- extends AbstractPrimaryKeyValidator
-{
- protected AbstractMappedSuperclassPrimaryKeyValidator(
- MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
-
- super(mappedSuperclass, textRangeResolver);
- }
-
-
- protected MappedSuperclass mappedSuperclass() {
- return (MappedSuperclass) this.typeMapping();
- }
-
- @Override
- protected IdClassReference idClassReference() {
- return mappedSuperclass().getIdClassReference();
- }
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- validatePrimaryKeyIsNotRedefined(messages, reporter);
- validateIdClassIsUsedIfNecessary(messages, reporter);
-
- // if primary key is composite, it may either use an id class or embedded id, not both
- validateOneOfIdClassOrEmbeddedIdIsUsed(messages, reporter);
- // ... and only one embedded id
- validateOneEmbeddedId(messages, reporter);
- // ... and not both id and embedded id
- validateOneOfEmbeddedOrIdIsUsed(messages, reporter);
-
- if (specifiesIdClass()) {
- validateIdClass(idClassReference().getIdClass(), messages, reporter);
- }
- return true;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java
deleted file mode 100644
index 40592c0ac7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn, R extends NamedColumnTextRangeResolver>
- implements JptValidator
-{
- /** this is <code>null</code> for columns defined on entities and secondary tables */
- protected final ReadOnlyPersistentAttribute persistentAttribute;
-
- protected final C column;
-
- protected final R textRangeResolver;
-
- protected final TableDescriptionProvider tableDescriptionProvider;
-
- protected final JptValidator tableValidator;
-
-
- protected AbstractNamedColumnValidator(
- C column,
- R textRangeResolver) {
- this(null, column, textRangeResolver);
- }
-
- protected AbstractNamedColumnValidator(
- C column,
- R textRangeResolver,
- TableDescriptionProvider provider) {
- this(null, column, textRangeResolver, provider);
- }
-
- protected AbstractNamedColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- C column,
- R textRangeResolver) {
- this(persistentAttribute, column, textRangeResolver, TableDescriptionProvider.Null.instance());
- }
-
- protected AbstractNamedColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- C column,
- R textRangeResolver,
- TableDescriptionProvider tableDescriptionProvider) {
- this.persistentAttribute = persistentAttribute;
- this.column = column;
- this.textRangeResolver = textRangeResolver;
- this.tableDescriptionProvider = tableDescriptionProvider;
- this.tableValidator = this.buildTableValidator();
- }
-
- protected JptValidator buildTableValidator() {
- return JptValidator.Null.instance();
- }
-
- public final boolean validate(List<IMessage> messages, IReporter reporter) {
- if (this.tableValidator.validate(messages, reporter)) {
- // validate the name only if the table is valid
- this.validateName(messages);
- }
- return true;
- }
-
- protected void validateName(List<IMessage> messages) {
- Table dbTable = this.column.getDbTable();
- if ((dbTable != null) && ! this.column.isResolved()) {
- messages.add(this.buildUnresolvedNameMessage());
- }
- }
-
- protected IMessage buildUnresolvedNameMessage() {
- return this.columnIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnresolvedNameMessage() :
- this.buildUnresolvedNameMessage(this.getUnresolvedNameMessage());
- }
-
- protected IMessage buildUnresolvedNameMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- new String[] {
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getUnresolvedNameMessage();
-
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnresolvedNameMessage();
-
- protected boolean columnIsPartOfVirtualAttribute() {
- return (this.persistentAttribute != null) &&
- this.persistentAttribute.isVirtual();
- }
-
-
- // ********** table description provider **********
-
- public interface TableDescriptionProvider {
- String getColumnTableDescriptionMessage();
-
- final class Null
- implements TableDescriptionProvider
- {
- private static final TableDescriptionProvider INSTANCE = new Null();
- public static TableDescriptionProvider instance() {
- return INSTANCE;
- }
- // ensure single instance
- private Null() {
- super();
- }
- public String getColumnTableDescriptionMessage() {
- throw new UnsupportedOperationException();
- }
- @Override
- public String toString() {
- return StringTools.buildSingletonToString(this);
- }
- }
- }
-
-
- // ********** base column table validator **********
-
- /**
- * This column table validator (or its subclasses) can only be used by
- * a validator for a <em>base</em> column, which specifies a table. This
- * includes both normal columns and join columns.
- */
- protected class BaseColumnTableValidator
- implements JptValidator
- {
- protected BaseColumnTableValidator() {
- super();
- }
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- if (this.getColumn().tableNameIsInvalid()) {
- messages.add(this.buildTableNotValidMessage());
- return false;
- }
- return true;
- }
-
- protected ReadOnlyTableColumn getColumn() {
- return (ReadOnlyTableColumn) AbstractNamedColumnValidator.this.column;
- }
-
- protected IMessage buildTableNotValidMessage() {
- return AbstractNamedColumnValidator.this.columnIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeTableNotValidMessage() :
- this.buildTableNotValidMessage_();
- }
-
- protected IMessage buildTableNotValidMessage_() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getColumnTableNotValidMessage(),
- new String[] {
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- protected String getColumnTableNotValidMessage() {
- return JpaValidationMessages.COLUMN_TABLE_NOT_VALID;
- }
-
- protected String getColumnTableDescriptionMessage() {
- return AbstractNamedColumnValidator.this.tableDescriptionProvider.getColumnTableDescriptionMessage();
- }
-
- protected TableColumnTextRangeResolver getTextRangeResolver() {
- return (TableColumnTextRangeResolver) AbstractNamedColumnValidator.this.textRangeResolver;
- }
-
- protected IMessage buildVirtualAttributeTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeColumnTableNotValidMessage(),
- new String[] {
- AbstractNamedColumnValidator.this.persistentAttribute.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java
deleted file mode 100644
index 3cf01eabc4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractPersistentAttributeValidator
- implements JptValidator
-{
- protected ReadOnlyPersistentAttribute persistentAttribute;
-
- protected PersistentAttributeTextRangeResolver textRangeResolver;
-
-
- protected AbstractPersistentAttributeValidator(
- ReadOnlyPersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
- this.persistentAttribute = persistentAttribute;
- this.textRangeResolver = textRangeResolver;
- }
-
- public final boolean validate(List<IMessage> messages, IReporter reporter) {
- if (this.persistentAttribute.getMappingKey() != MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) {
- this.validateMappedAttribute(messages);
- }
- return true;
- }
-
- protected abstract void validateMappedAttribute(List<IMessage> messages);
-
- protected IMessage buildAttributeMessage(String msgID) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- new String[] {this.persistentAttribute.getName()},
- this.persistentAttribute,
- this.textRangeResolver.getAttributeTextRange()
- );
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
deleted file mode 100644
index a01439d3a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
+++ /dev/null
@@ -1,771 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context;
-
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.HashBag;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
-import org.eclipse.jpt.jpa.core.context.IdMapping;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.PropertyAccessor;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.SingleRelationshipMapping2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractPrimaryKeyValidator
- implements JptValidator
-{
- private final TypeMapping typeMapping;
-
- private final PrimaryKeyTextRangeResolver textRangeResolver;
-
- public static final String[] EMPTY_STRING_ARRAY = StringTools.EMPTY_STRING_ARRAY;
-
- protected AbstractPrimaryKeyValidator(
- TypeMapping typeMapping, PrimaryKeyTextRangeResolver textRangeResolver) {
-
- this.typeMapping = typeMapping;
- this.textRangeResolver = textRangeResolver;
- }
-
-
- protected TypeMapping typeMapping() {
- return this.typeMapping;
- }
-
- protected abstract IdClassReference idClassReference();
-
- protected PrimaryKeyTextRangeResolver textRangeResolver() {
- return this.textRangeResolver;
- }
-
- // for JPA portability, a hierarchy must define its primary key on one class
- // (entity *or* mapped superclass)
- protected void validatePrimaryKeyIsNotRedefined(List<IMessage> messages, IReporter reporter) {
- if (definesPrimaryKeyOnAncestor(typeMapping())) {
- if (idClassReference().isSpecified()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_CLASS,
- EMPTY_STRING_ARRAY,
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
- for (AttributeMapping each : getPrimaryKeyMappingsDefinedLocally(typeMapping())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE,
- EMPTY_STRING_ARRAY,
- each,
- textRangeResolver().getAttributeMappingTextRange(each.getName())));
- }
- return;
- }
- }
-
- // if a primary key defining class has multiple primary keys, it must use an id class
- protected void validateIdClassIsUsedIfNecessary(List<IMessage> messages, IReporter reporter) {
- if (! specifiesIdClass() && idClassIsRequired()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REQUIRED,
- EMPTY_STRING_ARRAY,
- typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
- }
- }
-
- // only one composite primary key strategy may be used
- protected void validateOneOfIdClassOrEmbeddedIdIsUsed(List<IMessage> messages, IReporter reporter) {
- if (idClassReference().isSpecified()
- && CollectionTools.size(typeMapping().getAllAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY)) > 0) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED,
- EMPTY_STRING_ARRAY,
- typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
- }
- }
-
- //only embedded or id, both may not be used
- protected void validateOneOfEmbeddedOrIdIsUsed(List<IMessage> messages, IReporter reporter) {
- if (definesEmbeddedIdMapping(typeMapping) && definesIdMapping(typeMapping)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_AND_EMBEDDED_ID_BOTH_USED,
- EMPTY_STRING_ARRAY,
- typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
- }
- }
-
- // only one embedded id may be used
- protected void validateOneEmbeddedId(List<IMessage> messages, IReporter reporter) {
- if (CollectionTools.size(getEmbeddedIdMappings(typeMapping())) > 1) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_MULTIPLE_EMBEDDED_ID,
- EMPTY_STRING_ARRAY,
- typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
- }
- }
-
- protected void validateMapsIdMappings(List<IMessage> messages, IReporter reporter) {
- for (SingleRelationshipMapping2_0 mapsIdRelationshipMapping : getMapsIdMappingsDefinedLocally(typeMapping())) {
- // can't use maps id mappings with an id class
- if (definesIdClass(typeMapping())) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID,
- new String[] {mapsIdRelationshipMapping.getName()},
- mapsIdRelationshipMapping,
- textRangeResolver().getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
- }
-
- AttributeMapping resolvedAttributeMapping =
- mapsIdRelationshipMapping.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getDerivedIdAttributeMapping();
- if (resolvedAttributeMapping != null
- && ! ClassName.areAutoboxEquivalents(
- resolvedAttributeMapping.getPersistentAttribute().getTypeName(),
- getTargetEntityPrimaryKeyTypeName(mapsIdRelationshipMapping))) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
- new String[] {mapsIdRelationshipMapping.getName()},
- mapsIdRelationshipMapping,
- textRangeResolver().getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
- }
- }
- }
-
- protected void validateIdClass(JavaPersistentType idClass, List<IMessage> messages, IReporter reporter) {
- // there should already be a validation error if the id class does not resolve to a class
- if (idClass == null) {
- return;
- }
-
- if (hasDerivedIdMappingMatchingIdClass(idClass)) {
- validateIdClass_derivedIdMappingMatchingIdClass(idClass, messages, reporter);
- return;
- }
-
- for (JavaPersistentAttribute idClassAttribute : this.getAllIdClassAttributes(idClass)) {
- boolean foundMatch = false;
- for (AttributeMapping attributeMapping : getAttributeMappings(typeMapping())) {
- if (idClassAttribute.getName().equals(attributeMapping.getName())) {
- foundMatch = true;
-
- // the matching attribute should be a primary key
- if (! definesPrimaryKey(attributeMapping)) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY,
- new String[] {idClassAttribute.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
-
- // the matching attribute's type should agree
- String idClassAttributeTypeName = idClassAttribute.getTypeName();
- String attributeMappingTypeName = getTypeNameForIdClass(attributeMapping);
- if (attributeMappingTypeName != null // if it's null, there should be
- // another failing validation elsewhere
- && ! ClassName.areAutoboxEquivalents(idClassAttributeTypeName, attributeMappingTypeName)) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
- new String[] {idClassAttribute.getName(), idClassAttributeTypeName},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
- }
- }
-
- if (! foundMatch) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH,
- new String[] {idClassAttribute.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
- }
-
- // This is for validating if a type mapping has extra id attributes that do not match
- // an attribute on the id class, which is a supplement of the validation right above
- for (AttributeMapping attributeMapping : getPrimaryKeyMappings(typeMapping())) {
- AccessType type = attributeMapping.getPersistentAttribute().getOwningPersistentType().getAccess();
- if (type == AccessType.FIELD) {
- checkMissingAttribute(idClass, attributeMapping, messages, reporter);
- } else if (type == AccessType.PROPERTY) {
- // EclipseLink does not care about the existence status of property methods,
- // but the matching field in the id class still needs to exist
- if (!CollectionTools.contains(getIdClassFieldNames(idClass), attributeMapping.getName())) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST,
- new String[] {attributeMapping.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- } else {
- // Validation for missing property methods is only for generic platform
- checkMissingAttributeWithPropertyAccess(idClass, attributeMapping, messages, reporter);
- }
- }
- }
-
- // This is for validating cases when id class has property-based access
- if (typeMapping().getPersistentType().getAccess() == AccessType.PROPERTY) {
- validateIdClassAttributesWithPropertyAccess(idClass, messages, reporter);
- }
-
- validateIdClassConstructor(idClass, messages, reporter);
- }
-
- protected void checkMissingAttribute(JavaPersistentType idClass,
- AttributeMapping attributeMapping, List<IMessage> messages, IReporter reporter) {
- if (!CollectionTools.contains(getIdClassAttributeNames(idClass), attributeMapping.getName())) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST,
- new String[] {attributeMapping.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange())
- );
- }
- }
-
- protected abstract void validateIdClassAttributesWithPropertyAccess(
- JavaPersistentType idClass, List<IMessage> messages,
- IReporter reporter);
-
- protected void validateIdClassConstructor(JavaPersistentType idClass,
- List<IMessage> messages, IReporter reporter) {
- if (!idClass.getJavaResourceType().hasNoArgConstructor()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_NO_ARG_CONSTRUCTOR,
- new String[] {idClass.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange())
- );
- }
- }
-
- protected void checkMissingAttributeWithPropertyAccess(JavaPersistentType idClass,
- AttributeMapping attributeMapping,
- List<IMessage> messages, IReporter reporter) {
- // do nothing
- }
-
- protected void validateIdClass_derivedIdMappingMatchingIdClass(
- JavaPersistentType idClass, List<IMessage> messages, IReporter reporter) {
-
- Collection<AttributeMapping> errorMappings = new HashBag<AttributeMapping>();
- for (AttributeMapping each
- : new CompositeIterable<AttributeMapping>(getIdMappings(typeMapping()), getEmbeddedIdMappings(typeMapping()))) {
- errorMappings.add(each);
- }
- Collection<AttributeMapping> errorDerivedIdMappings = new HashBag<AttributeMapping>();
- for (SingleRelationshipMapping2_0 each : getDerivedIdMappings(typeMapping())) {
- if (idClass.getName().equals(getTargetEntityPrimaryKeyTypeName(each))) {
- errorDerivedIdMappings.add(each);
- }
- else {
- errorMappings.add(each);
- }
- }
- for (AttributeMapping each : errorMappings) {
- addNoIdClassAttributeMatchError(each, messages);
- }
- if (CollectionTools.size(errorDerivedIdMappings) > 1) {
- for (AttributeMapping each : errorDerivedIdMappings) {
- addDuplicateIdClassAttributeMatchError(each, messages);
- }
- }
- }
-
- protected void addNoIdClassAttributeMatchError(AttributeMapping attributeMapping, List<IMessage> messages) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH,
- new String[] {attributeMapping.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
-
- protected void addDuplicateIdClassAttributeMatchError(AttributeMapping attributeMapping, List<IMessage> messages) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH,
- new String[] {attributeMapping.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
-
- protected void validateIdClassPropertyMethods(
- JavaPersistentType idClass, List<IMessage> messages, IReporter reporter) {
-
- for (JavaPersistentAttribute attribute : getAllIdClassAttributes(idClass)) {
- PropertyAccessor accessor = (PropertyAccessor)attribute.getAccessor();
-
- // validate getter method
- JavaResourceMethod getter = accessor.getResourceGetter();
- if (getter != null) {
- validatePropertyMethod(idClass, getter.getMethodName(), messages, reporter);
- }
-
- // validate setter method
- JavaResourceMethod setter = accessor.getResourceSetter();
- if (setter != null) {
- validatePropertyMethod(idClass, setter.getMethodName(), messages, reporter);
- }
- }
- }
-
- private void validatePropertyMethod(JavaPersistentType idClass,
- String methodName, List<IMessage> messages, IReporter reporter) {
-
- JavaResourceMethod method = idClass.getJavaResourceType().getMethod(methodName);
-
- if (!method.isPublicOrProtected()) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_PROPERTY_METHOD_NOT_PUBLIC,
- new String[] {idClass.getJavaResourceType().getQualifiedName(), methodName},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()
- ));
- }
- }
-
- protected Iterable<String> getIdClassAttributeNames(JavaPersistentType idClass) {
- return new TransformationIterable<JavaPersistentAttribute, String>(getAllIdClassAttributes(idClass)) {
- @Override
- protected String transform(JavaPersistentAttribute attribute) {
- return attribute.getName();
- }
- };
- }
-
- protected Iterable<JavaPersistentAttribute> getAllIdClassAttributes(JavaPersistentType idClass) {
- return new SubIterableWrapper<ReadOnlyPersistentAttribute, JavaPersistentAttribute>(idClass.getAllAttributes());
- }
-
- protected Iterable<String> getIdClassFieldNames(JavaPersistentType idClass) {
- return new TransformationIterable<JavaResourceField, String>(idClass.getJavaResourceType().getFields()) {
- @Override
- protected String transform(JavaResourceField attribute) {
- return attribute.getName();
- }
- };
- }
-
- // **************** convenience methods ********************************************************
-
- // **************** primary key overall ********************************************************
-
- /**
- * Return whether an ancestor class has defined any aspect of the primary key
- */
- protected boolean definesPrimaryKeyOnAncestor(TypeMapping typeMapping) {
- for (TypeMapping each : typeMapping.getInheritanceHierarchy()) {
- if (each != typeMapping && definesPrimaryKey(each)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return whether the type mapping has defined any aspect of the primary key
- */
- protected boolean definesPrimaryKey(TypeMapping typeMapping) {
- return getIdClass(typeMapping) != null
- || ! CollectionTools.isEmpty(getPrimaryKeyMappings(typeMapping));
- }
-
- /**
- * Return true if the type mapping has defined any aspect of a complex primary key
- */
- protected boolean definesComplexPrimaryKey(TypeMapping typeMapping) {
- return definesIdClass(typeMapping)
- || getEmbeddedIdMapping(typeMapping) != null;
- }
-
- /**
- * Return the overriding type name of the primary key for the type mapping.
- * This may be
- * - type of the single simple primary key (id) attribute
- * - type of the single complex primary key (embedded id) attribute
- * - type of the id class
- * - null if none of the above are coherent (i.e. there are multiple possibilities, or the
- * primary key is invalid)
- */
- protected String getPrimaryKeyTypeName(TypeMapping typeMapping) {
- JavaPersistentType idClass = getIdClass(typeMapping);
- if (idClass != null) {
- return idClass.getName();
- }
- EmbeddedIdMapping embeddedId = getEmbeddedIdMapping(typeMapping);
- if (embeddedId != null) {
- return embeddedId.getPersistentAttribute().getTypeName();
- }
- IdMapping id = getIdMapping(typeMapping);
- if (id != null) {
- return id.getPersistentAttribute().getTypeName();
- }
- return null;
- }
-
- /**
- * Return whether the attribute mapping has defined any aspect of the primary key
- */
- protected boolean definesPrimaryKey(AttributeMapping attributeMapping) {
- String mappingKey = attributeMapping.getKey();
- if (CollectionTools.contains(this.getIdMappingKeys(), mappingKey)) {
- return true;
- }
- if (CollectionTools.contains(this.getSingleRelationshipMappingKeys(), mappingKey)) {
- SingleRelationshipMapping2_0 relationshipMapping = (SingleRelationshipMapping2_0) attributeMapping;
- return (relationshipMapping.getDerivedIdentity().usesIdDerivedIdentityStrategy()
- || relationshipMapping.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy());
- }
- return false;
- }
-
- protected Iterable<String> getIdMappingKeys() {
- return ID_MAPPING_KEYS;
- }
-
- protected static final String[] ID_MAPPING_KEYS_ARRAY = new String[] {
- MappingKeys.ID_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY
- };
-
- protected static final Iterable<String> ID_MAPPING_KEYS = new ArrayIterable<String>(ID_MAPPING_KEYS_ARRAY);
-
- protected Iterable<String> getSingleRelationshipMappingKeys() {
- return SINGLE_RELATIONSHIP_MAPPING_KEYS;
- }
-
- protected static final String[] SINGLE_RELATIONSHIP_MAPPING_KEYS_ARRAY = new String[] {
- MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY
- };
-
- protected static final Iterable<String> SINGLE_RELATIONSHIP_MAPPING_KEYS = new ArrayIterable<String>(SINGLE_RELATIONSHIP_MAPPING_KEYS_ARRAY);
-
-
- // **************** id class **********************************************
-
- protected boolean specifiesIdClass() {
- return idClassReference().isSpecified();
- }
-
- /**
- * Return whether an id class is defined on the class
- * NOTE: this is different from whether an id class is *specified*. If a specified id class
- * is not resolved, it is not defined. There will be a validation error to that effect.
- */
- protected boolean definesIdClass(TypeMapping typeMapping) {
- return getIdClass(typeMapping) != null;
- }
-
- /**
- * Return whether an ancestor class has defined an id class
- */
- protected boolean definesIdClassOnAncestor(TypeMapping typeMapping) {
- for (TypeMapping each : typeMapping.getInheritanceHierarchy()) {
- if (each != typeMapping && definesIdClass(each)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the id class to be used for the type mapping, whether that be locally
- * or on an ancestor
- */
- protected JavaPersistentType getIdClass(TypeMapping typeMapping) {
- for (TypeMapping each : typeMapping.getInheritanceHierarchy()) {
- if (each.getIdClass() != null) {
- return each.getIdClass();
- }
- }
- return null;
- }
-
-
- // **************** attribute mappings in general *************************
-
- /**
- * Return all the attribute mappings of the given type
- * mapping with transient attribute mappings being excluded
- */
- protected Iterable<AttributeMapping> getAttributeMappings(TypeMapping typeMapping) {
- return new FilteringIterable<AttributeMapping>(CollectionTools.collection(typeMapping.getAllAttributeMappings())) {
- @Override
- protected boolean accept(AttributeMapping o) {
- return !StringTools.stringsAreEqual(o.getKey(), MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
- }
- };
- }
-
- /**
- * Return all primary key mappings, defined on and above the type mapping
- */
- protected Iterable<AttributeMapping> getPrimaryKeyMappings(TypeMapping typeMapping) {
- return new CompositeIterable<AttributeMapping>(
- getIdMappings(typeMapping),
- getEmbeddedIdMappings(typeMapping),
- getDerivedIdMappings(typeMapping),
- getMapsIdMappings(typeMapping));
- }
-
- /**
- * Return primary key mappings declared directly on the type mapping
- */
- protected Iterable<AttributeMapping> getPrimaryKeyMappingsDefinedLocally(TypeMapping typeMapping) {
- return new CompositeIterable<AttributeMapping>(
- getIdMappingsDefinedLocally(typeMapping),
- getEmbeddedIdMappingsDefinedLocally(typeMapping),
- getDerivedIdMappingsDefinedLocally(typeMapping),
- getMapsIdMappingsDefinedLocally(typeMapping));
- }
-
- protected boolean hasAnyPrimaryKeyMappings(TypeMapping typeMapping) {
- return ! CollectionTools.isEmpty(getPrimaryKeyMappings(typeMapping));
- }
-
- // **************** id mappings *******************************************
-
- protected IdMapping getIdMapping(TypeMapping typeMapping) {
- Iterable<IdMapping> idMappings = getIdMappings(typeMapping);
- if (CollectionTools.size(idMappings) == 1) {
- return idMappings.iterator().next();
- }
- return null;
- }
-
- protected Iterable<IdMapping> getIdMappings(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, IdMapping>(
- typeMapping.getAllAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY));
- }
-
- protected Iterable<IdMapping> getIdMappingsDefinedLocally(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, IdMapping>(
- typeMapping.getAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY));
- }
-
-
- // **************** embedded id mappings **********************************
-
- /**
- * Return whether an embedded id is defined for this class, whether that be locally
- * or on an ancestor
- */
- protected boolean definesEmbeddedIdMapping(TypeMapping typeMapping) {
- return ! CollectionTools.isEmpty(getEmbeddedIdMappings(typeMapping));
- }
-
- /**
- * Return whether an id is defined for this class, whether that be locally
- * or on an ancestor
- */
- protected boolean definesIdMapping(TypeMapping typeMapping) {
- return ! CollectionTools.isEmpty(getIdMappings(typeMapping));
- }
-
- protected EmbeddedIdMapping getEmbeddedIdMapping(TypeMapping typeMapping) {
- Iterable<EmbeddedIdMapping> embeddedIdMappings = getEmbeddedIdMappings(typeMapping);
- if (CollectionTools.size(embeddedIdMappings) == 1) {
- return embeddedIdMappings.iterator().next();
- }
- return null;
- }
-
- protected Iterable<EmbeddedIdMapping> getEmbeddedIdMappings(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, EmbeddedIdMapping>(
- typeMapping.getAllAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY));
- }
-
- protected Iterable<EmbeddedIdMapping> getEmbeddedIdMappingsDefinedLocally(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, EmbeddedIdMapping>(
- typeMapping.getAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY));
- }
-
-
- // **************** derived id mappings ***********************************
-
- protected Iterable<SingleRelationshipMapping2_0> getDerivedIdMappings(TypeMapping typeMapping) {
- return new FilteringIterable<SingleRelationshipMapping2_0>(this.getAllSingleRelationshipMappings(typeMapping)) {
- @Override
- protected boolean accept(SingleRelationshipMapping2_0 o) {
- return o.getDerivedIdentity().usesIdDerivedIdentityStrategy();
- }
- };
- }
-
- protected Iterable<SingleRelationshipMapping2_0> getAllSingleRelationshipMappings(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(this.getAllSingleRelationshipMappings_(typeMapping));
- }
-
- @SuppressWarnings("unchecked")
- protected Iterable<AttributeMapping> getAllSingleRelationshipMappings_(TypeMapping typeMapping) {
- return new CompositeIterable<AttributeMapping>(
- typeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
- typeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)
- );
- }
-
- protected Iterable<SingleRelationshipMapping2_0> getDerivedIdMappingsDefinedLocally(TypeMapping typeMapping) {
- return new FilteringIterable<SingleRelationshipMapping2_0>(this.getSingleRelationshipMappings(typeMapping)) {
- @Override
- protected boolean accept(SingleRelationshipMapping2_0 o) {
- return o.getDerivedIdentity().usesIdDerivedIdentityStrategy();
- }
- };
- }
-
- protected Iterable<SingleRelationshipMapping2_0> getSingleRelationshipMappings(TypeMapping typeMapping) {
- return new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(this.getSingleRelationshipMappings_(typeMapping));
- }
-
- @SuppressWarnings("unchecked")
- protected Iterable<AttributeMapping> getSingleRelationshipMappings_(TypeMapping typeMapping) {
- return new CompositeIterable<AttributeMapping>(
- typeMapping.getAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
- typeMapping.getAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)
- );
- }
-
-
- // **************** maps id mappings **************************************
-
- protected Iterable<SingleRelationshipMapping2_0> getMapsIdMappings(TypeMapping typeMapping) {
- return new FilteringIterable<SingleRelationshipMapping2_0>(this.getAllSingleRelationshipMappings(typeMapping)) {
- @Override
- protected boolean accept(SingleRelationshipMapping2_0 o) {
- return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
- }
- };
- }
-
- protected Iterable<SingleRelationshipMapping2_0> getMapsIdMappingsDefinedLocally(TypeMapping typeMapping) {
- return new FilteringIterable<SingleRelationshipMapping2_0>(this.getSingleRelationshipMappings(typeMapping)) {
- @Override
- protected boolean accept(SingleRelationshipMapping2_0 o) {
- return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
- }
- };
- }
-
-
- // **************** misc **************************************************
-
- /**
- * Return whether an id class is required for this class
- */
- protected boolean idClassIsRequired() {
- // An id class is required if
- // - there are multiple "simple" primary key mappings
- // - or there is at least one "complex" primary key mapping
- // A simple primary key mapping can be
- // - an id mapping
- // - a derived id relationship mapping to an entity with a simple primary key
- // A complex primary key mapping can be
- // - a derived id relationship mapping to an entity with a complex primary key
- int simplePrimaryKeyMappingCount =
- CollectionTools.size(getIdMappings(typeMapping()));
- if (simplePrimaryKeyMappingCount > 1) {
- return true;
- }
- for (SingleRelationshipMapping2_0 relationshipMapping : getDerivedIdMappings(typeMapping())) {
- Entity entity = relationshipMapping.getResolvedTargetEntity();
- if (entity != null) {
- if (definesComplexPrimaryKey(entity)) {
- return true;
- }
- simplePrimaryKeyMappingCount++;
- if (simplePrimaryKeyMappingCount > 1) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected boolean hasDerivedIdMappingMatchingIdClass(JavaPersistentType idClass) {
- for (SingleRelationshipMapping2_0 each : getDerivedIdMappings(typeMapping())) {
- String primaryKeyTypeName = getTargetEntityPrimaryKeyTypeName(each);
- if (idClass.getName().equals(primaryKeyTypeName)) {
- return true;
- }
- }
- return false;
- }
-
- protected String getTargetEntityPrimaryKeyTypeName(SingleRelationshipMapping2_0 relationshipMapping) {
- Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
- if (targetEntity != null) {
- return getPrimaryKeyTypeName(targetEntity);
- }
- return null;
- }
-
- protected String getTypeNameForIdClass(AttributeMapping attributeMapping) {
- String mappingKey = attributeMapping.getKey();
- if (CollectionTools.contains(this.getIdMappingKeys(), mappingKey)) {
- return attributeMapping.getPersistentAttribute().getTypeName();
- }
- if (CollectionTools.contains(this.getSingleRelationshipMappingKeys(), mappingKey)) {
- SingleRelationshipMapping2_0 relationshipMapping = (SingleRelationshipMapping2_0) attributeMapping;
- Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
- if (targetEntity != null) {
- return getPrimaryKeyTypeName(targetEntity);
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java
deleted file mode 100644
index da999a22e5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractTableValidator
- implements JptValidator
-{
- /** this is <code>null</code> for tables defined on entities */
- protected final ReadOnlyPersistentAttribute persistentAttribute;
-
- protected final ReadOnlyTable table;
-
- protected final TableTextRangeResolver textRangeResolver;
-
- protected AbstractTableValidator(
- ReadOnlyTable table,
- TableTextRangeResolver textRangeResolver) {
- this(null, table, textRangeResolver);
- }
-
- protected AbstractTableValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyTable table,
- TableTextRangeResolver textRangeResolver) {
- super();
- this.persistentAttribute = persistentAttribute;
- this.table = table;
- this.textRangeResolver = textRangeResolver;
- }
-
- protected TableTextRangeResolver getTextRangeResolver() {
- return this.textRangeResolver;
- }
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- return this.validatesAgainstDatabase() &&
- this.validateAgainstDatabase(messages);
- }
-
- protected boolean validatesAgainstDatabase() {
- return this.table.validatesAgainstDatabase();
- }
-
- protected boolean validateAgainstDatabase(List<IMessage> messages) {
- if ( ! this.table.catalogIsResolved()) {
- messages.add(this.buildUnresolvedCatalogMessage());
- return false;
- }
-
- if ( ! this.table.schemaIsResolved()) {
- messages.add(this.buildUnresolvedSchemaMessage());
- return false;
- }
-
- if ( ! this.table.isResolved()) {
- if (this.table.getName() != null) { //if name is null, the validation will be handled elsewhere, such as the target entity is not defined
- messages.add(this.buildUnresolvedNameMessage());
- }
- return false;
- }
- return true;
- }
-
- protected IMessage buildUnresolvedCatalogMessage() {
- return this.tableIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnresolvedCatalogMessage() :
- this.buildUnresolvedCatalogMessage(this.getUnresolvedCatalogMessage());
- }
-
- protected abstract String getUnresolvedCatalogMessage();
-
- protected IMessage buildUnresolvedCatalogMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- new String[] {
- this.table.getCatalog(),
- this.table.getName()
- },
- this.table,
- this.textRangeResolver.getCatalogTextRange()
- );
- }
-
- protected IMessage buildVirtualAttributeUnresolvedCatalogMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedCatalogMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.table.getCatalog(),
- this.table.getName()
- },
- this.table,
- this.textRangeResolver.getCatalogTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnresolvedCatalogMessage();
-
- protected IMessage buildUnresolvedSchemaMessage() {
- return this.tableIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnresolvedSchemaMessage() :
- this.buildUnresolvedSchemaMessage(this.getUnresolvedSchemaMessage());
- }
-
- protected abstract String getUnresolvedSchemaMessage();
-
- protected IMessage buildUnresolvedSchemaMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- new String[] {
- this.table.getSchema(),
- this.table.getName()
- },
- this.table,
- this.textRangeResolver.getSchemaTextRange()
- );
- }
-
- protected IMessage buildVirtualAttributeUnresolvedSchemaMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedSchemaMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.table.getSchema(),
- this.table.getName()
- },
- this.table,
- this.textRangeResolver.getSchemaTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnresolvedSchemaMessage();
-
- protected IMessage buildUnresolvedNameMessage() {
- return this.tableIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnresolvedNameMessage() :
- this.buildUnresolvedNameMessage(this.getUnresolvedNameMessage());
- }
-
- protected abstract String getUnresolvedNameMessage();
-
- protected IMessage buildUnresolvedNameMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- new String[] {this.table.getName()},
- this.table,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.table.getName()
- },
- this.table,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnresolvedNameMessage();
-
- protected boolean tableIsPartOfVirtualAttribute() {
- return (this.persistentAttribute != null) &&
- this.persistentAttribute.isVirtual();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java
deleted file mode 100644
index 353e98aa69..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractTemporalConverterValidator
- implements JptValidator
-{
- protected final BaseTemporalConverter converter;
-
- protected final ConverterTextRangeResolver textRangeResolver;
-
- protected AbstractTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super();
- this.converter = converter;
- this.textRangeResolver = textRangeResolver;
- }
-
- protected ConverterTextRangeResolver getTextRangeResolver() {
- return this.textRangeResolver;
- }
-
- protected AttributeMapping getAttributeMapping() {
- return this.converter.getParent();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return this.getAttributeMapping().getPersistentAttribute();
- }
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- return this.validateAttributeTypeWithTemporal(messages);
- }
-
- protected boolean validateAttributeTypeWithTemporal(List<IMessage> messages) {
- String typeName = this.getTypeName();
- if (typeName == null) {
- //validation for a null type name is handled elsewhere, no need to have a temporal validation error
- return true;
- }
- if (!ArrayTools.contains(BaseTemporalConverter.TEMPORAL_MAPPING_SUPPORTED_TYPES, typeName)) {
- messages.add(this.buildInvalidTemporalMappingTypeMessage());
- return false;
- }
- return true;
- }
-
- protected abstract String getTypeName();
-
- protected IMessage buildInvalidTemporalMappingTypeMessage() {
- return this.getPersistentAttribute().isVirtual() ?
- this.buildVirtualAttributeInvalidTemporalMappingTypeMessage() :
- this.buildInvalidTemporalMappingTypeMessage_();
- }
-
- protected IMessage buildInvalidTemporalMappingTypeMessage_() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getInvalidTemporalMappingType(),
- StringTools.EMPTY_STRING_ARRAY,
- this.converter,
- this.getTextRangeResolver().getConverterTextRange()
- );
- }
-
- protected abstract String getInvalidTemporalMappingType();
-
- protected IMessage buildVirtualAttributeInvalidTemporalMappingTypeMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeInvalidTemporalMappingType(),
- new String[] {this.getPersistentAttribute().getName()},
- this.converter,
- this.getTextRangeResolver().getConverterTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeInvalidTemporalMappingType();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
deleted file mode 100644
index c38baf9152..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractTypeMappingValidator<T extends TypeMapping>
- implements JptValidator
-{
- protected T typeMapping;
-
- protected JavaResourceType jrt;
-
- protected TypeMappingTextRangeResolver textRangeResolver;
-
-
- protected AbstractTypeMappingValidator(
- T typeMapping, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
- this.typeMapping = typeMapping;
- this.jrt = jrt;
- this.textRangeResolver = textRangeResolver;
- }
-
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- this.validateType(messages);
- return true;
- }
-
- protected abstract void validateType(List<IMessage> messages);
-
- protected boolean isMemberType() {
- if (this.jrt == null) {
- return false;
- }
- return this.jrt.isMemberType();
- }
-
- protected boolean isStaticType() {
- if (this.jrt == null) {
- return false;
- }
- return this.jrt.isStatic();
- }
-
- protected boolean isFinalType() {
- if (this.jrt == null) {
- return false;
- }
- return this.jrt.isFinal();
- }
-
- protected boolean hasPrivateNoArgConstructor() {
- if (this.jrt == null) {
- return false;
- }
- return this.jrt.hasPrivateNoArgConstructor();
- }
-
- protected boolean hasNoArgConstructor() {
- if (this.jrt == null) {
- return false;
- }
- return this.jrt.hasNoArgConstructor();
- }
-
- protected IMessage buildTypeMessage(String msgID) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- new String[] {this.typeMapping.getName()},
- this.typeMapping,
- this.textRangeResolver.getTypeMappingTextRange()
- );
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java
deleted file mode 100644
index d7df3d59c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class AssociationOverrideInverseJoinColumnValidator
- extends InverseJoinColumnValidator
-{
- final ReadOnlyAssociationOverride override;
-
- public AssociationOverrideInverseJoinColumnValidator(
- ReadOnlyAssociationOverride override,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
- this.override = override;
- }
-
- public AssociationOverrideInverseJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAssociationOverride override,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
- this.override = override;
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected IMessage buildUnresolvedNameMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedNameMessage() :
- super.buildUnresolvedNameMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME,
- new String[] {
- this.override.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected IMessage buildUnresolvedReferencedColumnNameMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedReferencedColumnNameMessage() :
- super.buildUnresolvedReferencedColumnNameMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedReferencedColumnNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
- new String[] {
- this.override.getName(),
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedReferencedColumnNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName(),
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage() :
- super.buildUnspecifiedNameMultipleJoinColumnsMessage();
- }
-
- protected IMessage buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS,
- new String[] {this.override.getName()},
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS;
- }
-
- @Override
- protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() :
- super.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
- }
-
- protected IMessage buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS,
- new String[] {this.override.getName()},
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS;
- }
-
-
- // ********** table validator **********
-
- public class TableValidator
- extends InverseJoinColumnValidator.TableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected IMessage buildTableNotValidMessage() {
- return AssociationOverrideInverseJoinColumnValidator.this.override.isVirtual() ?
- this.buildVirtualOverrideColumnTableNotValidMessage() :
- super.buildTableNotValidMessage();
- }
-
- protected IMessage buildVirtualOverrideColumnTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualOverrideColumnTableNotValidMessage(),
- new String[] {
- AssociationOverrideInverseJoinColumnValidator.this.override.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- protected String getVirtualOverrideColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected IMessage buildVirtualAttributeTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeColumnTableNotValidMessage(),
- new String[] {
- AssociationOverrideInverseJoinColumnValidator.this.persistentAttribute.getName(),
- AssociationOverrideInverseJoinColumnValidator.this.override.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java
deleted file mode 100644
index a495440ed5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class AssociationOverrideJoinColumnValidator
- extends JoinColumnValidator
-{
- final ReadOnlyAssociationOverride override;
-
-
- public AssociationOverrideJoinColumnValidator(
- ReadOnlyAssociationOverride override,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
- this.override = override;
- }
-
- public AssociationOverrideJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAssociationOverride override,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
- this.override = override;
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected IMessage buildUnresolvedNameMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedNameMessage() :
- super.buildUnresolvedNameMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
- new String[] {
- this.override.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected IMessage buildUnresolvedReferencedColumnNameMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedReferencedColumnNameMessage() :
- super.buildUnresolvedReferencedColumnNameMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedReferencedColumnNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
- new String[] {
- this.override.getName(),
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedReferencedColumnNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName(),
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage() :
- super.buildUnspecifiedNameMultipleJoinColumnsMessage();
- }
-
- protected IMessage buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
- new String[] {this.override.getName()},
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() :
- super.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
- }
-
- protected IMessage buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
- new String[] {this.override.getName()},
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends JoinColumnValidator.TableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected IMessage buildTableNotValidMessage() {
- return AssociationOverrideJoinColumnValidator.this.override.isVirtual() ?
- this.buildVirtualOverrideColumnTableNotValidMessage() :
- super.buildTableNotValidMessage();
- }
-
- protected IMessage buildVirtualOverrideColumnTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualOverrideColumnTableNotValidMessage(),
- new String[] {
- AssociationOverrideJoinColumnValidator.this.override.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- protected String getVirtualOverrideColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected IMessage buildVirtualAttributeTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeColumnTableNotValidMessage(),
- new String[] {
- AssociationOverrideJoinColumnValidator.this.persistentAttribute.getName(),
- AssociationOverrideJoinColumnValidator.this.override.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java
deleted file mode 100644
index 24731b8de4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class AssociationOverrideJoinTableValidator
- extends AbstractJoinTableValidator
-{
- private final ReadOnlyAssociationOverride override;
-
- public AssociationOverrideJoinTableValidator(
- ReadOnlyAssociationOverride override,
- ReadOnlyJoinTable table,
- TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
- this.override = override;
- }
-
- public AssociationOverrideJoinTableValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAssociationOverride override,
- ReadOnlyJoinTable table,
- TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
- this.override = override;
- }
-
- @Override
- protected IMessage buildUnresolvedNameMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedNameMessage() :
- super.buildUnresolvedNameMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_NAME,
- new String[] {
- this.override.getName(),
- this.table.getName()
- },
- this.table,
- this.getTextRangeResolver().getNameTextRange()
- );
- }
-
- @Override
- protected IMessage buildUnresolvedCatalogMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedCatalogMessage() :
- super.buildUnresolvedCatalogMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedCatalogMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_CATALOG,
- new String[] {
- this.override.getName(),
- this.table.getCatalog()
- },
- this.table,
- this.getTextRangeResolver().getCatalogTextRange()
- );
- }
-
- @Override
- protected IMessage buildUnresolvedSchemaMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualOverrideUnresolvedSchemaMessage() :
- super.buildUnresolvedSchemaMessage();
- }
-
- protected IMessage buildVirtualOverrideUnresolvedSchemaMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_SCHEMA,
- new String[] {
- this.override.getName(),
- this.table.getSchema()
- },
- this.table,
- this.getTextRangeResolver().getSchemaTextRange()
- );
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- throw this.buildNestedJoinTableNotSupportedException();
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedCatalogMessage() {
- throw this.buildNestedJoinTableNotSupportedException();
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedSchemaMessage() {
- throw this.buildNestedJoinTableNotSupportedException();
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedCatalogMessage() {
- throw this.buildNestedJoinTableNotSupportedException();
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedSchemaMessage() {
- throw this.buildNestedJoinTableNotSupportedException();
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw this.buildNestedJoinTableNotSupportedException();
- }
-
- protected UnsupportedOperationException buildNestedJoinTableNotSupportedException() {
- return new UnsupportedOperationException("A nested relationship mapping cannot specify a join table"); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java
deleted file mode 100644
index b8417c6248..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class AssociationOverrideValidator
- extends OverrideValidator
-{
- public AssociationOverrideValidator(
- ReadOnlyAssociationOverride override,
- AssociationOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- super(override, container, textRangeResolver, overrideDescriptionProvider);
- }
-
- public AssociationOverrideValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAssociationOverride override,
- AssociationOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- super(persistentAttribute, override, container, textRangeResolver, overrideDescriptionProvider);
- }
-
- @Override
- protected String getVirtualOverrideUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVALID_NAME;
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.ASSOCIATION_OVERRIDE_INVALID_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVALID_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java
deleted file mode 100644
index 7f514740be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class AttributeOverrideColumnValidator
- extends NamedColumnValidator
-{
- final ReadOnlyAttributeOverride override;
-
- public AttributeOverrideColumnValidator(
- ReadOnlyAttributeOverride override,
- ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider message) {
- super(column, textRangeResolver, message);
- this.override = override;
- }
-
- public AttributeOverrideColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAttributeOverride override,
- ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider message) {
- super(persistentAttribute, column, textRangeResolver, message);
- this.override = override;
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected IMessage buildUnresolvedNameMessage() {
- return this.override.isVirtual() ?
- this.buildVirtualColumnUnresolvedNameMessage() :
- super.buildUnresolvedNameMessage();
- }
-
- protected IMessage buildVirtualColumnUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualOverrideUnresolvedNameMessage(),
- new String[] {
- this.override.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected String getVirtualOverrideUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends BaseColumnTableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected IMessage buildTableNotValidMessage() {
- return AttributeOverrideColumnValidator.this.override.isVirtual() ?
- this.buildVirtualOverrideColumnTableNotValidMessage() :
- super.buildTableNotValidMessage();
- }
-
- protected IMessage buildVirtualOverrideColumnTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualOverrideColumnTableNotValidMessage(),
- new String[] {
- AttributeOverrideColumnValidator.this.override.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- protected String getVirtualOverrideColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected IMessage buildVirtualAttributeTableNotValidMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeColumnTableNotValidMessage(),
- new String[] {
- AttributeOverrideColumnValidator.this.persistentAttribute.getName(),
- AttributeOverrideColumnValidator.this.override.getName(),
- this.getColumn().getTable(),
- this.getColumn().getName(),
- this.getColumnTableDescriptionMessage()
- },
- this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java
deleted file mode 100644
index 7f820a41c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class AttributeOverrideValidator
- extends OverrideValidator
-{
- public AttributeOverrideValidator(
- ReadOnlyAttributeOverride override,
- AttributeOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- super(override, container, textRangeResolver, overrideDescriptionProvider);
- }
-
- public AttributeOverrideValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAttributeOverride override,
- AttributeOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- super(persistentAttribute, override, container, textRangeResolver, overrideDescriptionProvider);
- }
-
- @Override
- protected String getVirtualOverrideUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME;
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.ATTRIBUTE_OVERRIDE_INVALID_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_INVALID_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java
deleted file mode 100644
index 5bab03af96..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn, R extends BaseJoinColumnTextRangeResolver>
- extends AbstractNamedColumnValidator<C, R>
-{
- private final ReadOnlyBaseJoinColumn.Owner joinColumnOwner;
-
- protected BaseJoinColumnValidator(
- C column,
- ReadOnlyBaseJoinColumn.Owner joinColumnOwner,
- R textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, textRangeResolver, provider);
- this.joinColumnOwner = joinColumnOwner;
- }
-
- protected BaseJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- C column,
- ReadOnlyBaseJoinColumn.Owner joinColumnOwner,
- R textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, textRangeResolver, provider);
- this.joinColumnOwner = joinColumnOwner;
- }
-
- @Override
- //this method will only be called if the table validates correctly
- protected void validateName(List<IMessage> messages) {
- this.validateJoinColumnName(messages);
- this.validateReferencedColumnName(messages);
- }
-
- protected void validateJoinColumnName(List<IMessage> messages) {
- if ((this.column.getSpecifiedName() == null) && (this.joinColumnOwner.getJoinColumnsSize() > 1)) {
- messages.add(this.buildUnspecifiedNameMultipleJoinColumnsMessage());
- }
- else if (this.column.getName() != null){
- super.validateName(messages);
- }
- //If the name is null and there is only one join-column, one of these validation messages will apply
- // 1. target entity does not have a primary key
- // 2. target entity is not specified
- // 3. target entity is not an entity
- }
-
- protected void validateReferencedColumnName(List<IMessage> messages) {
- if ((this.column.getSpecifiedReferencedColumnName() == null) && (this.joinColumnOwner.getJoinColumnsSize() > 1)) {
- messages.add(this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage());
- }
- //bug 315292 is the reason we are only validating if there is a specified referenced column name
- else if (this.column.getSpecifiedReferencedColumnName() != null) {
- if ((this.column.getReferencedColumnDbTable() != null) && ! this.column.referencedColumnIsResolved()) {
- messages.add(this.buildUnresolvedReferencedColumnNameMessage());
- }
- }
- //If the referenced column name is null and there is only one join-column, one of these validation messages will apply
- // 1. target entity does not have a primary key
- // 2. target entity is not specified
- // 3. target entity is not an entity
- }
-
- protected IMessage buildUnresolvedReferencedColumnNameMessage() {
- return this.columnIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnresolvedReferencedColumnNameMessage() :
- this.buildUnresolvedReferencedColumnNameMessage(this.getUnresolvedReferencedColumnNameMessage());
- }
-
- protected abstract String getUnresolvedReferencedColumnNameMessage();
-
- protected IMessage buildUnresolvedReferencedColumnNameMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- new String[] {
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- protected IMessage buildVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedReferencedColumnNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnresolvedReferencedColumnNameMessage();
-
- protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
- return this.columnIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() :
- this.buildUnspecifiedNameMultipleJoinColumnsMessage(this.getUnspecifiedNameMultipleJoinColumnsMessage());
- }
-
- protected abstract String getUnspecifiedNameMultipleJoinColumnsMessage();
-
- protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- StringTools.EMPTY_STRING_ARRAY,
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected IMessage buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(),
- new String[] {this.persistentAttribute.getName()},
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage();
-
- protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return this.columnIsPartOfVirtualAttribute() ?
- this.buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() :
- this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(this.getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage());
- }
-
- protected abstract String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
-
- protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- StringTools.EMPTY_STRING_ARRAY,
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- protected IMessage buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
- new String[] {this.persistentAttribute.getName()},
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/CollectionTableTableDescriptionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/CollectionTableTableDescriptionProvider.java
deleted file mode 100644
index 4e0deec3dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/CollectionTableTableDescriptionProvider.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-
-public class CollectionTableTableDescriptionProvider
- implements AbstractNamedColumnValidator.TableDescriptionProvider
-{
- public String getColumnTableDescriptionMessage() {
- return JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java
deleted file mode 100644
index 793fd8dc46..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on converters.
- */
-public interface ConverterTextRangeResolver
-{
- TextRange getConverterTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java
deleted file mode 100644
index c993c07889..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class DiscriminatorColumnValidator
- extends AbstractNamedColumnValidator<ReadOnlyNamedColumn, NamedColumnTextRangeResolver>
-{
- public DiscriminatorColumnValidator(
- ReadOnlyNamedColumn namedColumn,
- NamedColumnTextRangeResolver textRangeResolver) {
- super(namedColumn, textRangeResolver);
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.DISCRIMINATOR_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EmbeddableOverrideDescriptionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EmbeddableOverrideDescriptionProvider.java
deleted file mode 100644
index 615e1c2ed0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EmbeddableOverrideDescriptionProvider.java
+++ /dev/null
@@ -1,22 +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.jpa.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.OverrideValidator.OverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-
-public class EmbeddableOverrideDescriptionProvider implements OverrideDescriptionProvider
-{
- public String getOverrideDescriptionMessage() {
- return JpaValidationDescriptionMessages.ON_EMBEDDABLE;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
deleted file mode 100644
index cafc2d9552..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-
-public class EntityPrimaryKeyJoinColumnValidator
- extends PrimaryKeyJoinColumnValidator
-{
- public EntityPrimaryKeyJoinColumnValidator(
- ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(column, owner, textRangeResolver);
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityTableDescriptionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityTableDescriptionProvider.java
deleted file mode 100644
index 26a00ab41d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityTableDescriptionProvider.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-
-public class EntityTableDescriptionProvider
- implements AbstractNamedColumnValidator.TableDescriptionProvider
-{
- public String getColumnTableDescriptionMessage() {
- return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
deleted file mode 100644
index 058f7b010f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericEntityPrimaryKeyValidator
- extends AbstractEntityPrimaryKeyValidator
-{
- public GenericEntityPrimaryKeyValidator(Entity entity, PrimaryKeyTextRangeResolver textRangeResolver) {
- super(entity, textRangeResolver);
- }
-
- @Override
- protected boolean idClassIsRequired() {
- //Short circuit check for idClassIsRequired if any part of the primary key is defined
- //in a superclass for Generic types. Other validation will exist and needs to be
- //addressed first
- if(definesPrimaryKeyOnAncestor(typeMapping())){
- return false;
- }
- return super.idClassIsRequired();
- }
-
- @Override
- protected void validateIdClassConstructor(JavaPersistentType idClass,
- List<IMessage> messages, IReporter reporter) {
- if (!idClass.getJavaResourceType().hasPublicNoArgConstructor()) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_PUBLIC_NO_ARG_CONSTRUCTOR,
- new String[] {idClass.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
- }
-
- @Override
- protected void checkMissingAttributeWithPropertyAccess(JavaPersistentType idClass, AttributeMapping attributeMapping,
- List<IMessage> messages, IReporter reporter) {
- // Missing attribute is reported if missing getter or/and setter
- // property method(s) in Id class with property access
- checkMissingAttribute(idClass, attributeMapping, messages, reporter);
- }
-
- @Override
- protected void validateIdClassAttributesWithPropertyAccess(
- JavaPersistentType idClass, List<IMessage> messages,
- IReporter reporter) {
- validateIdClassPropertyMethods(idClass, messages, reporter);
- }
-
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
deleted file mode 100644
index c431490852..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericMappedSuperclassPrimaryKeyValidator extends
- AbstractMappedSuperclassPrimaryKeyValidator {
-
- public GenericMappedSuperclassPrimaryKeyValidator(MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
- super(mappedSuperclass, textRangeResolver);
- }
-
- @Override
- protected boolean idClassIsRequired() {
- //Short circuit check for idClassIsRequired if any part of the primary key is defined
- //in a superclass for Generic types. Other validation will exist and needs to be
- //addressed first
- if(definesPrimaryKeyOnAncestor(typeMapping())){
- return false;
- }
- return super.idClassIsRequired();
- }
-
- @Override
- protected void validateIdClassConstructor(JavaPersistentType idClass,
- List<IMessage> messages, IReporter reporter) {
- if (!idClass.getJavaResourceType().hasPublicNoArgConstructor()) {
- messages.add(DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_PUBLIC_NO_ARG_CONSTRUCTOR,
- new String[] {idClass.getName()},
- typeMapping(),
- textRangeResolver().getIdClassTextRange()));
- }
- }
-
- @Override
- protected void checkMissingAttributeWithPropertyAccess(JavaPersistentType idClass, AttributeMapping attributeMapping,
- List<IMessage> messages, IReporter reporter) {
- // Missing attribute is reported if missing getter or/and setter
- // property method(s) in Id class with property access
- checkMissingAttribute(idClass, attributeMapping, messages, reporter);
- }
-
- @Override
- protected void validateIdClassAttributesWithPropertyAccess(
- JavaPersistentType idClass, List<IMessage> messages,
- IReporter reporter) {
- validateIdClassPropertyMethods(idClass, messages, reporter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
deleted file mode 100644
index 03deea394b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.HashBag;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.MappingFileRoot;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer;
-import org.eclipse.jpt.jpa.core.jpa2.context.JpaRootContextNode2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceXml2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * the context model root
- */
-public class GenericRootContextNode
- extends AbstractJpaContextNode
- implements JpaRootContextNode2_0
-{
- /* This object has no parent, so it must point to the JPA project explicitly. */
- protected final JpaProject jpaProject;
-
- /* Main context object. */
- protected PersistenceXml persistenceXml;
-
-
- public GenericRootContextNode(JpaProject jpaProject) {
- super(null); // the JPA project is not really a "parent"...
-
- if (jpaProject == null) {
- throw new NullPointerException();
- }
- this.jpaProject = jpaProject;
- this.persistenceXml = this.buildPersistenceXml();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncPersistenceXml();
- }
-
- @Override
- public void update() {
- super.update();
- this.updatePersistenceXml();
- }
-
-
- // ********** persistence.xml **********
-
- public PersistenceXml getPersistenceXml() {
- return this.persistenceXml;
- }
-
- protected void setPersistenceXml(PersistenceXml persistenceXml) {
- PersistenceXml old = this.persistenceXml;
- this.persistenceXml = persistenceXml;
- this.firePropertyChanged(PERSISTENCE_XML_PROPERTY, old, persistenceXml);
- }
-
- protected PersistenceXml buildPersistenceXml() {
- JpaXmlResource xmlResource = this.resolvePersistenceXmlResource();
- return (xmlResource == null) ? null : this.buildPersistenceXml(xmlResource);
- }
-
- protected void syncPersistenceXml() {
- this.syncPersistenceXml(true);
- }
-
- /**
- * We call this method from both {@link #syncPersistenceXml()} and
- * {@link #updatePersistenceXml()} because<ul>
- * <li>a <em>sync</em> will occur when the file is edited directly;
- * and the user could modify something (e.g. the version number) that
- * triggers the file being "resolved" or not;
- * see {@link #resolvePersistenceXmlResource()}
- * <li>an <em>update</em> will occur whenever the entire file is added or
- * removed
- * </ul>
- */
- protected void syncPersistenceXml(boolean sync) {
- JpaXmlResource xmlResource = this.resolvePersistenceXmlResource();
- if (xmlResource == null) {
- if (this.persistenceXml != null) {
- this.persistenceXml.dispose();
- this.setPersistenceXml(null);
- }
- } else {
- if (this.persistenceXml == null) {
- this.setPersistenceXml(this.buildPersistenceXml(xmlResource));
- } else {
- if (sync) {
- this.persistenceXml.synchronizeWithResourceModel();
- } else {
- this.persistenceXml.update();
- }
- }
- }
- }
-
- protected JpaXmlResource resolvePersistenceXmlResource() {
- JpaXmlResource xmlResource = this.jpaProject.getPersistenceXmlResource();
- if (xmlResource == null) {
- return null;
- }
- if (xmlResource.isReverting()) {
- // 308254 - this can happen when persistence.xml is closed without saving;
- // the model is completely whacked in another thread - so wipe our model(?)
- return null;
- }
- JptResourceType resourceType = xmlResource.getResourceType();
- if (resourceType == null) {
- return null;
- }
- if ( ! this.getJpaPlatform().supportsResourceType(resourceType)) {
- return null;
- }
- return xmlResource;
- }
-
- /**
- * pre-condition: 'xmlResource' is not <code>null</code>
- */
- protected PersistenceXml buildPersistenceXml(JpaXmlResource xmlResource) {
- return this.getJpaFactory().buildPersistenceXml(this, xmlResource);
- }
-
- protected void updatePersistenceXml() {
- this.syncPersistenceXml(false);
- }
-
-
- // ********** misc **********
-
- @Override
- protected boolean requiresParent() {
- return false;
- }
-
- @Override
- public void stateChanged() {
- super.stateChanged();
- // forward to JPA project
- this.jpaProject.stateChanged();
- }
-
- @Override
- public JpaProject getJpaProject() {
- return this.jpaProject;
- }
-
- @Override
- public IResource getResource() {
- return this.getProject();
- }
-
- protected IProject getProject() {
- return this.jpaProject.getProject();
- }
-
- @Override
- public PersistenceUnit getPersistenceUnit() {
- return null;
- }
-
- @Override
- public MappingFileRoot getMappingFileRoot() {
- return null;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.jpaProject.getName());
- }
-
-
- // ********** metamodel **********
-
- public void initializeMetamodel() {
- if (this.persistenceXml != null) {
- ((PersistenceXml2_0) this.persistenceXml).initializeMetamodel();
- }
- }
-
- public IStatus synchronizeMetamodel(IProgressMonitor monitor) {
- return (this.persistenceXml != null) ?
- ((PersistenceXml2_0) this.persistenceXml).synchronizeMetamodel(monitor) :
- Status.OK_STATUS;
- }
-
- public void disposeMetamodel() {
- if (this.persistenceXml != null) {
- ((PersistenceXml2_0) this.persistenceXml).disposeMetamodel();
- }
- }
-
-
- // ********** validation **********
-
- public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
-
- if (this.persistenceXml == null) {
- messages.add(buildPersistenceXmlValidationMessage());
- return;
- }
- if ( ! this.jpaProject.discoversAnnotatedClasses()) {
- this.validateOrphanClasses(messages);
- }
- this.persistenceXml.validate(messages, reporter);
- }
-
- protected IMessage buildPersistenceXmlValidationMessage() {
- int severity = IMessage.HIGH_SEVERITY;
- IFile file = getPlatformFile();
- if (file != null && file.exists()) {
- JpaXmlResource xmlResource = this.jpaProject.getPersistenceXmlResource();
- if (xmlResource != null
- && ! getJpaPlatform().supportsResourceType(xmlResource.getResourceType())) {
- return DefaultJpaValidationMessages.buildMessage(
- severity,
- JpaValidationMessages.PERSISTENCE_XML_UNSUPPORTED_CONTENT,
- file);
- }
- return DefaultJpaValidationMessages.buildMessage(
- severity,
- JpaValidationMessages.PERSISTENCE_XML_INVALID_CONTENT,
- file);
- }
- return DefaultJpaValidationMessages.buildMessage(
- severity,
- JpaValidationMessages.PROJECT_NO_PERSISTENCE_XML,
- this);
- }
-
- protected IFile getPlatformFile() {
- return this.jpaProject.getPlatformFile(JptJpaCorePlugin.DEFAULT_PERSISTENCE_XML_RUNTIME_PATH);
- }
-
- protected void validateOrphanClasses(List<IMessage> messages) {
- Persistence persistence = this.persistenceXml.getPersistence();
- if (persistence == null) {
- return; // handled with other validation
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return; // the context model currently only supports 1 persistence unit
- }
-
- PersistenceUnit persistenceUnit = persistence.getPersistenceUnits().iterator().next();
- HashBag<String> annotatedClassNames = CollectionTools.bag(this.jpaProject.getAnnotatedJavaSourceClassNames());
- HashBag<String> orphans = annotatedClassNames.clone();
- for (String annotatedClassName : annotatedClassNames) {
- if (persistenceUnit.specifiesPersistentType(annotatedClassName)) {
- orphans.remove(annotatedClassName);
- }
- else if (MetamodelSynchronizer.MetamodelTools.isMetamodel(getJpaProject().getJavaResourceType(annotatedClassName))) {
- orphans.remove(annotatedClassName);
- }
- }
-
- // TODO remove 'jrcu'
- // replace jrcu.getFile() with jrpt.getFile()
- // replace jrpt.getMappingAnnotation().getTextRange(jrcu.buildASTRoot())
- // with jrpt.getMappingAnnotation().getTextRange()
- // (new method #getTextRange() ?)
- Iterable<String> typeMappingAnnotationNames = this.jpaProject.getTypeMappingAnnotationNames();
- for (String orphan : orphans) {
- JavaResourceAbstractType jrt = this.jpaProject.getJavaResourceType(orphan);
- JavaResourceCompilationUnit jrcu = jrt.getJavaResourceCompilationUnit();
- if (jrt.isAnnotatedWithAnyOf(typeMappingAnnotationNames)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT,
- new String[] {jrt.getQualifiedName()},
- jrt.getFile(),
- jrt.getNameTextRange(jrcu.buildASTRoot())
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT,
- new String[] {jrt.getName()},
- jrt.getFile(),
- jrt.getNameTextRange(jrcu.buildASTRoot())
- )
- );
- }
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java
deleted file mode 100644
index 21e505ec43..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class GenericTypeMappingValidator
- extends AbstractTypeMappingValidator<TypeMapping>
-{
- public GenericTypeMappingValidator(TypeMapping typeMapping, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
- super(typeMapping, jrt, textRangeResolver);
- }
-
- @Override
- protected void validateType(List<IMessage> messages) {
- if (this.isFinalType()) {
- messages.add(this.buildTypeMessage(JpaValidationMessages.TYPE_MAPPING_FINAL_CLASS));
- }
- if (this.isMemberType()) {
- messages.add(this.buildTypeMessage(JpaValidationMessages.TYPE_MAPPING_MEMBER_CLASS));
- }
- if (this.hasNoArgConstructor()) {
- if (this.hasPrivateNoArgConstructor()) {
- messages.add(this.buildTypeMessage(JpaValidationMessages.TYPE_MAPPING_CLASS_PRIVATE_NO_ARG_CONSTRUCTOR));
- }
- }
- else {
- messages.add(this.buildTypeMessage(JpaValidationMessages.TYPE_MAPPING_CLASS_MISSING_NO_ARG_CONSTRUCTOR));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java
deleted file mode 100644
index a495cc48ed..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class InverseJoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyJoinColumn, JoinColumnTextRangeResolver>
-{
- protected InverseJoinColumnValidator(
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
- }
-
- public InverseJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.INVERSE_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends BaseColumnTableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected String getColumnTableNotValidMessage() {
- return JpaValidationMessages.INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java
deleted file mode 100644
index 87ddf14046..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class JoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyJoinColumn, JoinColumnTextRangeResolver>
-{
- protected JoinColumnValidator(
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
- }
-
- public JoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends BaseColumnTableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected String getColumnTableNotValidMessage() {
- return JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableTableDescriptionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableTableDescriptionProvider.java
deleted file mode 100644
index 91a0fbc3e9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableTableDescriptionProvider.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-
-public class JoinTableTableDescriptionProvider
- implements AbstractNamedColumnValidator.TableDescriptionProvider
-{
- public String getColumnTableDescriptionMessage() {
- return JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java
deleted file mode 100644
index 982d7c16c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class JoinTableValidator
- extends AbstractJoinTableValidator
-{
- public JoinTableValidator(ReadOnlyPersistentAttribute persistentAttribute, ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedCatalogMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedSchemaMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java
deleted file mode 100644
index d9c3c2f232..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class MapKeyAttributeOverrideColumnValidator
- extends AttributeOverrideColumnValidator
-{
- public MapKeyAttributeOverrideColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAttributeOverride override,
- ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, override, column, textRangeResolver, provider);
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected String getVirtualOverrideUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends AttributeOverrideColumnValidator.TableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected String getVirtualOverrideColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java
deleted file mode 100644
index 951bd5634b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class MapKeyAttributeOverrideValidator
- extends AttributeOverrideValidator
-{
- public MapKeyAttributeOverrideValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyAttributeOverride override,
- AttributeOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- super(persistentAttribute, override, container, textRangeResolver, overrideDescriptionProvider);
- }
-
- @Override
- protected String getVirtualOverrideUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java
deleted file mode 100644
index ceced2be43..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class MapKeyColumnValidator
- extends AbstractNamedColumnValidator<ReadOnlyBaseColumn, TableColumnTextRangeResolver>
-{
- public MapKeyColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, textRangeResolver, provider);
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.MAP_KEY_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends BaseColumnTableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected String getColumnTableNotValidMessage() {
- return JpaValidationMessages.MAP_KEY_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MappedSuperclassOverrideDescriptionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MappedSuperclassOverrideDescriptionProvider.java
deleted file mode 100644
index 71a7dc083e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MappedSuperclassOverrideDescriptionProvider.java
+++ /dev/null
@@ -1,22 +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.jpa.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.OverrideValidator.OverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-
-public class MappedSuperclassOverrideDescriptionProvider implements OverrideDescriptionProvider
-{
- public String getOverrideDescriptionMessage() {
- return JpaValidationDescriptionMessages.ON_MAPPED_SUPERCLASS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java
deleted file mode 100644
index 0487f75ba9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class NamedColumnValidator
- extends AbstractNamedColumnValidator<ReadOnlyBaseColumn, TableColumnTextRangeResolver>
-{
-
- protected NamedColumnValidator(
- ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, textRangeResolver, provider);
- }
-
- public NamedColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, textRangeResolver, provider);
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new BaseColumnTableValidator();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
deleted file mode 100644
index 5f29dd78dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class OneToOnePrimaryKeyJoinColumnValidator
- extends PrimaryKeyJoinColumnValidator
-{
- public OneToOnePrimaryKeyJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(persistentAttribute, column, owner, textRangeResolver);
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java
deleted file mode 100644
index 30605494ce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class OverrideValidator
- implements JptValidator
-{
- /** this is <code>null</code> for overrides defined on entities */
- protected final ReadOnlyPersistentAttribute persistentAttribute;
-
- protected final ReadOnlyOverride override;
-
- protected final OverrideContainer container;
-
- protected final OverrideTextRangeResolver textRangeResolver;
-
- protected final OverrideDescriptionProvider overrideDescriptionProvider;
-
- protected OverrideValidator(
- ReadOnlyOverride override,
- OverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- this(null, override, container, textRangeResolver, overrideDescriptionProvider);
- }
-
-
- protected OverrideValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyOverride override,
- OverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
- OverrideDescriptionProvider overrideDescriptionProvider) {
- this.persistentAttribute = persistentAttribute;
- this.override = override;
- this.container = container;
- this.textRangeResolver = textRangeResolver;
- this.overrideDescriptionProvider = overrideDescriptionProvider;
- }
-
- protected String getOverrideDescriptionMessage() {
- return this.overrideDescriptionProvider.getOverrideDescriptionMessage();
- }
-
- public boolean validate(List<IMessage> messages, IReporter reporter) {
- if (this.validateType(messages)) {
- // validate the name only if the type is valid
- return this.validateName(messages);
- }
- return false;
- }
-
- protected boolean validateType(List<IMessage> messages) {
- if (this.container.getOverridableTypeMapping() == null) {
- messages.add(this.buildUnresolvedOverrideTypeMessage());
- return false;
- }
- return true;
- }
-
- protected IMessage buildUnresolvedOverrideTypeMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getUnresolvedOverrideTypeMessage(),
- new String[] {this.override.getName()},
- this.override,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected String getUnresolvedOverrideTypeMessage() {
- return this.override.isVirtual() ?
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE :
- JpaValidationMessages.ATTRIBUTE_OVERRIDE_INVALID_TYPE;
- }
-
- protected boolean validateName(List<IMessage> messages) {
- if ( ! CollectionTools.contains(this.container.getAllOverridableNames(), this.override.getName())) {
- messages.add(this.buildUnresolvedNameMessage());
- return false;
- }
- return true;
- }
-
- protected IMessage buildUnresolvedNameMessage() {
- if (this.override.isVirtual()) {
- // this can happen when an erroneous Java override triggers a
- // corresponding orm.xml virtual override
- return this.buildVirtualUnresolvedNameMessage();
- }
- if (this.overrideIsPartOfVirtualAttribute()) {
- return this.buildVirtualAttributeUnresolvedNameMessage();
- }
- return this.buildUnresolvedNameMessage(this.getUnresolvedNameMessage());
- }
-
- protected IMessage buildVirtualUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualOverrideUnresolvedNameMessage(),
- new String[] {
- this.override.getName(),
- this.getOverrideDescriptionMessage(),
- this.container.getOverridableTypeMapping().getName()
- },
- this.override,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getVirtualOverrideUnresolvedNameMessage();
-
- protected IMessage buildUnresolvedNameMessage(String message) {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- message,
- new String[] {
- this.override.getName(),
- this.getOverrideDescriptionMessage(),
- this.container.getOverridableTypeMapping().getName()
- },
- this.override,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getUnresolvedNameMessage();
-
- protected IMessage buildVirtualAttributeUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- this.getVirtualAttributeUnresolvedNameMessage(),
- new String[] {
- this.persistentAttribute.getName(),
- this.override.getName(),
- this.getOverrideDescriptionMessage(),
- this.container.getOverridableTypeMapping().getName()
- },
- this.override,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- protected abstract String getVirtualAttributeUnresolvedNameMessage();
-
- protected boolean overrideIsPartOfVirtualAttribute() {
- return (this.persistentAttribute != null) &&
- this.persistentAttribute.isVirtual();
- }
-
- public interface OverrideDescriptionProvider {
- String getOverrideDescriptionMessage();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java
deleted file mode 100644
index 6d06448154..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.FieldAccessor;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class PersistentFieldValidator
- extends AbstractPersistentAttributeValidator
-{
-
- protected FieldAccessor fieldAccessor;
-
- public PersistentFieldValidator(
- ReadOnlyPersistentAttribute persistentAttribute, FieldAccessor fieldAccessor, PersistentAttributeTextRangeResolver textRangeResolver)
- {
- super(persistentAttribute, textRangeResolver);
- this.fieldAccessor = fieldAccessor;
- }
-
- @Override
- protected void validateMappedAttribute(List<IMessage> messages) {
- if (this.fieldAccessor.isFinal()) {
- messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_FINAL_FIELD));
- }
- if (this.fieldAccessor.isPublic()) {
- messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_PUBLIC_FIELD));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java
deleted file mode 100644
index b4444380b2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.PropertyAccessor;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class PersistentPropertyValidator
- extends AbstractPersistentAttributeValidator
-{
-
- protected PropertyAccessor propertyAccessor;
-
- public PersistentPropertyValidator(
- ReadOnlyPersistentAttribute persistentAttribute, PropertyAccessor propertyAccessor, PersistentAttributeTextRangeResolver textRangeResolver)
- {
- super(persistentAttribute, textRangeResolver);
- this.propertyAccessor = propertyAccessor;
- }
-
- @Override
- //TODO validation for null getter or null setter - would apply to EclipseLink too
- //TODO validation for annotated setter? - would apply to EclipseLink too
- protected void validateMappedAttribute(List<IMessage> messages) {
- if (this.propertyAccessor.getResourceGetter() != null && this.propertyAccessor.getResourceGetter().isFinal()) {
- messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_FINAL_GETTER));
- }
- if (this.propertyAccessor.getResourceSetter() != null && this.propertyAccessor.getResourceSetter().isFinal()) {
- messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_FINAL_SETTER));
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
deleted file mode 100644
index c531b28f01..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public abstract class PrimaryKeyJoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyBaseJoinColumn, BaseJoinColumnTextRangeResolver>
-{
- protected PrimaryKeyJoinColumnValidator(
- ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(column, owner, textRangeResolver, TableDescriptionProvider.Null.instance());
- }
-
- protected PrimaryKeyJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(persistentAttribute, column, owner, textRangeResolver, TableDescriptionProvider.Null.instance());
- }
-
- @Override
- protected IMessage buildUnresolvedNameMessage() {
- return this.column.isVirtual() ?
- this.buildUnresolvedNameMessage(this.getVirtualPKJoinColumnUnresolvedNameMessage()) :
- super.buildUnresolvedNameMessage();
- }
-
- protected String getVirtualPKJoinColumnUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected IMessage buildUnresolvedReferencedColumnNameMessage() {
- return this.column.isVirtual() ?
- this.buildUnresolvedReferencedColumnNameMessage(this.getVirtualPKJoinColumnUnresolvedReferencedColumnNameMessage()) :
- super.buildUnresolvedReferencedColumnNameMessage();
- }
-
- protected String getVirtualPKJoinColumnUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
- return this.column.isVirtual() ?
- this.buildUnspecifiedNameMultipleJoinColumnsMessage(this.getVirtualPKJoinColumnUnspecifiedNameMultipleJoinColumnsMessage()) :
- super.buildUnspecifiedNameMultipleJoinColumnsMessage();
- }
-
- protected String getVirtualPKJoinColumnUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return this.column.isVirtual() ?
- this.buildUnspecifiedNameMultipleJoinColumnsMessage(this.getVirtualPKJoinColumnUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage()) :
- super.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
- }
-
- protected String getVirtualPKJoinColumnUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/RelationshipStrategyTableDescriptionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/RelationshipStrategyTableDescriptionProvider.java
deleted file mode 100644
index 6877fdb639..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/RelationshipStrategyTableDescriptionProvider.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-
-public class RelationshipStrategyTableDescriptionProvider
- implements AbstractNamedColumnValidator.TableDescriptionProvider
-{
- private final RelationshipStrategy relationshipStrategy;
-
- public RelationshipStrategyTableDescriptionProvider(RelationshipStrategy relationshipStrategy) {
- super();
- this.relationshipStrategy = relationshipStrategy;
- }
-
- public String getColumnTableDescriptionMessage() {
- return this.relationshipStrategy.getColumnTableNotValidDescription();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
deleted file mode 100644
index 7ecf62d72b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class SecondaryTablePrimaryKeyJoinColumnValidator
- extends PrimaryKeyJoinColumnValidator
-{
- private final ReadOnlySecondaryTable secondaryTable;
-
- public SecondaryTablePrimaryKeyJoinColumnValidator(
- ReadOnlySecondaryTable secondaryTable,
- ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(column, owner, textRangeResolver);
- this.secondaryTable = secondaryTable;
- }
-
- protected boolean secondaryTableIsVirtual() {
- return this.secondaryTable.isVirtual();
- }
-
- protected String getSecondaryTableName() {
- return this.secondaryTable.getName();
- }
-
- @Override
- protected IMessage buildUnresolvedNameMessage() {
- return this.secondaryTableIsVirtual() ?
- this.buildVirtualSecondaryTableUnresolvedNameMessage() :
- super.buildUnresolvedNameMessage();
- }
-
- protected IMessage buildVirtualSecondaryTableUnresolvedNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME,
- new String[] {
- this.getSecondaryTableName(),
- this.column.getName(),
- this.column.getDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected IMessage buildUnresolvedReferencedColumnNameMessage() {
- return this.secondaryTableIsVirtual() ?
- this.buildVirtualSecondaryTableUnresolvedReferencedColumnNameMessage() :
- super.buildUnresolvedReferencedColumnNameMessage();
- }
-
- protected IMessage buildVirtualSecondaryTableUnresolvedReferencedColumnNameMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
- new String[] {
- this.getSecondaryTableName(),
- this.column.getReferencedColumnName(),
- this.column.getReferencedColumnDbTable().getName()
- },
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
- return this.secondaryTableIsVirtual() ?
- this.buildVirtualSecondaryTableUnspecifiedNameMultipleJoinColumnsMessage() :
- super.buildUnspecifiedNameMultipleJoinColumnsMessage();
- }
-
- protected IMessage buildVirtualSecondaryTableUnspecifiedNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
- new String[] {this.getSecondaryTableName()},
- this.column,
- this.textRangeResolver.getNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return this.secondaryTableIsVirtual() ?
- this.buildVirtualSecondaryTableUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() :
- super.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
- }
-
- protected IMessage buildVirtualSecondaryTableUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
- new String[] {this.getSecondaryTableName()},
- this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
- );
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java
deleted file mode 100644
index ff7cbe3139..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class SecondaryTableValidator
- extends AbstractTableValidator
-{
- public SecondaryTableValidator(ReadOnlySecondaryTable table, TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
- }
-
- @Override
- protected String getUnresolvedCatalogMessage() {
- return JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_CATALOG;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedCatalogMessage() {
- throw this.buildAttributeTableNotSupportedException();
- }
-
- @Override
- protected String getUnresolvedSchemaMessage() {
- return JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_SCHEMA;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedSchemaMessage() {
- throw this.buildAttributeTableNotSupportedException();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw this.buildAttributeTableNotSupportedException();
- }
-
- protected UnsupportedOperationException buildAttributeTableNotSupportedException() {
- return new UnsupportedOperationException("An attribute cannot specify a secondary table"); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java
deleted file mode 100644
index 6a099e58b6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class TableValidator
- extends AbstractTableValidator
-{
- public TableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
- }
-
- @Override
- protected String getUnresolvedCatalogMessage() {
- return JpaValidationMessages.TABLE_UNRESOLVED_CATALOG;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedCatalogMessage() {
- throw this.buildAttributeTableNotSupportedException();
- }
-
- @Override
- protected String getUnresolvedSchemaMessage() {
- return JpaValidationMessages.TABLE_UNRESOLVED_SCHEMA;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedSchemaMessage() {
- throw this.buildAttributeTableNotSupportedException();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.TABLE_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw this.buildAttributeTableNotSupportedException();
- }
-
- protected UnsupportedOperationException buildAttributeTableNotSupportedException() {
- return new UnsupportedOperationException("An attribute cannot specify a table"); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java
deleted file mode 100644
index 413f615d76..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractJavaConverter
- extends AbstractJavaJpaContextNode
- implements JavaConverter
-{
-
- protected final JavaConverter.Owner owner;
-
- protected AbstractJavaConverter(JavaAttributeMapping parent, JavaConverter.Owner owner) {
- super(parent);
- this.owner = owner;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.owner.buildValidator(this, this.buildConverterTextRangeResolver(astRoot)).validate(messages, reporter);
- }
-
-
- protected ConverterTextRangeResolver buildConverterTextRangeResolver(final CompilationUnit astRoot) {
- return new ConverterTextRangeResolver() {
- public TextRange getConverterTextRange() {
- return getValidationTextRange(astRoot);
- }
- };
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- return this.getConverterAnnotation().getTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaAttributeMapping getParent() {
- return (JavaAttributeMapping) super.getParent();
- }
-
- protected JavaAttributeMapping getAttributeMapping() {
- return this.getParent();
- }
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getAttributeMapping().getResourceAttribute();
- }
-
- public void dispose() {
- // NOP
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java
deleted file mode 100644
index 10f4c4e22b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-
-/**
- * Java named discriminator column
- */
-public abstract class AbstractJavaNamedDiscriminatorColumn<A extends DiscriminatorColumnAnnotation, O extends JavaReadOnlyNamedDiscriminatorColumn.Owner>
- extends AbstractJavaNamedColumn<A, O>
- implements JavaNamedDiscriminatorColumn
-{
- protected DiscriminatorType specifiedDiscriminatorType;
- protected DiscriminatorType defaultDiscriminatorType;
-
- protected Integer specifiedLength;
- protected int defaultLength;
-
- protected AbstractJavaNamedDiscriminatorColumn(JavaJpaContextNode parent, O owner) {
- this(parent, owner, null);
- }
-
- protected AbstractJavaNamedDiscriminatorColumn(JavaJpaContextNode parent, O owner, A columnAnnotation) {
- super(parent, owner, columnAnnotation);
- this.specifiedDiscriminatorType = this.buildSpecifiedDiscriminatorType();
- this.specifiedLength = this.buildSpecifiedLength();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedDiscriminatorType_(this.buildSpecifiedDiscriminatorType());
- this.setSpecifiedLength_(this.buildSpecifiedLength());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultDiscriminatorType(this.buildDefaultDiscriminatorType());
- this.setDefaultLength(this.buildDefaultLength());
- }
-
-
- // ********** column annotation **********
-
- @Override
- public abstract A getColumnAnnotation();
-
-
- // ********** discriminator type **********
-
- public DiscriminatorType getDiscriminatorType() {
- return (this.specifiedDiscriminatorType != null) ? this.specifiedDiscriminatorType : this.defaultDiscriminatorType;
- }
-
- public DiscriminatorType getSpecifiedDiscriminatorType() {
- return this.specifiedDiscriminatorType;
- }
-
- public void setSpecifiedDiscriminatorType(DiscriminatorType discriminatorType) {
- if (this.valuesAreDifferent(this.specifiedDiscriminatorType, discriminatorType)) {
- this.getColumnAnnotation().setDiscriminatorType(DiscriminatorType.toJavaResourceModel(discriminatorType));
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedDiscriminatorType_(discriminatorType);
- }
- }
-
- protected void setSpecifiedDiscriminatorType_(DiscriminatorType discriminatorType) {
- DiscriminatorType old = this.specifiedDiscriminatorType;
- this.specifiedDiscriminatorType = discriminatorType;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
- }
-
- protected DiscriminatorType buildSpecifiedDiscriminatorType() {
- return DiscriminatorType.fromJavaResourceModel(this.getColumnAnnotation().getDiscriminatorType());
- }
-
- public DiscriminatorType getDefaultDiscriminatorType() {
- return this.defaultDiscriminatorType;
- }
-
- protected void setDefaultDiscriminatorType(DiscriminatorType discriminatorType) {
- DiscriminatorType old = this.defaultDiscriminatorType;
- this.defaultDiscriminatorType = discriminatorType;
- this.firePropertyChanged(DEFAULT_DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
- }
-
- protected DiscriminatorType buildDefaultDiscriminatorType() {
- return this.owner.getDefaultDiscriminatorType();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- public void setSpecifiedLength(Integer length) {
- if (this.valuesAreDifferent(this.specifiedLength, length)) {
- this.getColumnAnnotation().setLength(length);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedLength_(length);
- }
- }
-
- protected void setSpecifiedLength_(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- return this.getColumnAnnotation().getLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int length) {
- int old = this.defaultLength;
- this.defaultLength = length;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, length);
- }
-
- protected int buildDefaultLength() {
- return this.owner.getDefaultLength();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java
deleted file mode 100644
index 9671612069..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java
+++ /dev/null
@@ -1,593 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.common.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java override container
- * <p>
- * <strong>NB:</strong> Although not typical, a Java override container can
- * correspond to only a subset of the annotations in the Java source code.
- * In that case, the index of a specified override must be translated to its
- * corresponding annotation's index before we manipulate the annotations.
- * <p>
- * As of JPA 2.0, the only place we need these translations is for the attribute
- * overrides for an embedded collection. If an embedded collection is a
- * {@link java.util.Map Map}, the attribute overrides can override the mappings
- * for either the map's keys or the map's values. The names of the overrides for
- * the map's keys are prefixed with <code>"key."</code> while the overrides
- * for the map's values are prefixed with <code>"value."</code>.
- * (Just a bit of hack, courtesy of the JPA spec committee.)
- */
-public abstract class AbstractJavaOverrideContainer<
- O extends JavaOverrideContainer.Owner,
- R extends JavaReadOnlyOverride,
- S extends JavaOverride,
- V extends JavaVirtualOverride,
- A extends OverrideAnnotation & NestableAnnotation
- >
- extends AbstractJavaJpaContextNode
- implements JavaOverrideContainer2_0
-{
- /**
- * this can be <code>null</code> if the container is "read-only"
- * (i.e. a <em>null</em> container)
- * @see #getOwner2_0()
- */
- protected final O owner;
-
- protected final Vector<S> specifiedOverrides = new Vector<S>();
- protected final SpecifiedOverrideContainerAdapter specifiedOverrideContainerAdapter = new SpecifiedOverrideContainerAdapter();
-
- protected final Vector<V> virtualOverrides = new Vector<V>();
- protected final VirtualOverrideContainerAdapter virtualOverrideContainerAdapter = new VirtualOverrideContainerAdapter();
-
-
- protected AbstractJavaOverrideContainer(JavaJpaContextNode parent, O owner) {
- super(parent);
- this.owner = owner;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.synchronizeNodesWithResourceModel(this.getSpecifiedOverrides());
- // the virtual overrides do not need a sync
- }
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedOverrides();
- this.updateVirtualOverrides();
- }
-
-
- // ********** overrides **********
-
- @SuppressWarnings("unchecked")
- public ListIterable<R> getOverrides() {
- return new CompositeListIterable<R>(this.getReadOnlySpecifiedOverrides(), this.getReadOnlyVirtualOverrides());
- }
-
- public int getOverridesSize() {
- return this.specifiedOverrides.size() + this.virtualOverrides.size();
- }
-
- public R getOverrideNamed(String name) {
- return this.selectOverrideNamed(this.getOverrides(), name);
- }
-
- public Iterable<String> getOverrideNames() {
- return new FilteringIterable<String>(this.getOverrideNames_(), NotNullFilter.<String>instance());
- }
-
- protected Iterable<String> getOverrideNames_() {
- return new TransformationIterable<R, String>(this.getOverrides()) {
- @Override
- protected String transform(R override) {
- return override.getName();
- }
- };
- }
-
-
- // ********** override conversions **********
-
- /**
- * <em>Silently</em> add the new virtual override before removing the
- * specified override, or the <em>update</em> will discover the missing
- * virtual override and add it preemptively.
- */
- public V convertOverrideToVirtual(Override_ override) {
- if (override.isVirtual()) {
- throw new IllegalArgumentException("Override is already virtual: " + override); //$NON-NLS-1$
- }
-
- @SuppressWarnings("unchecked")
- S specifiedOverride = (S) override;
- int virtualIndex = this.virtualOverrides.size();
- String overrideName = specifiedOverride.getName();
- V virtualOverride = null;
- // make sure the specified override actually overrides something before building the virtual override
- if (this.overrideWillBeVirtual(overrideName, specifiedOverride)) {
- virtualOverride = this.buildVirtualOverride(overrideName);
- this.virtualOverrides.add(virtualIndex, virtualOverride);
- }
-
- this.removeSpecifiedOverride(specifiedOverride); // trigger update
-
- if (virtualOverride != null) {
- this.fireItemAdded(VIRTUAL_OVERRIDES_LIST, virtualIndex, virtualOverride);
- }
- return virtualOverride;
- }
-
- /**
- * Return whether the specified override name will be a
- * <em>virtual</em> override when the specified specified override is
- * removed from the container. The override name must be among the
- * valid override names and it must not correspond to any of the
- * remaining specified overrides.
- */
- protected boolean overrideWillBeVirtual(String overrideName, S specifiedOverrideToBeRemoved) {
- return CollectionTools.contains(this.getAllOverridableNames(), overrideName) &&
- (this.getSpecifiedOverrideNamed(overrideName, specifiedOverrideToBeRemoved) == null);
- }
-
- /**
- * <em>Silently</em> remove the virtual override and add the new specified
- * override before naming the specified override, or the <em>update</em>
- * will discover the dangling virtual override and remove it preemptively.
- */
- public S convertOverrideToSpecified(VirtualOverride override) {
- if ( ! override.isVirtual()) {
- throw new IllegalArgumentException("Override is already specified: " + override); //$NON-NLS-1$
- }
-
- @SuppressWarnings("unchecked")
- V virtualOverride = (V) override;
- int virtualIndex = this.virtualOverrides.indexOf(virtualOverride);
- this.virtualOverrides.remove(virtualIndex);
-
- int specifiedIndex = this.specifiedOverrides.size();
- S specifiedOverride = this.buildSpecifiedOverride(this.buildOverrideAnnotation(specifiedIndex));
- this.specifiedOverrides.add(specifiedIndex, specifiedOverride);
-
- this.initializeSpecifiedOverride(specifiedOverride, virtualOverride); // trigger update
-
- this.fireItemRemoved(VIRTUAL_OVERRIDES_LIST, virtualIndex, virtualOverride);
- this.fireItemAdded(SPECIFIED_OVERRIDES_LIST, specifiedIndex, specifiedOverride);
- return specifiedOverride;
- }
-
- protected abstract void initializeSpecifiedOverride(S specifiedOverride, V virtualOverride);
-
-
- // ********** specified overrides **********
-
- public ListIterable<S> getSpecifiedOverrides() {
- return new LiveCloneListIterable<S>(this.specifiedOverrides);
- }
-
- @SuppressWarnings("unchecked")
- protected ListIterable<R> getReadOnlySpecifiedOverrides() {
- // S should always be a subtype of R, but we can't enforce that in the
- // class declaration...
- return (ListIterable<R>) this.getSpecifiedOverrides();
- }
-
- public int getSpecifiedOverridesSize() {
- return this.specifiedOverrides.size();
- }
-
- public S getSpecifiedOverride(int index) {
- return this.specifiedOverrides.get(index);
- }
-
- public S getSpecifiedOverrideNamed(String name) {
- return this.getSpecifiedOverrideNamed(name, null);
- }
-
- @SuppressWarnings("unchecked")
- protected S getSpecifiedOverrideNamed(String name, S exclude) {
- return (S) this.selectOverrideNamed(this.getReadOnlySpecifiedOverrides(), name, exclude);
- }
-
- protected S addSpecifiedOverride() {
- return this.addSpecifiedOverride(this.specifiedOverrides.size());
- }
-
- protected S addSpecifiedOverride(int index) {
- A annotation = this.buildOverrideAnnotation(index);
- return this.addSpecifiedOverride_(index, annotation);
- }
-
- @SuppressWarnings("unchecked")
- protected A buildOverrideAnnotation(int index) {
- int annotationIndex = this.calculateNewAnnotationIndex(index);
- return (A) this.getResourceMember().addAnnotation(annotationIndex, this.getOverrideAnnotationName());
- }
-
- protected int calculateNewAnnotationIndex(int index) {
- // if we are adding to the end of the specified list,
- // put the annotation after all the existing annotations
- if (index == this.specifiedOverrides.size()) {
- return CollectionTools.size(this.getOverrideAnnotations());
- }
-
- // if we are adding to the front of the specified list,
- // put the annotation before of all the existing annotations
- if (index == 0) {
- return 0;
- }
-
- // if we are adding to the middle of the specified list,
- // put the annotation immediately after all the previous override's
- // existing annotation
- return this.translateToAnnotationIndex(index - 1) + 1;
- }
-
- /**
- * pre-condition: override exists at the specified index
- */
- protected int translateToAnnotationIndex(int index) {
- return CollectionTools.indexOf(this.getOverrideAnnotations(), this.specifiedOverrides.get(index).getOverrideAnnotation());
- }
-
- protected abstract String getOverrideAnnotationName();
-
- protected void removeSpecifiedOverride(S override) {
- this.removeSpecifiedOverride(this.specifiedOverrides.indexOf(override));
- }
-
- protected void removeSpecifiedOverride(int index) {
- this.removeOverrideAnnotation(index);
- this.removeSpecifiedOverride_(index);
- }
-
- protected void removeOverrideAnnotation(int index) {
- int annotationIndex = this.translateToAnnotationIndex(index);
- this.getResourceMember().removeAnnotation(annotationIndex, this.getOverrideAnnotationName());
- }
-
- protected void removeSpecifiedOverride_(int index) {
- this.removeItemFromList(index, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- }
-
- public void moveSpecifiedOverride(int targetIndex, int sourceIndex) {
- this.moveOverrideAnnotation(targetIndex, sourceIndex);
- this.moveItemInList(targetIndex, sourceIndex, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- }
-
- protected void moveOverrideAnnotation(int targetIndex, int sourceIndex) {
- int targetAnnotationIndex = this.translateToAnnotationIndex(targetIndex);
- int sourceAnnotationIndex = this.translateToAnnotationIndex(sourceIndex);
- this.getResourceMember().moveAnnotation(targetAnnotationIndex, sourceAnnotationIndex, this.getOverrideAnnotationName());
- }
-
- protected abstract S buildSpecifiedOverride(A overrideAnnotation);
-
- protected void updateSpecifiedOverrides() {
- ContextContainerTools.update(this.specifiedOverrideContainerAdapter);
- }
-
- protected Iterable<A> getRelevantOverrideAnnotations() {
- return new FilteringIterable<A>(this.getOverrideAnnotations()) {
- @Override
- protected boolean accept(A annotation) {
- String overrideName = annotation.getName();
- return (overrideName != null) && this.getOwner().isRelevant(overrideName);
- }
- protected JavaOverrideContainer2_0.Owner getOwner() {
- return AbstractJavaOverrideContainer.this.getOwner2_0();
- }
- };
- }
-
- protected Iterable<A> getOverrideAnnotations() {
- return new SubIterableWrapper<NestableAnnotation, A>((this.overrideAnnotations()));
- }
-
- protected Iterable<NestableAnnotation> overrideAnnotations() {
- return (this.owner == null) ? EmptyIterable.<NestableAnnotation>instance() : this.overrideAnnotations_();
- }
-
- /**
- * pre-condition: {@link #owner} is not <code>null</code>
- */
- protected Iterable<NestableAnnotation> overrideAnnotations_() {
- return this.getResourceMember().getAnnotations(this.getOverrideAnnotationName());
- }
-
- protected void moveSpecifiedOverride_(int index, S override) {
- this.moveItemInList(index, override, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- }
-
- protected S addSpecifiedOverride_(int index, A overrideAnnotation) {
- S override = this.buildSpecifiedOverride(overrideAnnotation);
- this.addItemToList(index, override, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- return override;
- }
-
- protected void removeSpecifiedOverride_(S override) {
- this.removeSpecifiedOverride_(this.specifiedOverrides.indexOf(override));
- }
-
- /**
- * specified override container adapter
- */
- protected class SpecifiedOverrideContainerAdapter
- implements ContextContainerTools.Adapter<S, A>
- {
- public Iterable<S> getContextElements() {
- return AbstractJavaOverrideContainer.this.getSpecifiedOverrides();
- }
- public Iterable<A> getResourceElements() {
- return AbstractJavaOverrideContainer.this.getRelevantOverrideAnnotations();
- }
- @SuppressWarnings("unchecked")
- public A getResourceElement(S contextElement) {
- return (A) contextElement.getOverrideAnnotation();
- }
- public void moveContextElement(int index, S element) {
- AbstractJavaOverrideContainer.this.moveSpecifiedOverride_(index, element);
- }
- public void addContextElement(int index, A resourceElement) {
- AbstractJavaOverrideContainer.this.addSpecifiedOverride_(index, resourceElement);
- }
- public void removeContextElement(S element) {
- AbstractJavaOverrideContainer.this.removeSpecifiedOverride_(element);
- }
- }
-
-
- // ********** virtual overrides **********
-
- public ListIterable<V> getVirtualOverrides() {
- return new LiveCloneListIterable<V>(this.virtualOverrides);
- }
-
- public int getVirtualOverridesSize() {
- return this.virtualOverrides.size();
- }
-
- @SuppressWarnings("unchecked")
- protected ListIterable<R> getReadOnlyVirtualOverrides() {
- // V should always be a subtype of R, but we can't enforce that in the
- // class declaration...
- return (ListIterable<R>) this.getVirtualOverrides();
- }
-
- protected void updateVirtualOverrides() {
- ContextContainerTools.update(this.virtualOverrideContainerAdapter);
- }
-
- /**
- * Return the overridable names that are not already in the list of
- * specified overrides.
- */
- protected Iterable<String> getVirtualOverrideNames() {
- return CollectionTools.iterable(this.virtualOverrideNames());
- }
-
- protected Iterator<String> virtualOverrideNames() {
- return new FilteringIterator<String>(this.getAllOverridableNames()) {
- @Override
- protected boolean accept(String name) {
- return AbstractJavaOverrideContainer.this.overrideIsVirtual(name);
- }
- };
- }
-
- protected boolean overrideIsVirtual(String name) {
- return this.getSpecifiedOverrideNamed(name) == null;
- }
-
- protected void moveVirtualOverride(int index, V override) {
- this.moveItemInList(index, override, this.virtualOverrides, VIRTUAL_OVERRIDES_LIST);
- }
-
- protected V addVirtualOverride(int index, String name) {
- V override = this.buildVirtualOverride(name);
- this.addItemToList(index, override, this.virtualOverrides, VIRTUAL_OVERRIDES_LIST);
- return override;
- }
-
- protected abstract V buildVirtualOverride(String name);
-
- protected void removeVirtualOverride(V override) {
- this.removeItemFromList(override, this.virtualOverrides, VIRTUAL_OVERRIDES_LIST);
- }
-
- /**
- * virtual override container adapter
- * NB: the context override is matched with a resource override by name
- */
- protected class VirtualOverrideContainerAdapter
- implements ContextContainerTools.Adapter<V, String>
- {
- public Iterable<V> getContextElements() {
- return AbstractJavaOverrideContainer.this.getVirtualOverrides();
- }
- public Iterable<String> getResourceElements() {
- return AbstractJavaOverrideContainer.this.getVirtualOverrideNames();
- }
- public String getResourceElement(V contextElement) {
- return contextElement.getName();
- }
- public void moveContextElement(int index, V element) {
- AbstractJavaOverrideContainer.this.moveVirtualOverride(index, element);
- }
- public void addContextElement(int index, String resourceElement) {
- AbstractJavaOverrideContainer.this.addVirtualOverride(index, resourceElement);
- }
- public void removeContextElement(V element) {
- AbstractJavaOverrideContainer.this.removeVirtualOverride(element);
- }
- }
-
-
- // ********** misc **********
-
- protected JavaOverrideContainer2_0.Owner getOwner2_0() {
- return (JavaOverrideContainer2_0.Owner) this.owner;
- }
-
- public TypeMapping getTypeMapping() {
- return this.owner.getTypeMapping();
- }
-
- protected JavaResourceMember getResourceMember() {
- return this.owner.getResourceMember();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return this.owner.getOverridableTypeMapping();
- }
-
- public Iterable<String> getAllOverridableNames() {
- return (this.owner != null) ? this.owner.getAllOverridableNames() : EmptyIterable.<String>instance();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.owner.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.owner.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.owner.resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.owner.getDefaultTableName();
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver) {
- return this.owner.buildOverrideValidator(override, this, textRangeResolver);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return this.owner.buildColumnValidator(override, column, columnOwner, textRangeResolver);
- }
-
- public String getPossiblePrefix() {
- return this.getOwner2_0().getPossiblePrefix();
- }
-
- public String getWritePrefix() {
- return this.getOwner2_0().getWritePrefix();
- }
-
- protected R selectOverrideNamed(Iterable<R> overrides, String name) {
- return this.selectOverrideNamed(overrides, name, null);
- }
-
- protected R selectOverrideNamed(Iterable<R> overrides, String name, S exclude) {
- for (R override : overrides) {
- if (override == exclude) {
- continue; // skip
- }
- if (this.valuesAreEqual(override.getName(), name)) {
- return override;
- }
- }
- return null;
- }
-
-
- // ********** code completion **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (R override : this.getOverrides()) {
- result = override.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- for (R override: this.getOverrides()) {
- override.validate(messages, reporter, astRoot);
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getValidationAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.owner.getValidationTextRange(astRoot);
- }
-
- protected TextRange getValidationAnnotationTextRange(CompilationUnit astRoot) {
- Annotation annotation = this.getValidationAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
- }
-
- protected Annotation getValidationAnnotation() {
- JavaResourceMember resourceMember = this.getResourceMember();
- return resourceMember.getAnnotation(this.getOverrideAnnotationName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java
deleted file mode 100644
index 1b9a7609a5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
-import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JarFile;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.persistence.JarFileRef;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Context JAR file
- */
-public class GenericJarFile
- extends AbstractPersistenceXmlContextNode
- implements JarFile, PersistentType.Owner
-{
- protected final JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot;
-
- protected final ContextCollectionContainer<JavaPersistentType, JavaResourceType> javaPersistentTypeContainer;
-
-
- // ********** constructor/initialization **********
-
- public GenericJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot) {
- super(parent);
- this.jarResourcePackageFragmentRoot = jarResourcePackageFragmentRoot;
- this.javaPersistentTypeContainer = this.buildJavaPersistentTypeContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncJavaPersistentTypes();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getJavaPersistentTypes());
- }
-
- public JavaResourcePackageFragmentRoot getJarResourcePackageFragmentRoot() {
- return this.jarResourcePackageFragmentRoot;
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<JarFile> getType() {
- return JarFile.class;
- }
-
- public TextRange getSelectionTextRange() {
- return null;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- return null;
- }
-
- public void dispose() {
- // nothing yet
- }
-
-
- // ********** JpaContextNode implementation **********
-
- @Override
- public JptResourceType getResourceType() {
- return JptCommonCorePlugin.JAR_RESOURCE_TYPE;
- }
-
-
- // ********** Java persistent types **********
-
- public JavaPersistentType getPersistentType(String typeName) {
- for (JavaPersistentType pt : this.getJavaPersistentTypes()) {
- if (pt.getName().equals(typeName)) {
- return pt;
- }
- }
- return null;
- }
-
- public Iterable<JavaPersistentType> getJavaPersistentTypes() {
- return this.javaPersistentTypeContainer.getContextElements();
- }
-
- public int getJavaPersistentTypesSize() {
- return this.javaPersistentTypeContainer.getContextElementsSize();
- }
-
- protected void syncJavaPersistentTypes() {
- this.javaPersistentTypeContainer.synchronizeWithResourceModel();
- }
-
- protected void addJavaPersistentType(JavaResourceType jrt) {
- this.javaPersistentTypeContainer.addContextElement(getJavaPersistentTypesSize(), jrt);
- }
-
- protected void removeJavaPersistentType(JavaPersistentType javaPersistentType ) {
- this.javaPersistentTypeContainer.removeContextElement(javaPersistentType);
- }
-
- //only accept types, enums aren't valid for JPA
- protected Iterable<JavaResourceType> getJavaResourceTypes() {
- return new SubIterableWrapper<JavaResourceAbstractType, JavaResourceType>(
- new FilteringIterable<JavaResourceAbstractType>(this.getJavaResourceAbstractTypes()) {
- @Override
- protected boolean accept(JavaResourceAbstractType o) {
- return o.getKind() == Kind.TYPE;
- }
- });
- }
-
- /**
- * the resource JAR holds only annotated types, so we can use them all for
- * building the context types
- */
- protected Iterable<JavaResourceAbstractType> getJavaResourceAbstractTypes() {
- return this.jarResourcePackageFragmentRoot.getTypes();
- }
-
- protected JavaPersistentType buildJavaPersistentType(JavaResourceType jrt) {
- return this.getJpaFactory().buildJavaPersistentType(this, jrt);
- }
-
- protected ContextCollectionContainer<JavaPersistentType, JavaResourceType> buildJavaPersistentTypeContainer() {
- JavaPersistentTypeContainer container = new JavaPersistentTypeContainer();
- container.initialize();
- return container;
- }
-
- /**
- * Java persistent type container
- */
- protected class JavaPersistentTypeContainer
- extends ContextCollectionContainer<JavaPersistentType, JavaResourceType>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return JAVA_PERSISTENT_TYPES_COLLECTION;
- }
- @Override
- protected JavaPersistentType buildContextElement(JavaResourceType resourceElement) {
- return GenericJarFile.this.buildJavaPersistentType(resourceElement);
- }
- @Override
- protected Iterable<JavaResourceType> getResourceElements() {
- return GenericJarFile.this.getJavaResourceTypes();
- }
- @Override
- protected JavaResourceType getResourceElement(JavaPersistentType contextElement) {
- return contextElement.getJavaResourceType();
- }
- }
-
-
- // ********** PersistentTypeContainer implementation **********
-
- public Iterable<JavaPersistentType> getPersistentTypes() {
- return this.getJavaPersistentTypes();
- }
-
-
- // ********** PersistentType.Owner implementation **********
-
- public AccessType getDefaultPersistentTypeAccess() {
- return this.getPersistenceUnit().getDefaultAccess();
- }
-
- public AccessType getOverridePersistentTypeAccess() {
- // no access type at this level overrides any local access type specification
- return null;
- }
-
-
- // ********** JpaNode implementation **********
-
- @Override
- public JarFileRef getParent() {
- return (JarFileRef) super.getParent();
- }
-
- protected JarFileRef getJarFileRef() {
- return this.getParent();
- }
-
- @Override
- public IResource getResource() {
- return this.jarResourcePackageFragmentRoot.getFile();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // TODO validate 'javaPersistentTypes'
- }
-
- public boolean isIn(org.eclipse.core.resources.IFolder folder) {
- IResource member = folder.findMember(this.jarResourcePackageFragmentRoot.getFile().getName());
- IFile file = this.jarResourcePackageFragmentRoot.getFile();
- return member != null && file != null && member.equals(file);
- }
-
- public TextRange getValidationTextRange() {
- return this.getJarFileRef().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
deleted file mode 100644
index 55f80de86c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverride2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Specified Java association override
- */
-public class GenericJavaAssociationOverride
- extends AbstractJavaOverride<JavaAssociationOverrideContainer, AssociationOverrideAnnotation>
- implements JavaAssociationOverride2_0
-{
- protected final JavaOverrideRelationship relationship;
-
-
- public GenericJavaAssociationOverride(JavaAssociationOverrideContainer parent, AssociationOverrideAnnotation annotation) {
- super(parent, annotation);
- this.relationship = this.buildRelationship();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.relationship.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.relationship.update();
- }
-
-
- // ********** specified/virtual **********
-
- @Override
- public JavaVirtualAssociationOverride convertToVirtual() {
- return (JavaVirtualAssociationOverride) super.convertToVirtual();
- }
-
-
- // ********** relationship **********
-
- public JavaOverrideRelationship getRelationship() {
- return this.relationship;
- }
-
- protected JavaOverrideRelationship buildRelationship() {
- return this.getJpaFactory().buildJavaOverrideRelationship(this);
- }
-
-
- // ********** misc **********
-
- @Override
- protected JavaAssociationOverrideContainer2_0 getContainer2_0() {
- return (JavaAssociationOverrideContainer2_0) super.getContainer2_0();
- }
-
- public RelationshipMapping getMapping() {
- return this.getContainer().getRelationshipMapping(this.name);
- }
-
- public void initializeFrom(ReadOnlyAssociationOverride oldOverride) {
- super.initializeFrom(oldOverride);
- this.relationship.initializeFrom(oldOverride.getRelationship());
- }
-
- public void initializeFromVirtual(ReadOnlyAssociationOverride virtualOverride) {
- super.initializeFromVirtual(virtualOverride);
- this.relationship.initializeFromVirtual(virtualOverride.getRelationship());
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.relationship.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- @Override
- protected Iterable<String> getCandidateNames() {
- return this.getContainer().getAllOverridableNames();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
deleted file mode 100644
index 215fc57d2d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-
-/**
- * Java attribute override container
- */
-public class GenericJavaAssociationOverrideContainer
- extends AbstractJavaOverrideContainer<
- JavaAssociationOverrideContainer.Owner,
- JavaReadOnlyAssociationOverride,
- JavaAssociationOverride,
- JavaVirtualAssociationOverride,
- AssociationOverrideAnnotation
- >
- implements JavaAssociationOverrideContainer2_0
-{
- public GenericJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner) {
- super(parent, owner);
- }
-
-
- public RelationshipMapping getRelationshipMapping(String attributeName) {
- return MappingTools.getRelationshipMapping(attributeName, this.owner.getOverridableTypeMapping());
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship(String associationOverrideName) {
- return this.owner.resolveOverriddenRelationship(associationOverrideName);
- }
-
- public ReadOnlyOverrideRelationship getOverrideRelationship(String overrideName) {
- return this.getOverrideNamed(overrideName).getRelationship();
- }
-
- @Override
- protected JavaAssociationOverrideContainer2_0.Owner getOwner2_0() {
- return (JavaAssociationOverrideContainer2_0.Owner) super.getOwner2_0();
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner o, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableJoinColumnValidator(override, column, o, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner o, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableInverseJoinColumnValidator(override, column, o, textRangeResolver);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableValidator(override, table, textRangeResolver);
- }
-
- @Override
- protected String getOverrideAnnotationName() {
- return AssociationOverrideAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- protected JavaAssociationOverride buildSpecifiedOverride(AssociationOverrideAnnotation overrideAnnotation) {
- return this.getJpaFactory().buildJavaAssociationOverride(this, overrideAnnotation);
- }
-
- @Override
- protected void initializeSpecifiedOverride(JavaAssociationOverride specifiedOverride, JavaVirtualAssociationOverride virtualOverride) {
- specifiedOverride.initializeFromVirtual(virtualOverride);
- }
-
- @Override
- protected JavaVirtualAssociationOverride buildVirtualOverride(String name) {
- return this.getJpaFactory().buildJavaVirtualAssociationOverride(this, name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
deleted file mode 100644
index 0f7fbabdfb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaOverride;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Specified Java attribute override
- */
-public class GenericJavaAttributeOverride
- extends AbstractJavaOverride<JavaAttributeOverrideContainer, AttributeOverrideAnnotation>
- implements JavaAttributeOverride, JavaColumn.Owner
-{
- protected final JavaColumn column;
-
-
- public GenericJavaAttributeOverride(JavaAttributeOverrideContainer parent, AttributeOverrideAnnotation annotation) {
- super(parent, annotation);
- this.column = this.buildColumn();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- }
-
-
- // ********** specified/virtual **********
-
- @Override
- public JavaVirtualAttributeOverride convertToVirtual() {
- return (JavaVirtualAttributeOverride) super.convertToVirtual();
- }
-
-
- // ********** column **********
-
- public JavaColumn getColumn() {
- return this.column;
- }
-
- protected JavaColumn buildColumn() {
- return this.getJpaFactory().buildJavaColumn(this, this);
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyAttributeOverride oldOverride) {
- super.initializeFrom(oldOverride);
- this.column.initializeFrom(oldOverride.getColumn());
- }
-
- public void initializeFromVirtual(ReadOnlyAttributeOverride oldOverride) {
- super.initializeFromVirtual(oldOverride);
- this.column.initializeFromVirtual(oldOverride.getColumn());
- }
-
-
- // ********** column owner implementation **********
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.name;
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
-
- public CompleteColumnAnnotation getColumnAnnotation() {
- return this.getOverrideAnnotation().getNonNullColumn();
- }
-
- public void removeColumnAnnotation() {
- this.getOverrideAnnotation().removeColumn();
- }
-
-
- // ********** derived **********
-
- protected boolean attributeIsDerivedId() {
- return this.getTypeMapping().attributeIsDerivedId(this.name);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- @Override
- protected Iterable<String> getCandidateNames() {
- return this.getContainer().getAllOverridableNames();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- if (this.attributeIsDerivedId()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ATTRIBUTE_OVERRIDE_DERIVED_AND_SPECIFIED,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
-
- // validate the column if it is specified
- if (this.columnAnnotationIsSpecified()) {
- this.column.validate(messages, reporter, astRoot);
- }
- } else {
- this.column.validate(messages, reporter, astRoot);
- }
- }
-
- protected boolean columnAnnotationIsSpecified() {
- return this.getOverrideAnnotation().getColumn() != null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java
deleted file mode 100644
index 182d70f4aa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAttributeOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-
-/**
- * Java attribute override container
- */
-public class GenericJavaAttributeOverrideContainer
- extends AbstractJavaOverrideContainer<
- JavaAttributeOverrideContainer.Owner,
- JavaReadOnlyAttributeOverride,
- JavaAttributeOverride,
- JavaVirtualAttributeOverride,
- AttributeOverrideAnnotation
- >
- implements JavaAttributeOverrideContainer2_0
-{
- public GenericJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner) {
- super(parent, owner);
- }
-
-
- public ReadOnlyColumn resolveOverriddenColumn(String attributeName) {
- return (attributeName == null) ? null : this.owner.resolveOverriddenColumn(attributeName);
- }
-
- public ReadOnlyColumn getOverrideColumn(String overrideName) {
- return this.getOverrideNamed(overrideName).getColumn();
- }
-
- @Override
- protected String getOverrideAnnotationName() {
- return AttributeOverrideAnnotation.ANNOTATION_NAME;
- }
-
- @Override
- protected JavaAttributeOverride buildSpecifiedOverride(AttributeOverrideAnnotation overrideAnnotation) {
- return this.getJpaFactory().buildJavaAttributeOverride(this, overrideAnnotation);
- }
-
- @Override
- protected void initializeSpecifiedOverride(JavaAttributeOverride specifiedOverride, JavaVirtualAttributeOverride virtualOverride) {
- specifiedOverride.initializeFromVirtual(virtualOverride);
- }
-
- @Override
- protected JavaVirtualAttributeOverride buildVirtualOverride(String name) {
- return this.getJpaFactory().buildJavaVirtualAttributeOverride(this, name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseEnumeratedConverter.java
deleted file mode 100644
index be8b74c1be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseEnumeratedConverter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.EnumType;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-
-public class GenericJavaBaseEnumeratedConverter
- extends AbstractJavaConverter
- implements JavaBaseEnumeratedConverter
-{
- protected final BaseEnumeratedAnnotation enumeratedAnnotation;
-
- protected EnumType specifiedEnumType;
- protected EnumType defaultEnumType;
-
-
- public GenericJavaBaseEnumeratedConverter(JavaAttributeMapping parent, BaseEnumeratedAnnotation enumeratedAnnotation, JavaConverter.Owner owner) {
- super(parent, owner);
- this.enumeratedAnnotation = enumeratedAnnotation;
- this.specifiedEnumType = this.buildSpecifiedEnumType();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedEnumType_(this.buildSpecifiedEnumType());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultEnumType(this.buildDefaultEnumType());
- }
-
-
- // ********** enum type **********
-
- public EnumType getEnumType() {
- return (this.specifiedEnumType != null) ? this.specifiedEnumType : this.defaultEnumType;
- }
-
- public EnumType getSpecifiedEnumType() {
- return this.specifiedEnumType;
- }
-
- public void setSpecifiedEnumType(EnumType enumType) {
- this.enumeratedAnnotation.setValue(EnumType.toJavaResourceModel(enumType));
- this.setSpecifiedEnumType_(enumType);
- }
-
- protected void setSpecifiedEnumType_(EnumType enumType) {
- EnumType old = this.specifiedEnumType;
- this.specifiedEnumType = enumType;
- this.firePropertyChanged(SPECIFIED_ENUM_TYPE_PROPERTY, old, enumType);
- }
-
- protected EnumType buildSpecifiedEnumType() {
- return EnumType.fromJavaResourceModel(this.enumeratedAnnotation.getValue());
- }
-
- public EnumType getDefaultEnumType() {
- return this.defaultEnumType;
- }
-
- protected void setDefaultEnumType(EnumType enumType) {
- EnumType old = this.defaultEnumType;
- this.defaultEnumType = enumType;
- this.firePropertyChanged(DEFAULT_ENUM_TYPE_PROPERTY, old, enumType);
- }
-
- protected EnumType buildDefaultEnumType() {
- return DEFAULT_ENUM_TYPE;
- }
-
-
- // ********** misc **********
-
- public Class<? extends Converter> getType() {
- return BaseEnumeratedConverter.class;
- }
-
- public BaseEnumeratedAnnotation getConverterAnnotation() {
- return this.enumeratedAnnotation;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseTemporalConverter.java
deleted file mode 100644
index d871f4eab4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBaseTemporalConverter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.TemporalType;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-
-public class GenericJavaBaseTemporalConverter
- extends AbstractJavaConverter
- implements JavaBaseTemporalConverter
-{
- protected final BaseTemporalAnnotation temporalAnnotation;
-
- protected TemporalType temporalType;
-
-
- public GenericJavaBaseTemporalConverter(JavaAttributeMapping parent, BaseTemporalAnnotation temporalAnnotation, JavaConverter.Owner owner) {
- super(parent, owner);
- this.temporalAnnotation = temporalAnnotation;
- this.temporalType = this.buildTemporalType();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setTemporalType_(this.buildTemporalType());
- }
-
-
- // ********** temporal type **********
-
- public TemporalType getTemporalType() {
- return this.temporalType;
- }
-
- public void setTemporalType(TemporalType temporalType) {
- if (this.valuesAreDifferent(this.temporalType, temporalType)) {
- this.temporalAnnotation.setValue(TemporalType.toJavaResourceModel(temporalType));
- this.removeTemporalAnnotationIfUnset();
- this.setTemporalType_(temporalType);
- }
- }
-
- protected void setTemporalType_(TemporalType temporalType) {
- TemporalType old = this.temporalType;
- this.temporalType = temporalType;
- this.firePropertyChanged(TEMPORAL_TYPE_PROPERTY, old, temporalType);
- }
-
- protected TemporalType buildTemporalType() {
- return TemporalType.fromJavaResourceModel(this.temporalAnnotation.getValue());
- }
-
-
- // ********** misc **********
-
- public Class<? extends Converter> getType() {
- return BaseTemporalConverter.class;
- }
-
- public BaseTemporalAnnotation getConverterAnnotation() {
- return this.temporalAnnotation;
- }
-
- protected void removeTemporalAnnotationIfUnset() {
- if (this.temporalAnnotation.isUnset()) {
- this.temporalAnnotation.removeAnnotation();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBasicMapping.java
deleted file mode 100644
index fc88aeed80..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaBasicMapping.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBasicMapping;
-
-public class GenericJavaBasicMapping
- extends AbstractJavaBasicMapping
-{
- public GenericJavaBasicMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java
deleted file mode 100644
index 7a26de7fea..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCascade2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation;
-
-public class GenericJavaCascade
- extends AbstractJavaJpaContextNode
- implements JavaCascade2_0
-{
- protected boolean all;
-
- protected boolean persist;
-
- protected boolean merge;
-
- protected boolean remove;
-
- protected boolean refresh;
-
- /* JPA 2.0 */
- protected boolean detach;
-
-
- /**
- * This is built directly by the mapping implementation; as opposed to via
- * a platform-specific factory.
- * @see AbstractJavaRelationshipMapping#buildCascade()
- */
- public GenericJavaCascade(JavaRelationshipMapping parent) {
- super(parent);
- this.all = this.buildAll();
- this.persist = this.buildPersist();
- this.merge = this.buildMerge();
- this.remove = this.buildRemove();
- this.refresh = this.buildRefresh();
- this.detach = this.buildDetach();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setAll_(this.buildAll());
- this.setPersist_(this.buildPersist());
- this.setMerge_(this.buildMerge());
- this.setRemove_(this.buildRemove());
- this.setRefresh_(this.buildRefresh());
- this.setDetach_(this.buildDetach());
- }
-
-
- // ********** all **********
-
- public boolean isAll() {
- return this.all;
- }
-
- public void setAll(boolean all) {
- if (all != this.all) {
- this.getMappingAnnotationForUpdate().setCascadeAll(all);
- this.setAll_(all);
- }
- }
-
- protected void setAll_(boolean all) {
- boolean old = this.all;
- this.all = all;
- this.firePropertyChanged(ALL_PROPERTY, old, all);
- }
-
- protected boolean buildAll() {
- RelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation != null) && annotation.isCascadeAll();
- }
-
-
- // ********** persist **********
-
- public boolean isPersist() {
- return this.persist;
- }
-
- public void setPersist(boolean persist) {
- if (persist != this.persist) {
- this.getMappingAnnotationForUpdate().setCascadePersist(persist);
- this.setPersist_(persist);
- }
- }
-
- protected void setPersist_(boolean persist) {
- boolean old = this.persist;
- this.persist = persist;
- this.firePropertyChanged(PERSIST_PROPERTY, old, persist);
- }
-
- protected boolean buildPersist() {
- RelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation != null) && annotation.isCascadePersist();
- }
-
-
- // ********** merge **********
-
- public boolean isMerge() {
- return this.merge;
- }
-
- public void setMerge(boolean merge) {
- if (merge != this.merge) {
- this.getMappingAnnotationForUpdate().setCascadeMerge(merge);
- this.setMerge_(merge);
- }
- }
-
- protected void setMerge_(boolean merge) {
- boolean old = this.merge;
- this.merge = merge;
- this.firePropertyChanged(MERGE_PROPERTY, old, merge);
- }
-
- protected boolean buildMerge() {
- RelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation != null) && annotation.isCascadeMerge();
- }
-
-
- // ********** remove **********
-
- public boolean isRemove() {
- return this.remove;
- }
-
- public void setRemove(boolean remove) {
- if (remove != this.remove) {
- this.getMappingAnnotationForUpdate().setCascadeRemove(remove);
- this.setRemove_(remove);
- }
- }
-
- protected void setRemove_(boolean remove) {
- boolean oldRemove = this.remove;
- this.remove = remove;
- this.firePropertyChanged(REMOVE_PROPERTY, oldRemove, remove);
- }
-
- protected boolean buildRemove() {
- RelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation != null) && annotation.isCascadeRemove();
- }
-
-
- // ********** refresh **********
-
- public boolean isRefresh() {
- return this.refresh;
- }
-
- public void setRefresh(boolean refresh) {
- if (refresh != this.refresh) {
- this.getMappingAnnotationForUpdate().setCascadeRefresh(refresh);
- this.setRefresh_(refresh);
- }
- }
-
- protected void setRefresh_(boolean refresh) {
- boolean old = this.refresh;
- this.refresh = refresh;
- this.firePropertyChanged(REFRESH_PROPERTY, old, refresh);
- }
-
- protected boolean buildRefresh() {
- RelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation != null) && annotation.isCascadeRefresh();
- }
-
-
- // ********** detach **********
-
- public boolean isDetach() {
- return this.detach;
- }
-
- public void setDetach(boolean detach) {
- if (detach != this.detach) {
- this.getMappingAnnotationForUpdate2_0().setCascadeDetach(detach);
- this.setDetach_(detach);
- }
- }
-
- protected void setDetach_(boolean detach) {
- boolean old = this.detach;
- this.detach = detach;
- this.firePropertyChanged(DETACH_PROPERTY, old, detach);
- }
-
- protected boolean buildDetach() {
- return this.isJpa2_0Compatible() && this.buildDetach_();
- }
-
- protected boolean buildDetach_() {
- RelationshipMapping2_0Annotation annotation = this.getMappingAnnotation2_0();
- return (annotation != null) && annotation.isCascadeDetach();
- }
-
-
-
- // ********** misc **********
-
- @Override
- public JavaRelationshipMapping getParent() {
- return (JavaRelationshipMapping) super.getParent();
- }
-
- protected JavaRelationshipMapping getMapping() {
- return this.getParent();
- }
-
- protected RelationshipMappingAnnotation getMappingAnnotation() {
- return this.getMapping().getMappingAnnotation();
- }
-
- protected RelationshipMappingAnnotation getMappingAnnotationForUpdate() {
- return this.getMapping().getAnnotationForUpdate();
- }
-
- protected RelationshipMapping2_0Annotation getMappingAnnotation2_0() {
- return (RelationshipMapping2_0Annotation) this.getMappingAnnotation();
- }
-
- protected RelationshipMapping2_0Annotation getMappingAnnotationForUpdate2_0() {
- return (RelationshipMapping2_0Annotation) this.getMappingAnnotationForUpdate();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationCascadeTextRange();
- return (textRange != null) ? textRange : this.getMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationCascadeTextRange() {
- RelationshipMappingAnnotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getCascadeTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaColumn.java
deleted file mode 100644
index 2af11ca6fa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaColumn.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseColumn;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-
-/**
- * Java column
- * <p>
- * Note: The <code>Column</code> annotation is one of only 2 annotations that
- * can be nested outside of an array (i.e. in an <code>AttributeOverride</code>
- * annotation); the other is {@link GenericJavaJoinTable JoinTable}.
- */
-public class GenericJavaColumn
- extends AbstractJavaBaseColumn<CompleteColumnAnnotation, JavaColumn.Owner>
- implements JavaColumn
-{
- protected Integer specifiedLength;
- protected int defaultLength;
-
- protected Integer specifiedPrecision;
- protected int defaultPrecision;
-
- protected Integer specifiedScale;
- protected int defaultScale;
-
-
- public GenericJavaColumn(JavaJpaContextNode parent, JavaColumn.Owner owner) {
- super(parent, owner);
- this.specifiedLength = this.buildSpecifiedLength();
- this.specifiedPrecision = this.buildSpecifiedPrecision();
- this.specifiedScale = this.buildSpecifiedScale();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedLength_(this.buildSpecifiedLength());
- this.setSpecifiedPrecision_(this.buildSpecifiedPrecision());
- this.setSpecifiedScale_(this.buildSpecifiedScale());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultLength(this.buildDefaultLength());
- this.setDefaultPrecision(this.buildDefaultPrecision());
- this.setDefaultScale(this.buildDefaultScale());
- }
-
-
- // ********** column annotation **********
-
- @Override
- public CompleteColumnAnnotation getColumnAnnotation() {
- return this.owner.getColumnAnnotation();
- }
-
- @Override
- protected void removeColumnAnnotation() {
- this.owner.removeColumnAnnotation();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- public void setSpecifiedLength(Integer length) {
- if (this.valuesAreDifferent(this.specifiedLength, length)) {
- this.getColumnAnnotation().setLength(length);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedLength_(length);
- }
- }
-
- protected void setSpecifiedLength_(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- return this.getColumnAnnotation().getLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int length) {
- int old = this.defaultLength;
- this.defaultLength = length;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, length);
- }
-
- protected int buildDefaultLength() {
- return DEFAULT_LENGTH;
- }
-
-
- // ********** precision **********
-
- public int getPrecision() {
- return (this.specifiedPrecision != null) ? this.specifiedPrecision.intValue() : this.defaultPrecision;
- }
-
- public Integer getSpecifiedPrecision() {
- return this.specifiedPrecision;
- }
-
- public void setSpecifiedPrecision(Integer precision) {
- if (this.valuesAreDifferent(this.specifiedPrecision, precision)) {
- this.getColumnAnnotation().setPrecision(precision);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedPrecision_(precision);
- }
- }
-
- protected void setSpecifiedPrecision_(Integer precision) {
- Integer old = this.specifiedPrecision;
- this.specifiedPrecision = precision;
- this.firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, old, precision);
- }
-
- protected Integer buildSpecifiedPrecision() {
- return this.getColumnAnnotation().getPrecision();
- }
-
- public int getDefaultPrecision() {
- return this.defaultPrecision;
- }
-
- protected void setDefaultPrecision(int precision) {
- int old = this.defaultPrecision;
- this.defaultPrecision = precision;
- this.firePropertyChanged(DEFAULT_PRECISION_PROPERTY, old, precision);
- }
-
- protected int buildDefaultPrecision() {
- return DEFAULT_PRECISION;
- }
-
-
- // ********** scale **********
-
- public int getScale() {
- return (this.specifiedScale != null) ? this.specifiedScale.intValue() : this.defaultScale;
- }
-
- public Integer getSpecifiedScale() {
- return this.specifiedScale;
- }
-
- public void setSpecifiedScale(Integer scale) {
- if (this.valuesAreDifferent(this.specifiedScale, scale)) {
- this.getColumnAnnotation().setScale(scale);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedScale_(scale);
- }
- }
-
- protected void setSpecifiedScale_(Integer scale) {
- Integer old = this.specifiedScale;
- this.specifiedScale = scale;
- this.firePropertyChanged(SPECIFIED_SCALE_PROPERTY, old, scale);
- }
-
- protected Integer buildSpecifiedScale() {
- return this.getColumnAnnotation().getScale();
- }
-
- public int getDefaultScale() {
- return this.defaultScale;
- }
-
- protected void setDefaultScale(int scale) {
- int old = this.defaultScale;
- this.defaultScale = scale;
- this.firePropertyChanged(DEFAULT_SCALE_PROPERTY, old, scale);
- }
-
- protected int buildDefaultScale() {
- return DEFAULT_SCALE;
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedLength(oldColumn.getSpecifiedLength());
- this.setSpecifiedPrecision(oldColumn.getSpecifiedPrecision());
- this.setSpecifiedScale(oldColumn.getSpecifiedScale());
- }
-
- public void initializeFromVirtual(ReadOnlyColumn virtualColumn) {
- super.initializeFromVirtual(virtualColumn);
- // ignore other settings?
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
deleted file mode 100644
index 4d2f68696b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.java.JavaDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-
-/**
- * Java discriminator column
- */
-public class GenericJavaDiscriminatorColumn
- extends AbstractJavaNamedDiscriminatorColumn<DiscriminatorColumnAnnotation, JavaDiscriminatorColumn.Owner>
- implements JavaDiscriminatorColumn
-{
-
- public GenericJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
- super(parent, owner);
- }
-
-
- // ********** column annotation **********
-
- @Override
- public DiscriminatorColumnAnnotation getColumnAnnotation() {
- return (DiscriminatorColumnAnnotation) this.getJavaResourceType().getNonNullAnnotation(DiscriminatorColumnAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected void removeColumnAnnotation() {
- this.getJavaResourceType().removeAnnotation(DiscriminatorColumnAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaEntity getParent() {
- return (JavaEntity) super.getParent();
- }
-
- protected JavaEntity getEntity() {
- return this.getParent();
- }
-
- protected JavaPersistentType getPersistentType() {
- return this.getEntity().getPersistentType();
- }
-
- protected JavaResourceType getJavaResourceType() {
- return this.getPersistentType().getJavaResourceType();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddable.java
deleted file mode 100644
index 75bcc8579a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddable.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * Java embeddable type mapping
- */
-public class GenericJavaEmbeddable
- extends AbstractJavaEmbeddable
-{
- public GenericJavaEmbeddable(JavaPersistentType parent, EmbeddableAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- }
-
- @Override
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- //generic only allows basic and transient within an Embeddable
- return ArrayTools.contains(ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
- }
-
- public static final String[] ALLOWED_ATTRIBUTE_MAPPING_KEYS =
- new String[] {
- MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java
deleted file mode 100644
index f6ff5eb990..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEmbeddedIdMapping;
-
-/**
- * Java embedded ID mapping
- */
-public class GenericJavaEmbeddedIdMapping
- extends AbstractJavaEmbeddedIdMapping
-{
-
- public GenericJavaEmbeddedIdMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java
deleted file mode 100644
index a72d2dc1b8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEmbeddedMapping;
-
-/**
- * Java embedded mapping
- */
-public class GenericJavaEmbeddedMapping
- extends AbstractJavaEmbeddedMapping
-{
-
- public GenericJavaEmbeddedMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEntity.java
deleted file mode 100644
index e123367631..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaEntity.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEntity;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.NullJavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.CacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-
-public class GenericJavaEntity
- extends AbstractJavaEntity
-{
- // EclipseLink holds its cacheable in its caching
- protected final JavaCacheable2_0 cacheable;
-
-
- public GenericJavaEntity(JavaPersistentType parent, EntityAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- this.cacheable = this.buildCacheable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.cacheable.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.cacheable.update();
- }
-
-
- // ********** cacheable **********
-
- public JavaCacheable2_0 getCacheable() {
- return this.cacheable;
- }
-
- protected JavaCacheable2_0 buildCacheable() {
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaCacheable(this) :
- new NullJavaCacheable2_0(this);
- }
-
- public boolean calculateDefaultCacheable() {
- Cacheable2_0 parentCacheable = this.getParentCacheable();
- return (parentCacheable != null) ?
- parentCacheable.isCacheable() :
- ((PersistenceUnit2_0) this.getPersistenceUnit()).calculateDefaultCacheable();
- }
-
- protected Cacheable2_0 getParentCacheable() {
- CacheableHolder2_0 parentEntity = (CacheableHolder2_0) this.getParentEntity();
- return (parentEntity == null) ? null : parentEntity.getCacheable();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
deleted file mode 100644
index 4f8f3082fe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.GenerationType;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratedValue;
-import org.eclipse.jpt.jpa.core.context.java.JavaIdMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java generated value
- */
-public class GenericJavaGeneratedValue
- extends AbstractJavaJpaContextNode
- implements JavaGeneratedValue
-{
- protected final GeneratedValueAnnotation generatedValueAnnotation;
-
- protected GenerationType specifiedStrategy;
- protected GenerationType defaultStrategy;
-
- protected String specifiedGenerator;
- protected String defaultGenerator;
-
-
- public GenericJavaGeneratedValue(JavaIdMapping parent, GeneratedValueAnnotation generatedValueAnnotation) {
- super(parent);
- this.generatedValueAnnotation = generatedValueAnnotation;
- this.specifiedStrategy = this.buildSpecifiedStrategy();
- this.specifiedGenerator = generatedValueAnnotation.getGenerator();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedStrategy_(this.buildSpecifiedStrategy());
- this.setSpecifiedGenerator_(this.generatedValueAnnotation.getGenerator());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultStrategy(this.buildDefaultStrategy());
- this.setDefaultGenerator(this.buildDefaultGenerator());
- }
-
-
- // ********** strategy **********
-
- public GenerationType getStrategy() {
- return (this.specifiedStrategy != null) ? this.specifiedStrategy : this.defaultStrategy;
- }
-
- public GenerationType getSpecifiedStrategy() {
- return this.specifiedStrategy;
- }
-
- public void setSpecifiedStrategy(GenerationType strategy) {
- this.generatedValueAnnotation.setStrategy(GenerationType.toJavaResourceModel(strategy));
- this.setSpecifiedStrategy_(strategy);
- }
-
- protected void setSpecifiedStrategy_(GenerationType strategy) {
- GenerationType old = this.specifiedStrategy;
- this.specifiedStrategy = strategy;
- this.firePropertyChanged(SPECIFIED_STRATEGY_PROPERTY, old, strategy);
- }
-
- protected GenerationType buildSpecifiedStrategy() {
- return GenerationType.fromJavaResourceModel(this.generatedValueAnnotation.getStrategy());
- }
-
- public GenerationType getDefaultStrategy() {
- return this.defaultStrategy;
- }
-
- protected void setDefaultStrategy(GenerationType strategy) {
- GenerationType old = this.defaultStrategy;
- this.defaultStrategy = strategy;
- this.firePropertyChanged(DEFAULT_STRATEGY_PROPERTY, old, strategy);
- }
-
- protected GenerationType buildDefaultStrategy() {
- return DEFAULT_STRATEGY;
- }
-
-
- // ********** generator **********
-
- public String getGenerator() {
- return (this.specifiedGenerator != null) ? this.specifiedGenerator : this.defaultGenerator;
- }
-
- public String getSpecifiedGenerator() {
- return this.specifiedGenerator;
- }
-
- public void setSpecifiedGenerator(String generator) {
- this.generatedValueAnnotation.setGenerator(generator);
- this.setSpecifiedGenerator_(generator);
- }
-
- protected void setSpecifiedGenerator_(String generator) {
- String old = this.specifiedGenerator;
- this.specifiedGenerator = generator;
- this.firePropertyChanged(SPECIFIED_GENERATOR_PROPERTY, old, generator);
- }
-
- public String getDefaultGenerator() {
- return this.defaultGenerator;
- }
-
- protected void setDefaultGenerator(String generator) {
- String old = this.defaultGenerator;
- this.defaultGenerator = generator;
- this.firePropertyChanged(DEFAULT_GENERATOR_PROPERTY, old, generator);
- }
-
- protected String buildDefaultGenerator() {
- return null;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaIdMapping getParent() {
- return (JavaIdMapping) super.getParent();
- }
-
- protected JavaIdMapping getIdMapping() {
- return this.getParent();
- }
-
- public GeneratedValueAnnotation getGeneratedValueAnnotation() {
- return this.generatedValueAnnotation;
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.generatorTouches(pos)) {
- return this.getJavaCandidateGeneratorNames(filter);
- }
- return null;
- }
-
- protected boolean generatorTouches(int pos) {
- return this.generatedValueAnnotation.generatorTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateGeneratorNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateGeneratorNames(filter));
- }
-
- protected Iterable<String> getCandidateGeneratorNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateGeneratorNames(), filter);
- }
-
- protected Iterable<String> getCandidateGeneratorNames() {
- return this.getPersistenceUnit().getUniqueGeneratorNames();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- String generator = this.getGenerator();
- if (generator == null) {
- return;
- }
-
- for (Generator next : this.getPersistenceUnit().getGenerators()) {
- if (generator.equals(next.getName())) {
- return;
- }
- }
-
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ID_MAPPING_UNRESOLVED_GENERATOR_NAME,
- new String[] {generator},
- this.getIdMapping(),
- this.getGeneratorTextRange(astRoot)
- )
- );
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getIdMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- return this.generatedValueAnnotation.getTextRange(astRoot);
- }
-
- public TextRange getGeneratorTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.generatedValueAnnotation.getGeneratorTextRange(), astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
deleted file mode 100644
index 350c7b1cb3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaTableGenerator;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaGeneratorContainer
- extends AbstractJavaJpaContextNode
- implements JavaGeneratorContainer
-{
- protected final ParentAdapter parentAdapter;
-
- protected JavaSequenceGenerator sequenceGenerator;
-
- protected JavaTableGenerator tableGenerator;
-
-
- public GenericJavaGeneratorContainer(ParentAdapter parentAdapter) {
- super(parentAdapter.getGeneratorContainerParent());
- this.parentAdapter = parentAdapter;
- this.sequenceGenerator = this.buildSequenceGenerator();
- this.tableGenerator = this.buildTableGenerator();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSequenceGenerator();
- this.syncTableGenerator();
- }
-
- @Override
- public void update() {
- super.update();
- if (this.sequenceGenerator != null) {
- this.sequenceGenerator.update();
- }
- if (this.tableGenerator != null) {
- this.tableGenerator.update();
- }
- }
-
-
- // ********** sequence generator **********
-
- public JavaSequenceGenerator getSequenceGenerator() {
- return this.sequenceGenerator;
- }
-
- public JavaSequenceGenerator addSequenceGenerator() {
- if (this.sequenceGenerator != null) {
- throw new IllegalStateException("sequence generator already exists: " + this.sequenceGenerator); //$NON-NLS-1$
- }
- SequenceGeneratorAnnotation annotation = this.buildSequenceGeneratorAnnotation();
- JavaSequenceGenerator generator = this.buildSequenceGenerator(annotation);
- this.setSequenceGenerator(generator);
- return generator;
- }
-
- protected SequenceGeneratorAnnotation buildSequenceGeneratorAnnotation() {
- return (SequenceGeneratorAnnotation) this.parentAdapter.getResourceAnnotatedElement().addAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
- }
-
- public void removeSequenceGenerator() {
- if (this.sequenceGenerator == null) {
- throw new IllegalStateException("sequence generator does not exist"); //$NON-NLS-1$
- }
- this.parentAdapter.getResourceAnnotatedElement().removeAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
- this.setSequenceGenerator(null);
- }
-
- protected JavaSequenceGenerator buildSequenceGenerator() {
- SequenceGeneratorAnnotation annotation = this.getSequenceGeneratorAnnotation();
- return (annotation == null) ? null : this.buildSequenceGenerator(annotation);
- }
-
- protected SequenceGeneratorAnnotation getSequenceGeneratorAnnotation() {
- return (SequenceGeneratorAnnotation) this.parentAdapter.getResourceAnnotatedElement().getAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
- }
-
- protected JavaSequenceGenerator buildSequenceGenerator(SequenceGeneratorAnnotation sequenceGeneratorAnnotation) {
- return this.parentAdapter.parentSupportsGenerators() ?
- this.getJpaFactory().buildJavaSequenceGenerator(this, sequenceGeneratorAnnotation) :
- null;
- }
-
- protected void syncSequenceGenerator() {
- SequenceGeneratorAnnotation annotation = this.getSequenceGeneratorAnnotation();
- if (annotation == null) {
- if (this.sequenceGenerator != null) {
- this.setSequenceGenerator(null);
- }
- } else {
- if ((this.sequenceGenerator != null) && (this.sequenceGenerator.getGeneratorAnnotation() == annotation)) {
- this.sequenceGenerator.synchronizeWithResourceModel();
- } else {
- this.setSequenceGenerator(this.buildSequenceGenerator(annotation));
- }
- }
- }
-
- protected void setSequenceGenerator(JavaSequenceGenerator sequenceGenerator) {
- JavaSequenceGenerator old = this.sequenceGenerator;
- this.sequenceGenerator = sequenceGenerator;
- this.firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, old, sequenceGenerator);
- }
-
-
- // ********** table generator **********
-
- public JavaTableGenerator getTableGenerator() {
- return this.tableGenerator;
- }
-
- public JavaTableGenerator addTableGenerator() {
- if (this.tableGenerator != null) {
- throw new IllegalStateException("table generator already exists: " + this.tableGenerator); //$NON-NLS-1$
- }
- TableGeneratorAnnotation annotation = this.buildTableGeneratorAnnotation();
- JavaTableGenerator generator = this.buildTableGenerator(annotation);
- this.setTableGenerator(generator);
- return generator;
- }
-
- protected TableGeneratorAnnotation buildTableGeneratorAnnotation() {
- return (TableGeneratorAnnotation) this.parentAdapter.getResourceAnnotatedElement().addAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
- }
-
- public void removeTableGenerator() {
- if (this.tableGenerator == null) {
- throw new IllegalStateException("table generator does not exist"); //$NON-NLS-1$
- }
- this.parentAdapter.getResourceAnnotatedElement().removeAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
- this.setTableGenerator(null);
- }
-
- protected JavaTableGenerator buildTableGenerator() {
- TableGeneratorAnnotation annotation = this.getTableGeneratorAnnotation();
- return (annotation == null) ? null : this.buildTableGenerator(annotation);
- }
-
- protected TableGeneratorAnnotation getTableGeneratorAnnotation() {
- return (TableGeneratorAnnotation) this.parentAdapter.getResourceAnnotatedElement().getAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
- }
-
- protected JavaTableGenerator buildTableGenerator(TableGeneratorAnnotation tableGeneratorAnnotation) {
- return this.parentAdapter.parentSupportsGenerators() ?
- this.getJpaFactory().buildJavaTableGenerator(this, tableGeneratorAnnotation) :
- null;
- }
-
- protected void syncTableGenerator() {
- TableGeneratorAnnotation annotation = this.getTableGeneratorAnnotation();
- if (annotation == null) {
- if (this.tableGenerator != null) {
- this.setTableGenerator(null);
- }
- } else {
- if ((this.tableGenerator != null) && (this.tableGenerator.getGeneratorAnnotation() == annotation)) {
- this.tableGenerator.synchronizeWithResourceModel();
- } else {
- this.setTableGenerator(this.buildTableGenerator(annotation));
- }
- }
- }
-
- protected void setTableGenerator(JavaTableGenerator tableGenerator) {
- JavaTableGenerator old = this.tableGenerator;
- this.tableGenerator = tableGenerator;
- this.firePropertyChanged(TABLE_GENERATOR_PROPERTY, old, tableGenerator);
- }
-
-
- // ********** code completion **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.tableGenerator != null) {
- result = this.tableGenerator.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- if (this.sequenceGenerator != null) {
- result = this.sequenceGenerator.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- /**
- * The generators are validated in the persistence unit.
- * @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateGenerators(List, IReporter)
- */
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- // generators are validated in the persistence unit
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getResourceTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
- }
-
- protected TextRange getResourceTextRange(CompilationUnit astRoot) {
- return this.parentAdapter.getResourceAnnotatedElement().getTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJpaContextNode getParent() {
- return (JavaJpaContextNode) super.getParent();
- }
-
- public Iterable<Generator> getGenerators() {
- return new FilteringIterable<Generator>(this.getGenerators_(), NotNullFilter.<Generator>instance());
- }
-
- protected Iterable<Generator> getGenerators_() {
- return new ArrayIterable<Generator>(this.sequenceGenerator, this.tableGenerator);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaIdMapping.java
deleted file mode 100644
index 7f1aca7b89..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaIdMapping.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaIdMapping;
-
-
-public class GenericJavaIdMapping
- extends AbstractJavaIdMapping
-{
- public GenericJavaIdMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
deleted file mode 100644
index dee7dcbdc0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Java join column
- */
-public class GenericJavaJoinColumn
- extends AbstractJavaBaseColumn<CompleteJoinColumnAnnotation, JavaReadOnlyJoinColumn.Owner>
- implements JavaJoinColumn
-{
- /** @see AbstractJavaNamedColumn#AbstractJavaNamedColumn(JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation) */
- protected /* final */ CompleteJoinColumnAnnotation columnAnnotation; // never null
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation columnAnnotation) {
- super(parent, owner, columnAnnotation);
- this.specifiedReferencedColumnName = this.buildSpecifiedReferencedColumnName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedReferencedColumnName_(this.buildSpecifiedReferencedColumnName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** column annotation **********
-
- @Override
- public CompleteJoinColumnAnnotation getColumnAnnotation() {
- return this.columnAnnotation;
- }
-
- @Override
- protected void setColumnAnnotation(CompleteJoinColumnAnnotation columnAnnotation) {
- this.columnAnnotation = columnAnnotation;
- }
-
- @Override
- protected void removeColumnAnnotation() {
- // we don't remove a join column annotation when it is empty
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- public void setSpecifiedReferencedColumnName(String name) {
- if (this.valuesAreDifferent(this.specifiedReferencedColumnName, name)) {
- this.getColumnAnnotation().setReferencedColumnName(name);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedReferencedColumnName_(name);
- }
- }
-
- protected void setSpecifiedReferencedColumnName_(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- return this.getColumnAnnotation().getReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultReferencedColumnName() {
- return MappingTools.buildJoinColumnDefaultReferencedColumnName(this.owner);
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyJoinColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedReferencedColumnName(oldColumn.getSpecifiedReferencedColumnName());
- }
-
- public void initializeFromVirtual(ReadOnlyJoinColumn virtualColumn) {
- super.initializeFromVirtual(virtualColumn);
- this.setSpecifiedReferencedColumnName(virtualColumn.getReferencedColumnName());
- }
-
- // ********** Java completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.referencedColumnNameTouches(pos)) {
- return this.getJavaCandidateReferencedColumnNames(filter);
- }
- return null;
- }
-
- protected boolean referencedColumnNameTouches(int pos) {
- return this.getColumnAnnotation().referencedColumnNameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateReferencedColumnNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateReferencedColumnNames(filter));
- }
-
- protected Iterable<String> getCandidateReferencedColumnNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateReferencedColumnNames(), filter);
- }
-
- protected Iterable<String> getCandidateReferencedColumnNames() {
- Table table = this.owner.getReferencedColumnDbTable();
- return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-
-
- // ********** validation **********
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaJoinColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getReferencedColumnNameTextRange(), astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java
deleted file mode 100644
index a829e4e29a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java join table
- * <p>
- * Note: The <code>JoinTable</code> annotation is one of only 2 annotations that
- * can be nested outside of an array (i.e. in an <code>AssociationOverride</code>
- * annotation); the other is {@link GenericJavaColumn Column}.
- */
-public class GenericJavaJoinTable
- extends GenericJavaReferenceTable<JoinTableAnnotation>
- implements JavaJoinTable
-{
- protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedInverseJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
-
- protected JavaJoinColumn defaultInverseJoinColumn;
-
-
- public GenericJavaJoinTable(JavaJoinTableRelationshipStrategy parent, Owner owner) {
- super(parent, owner);
- this.inverseJoinColumnOwner = this.buildInverseJoinColumnOwner();
- this.specifiedInverseJoinColumnContainer = this.buildSpecifiedInverseJoinColumnContainer();
- }
-
- @Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedInverseJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedInverseJoinColumns());
- this.updateDefaultInverseJoinColumn();
- }
-
-
- // ********** table annotation **********
-
- @Override
- public JoinTableAnnotation getTableAnnotation() {
- return this.getRelationshipStrategy().getJoinTableAnnotation();
- }
-
- @Override
- protected void removeTableAnnotation() {
- // we don't remove a join table annotation when it is empty
- }
-
-
- // ********** inverse join columns **********
-
- public ListIterable<JavaJoinColumn> getInverseJoinColumns() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumns() : this.getDefaultInverseJoinColumns();
- }
-
- public int getInverseJoinColumnsSize() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumnsSize() : this.defaultInverseJoinColumnsSize();
- }
-
- public void convertDefaultInverseJoinColumnToSpecified() {
- MappingTools.convertJoinTableDefaultToSpecifiedInverseJoinColumn(this);
- }
-
-
- // ********** specified inverse join columns **********
-
- public ListIterable<JavaJoinColumn> getSpecifiedInverseJoinColumns() {
- return this.specifiedInverseJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedInverseJoinColumnsSize() {
- return this.specifiedInverseJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedInverseJoinColumns() {
- return this.getSpecifiedInverseJoinColumnsSize() != 0;
- }
-
- public JavaJoinColumn getSpecifiedInverseJoinColumn(int index) {
- return this.specifiedInverseJoinColumnContainer.getContextElement(index);
- }
-
- public JavaJoinColumn addSpecifiedInverseJoinColumn() {
- return this.addSpecifiedInverseJoinColumn(this.getSpecifiedInverseJoinColumnsSize());
- }
-
- public JavaJoinColumn addSpecifiedInverseJoinColumn(int index) {
- JoinColumnAnnotation annotation = this.getTableAnnotation().addInverseJoinColumn(index);
- return this.specifiedInverseJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removeSpecifiedInverseJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumnContainer.indexOfContextElement((JavaJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedInverseJoinColumn(int index) {
- this.getTableAnnotation().removeInverseJoinColumn(index);
- this.removeTableAnnotationIfUnset();
- this.specifiedInverseJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex) {
- this.getTableAnnotation().moveInverseJoinColumn(targetIndex, sourceIndex);
- this.specifiedInverseJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- public void clearSpecifiedInverseJoinColumns() {
- // for now, we have to remove annotations one at a time...
- for (int i = this.getSpecifiedInverseJoinColumnsSize(); i-- > 0; ) {
- this.removeSpecifiedInverseJoinColumn(i);
- }
- }
-
- protected void syncSpecifiedInverseJoinColumns() {
- this.specifiedInverseJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<JoinColumnAnnotation> getInverseJoinColumnAnnotations() {
- return this.getTableAnnotation().getInverseJoinColumns();
- }
-
- /**
- * inverse join column container
- */
- protected class SpecifiedInverseJoinColumnContainer
- extends ContextListContainer<JavaJoinColumn, JoinColumnAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_INVERSE_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaJoinColumn buildContextElement(JoinColumnAnnotation resourceElement) {
- return GenericJavaJoinTable.this.buildInverseJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<JoinColumnAnnotation> getResourceElements() {
- return GenericJavaJoinTable.this.getInverseJoinColumnAnnotations();
- }
- @Override
- protected JoinColumnAnnotation getResourceElement(JavaJoinColumn contextElement) {
- return (JoinColumnAnnotation) contextElement.getColumnAnnotation();
- }
- }
-
- protected JavaReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
- return new InverseJoinColumnOwner();
- }
-
- protected ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> buildSpecifiedInverseJoinColumnContainer() {
- SpecifiedInverseJoinColumnContainer container = new SpecifiedInverseJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- // ********** default inverse join column **********
-
- public JavaJoinColumn getDefaultInverseJoinColumn() {
- return this.defaultInverseJoinColumn;
- }
-
- protected void setDefaultInverseJoinColumn(JavaJoinColumn joinColumn) {
- JavaJoinColumn old = this.defaultInverseJoinColumn;
- this.defaultInverseJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, old, joinColumn);
- }
-
- protected ListIterable<JavaJoinColumn> getDefaultInverseJoinColumns() {
- return (this.defaultInverseJoinColumn != null) ?
- new SingleElementListIterable<JavaJoinColumn>(this.defaultInverseJoinColumn) :
- EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- protected int defaultInverseJoinColumnsSize() {
- return (this.defaultInverseJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultInverseJoinColumn() {
- if (this.buildsDefaultInverseJoinColumn()) {
- if (this.defaultInverseJoinColumn == null) {
- this.setDefaultInverseJoinColumn(this.buildInverseJoinColumn(new NullJoinColumnAnnotation(this.getTableAnnotation())));
- } else {
- this.defaultInverseJoinColumn.update();
- }
- } else {
- this.setDefaultInverseJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultInverseJoinColumn() {
- return ! this.hasSpecifiedInverseJoinColumns();
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJoinTableRelationshipStrategy getParent() {
- return (JavaJoinTableRelationshipStrategy) super.getParent();
- }
-
- protected JavaJoinTableRelationshipStrategy getRelationshipStrategy() {
- return this.getParent();
- }
-
- @Override
- protected String buildDefaultName() {
- return this.getRelationshipStrategy().getJoinTableDefaultName();
- }
-
- public void initializeFrom(ReadOnlyJoinTable oldTable) {
- super.initializeFrom(oldTable);
- for (ReadOnlyJoinColumn joinColumn : oldTable.getSpecifiedInverseJoinColumns()) {
- this.addSpecifiedInverseJoinColumn().initializeFrom(joinColumn);
- }
- }
-
- public void initializeFromVirtual(ReadOnlyJoinTable virtualTable) {
- super.initializeFromVirtual(virtualTable);
- for (ReadOnlyJoinColumn joinColumn : virtualTable.getInverseJoinColumns()) {
- this.addSpecifiedInverseJoinColumn().initializeFromVirtual(joinColumn);
- }
- }
-
- protected JavaJoinColumn buildInverseJoinColumn(JoinColumnAnnotation joinColumnAnnotation) {
- return this.buildJoinColumn(this.inverseJoinColumnOwner, joinColumnAnnotation);
- }
-
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationshipStrategy().getRelationship().getMapping();
- }
-
- public PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaJoinColumn column : this.getInverseJoinColumns()) {
- result = column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateJoinColumns(messages, reporter, astRoot);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter, astRoot);
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationshipStrategy().validatesAgainstDatabase();
- }
-
-
- // ********** join column owners **********
-
- /**
- * just a little common behavior
- */
- protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected AbstractJoinColumnOwner() {
- super();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. The table is always the join table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- /**
- * the join column can only be on the join table itself
- */
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return Tools.valuesAreEqual(GenericJavaJoinTable.this.getName(), tableName) ?
- GenericJavaJoinTable.this.getDbTable() :
- null;
- }
-
- /**
- * by default, the join column is, obviously, in the join table;
- * not sure whether it can be anywhere else...
- */
- public String getDefaultTableName() {
- return GenericJavaJoinTable.this.getName();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaJoinTable.this.getValidationTextRange(astRoot);
- }
-
- protected JavaRelationship getRelationship() {
- return this.getRelationshipStrategy().getRelationship();
- }
-
- protected JavaJoinTableRelationshipStrategy getRelationshipStrategy() {
- return GenericJavaJoinTable.this.getRelationshipStrategy();
- }
- }
-
-
- /**
- * owner for "back-pointer" join columns;
- * these point at the source/owning entity
- */
- protected class JoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- return this.getRelationship().getEntity();
- }
-
- public String getAttributeName() {
- return MappingTools.getTargetAttributeName(GenericJavaJoinTable.this.getRelationshipMapping());
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return this.getTypeMapping().getPrimaryDbTable();
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getRelationship().getTypeMapping();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaJoinTable.this.getJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-
-
- /**
- * owner for "forward-pointer" join columns;
- * these point at the target/inverse entity
- */
- protected class InverseJoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected InverseJoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- RelationshipMapping relationshipMapping = GenericJavaJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getResolvedTargetEntity();
- }
-
- public String getAttributeName() {
- RelationshipMapping relationshipMapping = GenericJavaJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getName();
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaJoinTable.this.getInverseJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaLobConverter.java
deleted file mode 100644
index c5c1ff4e57..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaLobConverter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.LobConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-
-public class GenericJavaLobConverter
- extends AbstractJavaConverter
- implements JavaLobConverter
-{
- protected final LobAnnotation lobAnnotation;
-
- public GenericJavaLobConverter(JavaAttributeMapping parent, LobAnnotation lobAnnotation, JavaConverter.Owner owner) {
- super(parent, owner);
- this.lobAnnotation = lobAnnotation;
- }
-
-
- // ********** misc **********
-
- public Class<? extends Converter> getType() {
- return LobConverter.class;
- }
-
- public LobAnnotation getConverterAnnotation() {
- return this.lobAnnotation;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java
deleted file mode 100644
index 935834c6d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaManyToManyMapping;
-
-public class GenericJavaManyToManyMapping
- extends AbstractJavaManyToManyMapping
-{
- public GenericJavaManyToManyMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java
deleted file mode 100644
index 4cdc288501..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaManyToOneMapping;
-
-public class GenericJavaManyToOneMapping
- extends AbstractJavaManyToOneMapping
-{
- public GenericJavaManyToOneMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java
deleted file mode 100644
index 36d734b5b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-
-/**
- * Java mapped superclass
- */
-public class GenericJavaMappedSuperclass
- extends AbstractJavaMappedSuperclass
-{
- public GenericJavaMappedSuperclass(JavaPersistentType parent, MappedSuperclassAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java
deleted file mode 100644
index d088cf32c9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.JoinTable;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.InverseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableValidator;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-public class GenericJavaMappingJoinTableRelationshipStrategy
- extends AbstractJavaJoinTableRelationshipStrategy
- implements JavaMappingJoinTableRelationshipStrategy2_0
-{
- public GenericJavaMappingJoinTableRelationshipStrategy(JavaMappingJoinTableRelationship parent) {
- super(parent);
- }
-
-
- // ********** join table annotation **********
-
- public JoinTableAnnotation getJoinTableAnnotation() {
- return (JoinTableAnnotation) this.getResourceAttribute().getNonNullAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected JoinTableAnnotation addJoinTableAnnotation() {
- return (JoinTableAnnotation) this.getResourceAttribute().addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
- }
-
- @Override
- protected void removeJoinTableAnnotation() {
- this.getResourceAttribute().removeAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** misc **********
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getRelationship().getMapping().getResourceAttribute();
- }
-
- @Override
- public JavaMappingJoinTableRelationship getParent() {
- return (JavaMappingJoinTableRelationship) super.getParent();
- }
-
- @Override
- public JavaMappingJoinTableRelationship getRelationship() {
- return this.getParent();
- }
-
- public boolean isOverridable() {
- return this.getJpaPlatformVariation().isJoinTableOverridable();
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return overrideRelationship.getJoinTableStrategy();
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationshipMapping().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new JoinTableValidator(this.getPersistentAttribute(), (JoinTable) table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new InverseJoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java
deleted file mode 100644
index f059eb1a64..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> named native query
- */
-public class GenericJavaNamedNativeQuery
- extends AbstractJavaQuery<NamedNativeQueryAnnotation>
- implements JavaNamedNativeQuery
-{
- protected String resultClass;
- protected String fullyQualifiedResultClass;
-
- protected String resultSetMapping;
-
-
- public GenericJavaNamedNativeQuery(JavaQueryContainer parent, NamedNativeQueryAnnotation queryAnnotation) {
- super(parent, queryAnnotation);
- this.resultClass = queryAnnotation.getResultClass();
- this.resultSetMapping = queryAnnotation.getResultSetMapping();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setResultClass_(this.queryAnnotation.getResultClass());
- this.setResultSetMapping_(this.queryAnnotation.getResultSetMapping());
- }
-
- @Override
- public void update() {
- super.update();
- this.setFullyQualifiedResultClass(this.buildFullyQualifiedResultClass());
- }
-
- // ********** result class **********
-
- public String getResultClass() {
- return this.resultClass;
- }
-
- public void setResultClass(String resultClass) {
- this.queryAnnotation.setResultClass(resultClass);
- this.setResultClass_(resultClass);
- }
-
- protected void setResultClass_(String resultClass) {
- String old = this.resultClass;
- this.resultClass = resultClass;
- this.firePropertyChanged(RESULT_CLASS_PROPERTY, old, resultClass);
- }
-
- public String getFullyQualifiedResultClass() {
- return this.fullyQualifiedResultClass;
- }
-
- protected void setFullyQualifiedResultClass(String resultClass) {
- String old = this.fullyQualifiedResultClass;
- this.fullyQualifiedResultClass = resultClass;
- this.firePropertyChanged(FULLY_QUALIFIED_RESULT_CLASS_PROPERTY, old, resultClass);
- }
-
- protected String buildFullyQualifiedResultClass() {
- return this.queryAnnotation.getFullyQualifiedResultClassName();
- }
-
- public char getResultClassEnclosingTypeSeparator() {
- return '.';
- }
-
-
- // ********** result set mapping **********
-
- public String getResultSetMapping() {
- return this.resultSetMapping;
- }
-
- public void setResultSetMapping(String resultSetMapping) {
- this.queryAnnotation.setResultSetMapping(resultSetMapping);
- this.setResultSetMapping_(resultSetMapping);
- }
-
- protected void setResultSetMapping_(String resultSetMapping) {
- String old = this.resultSetMapping;
- this.resultSetMapping = resultSetMapping;
- this.firePropertyChanged(RESULT_SET_MAPPING_PROPERTY, old, resultSetMapping);
- }
-
- // ********** metadata conversion *********
-
- public void convertTo(OrmQueryContainer queryContainer) {
- queryContainer.addNamedNativeQuery().convertFrom(this);
- }
-
- public void delete() {
- this.getParent().removeNamedNativeQuery(this);
- }
-
- // ********** validation **********
-
- @Override
- protected void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- // nothing yet
- }
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((NamedNativeQuery) node);
- }
-
- protected boolean isEquivalentTo(NamedNativeQuery nativeQuery) {
- return Tools.valuesAreEqual(this.resultClass, nativeQuery.getResultClass()) &&
- Tools.valuesAreEqual(this.resultSetMapping, nativeQuery.getResultSetMapping());
- }
-
- // ********** misc **********
-
- public Class<NamedNativeQuery> getType() {
- return NamedNativeQuery.class;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedQuery.java
deleted file mode 100644
index e9cf3c4ab6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNamedQuery.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java named query
- */
-public class GenericJavaNamedQuery
- extends AbstractJavaQuery<NamedQueryAnnotation>
- implements JavaNamedQuery
-{
- public GenericJavaNamedQuery(JavaQueryContainer parent, NamedQueryAnnotation queryAnnotation) {
- super(parent, queryAnnotation);
- }
-
- // ********** metadata conversion *********
-
- public void convertTo(OrmQueryContainer queryContainer) {
- queryContainer.addNamedQuery().convertFrom(this);
- }
-
- public void delete() {
- this.getParent().removeNamedQuery(this);
- }
-
- // ********** validation **********
-
- @Override
- protected void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- queryHelper.validate(this, this.query, this.queryAnnotation.getQueryTextRange(), 1, messages);
- }
-
- // ********** misc **********
-
- public Class<NamedQuery> getType() {
- return NamedQuery.class;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java
deleted file mode 100644
index b90206e45a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-
-/**
- * null mapping used when an attribute's default mapping cannot be determined
- */
-public class GenericJavaNullAttributeMapping
- extends AbstractJavaAttributeMapping<Annotation>
-{
- public GenericJavaNullAttributeMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-
- public String getKey() {
- return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return null;
- }
-
- @Override
- protected Annotation getAnnotation_() {
- return null;
- }
-
-
- // ********** metamodel **********
-
- @Override
- public MetamodelField getMetamodelField() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java
deleted file mode 100644
index bf84573cf3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaOneToManyMapping;
-
-public class GenericJavaOneToManyMapping
- extends AbstractJavaOneToManyMapping
-{
- public GenericJavaOneToManyMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java
deleted file mode 100644
index c2f6397a6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaOneToOneMapping;
-
-public class GenericJavaOneToOneMapping
- extends AbstractJavaOneToOneMapping
-{
- public GenericJavaOneToOneMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java
deleted file mode 100644
index 18d7560a64..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.OrderColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java ordering
- * <p>
- * <strong>NB:</strong> Setting any flag to <code>false</code> (or setting the
- * specified "order by" to <code>null</code>) can be a bit unpredictable. The
- * intent is to set a flag to <code>true</code> (or set the specified "order by"
- * to a non-<code>null</code> value).
- * <p>
- * <strong>(JPA 2.0 only) NB:</strong> If both the "order by" and the "order
- * column" annotations are present (which is prohibited by the JPA spec),
- * both are ignored.
- */
-public class GenericJavaOrderable
- extends AbstractJavaJpaContextNode
- implements JavaOrderable2_0
-{
- protected String specifiedOrderBy;
- protected boolean noOrdering = false;
- protected boolean pkOrdering = false;
- protected boolean customOrdering = false;
-
- // JPA 2.0
- protected final Owner owner; // this is null for JPA 1.0 mappings
- protected boolean orderColumnOrdering = false;
- protected final JavaOrderColumn2_0 orderColumn;
-
-
- /**
- * JPA 1.0
- */
- public GenericJavaOrderable(JavaAttributeMapping parent) {
- this(parent, null);
- }
-
- /**
- * JPA 2.0
- */
- public GenericJavaOrderable(JavaAttributeMapping parent, Owner owner) {
- super(parent);
- this.specifiedOrderBy = this.buildSpecifiedOrderBy();
- this.noOrdering = this.buildNoOrdering();
- this.pkOrdering = this.buildPkOrdering();
- this.customOrdering = this.buildCustomOrdering();
-
- this.owner = owner;
- this.orderColumnOrdering = this.buildOrderColumnOrdering();
- this.orderColumn = this.buildOrderColumn();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
-
- this.setSpecifiedOrderBy_(this.buildSpecifiedOrderBy());
- this.setNoOrdering_(this.buildNoOrdering());
- this.setPkOrdering_(this.buildPkOrdering());
- this.setCustomOrdering_(this.buildCustomOrdering());
-
- this.setOrderColumnOrdering_(this.buildOrderColumnOrdering());
- this.orderColumn.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.orderColumn.update();
- }
-
-
- // ********** specified order by **********
-
- public String getSpecifiedOrderBy() {
- return this.specifiedOrderBy;
- }
-
- public void setSpecifiedOrderBy(String orderBy) {
- if (orderBy != null) {
- this.removeOrderColumnAnnotation();
- this.getOrderByAnnotationForUpdate().setValue(orderBy);
-
- this.setSpecifiedOrderBy_(orderBy);
- this.setNoOrdering_(false);
- this.setPkOrdering_(false);
- this.setCustomOrdering_(true);
- this.setOrderColumnOrdering_(false);
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setSpecifiedOrderBy_(String orderBy) {
- String old = this.specifiedOrderBy;
- this.specifiedOrderBy = orderBy;
- this.firePropertyChanged(SPECIFIED_ORDER_BY_PROPERTY, old, orderBy);
- }
-
- protected String buildSpecifiedOrderBy() {
- if (this.orderColumnAnnotationIsPresent()) {
- return null;
- }
- OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
- return (orderByAnnotation == null) ? null : orderByAnnotation.getValue();
- }
-
-
- // ********** no ordering **********
-
- public boolean isNoOrdering() {
- return this.noOrdering;
- }
-
- public void setNoOrdering(boolean noOrdering) {
- if (noOrdering) {
- this.removeOrderColumnAnnotation();
- if (this.getOrderByAnnotation() != null) {
- this.removeOrderByAnnotation();
- }
-
- this.setSpecifiedOrderBy_(null);
- this.setNoOrdering_(true);
- this.setPkOrdering_(false);
- this.setCustomOrdering_(false);
- this.setOrderColumnOrdering_(false);
- } else {
- this.setPkOrdering(true); // hmmm...
- }
- }
-
- protected void setNoOrdering_(boolean noOrdering) {
- boolean old = this.noOrdering;
- this.noOrdering = noOrdering;
- this.firePropertyChanged(NO_ORDERING_PROPERTY, old, noOrdering);
- }
-
- protected boolean buildNoOrdering() {
- return this.isJpa2_0Compatible() ? this.buildNoOrdering2_0() : this.buildNoOrdering1_0();
- }
-
- /**
- * both annotations are missing <em>or</em> both are present
- */
- protected boolean buildNoOrdering2_0() {
- boolean orderByMissing = (this.getOrderByAnnotation() == null);
- boolean orderByPresent = ! orderByMissing;
- boolean orderColumnMissing = (this.getOrderColumnAnnotation() == null);
- boolean orderColumnPresent = ! orderColumnMissing;
- return (orderByMissing && orderColumnMissing) || (orderByPresent && orderColumnPresent);
- }
-
- /**
- * the order-by annotation is missing
- */
- protected boolean buildNoOrdering1_0() {
- return this.getOrderByAnnotation() == null;
- }
-
-
- // ********** pk ordering **********
-
- public boolean isPkOrdering() {
- return this.pkOrdering;
- }
-
- public void setPkOrdering(boolean pkOrdering) {
- if (pkOrdering) {
- this.removeOrderColumnAnnotation();
- OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
- if (orderByAnnotation == null) {
- this.addOrderByAnnotation();
- } else {
- orderByAnnotation.setValue(null);
- }
-
- this.setSpecifiedOrderBy_(null);
- this.setNoOrdering_(false);
- this.setPkOrdering_(true);
- this.setCustomOrdering_(false);
- this.setOrderColumnOrdering_(false);
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setPkOrdering_(boolean pkOrdering) {
- boolean old = this.pkOrdering;
- this.pkOrdering = pkOrdering;
- this.firePropertyChanged(PK_ORDERING_PROPERTY, old, pkOrdering);
- }
-
- /**
- * the order-by annotation is present but no value specified
- */
- protected boolean buildPkOrdering() {
- if (this.orderColumnAnnotationIsPresent()) {
- return false;
- }
- OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
- return (orderByAnnotation != null) && (orderByAnnotation.getValue() == null);
- }
-
-
- // ********** custom ordering **********
-
- public boolean isCustomOrdering() {
- return this.customOrdering;
- }
-
- public void setCustomOrdering(boolean customOrdering) {
- if (customOrdering) {
- this.setSpecifiedOrderBy(""); //$NON-NLS-1$
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setCustomOrdering_(boolean customOrdering) {
- boolean old = this.customOrdering;
- this.customOrdering = customOrdering;
- this.firePropertyChanged(CUSTOM_ORDERING_PROPERTY, old, customOrdering);
- }
-
- /**
- * the order-by annotation is present and it has a specified value
- */
- protected boolean buildCustomOrdering() {
- if (this.orderColumnAnnotationIsPresent()) {
- return false;
- }
- OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
- return (orderByAnnotation != null) && (orderByAnnotation.getValue() != null);
- }
-
-
- // ********** order column ordering **********
-
- public boolean isOrderColumnOrdering() {
- return this.orderColumnOrdering;
- }
-
- public void setOrderColumnOrdering(boolean orderColumnOrdering) {
- if (orderColumnOrdering) {
- this.removeOrderByAnnotation();
- if (this.getOrderColumnAnnotation() == null) {
- this.addOrderColumnAnnotation();
- }
-
- this.setSpecifiedOrderBy_(null);
- this.setNoOrdering_(false);
- this.setPkOrdering_(false);
- this.setCustomOrdering_(false);
- this.setOrderColumnOrdering_(true);
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setOrderColumnOrdering_(boolean orderColumnOrdering) {
- boolean old = this.orderColumnOrdering;
- this.orderColumnOrdering = orderColumnOrdering;
- this.firePropertyChanged(ORDER_COLUMN_ORDERING_PROPERTY, old, orderColumnOrdering);
- }
-
- /**
- * JPA 2.0 only;
- * the order column annotation is present <em>and</em>
- * the order-by annotation is missing
- */
- protected boolean buildOrderColumnOrdering() {
- return this.orderColumnAnnotationIsPresent() &&
- (this.getOrderByAnnotation() == null);
- }
-
-
- // ********** order column **********
-
- public JavaOrderColumn2_0 getOrderColumn() {
- return this.orderColumn;
- }
-
- protected JavaOrderColumn2_0 buildOrderColumn() {
- JavaReadOnlyNamedColumn.Owner columnOwner = new OrderColumnOwner();
- return this.isJpa2_0Compatible() ?
- this.getJpaFactory2_0().buildJavaOrderColumn(this, columnOwner) :
- new GenericJavaOrderColumn2_0(this, columnOwner);
- }
-
-
- // ********** order by annotation **********
-
- protected OrderByAnnotation getOrderByAnnotation() {
- return (OrderByAnnotation) this.getResourceAttribute().getAnnotation(OrderByAnnotation.ANNOTATION_NAME);
- }
-
- protected OrderByAnnotation getOrderByAnnotationForUpdate() {
- OrderByAnnotation annotation = this.getOrderByAnnotation();
- return (annotation != null) ? annotation : this.addOrderByAnnotation();
- }
-
- protected OrderByAnnotation addOrderByAnnotation() {
- return (OrderByAnnotation) this.getResourceAttribute().addAnnotation(OrderByAnnotation.ANNOTATION_NAME);
- }
-
- protected void removeOrderByAnnotation() {
- this.getResourceAttribute().removeAnnotation(OrderByAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** order column annotation **********
-
- protected OrderColumn2_0Annotation getOrderColumnAnnotation() {
- return (OrderColumn2_0Annotation) this.getResourceAttribute().getAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- /**
- * NB: Only return <code>true</code> for JPA 2.0 mappings.
- */
- protected boolean orderColumnAnnotationIsPresent() {
- return this.isJpa2_0Compatible() && (this.getOrderColumnAnnotation() != null);
- }
-
- protected OrderColumn2_0Annotation addOrderColumnAnnotation() {
- return (OrderColumn2_0Annotation) this.getResourceAttribute().addAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeOrderColumnAnnotation() {
- if (this.orderColumnAnnotationIsPresent()) {
- this.removeOrderColumnAnnotation_();
- }
- }
-
- protected void removeOrderColumnAnnotation_() {
- this.getResourceAttribute().removeAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaAttributeMapping getParent() {
- return (JavaAttributeMapping) super.getParent();
- }
-
- protected JavaAttributeMapping getAttributeMapping() {
- return this.getParent();
- }
-
- protected JavaPersistentAttribute getPersistentAttribute() {
- return this.getAttributeMapping().getPersistentAttribute();
- }
-
- public JavaResourceAttribute getResourceAttribute() {
- return this.getPersistentAttribute().getResourceAttribute();
- }
-
- // JPA 2.0 only
- public String getDefaultTableName() {
- return this.owner.getTableName();
- }
-
- // JPA 2.0 only
- protected Table resolveDbTable(String tableName) {
- return this.owner.resolveDbTable(tableName);
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return this.orderColumn.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getOrderByAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getOrderByAnnotationTextRange(CompilationUnit astRoot) {
- OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
- return (orderByAnnotation == null) ? null : orderByAnnotation.getTextRange(astRoot);
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- if (this.orderColumnAnnotationIsPresent() && (this.getOrderByAnnotation() != null)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED,
- new String[] {this.getPersistentAttribute().getName()},
- this.getAttributeMapping(),
- this.getOrderByAnnotationTextRange(astRoot)
- )
- );
- }
- if (this.orderColumnOrdering) {
- //TODO validation message if type is not List
- this.orderColumn.validate(messages, reporter, astRoot);
- }
- }
-
-
- // ********** order column owner (JPA 2.0) **********
-
- protected class OrderColumnOwner
- implements JavaReadOnlyNamedColumn.Owner
- {
- public String getDefaultTableName() {
- return GenericJavaOrderable.this.getDefaultTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericJavaOrderable.this.resolveDbTable(tableName);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getPersistentAttribute().getName() + "_ORDER"; //$NON-NLS-1$
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaOrderable.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OrderColumnValidator(this.getPersistentAttribute(), (OrderColumn2_0) column, textRangeResolver);
- }
-
- protected JavaPersistentAttribute getPersistentAttribute() {
- return GenericJavaOrderable.this.getPersistentAttribute();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java
deleted file mode 100644
index 47085a1fde..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.java.GenericJavaOverrideJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaOverrideJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverride2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaOverrideRelationship
- extends AbstractJavaJpaContextNode
- implements JavaOverrideRelationship2_0
-{
- protected JavaRelationshipStrategy strategy;
-
- protected final JavaJoinColumnRelationshipStrategy joinColumnStrategy;
-
- // JPA 2.0
- protected final JavaJoinTableRelationshipStrategy joinTableStrategy;
-
-
- public GenericJavaOverrideRelationship(JavaAssociationOverride parent) {
- super(parent);
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.setStrategy(this.buildStrategy());
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- public JavaRelationshipStrategy getStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(JavaRelationshipStrategy strategy) {
- JavaRelationshipStrategy old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- protected JavaRelationshipStrategy buildStrategy() {
- return this.isJpa2_0Compatible() ?
- this.buildStrategy2_0() :
- this.joinColumnStrategy;
- }
-
- /**
- * The overridden mapping determines the override's strategy.
- */
- protected JavaRelationshipStrategy buildStrategy2_0() {
- MappingRelationshipStrategy2_0 mappingStrategy = this.getMappingStrategy();
- return (mappingStrategy != null) ?
- (JavaRelationshipStrategy) mappingStrategy.selectOverrideStrategy(this) :
- this.buildMissingMappingStrategy();
- }
-
- /**
- * Get the strategy from the overridden mapping.
- */
- protected MappingRelationshipStrategy2_0 getMappingStrategy() {
- RelationshipMapping mapping = this.getMapping();
- return (mapping == null) ? null : (MappingRelationshipStrategy2_0) mapping.getRelationship().getStrategy();
- }
-
- /**
- * Return the strategy to use when the override's name does not match the
- * name of an appropriate relationship mapping.
- */
- protected JavaRelationshipStrategy buildMissingMappingStrategy() {
- return this.joinColumnStrategy.hasSpecifiedJoinColumns() ?
- this.joinColumnStrategy :
- this.joinTableStrategy;
- }
-
-
- // ********** join column strategy **********
-
- public JavaJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- throw new UnsupportedOperationException();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- // association overrides do not have defaults
- return false;
- }
-
- protected JavaJoinColumnRelationshipStrategy buildJoinColumnStrategy() {
- return new GenericJavaOverrideJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public JavaJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public void setStrategyToJoinTable() {
- throw new UnsupportedOperationException();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- // association overrides do not have defaults
- return false;
- }
-
- protected JavaJoinTableRelationshipStrategy buildJoinTableStrategy() {
- return this.isJpa2_0Compatible() ?
- new GenericJavaOverrideJoinTableRelationshipStrategy2_0(this) :
- new NullJavaJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeFrom(ReadOnlyRelationship oldRelationship) {
- oldRelationship.initializeOn(this);
- }
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- }
-
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- // NOP
- }
-
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
- public void initializeFromVirtual(ReadOnlyOverrideRelationship virtualRelationship) {
- virtualRelationship.initializeOnSpecified(this);
- }
-
- public void initializeOnSpecified(OverrideRelationship specifiedRelationship) {
- throw new UnsupportedOperationException();
- }
-
- public void initializeFromVirtualJoinTableRelationship(ReadOnlyJoinTableRelationship virtualRelationship) {
- this.joinTableStrategy.initializeFromVirtual(virtualRelationship.getJoinTableStrategy());
- }
-
- public void initializeFromVirtualJoinColumnRelationship(ReadOnlyJoinColumnRelationship virtualRelationship) {
- this.joinColumnStrategy.initializeFromVirtual(virtualRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaAssociationOverride getParent() {
- return (JavaAssociationOverride) super.getParent();
- }
-
- protected JavaAssociationOverride getAssociationOverride() {
- return this.getParent();
- }
-
- protected JavaAssociationOverride2_0 getAssociationOverride2_0() {
- return (JavaAssociationOverride2_0) this.getAssociationOverride();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getAssociationOverride().getTypeMapping();
- }
-
- public String getAttributeName() {
- return this.getAssociationOverride().getName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getAssociationOverride().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getAssociationOverride().getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getAssociationOverride().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getAssociationOverride().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
- }
-
- public AssociationOverrideAnnotation getOverrideAnnotation() {
- return this.getAssociationOverride().getOverrideAnnotation();
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- public RelationshipMapping getMapping() {
- return this.getAssociationOverride().getMapping();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
-
- return this.strategy.getJavaCompletionProposals(pos, filter, astRoot);
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getAssociationOverride().getValidationTextRange(astRoot);
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.strategy.validate(messages, reporter, astRoot);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
deleted file mode 100644
index a1c781c011..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.java.Accessor;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute;
-
-/**
- * Generic Java persistent attribute
- */
-public class GenericJavaPersistentAttribute
- extends AbstractJavaPersistentAttribute
-{
-
- public GenericJavaPersistentAttribute(PersistentType parent, JavaResourceField resourceField) {
- super(parent, resourceField);
- }
-
- public GenericJavaPersistentAttribute(PersistentType parent, JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter) {
- super(parent, resourceGetter, resourceSetter);
- }
-
- public GenericJavaPersistentAttribute(PersistentType parent, Accessor accessor) {
- super(parent, accessor);
- }
-
- // ********** validation **********
-
- @Override
- protected JptValidator buildAttributeValidator(CompilationUnit astRoot) {
- return getAccessor().buildAttributeValidator(this, this.buildTextRangeResolver(astRoot));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentType.java
deleted file mode 100644
index ccd859882e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentType.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType;
-
-/**
- * JPA 1.0 Java persistent type.
- * The specified access is always null.
- */
-public class GenericJavaPersistentType
- extends AbstractJavaPersistentType
-{
- public GenericJavaPersistentType(PersistentType.Owner parent, JavaResourceType jrt) {
- super(parent, jrt);
- }
-
-
- // ********** access **********
-
- /**
- * Return <code>null</code> - JPA 1.0 does not support a specified access.
- */
- @Override
- protected AccessType buildSpecifiedAccess() {
- return null;
- }
-
- /**
- * JPA 1.0 does not support a specified access.
- */
- @Override
- public void setSpecifiedAccess(AccessType specifiedAccess) {
- throw new UnsupportedOperationException("JPA 1.0 does not support a specified access type in java."); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
deleted file mode 100644
index c0cda4fe63..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaPrimaryKeyJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Java primary key join column
- */
-public class GenericJavaPrimaryKeyJoinColumn
- extends AbstractJavaNamedColumn<PrimaryKeyJoinColumnAnnotation, JavaReadOnlyBaseJoinColumn.Owner>
- implements JavaPrimaryKeyJoinColumn
-{
- /** @see AbstractJavaNamedColumn#AbstractJavaNamedColumn(org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation) */
- protected /* final */ PrimaryKeyJoinColumnAnnotation columnAnnotation; // never null
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation columnAnnotation) {
- super(parent, owner, columnAnnotation);
- this.specifiedReferencedColumnName = this.buildSpecifiedReferencedColumnName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedReferencedColumnName_(this.buildSpecifiedReferencedColumnName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** column annotation **********
-
- @Override
- public PrimaryKeyJoinColumnAnnotation getColumnAnnotation() {
- return this.columnAnnotation;
- }
-
- @Override
- protected void setColumnAnnotation(PrimaryKeyJoinColumnAnnotation columnAnnotation) {
- this.columnAnnotation = columnAnnotation;
- }
-
- @Override
- protected void removeColumnAnnotation() {
- // we don't remove a pk join column annotation when it is empty
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- public void setSpecifiedReferencedColumnName(String name) {
- if (this.valuesAreDifferent(this.specifiedReferencedColumnName, name)) {
- this.columnAnnotation.setReferencedColumnName(name);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedReferencedColumnName_(name);
- }
- }
-
- protected void setSpecifiedReferencedColumnName_(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- return this.columnAnnotation.getReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- // TODO not correct when we start supporting
- // primary key join columns in 1-1 mappings
- protected String buildDefaultReferencedColumnName() {
- return this.buildDefaultName();
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** misc **********
-
- @Override
- public String getTable() {
- return this.owner.getDefaultTableName();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.referencedColumnNameTouches(pos)) {
- return this.getJavaCandidateReferencedColumnNames(filter);
- }
- return null;
- }
-
- protected boolean referencedColumnNameTouches(int pos) {
- return this.columnAnnotation.referencedColumnNameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateReferencedColumnNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateReferencedColumnNames(filter));
- }
-
- protected Iterable<String> getCandidateReferencedColumnNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateReferencedColumnNames(), filter);
- }
-
- protected Iterable<String> getCandidateReferencedColumnNames() {
- Table table = this.owner.getReferencedColumnDbTable();
- return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-
-
- // ********** validation **********
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaPrimaryKeyJoinColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.columnAnnotation.getReferencedColumnNameTextRange(), astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public void toString(StringBuilder sb) {
- super.toString(sb);
- sb.append("=>"); //$NON-NLS-1$
- sb.append(this.getReferencedColumnName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
deleted file mode 100644
index 3b77df2586..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java query container
- */
-public class GenericJavaQueryContainer
- extends AbstractJavaJpaContextNode
- implements JavaQueryContainer
-{
- protected final Owner owner;
-
- protected final ContextListContainer<JavaNamedQuery, NamedQueryAnnotation> namedQueryContainer;
- protected final ContextListContainer<JavaNamedNativeQuery, NamedNativeQueryAnnotation> namedNativeQueryContainer;
-
-
- public GenericJavaQueryContainer(JavaJpaContextNode parent, Owner owner) {
- super(parent);
- this.owner = owner;
- this.namedQueryContainer = this.buildNamedQueryContainer();
- this.namedNativeQueryContainer = this.buildNamedNativeQueryContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncNamedQueries();
- this.syncNamedNativeQueries();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getNamedQueries());
- this.updateNodes(this.getNamedNativeQueries());
- }
-
-
- // ********** queries **********
-
- @SuppressWarnings("unchecked")
- public Iterable<Query> getQueries() {
- return new CompositeIterable<Query>(this.getNamedQueries(), this.getNamedNativeQueries());
- }
-
-
- // ********** named queries **********
-
-
- public ListIterable<JavaNamedQuery> getNamedQueries() {
- return this.namedQueryContainer.getContextElements();
- }
-
- public int getNamedQueriesSize() {
- return this.namedQueryContainer.getContextElementsSize();
- }
-
- public JavaNamedQuery addNamedQuery() {
- return this.addNamedQuery(this.getNamedQueriesSize());
- }
-
- public JavaNamedQuery addNamedQuery(int index) {
- NamedQueryAnnotation annotation = this.addNamedQueryAnnotation(index);
- return this.namedQueryContainer.addContextElement(index, annotation);
- }
-
- protected NamedQueryAnnotation addNamedQueryAnnotation(int index) {
- return (NamedQueryAnnotation) this.owner.getResourceAnnotatedElement().addAnnotation(index, NamedQueryAnnotation.ANNOTATION_NAME);
- }
-
- public void removeNamedQuery(NamedQuery namedQuery) {
- this.removeNamedQuery(this.namedQueryContainer.indexOfContextElement((JavaNamedQuery) namedQuery));
- }
-
- public void removeNamedQuery(int index) {
- this.owner.getResourceAnnotatedElement().removeAnnotation(index, NamedQueryAnnotation.ANNOTATION_NAME);
- this.namedQueryContainer.removeContextElement(index);
- }
-
- public void moveNamedQuery(int targetIndex, int sourceIndex) {
- this.owner.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, NamedQueryAnnotation.ANNOTATION_NAME);
- this.namedQueryContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected JavaNamedQuery buildNamedQuery(NamedQueryAnnotation namedQueryAnnotation) {
- return this.getJpaFactory().buildJavaNamedQuery(this, namedQueryAnnotation);
- }
-
- protected void syncNamedQueries() {
- this.namedQueryContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<NamedQueryAnnotation> getNamedQueryAnnotations() {
- return new SubListIterableWrapper<NestableAnnotation, NamedQueryAnnotation>(this.getNestableNamedQueryAnnotations_());
- }
-
- protected ListIterable<NestableAnnotation> getNestableNamedQueryAnnotations_() {
- return this.owner.getResourceAnnotatedElement().getAnnotations(NamedQueryAnnotation.ANNOTATION_NAME);
- }
-
- protected ContextListContainer<JavaNamedQuery, NamedQueryAnnotation> buildNamedQueryContainer() {
- NamedQueryContainer container = new NamedQueryContainer();
- container.initialize();
- return container;
- }
-
- /**
- * named query container
- */
- protected class NamedQueryContainer
- extends ContextListContainer<JavaNamedQuery, NamedQueryAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return NAMED_QUERIES_LIST;
- }
- @Override
- protected JavaNamedQuery buildContextElement(NamedQueryAnnotation resourceElement) {
- return GenericJavaQueryContainer.this.buildNamedQuery(resourceElement);
- }
- @Override
- protected ListIterable<NamedQueryAnnotation> getResourceElements() {
- return GenericJavaQueryContainer.this.getNamedQueryAnnotations();
- }
- @Override
- protected NamedQueryAnnotation getResourceElement(JavaNamedQuery contextElement) {
- return contextElement.getQueryAnnotation();
- }
- }
-
-
- // ********** named native queries **********
-
- public ListIterable<JavaNamedNativeQuery> getNamedNativeQueries() {
- return this.namedNativeQueryContainer.getContextElements();
- }
-
- public int getNamedNativeQueriesSize() {
- return this.namedNativeQueryContainer.getContextElementsSize();
- }
-
- public JavaNamedNativeQuery addNamedNativeQuery() {
- return this.addNamedNativeQuery(this.getNamedNativeQueriesSize());
- }
-
- public JavaNamedNativeQuery addNamedNativeQuery(int index) {
- NamedNativeQueryAnnotation annotation = this.addNamedNativeQueryAnnotation(index);
- return this.namedNativeQueryContainer.addContextElement(index, annotation);
- }
-
- protected NamedNativeQueryAnnotation addNamedNativeQueryAnnotation(int index) {
- return (NamedNativeQueryAnnotation) this.owner.getResourceAnnotatedElement().addAnnotation(index, NamedNativeQueryAnnotation.ANNOTATION_NAME);
- }
-
- public void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery) {
- this.removeNamedNativeQuery(this.namedNativeQueryContainer.indexOfContextElement((JavaNamedNativeQuery) namedNativeQuery));
- }
-
- public void removeNamedNativeQuery(int index) {
- this.owner.getResourceAnnotatedElement().removeAnnotation(index, NamedNativeQueryAnnotation.ANNOTATION_NAME);
- this.namedNativeQueryContainer.removeContextElement(index);
- }
-
- public void moveNamedNativeQuery(int targetIndex, int sourceIndex) {
- this.owner.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, NamedNativeQueryAnnotation.ANNOTATION_NAME);
- this.namedNativeQueryContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected JavaNamedNativeQuery buildNamedNativeQuery(NamedNativeQueryAnnotation namedNativeQueryAnnotation) {
- return this.getJpaFactory().buildJavaNamedNativeQuery(this, namedNativeQueryAnnotation);
- }
-
- protected void syncNamedNativeQueries() {
- this.namedNativeQueryContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<NamedNativeQueryAnnotation> getNamedNativeQueryAnnotations() {
- return new SubListIterableWrapper<NestableAnnotation, NamedNativeQueryAnnotation>(this.getNestableNamedNativeQueryAnnotations_());
- }
-
- protected ListIterable<NestableAnnotation> getNestableNamedNativeQueryAnnotations_() {
- return this.owner.getResourceAnnotatedElement().getAnnotations(NamedNativeQueryAnnotation.ANNOTATION_NAME);
- }
-
- protected ContextListContainer<JavaNamedNativeQuery, NamedNativeQueryAnnotation> buildNamedNativeQueryContainer() {
- NamedNativeQueryContainer container = new NamedNativeQueryContainer();
- container.initialize();
- return container;
- }
-
- /**
- * named query container
- */
- protected class NamedNativeQueryContainer
- extends ContextListContainer<JavaNamedNativeQuery, NamedNativeQueryAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return NAMED_NATIVE_QUERIES_LIST;
- }
- @Override
- protected JavaNamedNativeQuery buildContextElement(NamedNativeQueryAnnotation resourceElement) {
- return GenericJavaQueryContainer.this.buildNamedNativeQuery(resourceElement);
- }
- @Override
- protected ListIterable<NamedNativeQueryAnnotation> getResourceElements() {
- return GenericJavaQueryContainer.this.getNamedNativeQueryAnnotations();
- }
- @Override
- protected NamedNativeQueryAnnotation getResourceElement(JavaNamedNativeQuery contextElement) {
- return contextElement.getQueryAnnotation();
- }
- }
-
-
- // ********** validation **********
-
- /**
- * The queries are validated in the persistence unit.
- * @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateQueries(List, IReporter)
- */
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- // queries are validated in the persistence unit
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.owner.getResourceAnnotatedElement().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJpaContextNode getParent() {
- return (JavaJpaContextNode) super.getParent();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java
deleted file mode 100644
index 2c977b7d35..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * Java query hing
- */
-public class GenericJavaQueryHint
- extends AbstractJavaJpaContextNode
- implements JavaQueryHint
-{
- protected final QueryHintAnnotation queryHintAnnotation;
-
- protected String name;
- protected String value;
-
-
- public GenericJavaQueryHint(JavaQuery parent, QueryHintAnnotation queryHintAnnotation) {
- super(parent);
- this.queryHintAnnotation = queryHintAnnotation;
- this.name = queryHintAnnotation.getName();
- this.value = queryHintAnnotation.getValue();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.queryHintAnnotation.getName());
- this.setValue_(this.queryHintAnnotation.getValue());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.queryHintAnnotation.setName(name);
- this.setName_(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** value **********
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- this.queryHintAnnotation.setValue(value);
- this.setValue_(value);
- }
-
- protected void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.queryHintAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getQuery().getValidationTextRange(astRoot);
- }
-
- public boolean isEquivalentTo(QueryHint hint) {
- return StringTools.stringsAreEqual(this.getName(), hint.getName()) &&
- StringTools.stringsAreEqual(this.getValue(), hint.getValue()) ;
- }
-
- // ********** misc **********
-
- @Override
- public JavaQuery getParent() {
- return (JavaQuery) super.getParent();
- }
-
- protected JavaQuery getQuery() {
- return this.getParent();
- }
-
- public QueryHintAnnotation getQueryHintAnnotation() {
- return this.queryHintAnnotation;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
deleted file mode 100644
index fe0ead9f0e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReferenceTable;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaTable;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ReferenceTableAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java join table or collection table
- */
-public abstract class GenericJavaReferenceTable<A extends ReferenceTableAnnotation>
- extends AbstractJavaTable<A>
- implements JavaReferenceTable
-{
- protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected JavaJoinColumn defaultJoinColumn;
-
-
- protected GenericJavaReferenceTable(JavaJpaContextNode parent, Owner owner) {
- super(parent, owner);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedJoinColumns());
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<JavaJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
- public void convertDefaultJoinColumnToSpecified() {
- MappingTools.convertReferenceTableDefaultToSpecifiedJoinColumn(this);
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<JavaJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public JavaJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- public JavaJoinColumn addSpecifiedJoinColumn() {
- return this.addSpecifiedJoinColumn(this.getSpecifiedJoinColumnsSize());
- }
-
- public JavaJoinColumn addSpecifiedJoinColumn(int index) {
- JoinColumnAnnotation annotation = this.getTableAnnotation().addJoinColumn(index);
- return this.specifiedJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedJoinColumn(this.specifiedJoinColumnContainer.indexOfContextElement((JavaJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedJoinColumn(int index) {
- this.getTableAnnotation().removeJoinColumn(index);
- this.removeTableAnnotationIfUnset();
- this.specifiedJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
- this.getTableAnnotation().moveJoinColumn(targetIndex, sourceIndex);
- this.specifiedJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<JoinColumnAnnotation> getJoinColumnAnnotations() {
- return this.getTableAnnotation().getJoinColumns();
- }
-
-
- /**
- * join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<JavaJoinColumn, JoinColumnAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaJoinColumn buildContextElement(JoinColumnAnnotation resourceElement) {
- return GenericJavaReferenceTable.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<JoinColumnAnnotation> getResourceElements() {
- return GenericJavaReferenceTable.this.getJoinColumnAnnotations();
- }
- @Override
- protected JoinColumnAnnotation getResourceElement(JavaJoinColumn contextElement) {
- return (JoinColumnAnnotation) contextElement.getColumnAnnotation();
- }
- }
-
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
-
- protected ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> buildSpecifiedJoinColumnContainer(){
- SpecifiedJoinColumnContainer container = new SpecifiedJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- // ********** default join column **********
-
- public JavaJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(JavaJoinColumn joinColumn) {
- JavaJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<JavaJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<JavaJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- if (this.buildsDefaultJoinColumn()) {
- if (this.defaultJoinColumn == null) {
- this.setDefaultJoinColumn(this.buildJoinColumn(new NullJoinColumnAnnotation(this.getTableAnnotation())));
- } else {
- this.defaultJoinColumn.update();
- }
- } else {
- this.setDefaultJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultJoinColumn() {
- return ! this.hasSpecifiedJoinColumns();
- }
-
-
- // ********** misc **********
-
- protected void initializeFrom(ReadOnlyReferenceTable oldTable) {
- super.initializeFrom(oldTable);
- for (ReadOnlyJoinColumn joinColumn : oldTable.getSpecifiedJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFrom(joinColumn);
- }
- }
-
- protected void initializeFromVirtual(ReadOnlyReferenceTable virtualTable) {
- super.initializeFromVirtual(virtualTable);
- for (ReadOnlyJoinColumn joinColumn : virtualTable.getJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFromVirtual(joinColumn);
- }
- }
-
- protected JavaJoinColumn buildJoinColumn(JoinColumnAnnotation joinColumnAnnotation) {
- return this.buildJoinColumn(this.joinColumnOwner, joinColumnAnnotation);
- }
-
- protected JavaJoinColumn buildJoinColumn(JavaReadOnlyJoinColumn.Owner jcOwner, JoinColumnAnnotation joinColumnAnnotation) {
- return this.getJpaFactory().buildJavaJoinColumn(this, jcOwner, joinColumnAnnotation);
- }
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaJoinColumn column : this.getJoinColumns()) {
- result = column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- this.validateJoinColumns(messages, reporter, astRoot);
- }
- }
-
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateNodes(this.getJoinColumns(), messages, reporter, astRoot);
- }
-}
-
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
deleted file mode 100644
index 3fafa6103e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTablePrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullPrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java secondary table
- */
-public class GenericJavaSecondaryTable
- extends AbstractJavaTable<SecondaryTableAnnotation>
- implements JavaSecondaryTable
-{
- /** @see AbstractJavaTable#AbstractJavaTable(org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.Table.Owner, org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation) */
- protected /* final */ SecondaryTableAnnotation tableAnnotation;
-
- protected final ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> specifiedPrimaryKeyJoinColumnContainer;
- protected final JavaReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
-
- protected JavaPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
-
-
- public GenericJavaSecondaryTable(JavaEntity parent, Owner owner, SecondaryTableAnnotation tableAnnotation) {
- super(parent, owner, tableAnnotation);
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.specifiedPrimaryKeyJoinColumnContainer = this.buildSpecifiedPrimaryKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedPrimaryKeyJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedPrimaryKeyJoinColumns());
- this.updateDefaultPrimaryKeyJoinColumn();
- }
-
-
- // ********** table annotation **********
-
- @Override
- public SecondaryTableAnnotation getTableAnnotation() {
- return this.tableAnnotation;
- }
-
- /**
- * @see AbstractJavaTable
- */
- @Override
- protected void setTableAnnotation(SecondaryTableAnnotation tableAnnotation) {
- this.tableAnnotation = tableAnnotation;
- }
-
- @Override
- protected void removeTableAnnotation() {
- // even though its name is required, we don't remove a secondary table'
- // annotation when it is empty since it is part of a list and it's not
- // obvious whether this would be very user-helpful...
- }
-
- protected String getAnnotationName() {
- return SecondaryTableAnnotation.ANNOTATION_NAME;
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumns() : this.getDefaultPrimaryKeyJoinColumns();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumnsSize() : this.getDefaultPrimaryKeyJoinColumnsSize();
- }
-
-
- // ********** specified primary key join columns **********
-
-
- public ListIterable<JavaPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedPrimaryKeyJoinColumnsSize() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- protected boolean hasSpecifiedPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumnsSize() != 0;
- }
-
- public JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn() {
- return this.addSpecifiedPrimaryKeyJoinColumn(this.getSpecifiedPrimaryKeyJoinColumnsSize());
- }
-
- public JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
- PrimaryKeyJoinColumnAnnotation annotation = this.tableAnnotation.addPkJoinColumn(index);
- return this.specifiedPrimaryKeyJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn joinColumn) {
- this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumnContainer.indexOfContextElement((JavaPrimaryKeyJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
- this.tableAnnotation.removePkJoinColumn(index);
- this.removeTableAnnotationIfUnset();
- this.specifiedPrimaryKeyJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.tableAnnotation.movePkJoinColumn(targetIndex, sourceIndex);
- this.specifiedPrimaryKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedPrimaryKeyJoinColumns() {
- this.specifiedPrimaryKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getPrimaryKeyJoinColumnAnnotations() {
- return this.tableAnnotation.getPkJoinColumns();
- }
-
- /**
- * specified primary key join column container
- */
- protected class SpecifiedPrimaryKeyJoinColumnContainer
- extends ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaPrimaryKeyJoinColumn buildContextElement(PrimaryKeyJoinColumnAnnotation resourceElement) {
- return GenericJavaSecondaryTable.this.buildPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<PrimaryKeyJoinColumnAnnotation> getResourceElements() {
- return GenericJavaSecondaryTable.this.getPrimaryKeyJoinColumnAnnotations();
- }
- @Override
- protected PrimaryKeyJoinColumnAnnotation getResourceElement(JavaPrimaryKeyJoinColumn contextElement) {
- return contextElement.getColumnAnnotation();
- }
- }
-
- protected JavaReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
- protected ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> buildSpecifiedPrimaryKeyJoinColumnContainer() {
- SpecifiedPrimaryKeyJoinColumnContainer container = new SpecifiedPrimaryKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- // ********** default primary key join column **********
-
- public JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
- return this.defaultPrimaryKeyJoinColumn;
- }
-
- protected void setDefaultPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn joinColumn) {
- JavaPrimaryKeyJoinColumn old = this.defaultPrimaryKeyJoinColumn;
- this.defaultPrimaryKeyJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, old, joinColumn);
- }
-
- protected ListIterable<JavaPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- return (this.defaultPrimaryKeyJoinColumn != null) ?
- new SingleElementListIterable<JavaPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn) :
- EmptyListIterable.<JavaPrimaryKeyJoinColumn>instance();
- }
-
- protected int getDefaultPrimaryKeyJoinColumnsSize() {
- return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultPrimaryKeyJoinColumn() {
- if (this.buildsDefaultPrimaryKeyJoinColumn()) {
- if (this.defaultPrimaryKeyJoinColumn == null) {
- this.setDefaultPrimaryKeyJoinColumn(this.buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(this.tableAnnotation)));
- } else {
- this.defaultPrimaryKeyJoinColumn.update();
- }
- } else {
- this.setDefaultPrimaryKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultPrimaryKeyJoinColumn() {
- return ! this.hasSpecifiedPrimaryKeyJoinColumns();
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaEntity getParent() {
- return (JavaEntity) super.getParent();
- }
-
- protected JavaEntity getEntity() {
- return this.getParent();
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- protected JavaPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation) {
- return this.getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, pkJoinColumnAnnotation);
- }
-
-
- // ********** defaults **********
-
- /**
- * a secondary table doesn't have a default name
- */
- @Override
- protected String buildDefaultName() {
- return null;
- }
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** code completion **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaPrimaryKeyJoinColumn column : this.getPrimaryKeyJoinColumns()) {
- result = column.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
- }
- }
- }
-
- public boolean validatesAgainstDatabase() {
- return this.connectionProfileIsActive();
- }
-
-
- // ********** primary key join column owner adapter **********
-
- protected class PrimaryKeyJoinColumnOwner
- implements JavaReadOnlyBaseJoinColumn.Owner
- {
- protected JavaEntity getEntity() {
- return GenericJavaSecondaryTable.this.getEntity();
- }
-
- public String getDefaultTableName() {
- return GenericJavaSecondaryTable.this.getName();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericJavaSecondaryTable.this.getDbTable();
- }
-
- public Table getReferencedColumnDbTable() {
- return this.getEntity().getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaSecondaryTable.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- if (this.getJoinColumnsSize() != 1) {
- return null;
- }
- return this.getEntity().getPrimaryKeyColumnName();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaSecondaryTable.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericJavaSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java
deleted file mode 100644
index 5b45320174..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * Java sequence generator
- */
-public class GenericJavaSequenceGenerator
- extends AbstractJavaSequenceGenerator<SequenceGeneratorAnnotation>
-{
- public GenericJavaSequenceGenerator(JavaGeneratorContainer parent, SequenceGeneratorAnnotation generatorAnnotation) {
- super(parent, generatorAnnotation);
- }
-
-
- // ********** database stuff **********
-
- /**
- * The JPA 1.0 spec does not allow a sequence to specify a catalog.
- */
- @Override
- protected String getCatalog() {
- return this.getContextDefaultCatalog();
- }
-
- /**
- * The JPA 1.0 spec does not allow a sequence to specify a schema.
- */
- @Override
- protected String getSchema() {
- return this.getContextDefaultSchema();
- }
-
- // ********** validation **********
-
- @Override
- protected boolean isEquivalentTo(SequenceGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.getDbSchema(), generator.getDbSchema()) &&
- Tools.valuesAreEqual(this.getDbCatalog(), generator.getDbCatalog());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTable.java
deleted file mode 100644
index a0990dd1b9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTable.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaTable;
-import org.eclipse.jpt.jpa.core.resource.java.TableAnnotation;
-
-/**
- * Java table
- */
-public class GenericJavaTable
- extends AbstractJavaTable<TableAnnotation>
-{
- public GenericJavaTable(JavaEntity parent, Owner owner) {
- super(parent, owner);
- }
-
-
- // ********** table annotation **********
-
- @Override
- public TableAnnotation getTableAnnotation() {
- // TODO get the NullTableAnnotation from the resource model or build it here in the context model??
- return (TableAnnotation) this.getJavaResourceType().getNonNullAnnotation(this.getAnnotationName());
- }
-
- @Override
- protected void removeTableAnnotation() {
- this.getJavaResourceType().removeAnnotation(this.getAnnotationName());
- }
-
- protected String getAnnotationName() {
- return TableAnnotation.ANNOTATION_NAME;
- }
-
- protected JavaResourceType getJavaResourceType() {
- return this.getEntity().getPersistentType().getJavaResourceType();
- }
-
-
- // ********** defaults **********
-
- @Override
- protected String buildDefaultName() {
- return this.getEntity().getDefaultTableName();
- }
-
- /**
- * Just to remember:<ol>
- * <li>{@link org.eclipse.jpt.jpa.core.context.Entity#getDefaultSchema()}<br>
- * check inheritance; get default schema from root
- * <li>{@link org.eclipse.jpt.jpa.core.context.orm.EntityMappings#getSchema()}<br>
- * check for specified schema
- * <li>{@link org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit#getDefaultSchema()}<br>
- * {@link org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitDefaults#getSchema()}
- * <li>{@link org.eclipse.jpt.jpa.core.JpaProject#getDefaultSchema()}<br>
- * check for user override project setting
- * <li>{@link org.eclipse.jpt.jpa.db.Catalog#getDefaultSchema()}<br>
- * or {@link org.eclipse.jpt.jpa.db.Database#getDefaultSchema()}
- * </ol>
- */
- @Override
- protected String buildDefaultSchema() {
- return this.getEntity().getDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getEntity().getDefaultCatalog();
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.connectionProfileIsActive();
- }
-
-
- // ********** misc **********
-
- /**
- * covariant override
- */
- @Override
- public JavaEntity getParent() {
- return (JavaEntity) super.getParent();
- }
-
- protected JavaEntity getEntity() {
- return this.getParent();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java
deleted file mode 100644
index 4ed1b078bd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.TableGenerator;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaTableGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaGenerator;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Java table generator
- */
-public class GenericJavaTableGenerator
- extends AbstractJavaGenerator<TableGeneratorAnnotation>
- implements JavaTableGenerator, UniqueConstraint.Owner
-{
- protected String specifiedTable;
- protected String defaultTable;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected String specifiedPkColumnName;
- protected String defaultPkColumnName;
-
- protected String specifiedValueColumnName;
- protected String defaultValueColumnName;
-
- protected String specifiedPkColumnValue;
- protected String defaultPkColumnValue;
-
- protected final ContextListContainer<JavaUniqueConstraint, UniqueConstraintAnnotation> uniqueConstraintContainer;
-
-
- // ********** constructor **********
-
- public GenericJavaTableGenerator(JavaGeneratorContainer parent, TableGeneratorAnnotation generatorAnnotation) {
- super(parent, generatorAnnotation);
- this.specifiedTable = generatorAnnotation.getTable();
- this.specifiedSchema = generatorAnnotation.getSchema();
- this.specifiedCatalog = generatorAnnotation.getCatalog();
- this.specifiedPkColumnName = generatorAnnotation.getPkColumnName();
- this.specifiedValueColumnName = generatorAnnotation.getValueColumnName();
- this.specifiedPkColumnValue = generatorAnnotation.getPkColumnValue();
- this.uniqueConstraintContainer = this.buildUniqueConstraintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTable_(this.generatorAnnotation.getTable());
- this.setSpecifiedSchema_(this.generatorAnnotation.getSchema());
- this.setSpecifiedCatalog_(this.generatorAnnotation.getCatalog());
- this.setSpecifiedPkColumnName_(this.generatorAnnotation.getPkColumnName());
- this.setSpecifiedValueColumnName_(this.generatorAnnotation.getValueColumnName());
- this.setSpecifiedPkColumnValue_(this.generatorAnnotation.getPkColumnValue());
- this.syncUniqueConstraints();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTable(this.buildDefaultTable());
- this.setDefaultSchema(this.buildDefaultSchema());
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.setDefaultPkColumnName(this.buildDefaultPkColumnName());
- this.setDefaultValueColumnName(this.buildDefaultValueColumnName());
- this.setDefaultPkColumnValue(this.buildDefaultPkColumnValue());
- this.updateNodes(this.getUniqueConstraints());
- }
-
-
- // ********** initial value **********
-
- @Override
- protected int buildDefaultInitialValue() {
- return DEFAULT_INITIAL_VALUE;
- }
-
-
- // ********** table **********
-
- public String getTable() {
- return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
- }
-
- public String getSpecifiedTable() {
- return this.specifiedTable;
- }
-
- public void setSpecifiedTable(String table) {
- this.generatorAnnotation.setTable(table);
- this.setSpecifiedTable_(table);
- }
-
- protected void setSpecifiedTable_(String table) {
- String old = this.specifiedTable;
- this.specifiedTable = table;
- this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
- }
-
- public String getDefaultTable() {
- return this.defaultTable;
- }
-
- protected void setDefaultTable(String table) {
- String old = this.defaultTable;
- this.defaultTable = table;
- this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
- }
-
- protected String buildDefaultTable() {
- return null; // TODO the default table is determined by the runtime provider...
- }
-
- public Table getDbTable() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getTable());
- }
-
-
- // ********** schema **********
-
- @Override
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- this.generatorAnnotation.setSchema(schema);
- this.setSpecifiedSchema_(schema);
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
-
- // ********** catalog **********
-
- @Override
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- this.generatorAnnotation.setCatalog(catalog);
- this.setSpecifiedCatalog_(catalog);
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** primary key column name **********
-
- public String getPkColumnName() {
- return (this.specifiedPkColumnName != null) ? this.specifiedPkColumnName : this.defaultPkColumnName;
- }
-
- public String getSpecifiedPkColumnName() {
- return this.specifiedPkColumnName;
- }
-
- public void setSpecifiedPkColumnName(String name) {
- this.generatorAnnotation.setPkColumnName(name);
- this.setSpecifiedPkColumnName_(name);
- }
-
- protected void setSpecifiedPkColumnName_(String name) {
- String old = this.specifiedPkColumnName;
- this.specifiedPkColumnName = name;
- this.firePropertyChanged(SPECIFIED_PK_COLUMN_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultPkColumnName() {
- return this.defaultPkColumnName;
- }
-
- protected void setDefaultPkColumnName(String name) {
- String old = this.defaultPkColumnName;
- this.defaultPkColumnName = name;
- this.firePropertyChanged(DEFAULT_PK_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultPkColumnName() {
- return null; // TODO the default pk column name is determined by the runtime provider...
- }
-
-
- // ********** value column name **********
-
- public String getValueColumnName() {
- return (this.specifiedValueColumnName != null) ? this.specifiedValueColumnName : this.defaultValueColumnName;
- }
-
- public String getSpecifiedValueColumnName() {
- return this.specifiedValueColumnName;
- }
-
- public void setSpecifiedValueColumnName(String name) {
- this.generatorAnnotation.setValueColumnName(name);
- this.setSpecifiedValueColumnName_(name);
- }
-
- protected void setSpecifiedValueColumnName_(String name) {
- String old = this.specifiedValueColumnName;
- this.specifiedValueColumnName = name;
- this.firePropertyChanged(SPECIFIED_VALUE_COLUMN_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultValueColumnName() {
- return this.defaultValueColumnName;
- }
-
- protected void setDefaultValueColumnName(String name) {
- String old = this.defaultValueColumnName;
- this.defaultValueColumnName = name;
- this.firePropertyChanged(DEFAULT_VALUE_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultValueColumnName() {
- return null; // TODO the default value column name is determined by the runtime provider...
- }
-
-
- // ********** primary key column value **********
-
- public String getPkColumnValue() {
- return (this.specifiedPkColumnValue != null) ? this.specifiedPkColumnValue : this.defaultPkColumnValue;
- }
-
- public String getSpecifiedPkColumnValue() {
- return this.specifiedPkColumnValue;
- }
-
- public void setSpecifiedPkColumnValue(String value) {
- this.generatorAnnotation.setPkColumnValue(value);
- this.setSpecifiedPkColumnValue_(value);
- }
-
- protected void setSpecifiedPkColumnValue_(String value) {
- String old = this.specifiedPkColumnValue;
- this.specifiedPkColumnValue = value;
- this.firePropertyChanged(SPECIFIED_PK_COLUMN_VALUE_PROPERTY, old, value);
- }
-
- public String getDefaultPkColumnValue() {
- return this.defaultPkColumnValue;
- }
-
- protected void setDefaultPkColumnValue(String value) {
- String old = this.defaultPkColumnValue;
- this.defaultPkColumnValue = value;
- this.firePropertyChanged(DEFAULT_PK_COLUMN_VALUE_PROPERTY, old, value);
- }
-
- protected String buildDefaultPkColumnValue() {
- return null; // TODO the default pk column value is determined by the runtime provider...
- }
-
-
- // ********** unique constraints **********
- public ListIterable<JavaUniqueConstraint> getUniqueConstraints() {
- return this.uniqueConstraintContainer.getContextElements();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintContainer.getContextElementsSize();
- }
-
- public JavaUniqueConstraint getUniqueConstraint(int index) {
- return this.uniqueConstraintContainer.getContextElement(index);
- }
-
- public JavaUniqueConstraint addUniqueConstraint() {
- return this.addUniqueConstraint(this.getUniqueConstraintsSize());
- }
-
- public JavaUniqueConstraint addUniqueConstraint(int index) {
- UniqueConstraintAnnotation annotation = this.getGeneratorAnnotation().addUniqueConstraint(index);
- return this.uniqueConstraintContainer.addContextElement(index, annotation);
- }
-
- public void removeUniqueConstraint(int index) {
- this.getGeneratorAnnotation().removeUniqueConstraint(index);
- this.uniqueConstraintContainer.removeContextElement(index);
- }
-
- public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
- this.removeUniqueConstraint(this.uniqueConstraintContainer.indexOfContextElement((JavaUniqueConstraint) uniqueConstraint));
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- this.getGeneratorAnnotation().moveUniqueConstraint(targetIndex, sourceIndex);
- this.uniqueConstraintContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncUniqueConstraints() {
- this.uniqueConstraintContainer.synchronizeWithResourceModel();
- }
-
- protected void updateUniqueConstraints() {
- this.uniqueConstraintContainer.synchronizeWithResourceModel();
- }
-
- protected JavaUniqueConstraint buildUniqueConstraint(UniqueConstraintAnnotation constraintAnnotation) {
- return this.getJpaFactory().buildJavaUniqueConstraint(this, this, constraintAnnotation);
- }
-
- protected ListIterable<UniqueConstraintAnnotation> getUniqueConstraintAnnotations() {
- return this.getGeneratorAnnotation().getUniqueConstraints();
- }
-
- protected ContextListContainer<JavaUniqueConstraint, UniqueConstraintAnnotation> buildUniqueConstraintContainer() {
- UniqueConstraintContainer container = new UniqueConstraintContainer();
- container.initialize();
- return container;
- }
-
- /**
- * unique constraint container
- */
- protected class UniqueConstraintContainer
- extends ContextListContainer<JavaUniqueConstraint, UniqueConstraintAnnotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected JavaUniqueConstraint buildContextElement(UniqueConstraintAnnotation resourceElement) {
- return GenericJavaTableGenerator.this.buildUniqueConstraint(resourceElement);
- }
- @Override
- protected ListIterable<UniqueConstraintAnnotation> getResourceElements() {
- return GenericJavaTableGenerator.this.getUniqueConstraintAnnotations();
- }
- @Override
- protected UniqueConstraintAnnotation getResourceElement(JavaUniqueConstraint contextElement) {
- return contextElement.getUniqueConstraintAnnotation();
- }
- }
-
-
- // ********** UniqueConstraint.Owner implementation **********
-
- public Iterable<String> getCandidateUniqueConstraintColumnNames() {
- org.eclipse.jpt.jpa.db.Table dbTable = this.getDbTable();
- return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String>instance();
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaUniqueConstraint constraint : this.getUniqueConstraints()) {
- result = constraint.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * called if the database is connected:
- * table, schema, catalog, pkColumnName, valueColumnName
- */
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.tableTouches(pos)) {
- return this.getJavaCandidateTables(filter);
- }
- if (this.schemaTouches(pos)) {
- return this.getJavaCandidateSchemata(filter);
- }
- if (this.pkColumnNameTouches(pos)) {
- return this.getJavaCandidateColumnNames(filter);
- }
- if (this.valueColumnNameTouches(pos)) {
- return this.getJavaCandidateColumnNames(filter);
- }
- return null;
- }
-
- // ********** code assist: table
-
- protected boolean tableTouches(int pos) {
- return this.generatorAnnotation.tableTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateTables(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateTables(filter));
- }
-
- protected Iterable<String> getCandidateTables(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateTables(), filter);
- }
-
- protected Iterable<String> getCandidateTables() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema != null) ? dbSchema.getSortedTableIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** code assist: schema
-
- protected boolean schemaTouches(int pos) {
- return this.generatorAnnotation.schemaTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateSchemata(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateSchemata(filter));
- }
-
- protected Iterable<String> getCandidateSchemata(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateSchemata(), filter);
- }
-
- protected Iterable<String> getCandidateSchemata() {
- SchemaContainer schemaContainer = this.getDbSchemaContainer();
- return (schemaContainer != null) ? schemaContainer.getSortedSchemaIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** code assist: catalog
-
- protected boolean catalogTouches(int pos) {
- return this.generatorAnnotation.catalogTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateCatalogs(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateCatalogs(filter));
- }
-
- protected Iterable<String> getCandidateCatalogs(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateCatalogs(), filter);
- }
-
- protected Iterable<String> getCandidateCatalogs() {
- Database db = this.getDatabase();
- return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** code assist: pkColumnName
-
- protected boolean pkColumnNameTouches(int pos) {
- return this.generatorAnnotation.pkColumnNameTouches(pos);
- }
-
- protected Iterable<String> getJavaCandidateColumnNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateColumnNames(filter));
- }
-
- protected Iterable<String> getCandidateColumnNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateColumnNames(), filter);
- }
-
- protected Iterable<String> getCandidateColumnNames() {
- Table table = this.getDbTable();
- return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** code assist: valueColumnName
-
- protected boolean valueColumnNameTouches(int pos) {
- return this.generatorAnnotation.valueColumnNameTouches(pos);
- }
-
- // ********** metadata conversion **********
-
- public void convertTo(EntityMappings entityMappings) {
- entityMappings.addTableGenerator().convertFrom(this);
- }
-
- public void delete() {
- this.getParent().removeTableGenerator();
- }
-
- // ********** misc **********
-
- public Class<TableGenerator> getType() {
- return TableGenerator.class;
- }
-
- // ********** validation **********
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((TableGenerator) node);
- }
-
- protected boolean isEquivalentTo(TableGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.specifiedTable, generator.getSpecifiedTable()) &&
- Tools.valuesAreEqual(this.specifiedSchema, generator.getSpecifiedSchema()) &&
- Tools.valuesAreEqual(this.specifiedCatalog, generator.getSpecifiedCatalog()) &&
- Tools.valuesAreEqual(this.specifiedPkColumnName, generator.getSpecifiedPkColumnName()) &&
- Tools.valuesAreEqual(this.specifiedPkColumnValue, generator.getSpecifiedPkColumnValue()) &&
- Tools.valuesAreEqual(this.specifiedValueColumnName, generator.getSpecifiedValueColumnName()) &&
- uniqueConstrainsAreEquivalentTo(generator);
- }
-
- protected boolean uniqueConstrainsAreEquivalentTo(TableGenerator generator) {
- if (this.getUniqueConstraintsSize() != generator.getUniqueConstraintsSize()) {
- return false;
- }
-
- for (int i=0; i<this.getUniqueConstraintsSize(); i++) {
- if (! this.uniqueConstraintContainer.get(i).isEquivalentTo(generator.getUniqueConstraint(i))) {
- return false;
- }
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTransientMapping.java
deleted file mode 100644
index 37e46c1c56..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTransientMapping.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaTransientMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
-
-/**
- * Java transient mapping
- */
-public class GenericJavaTransientMapping
- extends AbstractJavaAttributeMapping<TransientAnnotation>
- implements JavaTransientMapping
-{
- public GenericJavaTransientMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-
- public String getKey() {
- return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return TransientAnnotation.ANNOTATION_NAME;
- }
-
-
- // ********** metamodel **********
-
- @Override
- public MetamodelField getMetamodelField() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
deleted file mode 100644
index cdcb4e0959..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-public class GenericJavaUniqueConstraint
- extends AbstractJavaReadOnlyUniqueConstraint
- implements JavaUniqueConstraint
-{
- protected Owner owner;
- protected final UniqueConstraintAnnotation uniqueConstraintAnnotation;
-
-
- public GenericJavaUniqueConstraint(JavaJpaContextNode parent, Owner owner, UniqueConstraintAnnotation uniqueConstraintAnnotation) {
- super(parent);
- this.owner = owner;
- this.uniqueConstraintAnnotation = uniqueConstraintAnnotation;
- this.initializeColumnNames();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncColumnNames();
- }
-
-
- // ********** column names **********
-
- public void addColumnName(String columnName) {
- this.addColumnName(this.columnNames.size(), columnName);
- }
-
- public void addColumnName(int index, String columnName) {
- this.uniqueConstraintAnnotation.addColumnName(index, columnName);
- this.addItemToList(index, columnName, this.columnNames, COLUMN_NAMES_LIST);
- }
-
- public void removeColumnName(String columnName) {
- this.removeColumnName(this.columnNames.indexOf(columnName));
- }
-
- public void removeColumnName(int index) {
- this.uniqueConstraintAnnotation.removeColumnName(index);
- this.removeItemFromList(index, this.columnNames, COLUMN_NAMES_LIST);
- }
-
- public void moveColumnName(int targetIndex, int sourceIndex) {
- this.uniqueConstraintAnnotation.moveColumnName(targetIndex, sourceIndex);
- this.moveItemInList(targetIndex, sourceIndex, this.columnNames, COLUMN_NAMES_LIST);
- }
-
- protected void initializeColumnNames() {
- for (String columnName : this.getResourceColumnNames()) {
- this.columnNames.add(columnName);
- }
- }
-
- @Override
- protected Iterable<String> getResourceColumnNames() {
- return this.uniqueConstraintAnnotation.getColumnNames();
- }
-
- // ********** Java completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getConnectedJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.columnNamesTouches(pos)) {
- return this.javaCandidateColumnNames(filter);
- }
- return null;
- }
-
- protected boolean columnNamesTouches(int pos) {
- return this.uniqueConstraintAnnotation.columnNamesTouches(pos);
- }
-
- protected Iterable<String> javaCandidateColumnNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateColumnNames(filter));
- }
-
- protected Iterable<String> getCandidateColumnNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateColumnNames(), filter);
- }
-
- protected Iterable<String> getCandidateColumnNames() {
- return this.owner.getCandidateUniqueConstraintColumnNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.uniqueConstraintAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
- }
-
- public boolean isEquivalentTo(UniqueConstraint uniqueConstraint) {
- return columnNamesAreEquivalent(uniqueConstraint);
- }
-
- protected boolean columnNamesAreEquivalent(UniqueConstraint uniqueConstraint) {
- if (this.getColumnNamesSize() != uniqueConstraint.getColumnNamesSize()) {
- return false;
- }
-
- for (int i=0; i<this.getColumnNamesSize(); i++) {
- if (! Tools.valuesAreEqual(this.columnNames.get(i), uniqueConstraint.getColumnName(i))) {
- return false;
- }
- }
- return true;
- }
-
- // ********** misc **********
-
- public UniqueConstraintAnnotation getUniqueConstraintAnnotation() {
- return this.uniqueConstraintAnnotation;
- }
-
- public void initializeFrom(ReadOnlyUniqueConstraint oldUniqueConstraint) {
- for (String columnName : oldUniqueConstraint.getColumnNames()) {
- this.addColumnName(columnName);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVersionMapping.java
deleted file mode 100644
index 9d66e365f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVersionMapping.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVersionMapping;
-
-public class GenericJavaVersionMapping
- extends AbstractJavaVersionMapping
-{
- public GenericJavaVersionMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java
deleted file mode 100644
index d7f6b3b98d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaVirtualAssociationOverride2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Virtual Java association override
- */
-public class GenericJavaVirtualAssociationOverride
- extends AbstractJavaVirtualOverride<JavaAssociationOverrideContainer>
- implements JavaVirtualAssociationOverride2_0
-{
- protected final JavaVirtualOverrideRelationship relationship;
-
-
- public GenericJavaVirtualAssociationOverride(JavaAssociationOverrideContainer parent, String name) {
- super(parent, name);
- this.relationship = this.buildRelationship();
- }
-
- @Override
- public void update() {
- super.update();
- this.relationship.update();
- }
-
- @Override
- public JavaAssociationOverride convertToSpecified() {
- return (JavaAssociationOverride) super.convertToSpecified();
- }
-
- public RelationshipMapping getMapping() {
- return this.getContainer().getRelationshipMapping(this.name);
- }
-
- protected JavaAssociationOverrideContainer2_0 getContainer2_0() {
- return (JavaAssociationOverrideContainer2_0) this.getContainer();
- }
-
-
- // ********** relationship **********
-
- public JavaVirtualOverrideRelationship getRelationship() {
- return this.relationship;
- }
-
- /**
- * The relationship should be available (since its presence precipitated the
- * creation of the virtual override).
- */
- protected JavaVirtualOverrideRelationship buildRelationship() {
- return this.getJpaFactory().buildJavaVirtualOverrideRelationship(this);
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getContainer().resolveOverriddenRelationship(this.name);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java
deleted file mode 100644
index a4c5705f52..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualOverride;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Virtual Java attribute override
- */
-public class GenericJavaVirtualAttributeOverride
- extends AbstractJavaVirtualOverride<JavaAttributeOverrideContainer>
- implements JavaVirtualAttributeOverride, JavaVirtualColumn.Owner
-{
- protected final JavaVirtualColumn column;
-
-
- public GenericJavaVirtualAttributeOverride(JavaAttributeOverrideContainer parent, String name) {
- super(parent, name);
- this.column = this.buildColumn();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- }
-
- @Override
- public JavaAttributeOverride convertToSpecified() {
- return (JavaAttributeOverride) super.convertToSpecified();
- }
-
-
- // ********** column **********
-
- public JavaVirtualColumn getColumn() {
- return this.column;
- }
-
- /**
- * The original column should be available (since the presence of its
- * attribute is what precipitated the creation of the virtual override).
- */
- protected JavaVirtualColumn buildColumn() {
- return this.getJpaFactory().buildJavaVirtualColumn(this, this);
- }
-
-
- // ********** column owner implementation **********
-
- @Override
- public String getDefaultTableName() {
- String overriddenColumnTable = this.getOverriddenColumnTable();
- return (overriddenColumnTable != null) ? overriddenColumnTable : super.getDefaultTableName();
- }
-
- protected String getOverriddenColumnTable() {
- ReadOnlyColumn overriddenColumn = this.resolveOverriddenColumn();
- // pretty sure this is the *specified* table...
- return (overriddenColumn == null) ? null : overriddenColumn.getSpecifiedTable();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- String overriddenColumnName = this.getOverriddenColumnName();
- return (overriddenColumnName != null) ? overriddenColumnName : this.name;
- }
-
- protected String getOverriddenColumnName() {
- ReadOnlyColumn overriddenColumn = this.resolveOverriddenColumn();
- return (overriddenColumn == null) ? null : overriddenColumn.getName();
- }
-
- public ReadOnlyColumn resolveOverriddenColumn() {
- return this.getContainer().resolveOverriddenColumn(this.name);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualColumn.java
deleted file mode 100644
index 342eec168b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualColumn.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualBaseColumn;
-
-/**
- * Java virtual column
- */
-public class GenericJavaVirtualColumn
- extends AbstractJavaVirtualBaseColumn<JavaVirtualColumn.Owner, ReadOnlyColumn>
- implements JavaVirtualColumn
-{
- protected Integer specifiedLength;
- protected int defaultLength;
-
- protected Integer specifiedPrecision;
- protected int defaultPrecision;
-
- protected Integer specifiedScale;
- protected int defaultScale;
-
-
- public GenericJavaVirtualColumn(JavaJpaContextNode parent, JavaVirtualColumn.Owner owner) {
- super(parent, owner);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedLength(this.buildSpecifiedLength());
- this.setDefaultLength(this.buildDefaultLength());
-
- this.setSpecifiedPrecision(this.buildSpecifiedPrecision());
- this.setDefaultPrecision(this.buildDefaultPrecision());
-
- this.setSpecifiedScale(this.buildSpecifiedScale());
- this.setDefaultScale(this.buildDefaultScale());
- }
-
-
- // ********** column **********
-
- @Override
- public ReadOnlyColumn getOverriddenColumn() {
- return this.owner.resolveOverriddenColumn();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- protected void setSpecifiedLength(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- return this.getOverriddenColumn().getSpecifiedLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int length) {
- int old = this.defaultLength;
- this.defaultLength = length;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, length);
- }
-
- protected int buildDefaultLength() {
- return DEFAULT_LENGTH;
- }
-
-
- // ********** precision **********
-
- public int getPrecision() {
- return (this.specifiedPrecision != null) ? this.specifiedPrecision.intValue() : this.defaultPrecision;
- }
-
- public Integer getSpecifiedPrecision() {
- return this.specifiedPrecision;
- }
-
- protected void setSpecifiedPrecision(Integer precision) {
- Integer old = this.specifiedPrecision;
- this.specifiedPrecision = precision;
- this.firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, old, precision);
- }
-
- protected Integer buildSpecifiedPrecision() {
- return this.getOverriddenColumn().getSpecifiedPrecision();
- }
-
- public int getDefaultPrecision() {
- return this.defaultPrecision;
- }
-
- protected void setDefaultPrecision(int precision) {
- int old = this.defaultPrecision;
- this.defaultPrecision = precision;
- this.firePropertyChanged(DEFAULT_PRECISION_PROPERTY, old, precision);
- }
-
- protected int buildDefaultPrecision() {
- return DEFAULT_PRECISION;
- }
-
-
- // ********** scale **********
-
- public int getScale() {
- return (this.specifiedScale != null) ? this.specifiedScale.intValue() : this.defaultScale;
- }
-
- public Integer getSpecifiedScale() {
- return this.specifiedScale;
- }
-
- protected void setSpecifiedScale(Integer scale) {
- Integer old = this.specifiedScale;
- this.specifiedScale = scale;
- this.firePropertyChanged(SPECIFIED_SCALE_PROPERTY, old, scale);
- }
-
- protected Integer buildSpecifiedScale() {
- return this.getOverriddenColumn().getSpecifiedScale();
- }
-
- public int getDefaultScale() {
- return this.defaultScale;
- }
-
- protected void setDefaultScale(int scale) {
- int old = this.defaultScale;
- this.defaultScale = scale;
- this.firePropertyChanged(DEFAULT_SCALE_PROPERTY, old, scale);
- }
-
- protected int buildDefaultScale() {
- return DEFAULT_SCALE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java
deleted file mode 100644
index 61d73f863a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Java virtual join column
- */
-public class GenericJavaVirtualJoinColumn
- extends AbstractJavaVirtualBaseColumn<JavaReadOnlyJoinColumn.Owner, ReadOnlyJoinColumn>
- implements JavaVirtualJoinColumn
-{
- protected final ReadOnlyJoinColumn overriddenColumn;
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
- super(parent, owner);
- this.overriddenColumn = overriddenColumn;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedReferencedColumnName(this.buildSpecifiedReferencedColumnName());
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** column **********
-
- @Override
- public ReadOnlyJoinColumn getOverriddenColumn() {
- return this.overriddenColumn;
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- protected void setSpecifiedReferencedColumnName(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- return this.getOverriddenColumn().getSpecifiedReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultReferencedColumnName() {
- return MappingTools.buildJoinColumnDefaultReferencedColumnName(this.owner);
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** validation **********
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaJoinColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 71ef4b44d9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaVirtualJoinColumnRelationshipStrategy
-{
- protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected JavaVirtualJoinColumn defaultJoinColumn;
-
-
- public GenericJavaVirtualOverrideJoinColumnRelationshipStrategy(JavaVirtualOverrideRelationship parent) {
- super(parent);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateSpecifiedJoinColumns();
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<JavaVirtualJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<JavaVirtualJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public JavaVirtualJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- protected void updateSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.update();
- }
-
- protected ListIterable<ReadOnlyJoinColumn> getOverriddenSpecifiedJoinColumns() {
- ReadOnlyJoinColumnRelationshipStrategy overriddenStrategy = this.getOverriddenStrategy();
- return (overriddenStrategy == null) ?
- EmptyListIterable.<ReadOnlyJoinColumn>instance() :
- new SuperListIterableWrapper<ReadOnlyJoinColumn>(overriddenStrategy.getSpecifiedJoinColumns());
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaVirtualJoinColumn buildContextElement(ReadOnlyJoinColumn resourceElement) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<ReadOnlyJoinColumn> getResourceElements() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getOverriddenSpecifiedJoinColumns();
- }
- @Override
- protected ReadOnlyJoinColumn getResourceElement(JavaVirtualJoinColumn contextElement) {
- return contextElement.getOverriddenColumn();
- }
- }
-
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
- protected ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> buildSpecifiedJoinColumnContainer(){
- return new SpecifiedJoinColumnContainer();
- }
-
-
- // ********** default join column **********
-
- public JavaVirtualJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(JavaVirtualJoinColumn joinColumn) {
- JavaVirtualJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<JavaVirtualJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<JavaVirtualJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<JavaVirtualJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- ReadOnlyJoinColumn overriddenDefaultJoinColumn = this.getOverriddenDefaultJoinColumn();
- if (overriddenDefaultJoinColumn == null) {
- if (this.defaultJoinColumn != null) {
- this.setDefaultJoinColumn(null);
- }
- } else {
- if ((this.defaultJoinColumn != null) && (this.defaultJoinColumn.getOverriddenColumn() == overriddenDefaultJoinColumn)) {
- this.defaultJoinColumn.update();
- } else {
- this.setDefaultJoinColumn(this.buildJoinColumn(overriddenDefaultJoinColumn));
- }
- }
- }
-
- protected ReadOnlyJoinColumn getOverriddenDefaultJoinColumn() {
- ReadOnlyJoinColumnRelationshipStrategy overriddenStrategy = this.getOverriddenStrategy();
- return (overriddenStrategy == null) ? null : overriddenStrategy.getDefaultJoinColumn();
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaVirtualOverrideRelationship getParent() {
- return (JavaVirtualOverrideRelationship) super.getParent();
- }
-
- public JavaVirtualOverrideRelationship getRelationship() {
- return this.getParent();
- }
-
- protected ReadOnlyJoinColumnRelationshipStrategy getOverriddenStrategy() {
- ReadOnlyJoinColumnRelationship relationship = this.getOverriddenJoinColumnRelationship();
- return (relationship == null) ? null : relationship.getJoinColumnStrategy();
- }
-
- protected ReadOnlyJoinColumnRelationship getOverriddenJoinColumnRelationship() {
- ReadOnlyRelationship relationship = this.resolveOverriddenRelationship();
- return (relationship instanceof ReadOnlyJoinColumnRelationship) ? (ReadOnlyJoinColumnRelationship) relationship : null;
- }
-
- protected ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getRelationship().resolveOverriddenRelationship();
- }
-
- public boolean isTargetForeignKey() {
- RelationshipMapping relationshipMapping = this.getRelationshipMapping();
- return (relationshipMapping != null) &&
- relationshipMapping.getRelationship().isTargetForeignKey();
- }
-
- public TypeMapping getRelationshipSource() {
- return this.isTargetForeignKey() ?
- // relationship mapping is not null
- this.getRelationshipMapping().getResolvedTargetEntity() :
- this.getRelationship().getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- return this.isTargetForeignKey() ?
- this.getRelationship().getTypeMapping() :
- // relationship mapping may still be null
- this.getRelationshipMappingTargetEntity();
- }
-
- protected TypeMapping getRelationshipMappingTargetEntity() {
- RelationshipMapping mapping = this.getRelationshipMapping();
- return (mapping == null) ? null : mapping.getResolvedTargetEntity();
- }
-
- protected Entity getRelationshipTargetEntity() {
- TypeMapping target = this.getRelationshipTarget();
- return (target instanceof Entity) ? (Entity) target : null;
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public String getTableName() {
- return this.isTargetForeignKey() ?
- this.getTargetDefaultTableName() :
- this.getRelationship().getDefaultTableName();
- }
-
- protected String getTargetDefaultTableName() {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping == null) ? null : typeMapping.getPrimaryTableName();
- }
-
- protected Table resolveDbTable(String tableName) {
- return this.isTargetForeignKey() ?
- this.resolveTargetDbTable(tableName) :
- this.getRelationship().resolveDbTable(tableName);
- }
-
- protected Table resolveTargetDbTable(String tableName) {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping == null) ? null : typeMapping.resolveDbTable(tableName);
- }
-
- protected boolean tableNameIsInvalid(String tableName) {
- return this.isTargetForeignKey() ?
- this.targetTableNameIsInvalid(tableName) :
- this.getRelationship().tableNameIsInvalid(tableName);
- }
-
- protected boolean targetTableNameIsInvalid(String tableName) {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping != null) && typeMapping.tableNameIsInvalid(tableName);
- }
-
- protected Table getReferencedColumnDbTable() {
- TypeMapping relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- protected Iterable<String> getCandidateTableNames() {
- return this.isTargetForeignKey() ?
- this.getTargetCandidateTableNames() :
- this.getRelationship().getCandidateTableNames();
- }
-
- protected Iterable<String> getTargetCandidateTableNames() {
- TypeMapping typeMapping = this.getRelationshipMapping().getResolvedTargetEntity();
- return (typeMapping != null) ? typeMapping.getAllAssociatedTableNames() : EmptyIterable.<String>instance();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
- protected String getAttributeName() {
- return this.getRelationship().getAttributeName();
- }
-
- protected JavaVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn overriddenJoinColumn) {
- return this.getJpaFactory().buildJavaVirtualJoinColumn(this, this.joinColumnOwner, overriddenJoinColumn);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- for (JavaVirtualJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
- }
- }
-
-
- // ********** join column owner **********
-
- protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getTableName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- public String getAttributeName() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getAttributeName();
- }
-
- public Entity getRelationshipTarget() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationshipTargetEntity();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.resolveDbTable(tableName);
- }
-
- public Table getReferencedColumnDbTable() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getReferencedColumnDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java
deleted file mode 100644
index 073d0ca591..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyAssociationOverride2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaVirtualOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaVirtualOverrideRelationship
- extends AbstractJavaJpaContextNode
- implements JavaVirtualOverrideRelationship2_0
-{
- protected JavaVirtualRelationshipStrategy strategy;
-
- protected final JavaVirtualJoinColumnRelationshipStrategy joinColumnStrategy;
-
- // JPA 2.0
- protected final JavaVirtualJoinTableRelationshipStrategy joinTableStrategy;
-
-
- public GenericJavaVirtualOverrideRelationship(JavaVirtualAssociationOverride parent) {
- super(parent);
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.setStrategy(this.buildStrategy());
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- public JavaVirtualRelationshipStrategy getStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(JavaVirtualRelationshipStrategy strategy) {
- JavaVirtualRelationshipStrategy old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- protected JavaVirtualRelationshipStrategy buildStrategy() {
- return this.isJpa2_0Compatible() ?
- this.buildStrategy2_0() :
- this.joinColumnStrategy;
- }
-
- /**
- * The overridden mapping determines the override's strategy.
- */
- protected JavaVirtualRelationshipStrategy buildStrategy2_0() {
- MappingRelationshipStrategy2_0 mappingStrategy = this.getMappingStrategy();
- return (mappingStrategy != null) ?
- (JavaVirtualRelationshipStrategy) mappingStrategy.selectOverrideStrategy(this) :
- this.buildMissingMappingStrategy();
- }
-
- /**
- * Get the strategy from the overridden mapping.
- */
- protected MappingRelationshipStrategy2_0 getMappingStrategy() {
- RelationshipMapping mapping = this.getMapping();
- return (mapping == null) ? null : (MappingRelationshipStrategy2_0) mapping.getRelationship().getStrategy();
- }
-
- /**
- * Return the strategy to use when the override's name does not match the
- * name of an appropriate relationship mapping.
- */
- protected JavaVirtualRelationshipStrategy buildMissingMappingStrategy() {
- return this.joinColumnStrategy.hasSpecifiedJoinColumns() ?
- this.joinColumnStrategy :
- this.joinTableStrategy;
- }
-
-
- // ********** join column strategy **********
-
- public JavaVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- // association overrides do not have defaults
- return false;
- }
-
- protected JavaVirtualJoinColumnRelationshipStrategy buildJoinColumnStrategy() {
- return new GenericJavaVirtualOverrideJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public JavaVirtualJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public boolean mayHaveDefaultJoinTable() {
- // association overrides do not have defaults
- return false;
- }
-
- protected JavaVirtualJoinTableRelationshipStrategy buildJoinTableStrategy() {
- return new GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- }
-
- public void initializeOnSpecified(OverrideRelationship specifiedRelationship) {
- specifiedRelationship.initializeFromVirtualJoinColumnRelationship(this);
- specifiedRelationship.initializeFromVirtualJoinTableRelationship(this);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaVirtualAssociationOverride getParent() {
- return (JavaVirtualAssociationOverride) super.getParent();
- }
-
- protected JavaVirtualAssociationOverride getAssociationOverride() {
- return this.getParent();
- }
-
- protected ReadOnlyAssociationOverride2_0 getAssociationOverride2_0() {
- return (ReadOnlyAssociationOverride2_0) this.getAssociationOverride();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getAssociationOverride().getTypeMapping();
- }
-
- public String getAttributeName() {
- return this.getAssociationOverride().getName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getAssociationOverride().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getAssociationOverride().getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getAssociationOverride().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getAssociationOverride().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public boolean isVirtual() {
- return true;
- }
-
- public RelationshipMapping getMapping() {
- return this.getAssociationOverride().getMapping();
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getAssociationOverride().resolveOverriddenRelationship();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getAssociationOverride().getValidationTextRange(astRoot);
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.strategy.validate(messages, reporter, astRoot);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java
deleted file mode 100644
index 0b5c080248..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaReadOnlyUniqueConstraint;
-
-public class GenericJavaVirtualUniqueConstraint
- extends AbstractJavaReadOnlyUniqueConstraint
- implements JavaVirtualUniqueConstraint
-{
- protected final ReadOnlyUniqueConstraint overriddenUniqueConstraint;
-
-
- public GenericJavaVirtualUniqueConstraint(JavaJpaContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint) {
- super(parent);
- this.overriddenUniqueConstraint = overriddenUniqueConstraint;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.syncColumnNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- public ReadOnlyUniqueConstraint getOverriddenUniqueConstraint() {
- return this.overriddenUniqueConstraint;
- }
-
- @Override
- protected Iterable<String> getResourceColumnNames() {
- return this.overriddenUniqueConstraint.getColumnNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java
deleted file mode 100644
index 981ebaf258..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaElementCollectionMapping2_0;
-
-public class JavaElementCollectionTemporalConverterValidator extends AbstractTemporalConverterValidator
-{
-
- public JavaElementCollectionTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
- }
-
- @Override
- protected JavaElementCollectionMapping2_0 getAttributeMapping() {
- return (JavaElementCollectionMapping2_0) super.getAttributeMapping();
- }
- @Override
- protected String getTypeName() {
- return this.getAttributeMapping().getFullyQualifiedTargetClass();
- }
-
- @Override
- protected String getInvalidTemporalMappingType() {
- return JpaValidationMessages.PERSISTENT_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE;
- }
-
- @Override
- protected String getVirtualAttributeInvalidTemporalMappingType() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java
deleted file mode 100644
index fa5ddd6626..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class JavaTemporalConverterValidator extends AbstractTemporalConverterValidator
-{
-
- public JavaTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
- }
-
- @Override
- protected String getTypeName() {
- return this.getPersistentAttribute().getTypeName();
- }
-
- @Override
- protected String getInvalidTemporalMappingType() {
- return JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE;
- }
-
- @Override
- protected String getVirtualAttributeInvalidTemporalMappingType() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java
deleted file mode 100644
index 90d1ba4ff9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-
-public class NullJavaConverter
- extends AbstractJavaJpaContextNode
- implements JavaConverter
-{
- public NullJavaConverter(JavaAttributeMapping parent) {
- super(parent);
- }
-
- @Override
- public JavaAttributeMapping getParent() {
- return (JavaAttributeMapping) super.getParent();
- }
-
- public Class<? extends Converter> getType() {
- return null;
- }
-
- public Annotation getConverterAnnotation() {
- return null;
- }
-
- public void dispose() {
- // NOP
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java
deleted file mode 100644
index df7fd609dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.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.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Used by
- * {@link org.eclipse.jpt.jpa.core.internal.context.java.GenericJavaOneToManyRelationship#buildJoinColumnStrategy()}
- * in a JPA 1.0 project.
- */
-public class NullJavaJoinColumnRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaMappingJoinColumnRelationshipStrategy2_0
-{
- public NullJavaJoinColumnRelationshipStrategy(JavaJoinColumnRelationship parent) {
- super(parent);
- }
-
-
- // ********** join columns **********
-
- public ListIterable<JavaJoinColumn> getJoinColumns() {
- return EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- public int getJoinColumnsSize() {
- return 0;
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<JavaJoinColumn> getSpecifiedJoinColumns() {
- return EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return 0;
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return false;
- }
-
- public JavaJoinColumn getSpecifiedJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public JavaJoinColumn addSpecifiedJoinColumn() {
- throw new UnsupportedOperationException();
- }
-
- public JavaJoinColumn addSpecifiedJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
- throw new UnsupportedOperationException();
- }
-
- public void removeSpecifiedJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** default join column **********
-
- public JavaJoinColumn getDefaultJoinColumn() {
- return null;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJoinColumnRelationship getParent() {
- return (JavaJoinColumnRelationship) super.getParent();
- }
-
- public JavaJoinColumnRelationship getRelationship() {
- return this.getParent();
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-
- public String getTableName() {
- return null;
- }
-
- public TypeMapping getRelationshipSource() {
- return this.getRelationshipMapping().getTypeMapping();
- }
-
- public TypeMapping getRelationshipTarget() {
- return null;
- }
-
- public boolean isTargetForeignKey() {
- return false;
- }
-
- public void initializeFrom(ReadOnlyJoinColumnRelationshipStrategy oldStrategy) {
- // NOP
- }
-
- public void initializeFromVirtual(ReadOnlyJoinColumnRelationshipStrategy oldStrategy) {
- // NOP
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null;
- }
-
- public void addStrategy() {
- // NOP
- }
-
- public void removeStrategy() {
- // NOP
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return true;
- }
-
- public Table resolveDbTable(String tableName) {
- return null;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
- public String getColumnTableNotValidDescription() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java
deleted file mode 100644
index 547a93fa4c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMappingJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-
-public class NullJavaJoinTableRelationshipStrategy
- extends AbstractJavaJpaContextNode
- implements JavaMappingJoinTableRelationshipStrategy2_0
-{
- public NullJavaJoinTableRelationshipStrategy(JavaJoinTableRelationship parent) {
- super(parent);
- }
-
-
- // ********** join table **********
-
- public JavaJoinTable getJoinTable() {
- return null;
- }
-
- public JoinTableAnnotation getJoinTableAnnotation() {
- return null;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaJoinTableRelationship getParent() {
- return (JavaJoinTableRelationship) super.getParent();
- }
-
- public JavaJoinTableRelationship getRelationship() {
- return this.getParent();
- }
-
- public void initializeFrom(ReadOnlyJoinTableRelationshipStrategy oldStrategy) {
- // NOP
- }
-
- public void initializeFromVirtual(ReadOnlyJoinTableRelationshipStrategy virtualStrategy) {
- // NOP
- }
-
- public String getTableName() {
- return null;
- }
-
- public Table resolveDbTable(String tableName) {
- return null;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return true;
- }
-
- public String getColumnTableNotValidDescription() {
- return null;
- }
-
- public String getJoinTableDefaultName() {
- return null;
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null;
- }
-
- public void addStrategy() {
- // NOP
- }
-
- public void removeStrategy() {
- // NOP
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- public boolean validatesAgainstDatabase() {
- return false;
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- throw new UnsupportedOperationException();
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java
deleted file mode 100644
index d4457f3730..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public abstract class AbstractOrmConverter
- extends AbstractOrmXmlContextNode
- implements OrmConverter
-{
- protected final OrmConverter.Owner owner;
-
- protected AbstractOrmConverter(OrmAttributeMapping parent, OrmConverter.Owner owner) {
- super(parent);
- this.owner = owner;
- }
-
- protected OrmConverter.Owner getOwner() {
- return this.owner;
- }
-
- // ********** misc **********
-
- @Override
- public OrmAttributeMapping getParent() {
- return (OrmAttributeMapping) super.getParent();
- }
-
- protected OrmAttributeMapping getAttributeMapping() {
- return this.getParent();
- }
-
- protected XmlAttributeMapping getXmlAttributeMapping() {
- return this.getAttributeMapping().getXmlAttributeMapping();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.owner.buildValidator(this, this.buildConverterTextRangeResolver()).validate(messages, reporter);
- }
-
-
- protected ConverterTextRangeResolver buildConverterTextRangeResolver() {
- return new ConverterTextRangeResolver() {
- public TextRange getConverterTextRange() {
- return getValidationTextRange();
- }
- };
- }
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlValidationTextRange();
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
- }
-
- protected abstract TextRange getXmlValidationTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedIdMapping.java
deleted file mode 100644
index e022e8d385..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedIdMapping.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal.jpa1.context.orm;
-
-import java.io.Serializable;
-import java.util.List;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.EmbeddedIdMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> embedded ID mapping
- */
-public abstract class AbstractOrmEmbeddedIdMapping<X extends XmlEmbeddedId>
- extends AbstractOrmBaseEmbeddedMapping<X>
- implements EmbeddedIdMapping2_0, OrmEmbeddedIdMapping
-{
- /* JPA 2.0 - the embedded id may be derived from a relationship */
- protected boolean derived;
-
-
- protected AbstractOrmEmbeddedIdMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.setMappedByRelationship(this.buildDerived());
- }
-
-
- // ********** derived **********
-
- public boolean isDerived() {
- return this.derived;
- }
-
- protected void setMappedByRelationship(boolean derived) {
- boolean old = this.derived;
- this.derived = derived;
- this.firePropertyChanged(DERIVED_PROPERTY, old, derived);
- }
-
- protected boolean buildDerived() {
- return this.isJpa2_0Compatible() && this.buildDerived_();
- }
-
- protected boolean buildDerived_() {
- return this.getTypeMapping().attributeIsDerivedId(this.name);
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 10;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmEmbeddedIdMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes xmlAttributes) {
- xmlAttributes.getEmbeddedIds().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes xmlAttributes) {
- xmlAttributes.getEmbeddedIds().remove(this.xmlAttributeMapping);
- }
-
- @Override
- protected Iterable<String> getEmbeddableOverridableAttributeMappingNames() {
- return this.derived ?
- EmptyIterable.<String>instance() :
- super.getEmbeddableOverridableAttributeMappingNames();
- }
-
- @Override
- protected OrmAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
- return new AttributeOverrideContainerOwner();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- validateMappedByRelationshipAndAttributeOverridesSpecified(messages, reporter);
- }
-
- @Override
- protected boolean validateTargetEmbeddable(List<IMessage> messages) {
- boolean continueValidating = super.validateTargetEmbeddable(messages);
- if (continueValidating) { //targetEmbeddable != null
- if (this.getTargetEmbeddable().getJavaResourceType() != null) {
- this.validateTargetEmbeddableClass(messages);
- }
- this.validateNoRelationshipMappingsOnTargetEmbeddable(messages);
- }
- return true;
- }
-
- /**
- * preconditions:
- * {@link #getTargetEmbeddable()} is not null
- * {@link #getTargetEmbeddable#getJavaResourceType()} is not null
- */
- protected void validateTargetEmbeddableClass(List<IMessage> messages) {
- this.validateTargetEmbeddableImplementsEqualsAndHashcode(messages);
- this.validateTargetEmbeddableIsPublic(messages);
- this.validateTargetEmbeddableImplementsSerializable(messages);
- this.validateTargetEmbeddableImplementsNoArgConstructor(messages);
- }
-
- /**
- * preconditions:
- * {@link #getTargetEmbeddable()} is not null
- */
- protected void validateNoRelationshipMappingsOnTargetEmbeddable(List<IMessage> messages) {
- TypeMapping targetEmbeddableTypeMapping = this.getTargetEmbeddable().getPersistentType().getMapping();
- if (targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
- || targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
- || targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
- || targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- /**
- * preconditions:
- * {@link #getTargetEmbeddable()} is not null
- * {@link #getTargetEmbeddable#getJavaResourceType()} is not null
- */
- protected void validateTargetEmbeddableImplementsSerializable(List<IMessage> messages) {
- String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
- IJavaProject javaProject = getJpaProject().getJavaProject();
- if (!JDTTools.typeIsSubType(javaProject, targetEmbeddableClassName, Serializable.class.getName())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- /**
- * preconditions:
- * {@link #getTargetEmbeddable()} is not null
- * {@link #getTargetEmbeddable#getJavaResourceType()} is not null
- */
- protected void validateTargetEmbeddableIsPublic(List<IMessage> messages) {
- if (!this.getTargetEmbeddable().getJavaResourceType().isPublic()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- /**
- * preconditions:
- * {@link #getTargetEmbeddable()} is not null
- * {@link #getTargetEmbeddable#getJavaResourceType()} is not null
- */
- protected void validateTargetEmbeddableImplementsEqualsAndHashcode(List<IMessage> messages) {
- JavaResourceType resourceType = this.getTargetEmbeddable().getJavaResourceType();
- if (!resourceType.hasHashCodeMethod() || !resourceType.hasEqualsMethod()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- /**
- * preconditions:
- * {@link #getTargetEmbeddable()} is not null
- * {@link #getTargetEmbeddable#getJavaResourceType()} is not null
- */
- protected void validateTargetEmbeddableImplementsNoArgConstructor(List<IMessage> messages) {
- String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
- IJavaProject javaProject = getJpaProject().getJavaProject();
- if (!JDTTools.classHasPublicZeroArgConstructor(javaProject, targetEmbeddableClassName)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- protected void validateMappedByRelationshipAndAttributeOverridesSpecified(List<IMessage> messages, IReporter reporter) {
- // [JPA 2.0] if the embedded id is mapped by a relationship, then any specified
- // attribute overrides are in error
- // (in JPA 1.0, this will obviously never be reached)
- if (this.derived
- && (this.attributeOverrideContainer.getSpecifiedOverridesSize() > 0)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
- EMPTY_STRING_ARRAY,
- this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange()
- )
- );
- }
- }
-
-
- // ********** attribute override container owner *********
-
- protected class AttributeOverrideContainerOwner
- extends AbstractOrmBaseEmbeddedMapping<XmlEmbeddedId>.AttributeOverrideContainerOwner
- {
- @Override
- public Iterable<String> getAllOverridableNames() {
- return AbstractOrmEmbeddedIdMapping.this.isDerived() ?
- EmptyIterable.<String>instance() :
- super.getAllOverridableNames();
- }
-
- /**
- * pre-condition: type mapping is not <code>null</code>
- */
- @Override
- protected Iterable<String> getAllOverridableAttributeNames_(TypeMapping overriddenTypeMapping) {
- return new FilteringIterable<String>(super.getAllOverridableAttributeNames_(overriddenTypeMapping)) {
- @Override
- protected boolean accept(String attributeName) {
- return ! AttributeOverrideContainerOwner.this.getTypeMapping().attributeIsDerivedId(attributeName);
- }
- };
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java
deleted file mode 100644
index a1cb23f604..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmEmbeddedMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> embedded mapping
- */
-public abstract class AbstractOrmEmbeddedMapping<X extends XmlEmbedded>
- extends AbstractOrmBaseEmbeddedMapping<X>
- implements OrmEmbeddedMapping2_0
-{
- protected final OrmAssociationOverrideContainer associationOverrideContainer;
-
-
- protected AbstractOrmEmbeddedMapping(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.associationOverrideContainer = this.buildAssociationOverrideContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.associationOverrideContainer.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.associationOverrideContainer.update();
- }
-
-
- // ********** association override container **********
-
- public OrmAssociationOverrideContainer getAssociationOverrideContainer() {
- return this.associationOverrideContainer;
- }
-
- protected OrmAssociationOverrideContainer buildAssociationOverrideContainer() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmAssociationOverrideContainer(this, this.buildAssociationOverrideContainerOwner()) :
- new GenericOrmAssociationOverrideContainer(this, null);
- }
-
- protected OrmAssociationOverrideContainer2_0.Owner buildAssociationOverrideContainerOwner() {
- return new AssociationOverrideContainerOwner();
- }
-
-
- // ********** embedded mappings **********
-
- /**
- * This is only to build the choices for a "mapped by" setting in a
- * relationship mapping. JPA 2.0 does not support relationship mappings
- * in an embedded ID class; so we only put this logic here.
- */
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<String> getAllMappingNames() {
- return this.isJpa2_0Compatible() ?
- new CompositeIterable<String>(super.getAllMappingNames(), this.getAllEmbeddableAttributeMappingNames()) :
- super.getAllMappingNames();
- }
-
- protected Iterable<String> getAllEmbeddableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<RelationshipMapping> allOverridableAssociations() {
- return (this.targetEmbeddable != null) ?
- new SubIterableWrapper<AttributeMapping, RelationshipMapping>(this.getAllOverridableAssociations_()) :
- EmptyIterable.<RelationshipMapping>instance();
- }
-
- protected Iterable<AttributeMapping> getAllOverridableAssociations_() {
- return new FilteringIterable<AttributeMapping>(this.targetEmbeddable.getAttributeMappings()) {
- @Override
- protected boolean accept(AttributeMapping attributeMapping) {
- return attributeMapping.isOverridableAssociationMapping();
- }
- };
- }
-
- @Override
- public AttributeMapping resolveAttributeMapping(String attributeName) {
- AttributeMapping resolvedMapping = super.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- return this.isJpa2_0Compatible() ? this.resolveAttributeMapping_(attributeName) : null;
- }
-
- protected AttributeMapping resolveAttributeMapping_(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- // recurse into the embeddable mappings
- for (AttributeMapping mapping : this.getEmbeddableAttributeMappings()) {
- AttributeMapping resolvedMapping = mapping.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- }
- return null;
- }
-
-
- // ********** misc **********
-
- public String getKey() {
- return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 80;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmEmbeddedMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes xmlAttributes) {
- xmlAttributes.getEmbeddeds().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes xmlAttributes) {
- xmlAttributes.getEmbeddeds().remove(this.xmlAttributeMapping);
- }
-
- @Override
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return this.isJpa2_0Compatible() ? this.resolveOverriddenRelationship_(attributeName) : null;
- }
-
- protected Relationship resolveOverriddenRelationship_(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AssociationOverride override = this.associationOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getRelationship() : this.resolveOverriddenRelationshipInTargetEmbeddable(attributeName);
- }
-
- protected Relationship resolveOverriddenRelationshipInTargetEmbeddable(String attributeName) {
- return (this.targetEmbeddable == null) ? null : this.targetEmbeddable.resolveOverriddenRelationship(attributeName);
- }
-
- @Override
- protected OrmAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
- return new AttributeOverrideContainerOwner();
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
- super.validateOverrides(messages, reporter);
- this.associationOverrideContainer.validate(messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.associationOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** attribute override container owner *********
-
- protected class AttributeOverrideContainerOwner
- extends AbstractOrmBaseEmbeddedMapping<XmlEmbedded>.AttributeOverrideContainerOwner
- {
- // nothing yet
- }
-
-
- // ********** association override container owner **********
-
- protected class AssociationOverrideContainerOwner
- implements OrmAssociationOverrideContainer2_0.Owner
- {
- protected String getMappingName() {
- return AbstractOrmEmbeddedMapping.this.getName();
- }
-
- public OrmTypeMapping getTypeMapping() {
- return AbstractOrmEmbeddedMapping.this.getTypeMapping();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmEmbeddedMapping.this.getTargetEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping typeMapping = this.getOverridableTypeMapping();
- return (typeMapping != null) ? typeMapping.getAllOverridableAssociationNames() : EmptyIterable.<String>instance();
- }
-
- public Iterable<String> getJavaOverrideNames() {
- return null;
- }
-
- public EList<XmlAssociationOverride> getXmlOverrides() {
- return AbstractOrmEmbeddedMapping.this.getXmlAttributeMapping().getAssociationOverrides();
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getTypeMapping().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getTypeMapping().getAllAssociatedTableNames();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getTypeMapping().getPrimaryTableName();
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmEmbeddedMapping.this.getValidationTextRange();
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table, textRangeResolver);
- }
-
- protected OrmPersistentAttribute getPersistentAttribute() {
- return AbstractOrmEmbeddedMapping.this.getPersistentAttribute();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java
deleted file mode 100644
index 62f184befa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn;
-
-/**
- * <code>orm.xml</code> named discriminator column
- */
-public abstract class AbstractOrmNamedDiscriminatorColumn<X extends XmlBaseDiscriminatorColumn, O extends OrmReadOnlyNamedDiscriminatorColumn.Owner>
- extends AbstractOrmNamedColumn<X, O>
- implements OrmNamedDiscriminatorColumn
-{
- protected DiscriminatorType specifiedDiscriminatorType;
- protected DiscriminatorType defaultDiscriminatorType;
-
- protected Integer specifiedLength;
- protected int defaultLength;
-
-
- protected AbstractOrmNamedDiscriminatorColumn(XmlContextNode parent, O owner) {
- this(parent, owner, null);
- }
-
- protected AbstractOrmNamedDiscriminatorColumn(XmlContextNode parent, O owner, X xmlColumn) {
- super(parent, owner, xmlColumn);
- this.specifiedDiscriminatorType = this.buildSpecifiedDiscriminatorType();
- this.specifiedLength = this.buildSpecifiedLength();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedDiscriminatorType_(this.buildSpecifiedDiscriminatorType());
- this.setSpecifiedLength_(this.buildSpecifiedLength());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultDiscriminatorType(this.buildDefaultDiscriminatorType());
- this.setDefaultLength(this.buildDefaultLength());
- }
-
-
- // ********** discriminator type **********
-
- public DiscriminatorType getDiscriminatorType() {
- return (this.specifiedDiscriminatorType != null) ? this.specifiedDiscriminatorType : this.defaultDiscriminatorType;
- }
-
- public DiscriminatorType getSpecifiedDiscriminatorType() {
- return this.specifiedDiscriminatorType;
- }
-
- public void setSpecifiedDiscriminatorType(DiscriminatorType discriminatorType) {
- if (this.valuesAreDifferent(this.specifiedDiscriminatorType, discriminatorType)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedDiscriminatorType_(discriminatorType);
- xmlColumn.setDiscriminatorType(DiscriminatorType.toOrmResourceModel(discriminatorType));
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedDiscriminatorType_(DiscriminatorType discriminatorType) {
- DiscriminatorType old = this.specifiedDiscriminatorType;
- this.specifiedDiscriminatorType = discriminatorType;
- this.firePropertyChanged(SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
- }
-
- protected DiscriminatorType buildSpecifiedDiscriminatorType() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : DiscriminatorType.fromOrmResourceModel(xmlColumn.getDiscriminatorType());
- }
-
- public DiscriminatorType getDefaultDiscriminatorType() {
- return this.defaultDiscriminatorType;
- }
-
- protected void setDefaultDiscriminatorType(DiscriminatorType discriminatorType) {
- DiscriminatorType old = this.defaultDiscriminatorType;
- this.defaultDiscriminatorType = discriminatorType;
- this.firePropertyChanged(DEFAULT_DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
- }
-
- protected DiscriminatorType buildDefaultDiscriminatorType() {
- return this.owner.getDefaultDiscriminatorType();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- public void setSpecifiedLength(Integer length) {
- if (this.valuesAreDifferent(this.specifiedLength, length)) {
- X xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedLength_(length);
- xmlColumn.setLength(length);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedLength_(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- X xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int defaultLength) {
- int old = this.defaultLength;
- this.defaultLength = defaultLength;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, defaultLength);
- }
-
- protected int buildDefaultLength() {
- return this.owner.getDefaultLength();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java
deleted file mode 100644
index 93c19b4866..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Specified <code>orm.xml</code> override
- */
-public abstract class AbstractOrmOverride<C extends OrmOverrideContainer, X extends XmlOverride>
- extends AbstractOrmXmlContextNode
- implements OrmOverride
-{
- protected final X xmlOverride;
-
- protected String name;
-
-
- protected AbstractOrmOverride(C parent, X xmlOverride) {
- super(parent);
- this.xmlOverride = xmlOverride;
- this.name = xmlOverride.getName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.xmlOverride.getName());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlOverride.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** specified/virtual **********
-
- public boolean isVirtual() {
- return false;
- }
-
- public OrmVirtualOverride convertToVirtual() {
- return this.getContainer().convertOverrideToVirtual(this);
- }
-
-
- // ********** misc **********
-
- @Override
- @SuppressWarnings("unchecked")
- public C getParent() {
- return (C) super.getParent();
- }
-
- protected C getContainer() {
- return this.getParent();
- }
-
- public X getXmlOverride() {
- return this.xmlOverride;
- }
-
- protected void initializeFrom(ReadOnlyOverride oldOverride) {
- this.setName(oldOverride.getName());
- }
-
- protected void initializeFromVirtual(ReadOnlyOverride virtualOverride) {
- this.setName(virtualOverride.getName());
- }
-
- public TypeMapping getTypeMapping() {
- return this.getContainer().getTypeMapping();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getContainer().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getContainer().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.buildValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildValidator() {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver());
- }
-
- protected OverrideTextRangeResolver buildTextRangeResolver() {
- return new OrmOverrideTextRangeResolver(this);
- }
-
- /**
- * @see AbstractOrmOverrideContainer#getValidationTextRange()
- */
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlOverride.getValidationTextRange();
- // skip the container since it really doesn't have a text range
- // (also, this prevents a stack overflow)
- return (textRange != null) ? textRange : this.getContainer().getParent().getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange(this.xmlOverride.getNameTextRange());
- }
-
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getContainer().tableNameIsInvalid(tableName);
- }
-
-
- public Iterable<String> getCandidateTableNames() {
- return this.getContainer().getCandidateTableNames();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos)) {
- return this.getCandidateNames();
- }
- return null;
- }
-
- protected boolean nameTouches(int pos) {
- return this.xmlOverride.nameTouches(pos);
- }
-
- protected Iterable<String> getCandidateNames() {
- return this.getContainer().getAllOverridableNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java
deleted file mode 100644
index 038e1f2e30..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import java.util.Vector;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.Override_;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.VirtualOverride;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> override container
- */
-public abstract class AbstractOrmOverrideContainer<
- O extends OrmOverrideContainer.Owner,
- R extends OrmReadOnlyOverride,
- S extends OrmOverride,
- V extends OrmVirtualOverride,
- X extends XmlOverride
- >
- extends AbstractOrmXmlContextNode
- implements OrmOverrideContainer
-{
- // this can be null if the container is "read-only" (i.e. a "null" container)
- protected final O owner;
-
- protected final Vector<S> specifiedOverrides = new Vector<S>();
- protected final SpecifiedOverrideContainerAdapter specifiedOverrideContainerAdapter = new SpecifiedOverrideContainerAdapter();
-
- protected final Vector<V> virtualOverrides = new Vector<V>();
- protected final VirtualOverrideContainerAdapter virtualOverrideContainerAdapter = new VirtualOverrideContainerAdapter();
-
-
- protected AbstractOrmOverrideContainer(XmlContextNode parent, O owner) {
- super(parent);
- this.owner = owner;
- this.initializeSpecifiedOverrides();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedOverrides();
- // the virtual overrides do not need a sync
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedOverrides());
- this.updateVirtualOverrides();
- }
-
-
- // ********** overrides **********
-
- @SuppressWarnings("unchecked")
- public ListIterable<R> getOverrides() {
- return new CompositeListIterable<R>(this.getReadOnlySpecifiedOverrides(), this.getReadOnlyVirtualOverrides());
- }
-
- public int getOverridesSize() {
- return this.specifiedOverrides.size() + this.virtualOverrides.size();
- }
-
- public R getOverrideNamed(String name) {
- return this.selectOverrideNamed(this.getOverrides(), name);
- }
-
-
- // ********** override conversions **********
-
- /**
- * <em>Silently</em> add the new virtual override before removing the
- * specified override, or the <em>update</em> will discover the missing
- * virtual override and add it preemptively.
- */
- public V convertOverrideToVirtual(Override_ override) {
- if (override.isVirtual()) {
- throw new IllegalArgumentException("Override is already virtual: " + override); //$NON-NLS-1$
- }
-
- @SuppressWarnings("unchecked")
- S specifiedOverride = (S) override;
- int virtualIndex = this.virtualOverrides.size();
- String overrideName = specifiedOverride.getName();
- V virtualOverride = null;
- // make sure the specified override actually overrides something before building the virtual override
- if (this.overrideWillBeVirtual(overrideName, specifiedOverride)) {
- virtualOverride = this.buildVirtualOverride(overrideName);
- this.virtualOverrides.add(virtualIndex, virtualOverride);
- }
-
- this.removeSpecifiedOverride(specifiedOverride); // trigger update
-
- if (virtualOverride != null) {
- this.fireItemAdded(VIRTUAL_OVERRIDES_LIST, virtualIndex, virtualOverride);
- }
- return virtualOverride;
- }
-
- /**
- * Return whether the specified override name will be a
- * <em>virtual</em> override when the specified specified override is
- * removed from the container. The override name must be among the
- * valid override names and it must not correspond to any of the
- * remaining specified overrides.
- */
- protected boolean overrideWillBeVirtual(String overrideName, S specifiedOverrideToBeRemoved) {
- return CollectionTools.contains(this.getPossibleVirtualOverrideNames(), overrideName) &&
- (this.getSpecifiedOverrideNamed(overrideName, specifiedOverrideToBeRemoved) == null);
- }
-
- /**
- * <em>Silently</em> remove the virtual override and add the new specified
- * override before naming the specified override, or the <em>update</em>
- * will discover the dangling virtual override and remove it preemptively.
- */
- public S convertOverrideToSpecified(VirtualOverride override) {
- if ( ! override.isVirtual()) {
- throw new IllegalArgumentException("Override is already specified: " + override); //$NON-NLS-1$
- }
-
- @SuppressWarnings("unchecked")
- V virtualOverride = (V) override;
- int virtualIndex = this.virtualOverrides.indexOf(virtualOverride);
- this.virtualOverrides.remove(virtualIndex);
-
- int specifiedIndex = this.specifiedOverrides.size();
- X xmlOverride = this.buildXmlOverride();
- S specifiedOverride = this.buildSpecifiedOverride(xmlOverride);
- this.specifiedOverrides.add(specifiedIndex, specifiedOverride);
- this.owner.getXmlOverrides().add(specifiedIndex, xmlOverride);
-
- this.initializeSpecifiedOverride(specifiedOverride, virtualOverride); // trigger update
-
- this.fireItemRemoved(VIRTUAL_OVERRIDES_LIST, virtualIndex, virtualOverride);
- this.fireItemAdded(SPECIFIED_OVERRIDES_LIST, specifiedIndex, specifiedOverride);
- return specifiedOverride;
- }
-
- protected abstract void initializeSpecifiedOverride(S specifiedOverride, V virtualOverride);
-
-
- // ********** specified overrides **********
-
- public ListIterable<S> getSpecifiedOverrides() {
- return new LiveCloneListIterable<S>(this.specifiedOverrides);
- }
-
- @SuppressWarnings("unchecked")
- protected ListIterable<R> getReadOnlySpecifiedOverrides() {
- // S should always be a subtype of R, but we can't enforce that in the
- // class declaration...
- return (ListIterable<R>) this.getSpecifiedOverrides();
- }
-
- public int getSpecifiedOverridesSize() {
- return this.specifiedOverrides.size();
- }
-
- public S getSpecifiedOverride(int index) {
- return this.specifiedOverrides.get(index);
- }
-
- public S getSpecifiedOverrideNamed(String name) {
- return this.getSpecifiedOverrideNamed(name, null);
- }
-
- @SuppressWarnings("unchecked")
- protected S getSpecifiedOverrideNamed(String name, S exclude) {
- return (S) this.selectOverrideNamed(this.getReadOnlySpecifiedOverrides(), name, exclude);
- }
-
- protected S addSpecifiedOverride() {
- return this.addSpecifiedOverride(this.specifiedOverrides.size());
- }
-
- protected S addSpecifiedOverride(int index) {
- X xmlOverride = this.buildXmlOverride();
- S override = this.addSpecifiedOverride_(index, xmlOverride);
- this.owner.getXmlOverrides().add(index, xmlOverride);
- return override;
- }
-
- protected abstract X buildXmlOverride();
-
- protected void removeSpecifiedOverride(S override) {
- this.removeSpecifiedOverride(this.specifiedOverrides.indexOf(override));
- }
-
- protected void removeSpecifiedOverride(int index) {
- this.removeSpecifiedOverride_(index);
- this.owner.getXmlOverrides().remove(index);
- }
-
- protected void removeSpecifiedOverride_(int index) {
- this.removeItemFromList(index, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- }
-
- public void moveSpecifiedOverride(int targetIndex, int sourceIndex) {
- this.moveItemInList(targetIndex, sourceIndex, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- this.owner.getXmlOverrides().move(targetIndex, sourceIndex);
- }
-
- protected void initializeSpecifiedOverrides() {
- for (X xmlOverride : this.getXmlOverrides()) {
- this.specifiedOverrides.add(this.buildSpecifiedOverride(xmlOverride));
- }
- }
-
- protected abstract S buildSpecifiedOverride(X xmlOverride);
-
- protected void syncSpecifiedOverrides() {
- ContextContainerTools.synchronizeWithResourceModel(this.specifiedOverrideContainerAdapter);
- }
-
- protected Iterable<X> getXmlOverrides() {
- return (this.owner == null) ? EmptyIterable.<X>instance() : this.getXmlOverrides_();
- }
-
- /**
- * pre-condition: {@link #owner} is not <code>null</code>
- */
- protected abstract Iterable<X> getXmlOverrides_();
-
- protected void moveSpecifiedOverride_(int index, S override) {
- this.moveItemInList(index, override, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- }
-
- protected S addSpecifiedOverride_(int index, X xmlOverride) {
- S override = this.buildSpecifiedOverride(xmlOverride);
- this.addItemToList(index, override, this.specifiedOverrides, SPECIFIED_OVERRIDES_LIST);
- return override;
- }
-
- protected void removeSpecifiedOverride_(S override) {
- this.removeSpecifiedOverride_(this.specifiedOverrides.indexOf(override));
- }
-
- /**
- * specified override container adapter
- */
- protected class SpecifiedOverrideContainerAdapter
- implements ContextContainerTools.Adapter<S, X>
- {
- public Iterable<S> getContextElements() {
- return AbstractOrmOverrideContainer.this.getSpecifiedOverrides();
- }
- public Iterable<X> getResourceElements() {
- return AbstractOrmOverrideContainer.this.getXmlOverrides();
- }
- @SuppressWarnings("unchecked")
- public X getResourceElement(S contextElement) {
- return (X) contextElement.getXmlOverride();
- }
- public void moveContextElement(int index, S element) {
- AbstractOrmOverrideContainer.this.moveSpecifiedOverride_(index, element);
- }
- public void addContextElement(int index, X resourceElement) {
- AbstractOrmOverrideContainer.this.addSpecifiedOverride_(index, resourceElement);
- }
- public void removeContextElement(S element) {
- AbstractOrmOverrideContainer.this.removeSpecifiedOverride_(element);
- }
- }
-
-
- // ********** virtual overrides **********
-
- public ListIterable<V> getVirtualOverrides() {
- return new LiveCloneListIterable<V>(this.virtualOverrides);
- }
-
- @SuppressWarnings("unchecked")
- protected ListIterable<R> getReadOnlyVirtualOverrides() {
- // V should always be a subtype of R, but we can't enforce that in the
- // class declaration...
- return (ListIterable<R>) this.getVirtualOverrides();
- }
-
- public int getVirtualOverridesSize() {
- return this.virtualOverrides.size();
- }
-
- protected void updateVirtualOverrides() {
- ContextContainerTools.update(this.virtualOverrideContainerAdapter);
- }
-
- /**
- * Return the overridable names that are not already in the list of
- * specified overrides.
- */
- protected Iterable<String> getVirtualOverrideNames() {
- return new FilteringIterable<String>(this.getPossibleVirtualOverrideNames()) {
- @Override
- protected boolean accept(String name) {
- return AbstractOrmOverrideContainer.this.overrideIsVirtual(name);
- }
- };
- }
-
- protected boolean overrideIsVirtual(String name) {
- return this.getSpecifiedOverrideNamed(name) == null;
- }
-
- protected void moveVirtualOverride(int index, V override) {
- this.moveItemInList(index, override, this.virtualOverrides, VIRTUAL_OVERRIDES_LIST);
- }
-
- protected V addVirtualOverride(int index, String name) {
- V override = this.buildVirtualOverride(name);
- this.addItemToList(index, override, this.virtualOverrides, VIRTUAL_OVERRIDES_LIST);
- return override;
- }
-
- protected abstract V buildVirtualOverride(String name);
-
- protected void removeVirtualOverride(V override) {
- this.removeItemFromList(override, this.virtualOverrides, VIRTUAL_OVERRIDES_LIST);
- }
-
- /**
- * virtual override container adapter
- * NB: the context override is matched with a resource override by name
- */
- protected class VirtualOverrideContainerAdapter
- implements ContextContainerTools.Adapter<V, String>
- {
- public Iterable<V> getContextElements() {
- return AbstractOrmOverrideContainer.this.getVirtualOverrides();
- }
- public Iterable<String> getResourceElements() {
- return AbstractOrmOverrideContainer.this.getVirtualOverrideNames();
- }
- public String getResourceElement(V contextElement) {
- return contextElement.getName();
- }
- public void moveContextElement(int index, V element) {
- AbstractOrmOverrideContainer.this.moveVirtualOverride(index, element);
- }
- public void addContextElement(int index, String resourceElement) {
- AbstractOrmOverrideContainer.this.addVirtualOverride(index, resourceElement);
- }
- public void removeContextElement(V element) {
- AbstractOrmOverrideContainer.this.removeVirtualOverride(element);
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public TypeMapping getOverridableTypeMapping() {
- return this.owner.getOverridableTypeMapping();
- }
-
- public TypeMapping getTypeMapping() {
- return this.owner.getTypeMapping();
- }
-
- /**
- * Return all the possible virtual override names. If we have a
- * corresponding Java entity, take the override names from it. This allows
- * us to include any Java specified overrides that are invalid (and
- * generate the appropriate error messages). If we don't have a
- * corresponding Java entity, take the override names directly from the
- * type.
- */
- protected Iterable<String> getPossibleVirtualOverrideNames() {
- if (this.owner == null) {
- return EmptyIterable.instance();
- }
- Iterable<String> javaNames = this.owner.getJavaOverrideNames();
- return (javaNames != null) ? javaNames : this.owner.getAllOverridableNames();
- }
-
- public Iterable<String> getAllOverridableNames() {
- return (this.owner != null) ? this.owner.getAllOverridableNames() : EmptyIterable.<String>instance();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.owner.tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.owner.getCandidateTableNames();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return this.owner.resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.owner.getDefaultTableName();
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver) {
- return this.owner.buildOverrideValidator(override, this, textRangeResolver);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return this.owner.buildColumnValidator(override, column, columnOwner, textRangeResolver);
- }
-
- protected R selectOverrideNamed(Iterable<R> overrides, String name) {
- return this.selectOverrideNamed(overrides, name, null);
- }
-
- protected R selectOverrideNamed(Iterable<R> overrides, String name, S exclude) {
- for (R override : overrides) {
- if (override == exclude) {
- continue; // skip
- }
- if (this.valuesAreEqual(override.getName(), name)) {
- return override;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- for (R override : this.getOverrides()) {
- override.validate(messages, reporter);
- }
- }
-
- public TextRange getValidationTextRange() {
- return (this.specifiedOverrides.size() > 0) ?
- this.specifiedOverrides.get(0).getValidationTextRange() :
- this.owner.getValidationTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (R override : this.getOverrides()) {
- result = override.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitDefaults.java
deleted file mode 100644
index 0e7ab51c70..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitDefaults.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistenceUnitDefaults2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.db.Catalog;
-import org.eclipse.jpt.jpa.db.Database;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.SchemaContainer;
-
-/**
- * <code>orm.xml</code> file
- * <br>
- * <code>persistence-unit-defaults</code> element
- */
-public abstract class AbstractOrmPersistenceUnitDefaults
- extends AbstractOrmXmlContextNode
- implements OrmPersistenceUnitDefaults2_0
-{
- protected AccessType specifiedAccess;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected boolean cascadePersist;
-
- protected boolean delimitedIdentifiers;
-
-
- // ********** constructor/initialization **********
-
- protected AbstractOrmPersistenceUnitDefaults(OrmPersistenceUnitMetadata parent) {
- super(parent);
- this.specifiedAccess = this.buildSpecifiedAccess();
- this.specifiedCatalog = this.buildSpecifiedCatalog();
- this.specifiedSchema = this.buildSpecifiedSchema();
- this.cascadePersist = this.buildCascadePersist();
- this.delimitedIdentifiers = this.buildDelimitedIdentifiers();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedAccess_(this.buildSpecifiedAccess());
- this.setSpecifiedCatalog_(this.buildSpecifiedCatalog());
- this.setSpecifiedSchema_(this.buildSpecifiedSchema());
- this.setCascadePersist_(this.buildCascadePersist());
- this.setDelimitedIdentifiers_(this.buildDelimitedIdentifiers());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.setDefaultSchema(this.buildDefaultSchema());
- }
-
-
- // ********** access **********
-
- public AccessType getAccess() {
- return this.getSpecifiedAccess();
- }
-
- public AccessType getDefaultAccess() {
- return null;
- }
-
- public AccessType getSpecifiedAccess() {
- return this.specifiedAccess;
- }
-
- public void setSpecifiedAccess(AccessType access) {
- if (this.valuesAreDifferent(this.specifiedAccess, access)) {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
- this.setSpecifiedAccess_(access);
- xmlDefaults.setAccess(AccessType.toOrmResourceModel(access));
- this.removeXmlDefaultsIfUnset();
- }
- }
-
- protected void setSpecifiedAccess_(AccessType access) {
- AccessType old = this.specifiedAccess;
- this.specifiedAccess = access;
- this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, access);
- }
-
- protected AccessType buildSpecifiedAccess() {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
- return (xmlDefaults == null) ? null : AccessType.fromOrmResourceModel(xmlDefaults.getAccess(), this.getJpaPlatform(), this.getResourceType());
- }
-
-
- // ********** schema container **********
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
- * then the database probably does not support catalogs; and we need to
- * get the schema directly from the database.
- */
- public SchemaContainer getDbSchemaContainer() {
- String catalog = this.getCatalog();
- return (catalog != null) ? this.resolveDbCatalog(catalog) : this.getDatabase();
- }
-
-
- // ********** catalog **********
-
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- if (this.valuesAreDifferent(this.specifiedCatalog, catalog)) {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
- this.setSpecifiedCatalog_(catalog);
- xmlDefaults.setCatalog(catalog);
- this.removeXmlDefaultsIfUnset();
- }
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildSpecifiedCatalog() {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
- return (xmlDefaults == null) ? null : xmlDefaults.getCatalog();
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog() {
- return this.getJpaProject().getDefaultCatalog();
- }
-
- /**
- * If we don't have a catalog (i.e. we don't even have a <em>default</em>
- * catalog), then the database probably does not support catalogs.
- */
- public Catalog getDbCatalog() {
- String catalog = this.getCatalog();
- return (catalog == null) ? null : this.resolveDbCatalog(catalog);
- }
-
-
- // ********** schema **********
-
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- if (this.valuesAreDifferent(this.specifiedSchema, schema)) {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
- this.setSpecifiedSchema_(schema);
- xmlDefaults.setSchema(schema);
- this.removeXmlDefaultsIfUnset();
- }
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildSpecifiedSchema() {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
- return (xmlDefaults == null) ? null : xmlDefaults.getSchema();
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema() {
- return this.getJpaProject().getDefaultSchema();
- }
-
- public Schema getDbSchema() {
- SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
- return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
- }
-
-
- // ********** cascade persist **********
-
- public boolean isCascadePersist() {
- return this.cascadePersist;
- }
-
- public void setCascadePersist(boolean cascadePersist) {
- if (this.cascadePersist != cascadePersist) {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
- this.setCascadePersist_(cascadePersist);
- xmlDefaults.setCascadePersist(cascadePersist);
- this.removeXmlDefaultsIfUnset();
- }
- }
-
- protected void setCascadePersist_(boolean cascadePersist) {
- boolean old = this.cascadePersist;
- this.cascadePersist = cascadePersist;
- this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, cascadePersist);
- }
-
- protected boolean buildCascadePersist() {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
- return (xmlDefaults == null) ? false : xmlDefaults.isCascadePersist();
- }
-
-
- // ********** delimited identifiers **********
-
- public boolean isDelimitedIdentifiers() {
- return this.delimitedIdentifiers;
- }
-
- public void setDelimitedIdentifiers(boolean delimitedIdentifiers) {
- if (this.delimitedIdentifiers != delimitedIdentifiers) {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
- this.setDelimitedIdentifiers_(delimitedIdentifiers);
- xmlDefaults.setDelimitedIdentifiers(delimitedIdentifiers);
- this.removeXmlDefaultsIfUnset();
- }
- }
-
- protected void setDelimitedIdentifiers_(boolean di) {
- boolean old = this.delimitedIdentifiers;
- this.delimitedIdentifiers = di;
- this.firePropertyChanged(DELIMITED_IDENTIFIERS_PROPERTY, old, di);
- }
-
- protected boolean buildDelimitedIdentifiers() {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
- return (xmlDefaults == null) ? false : xmlDefaults.isDelimitedIdentifiers();
- }
-
-
- // ********** XML defaults **********
-
- /**
- * Return <code>null</code> if the XML defaults does not exist.
- */
- protected XmlPersistenceUnitDefaults getXmlDefaults() {
- XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
- return (xmlMetadata == null) ? null : xmlMetadata.getPersistenceUnitDefaults();
- }
-
- protected XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata() {
- return this.getPersistenceUnitMetadata().getXmlPersistenceUnitMetadata();
- }
-
- /**
- * Build the XML defaults (and XML metadata if necessary) if it does not exist.
- */
- protected XmlPersistenceUnitDefaults getXmlDefaultsForUpdate() {
- XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadataForUpdate();
- XmlPersistenceUnitDefaults xmlDefaults = xmlMetadata.getPersistenceUnitDefaults();
- return (xmlDefaults != null) ? xmlDefaults : this.buildXmlDefaults(xmlMetadata);
- }
-
- protected XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadataForUpdate() {
- return this.getPersistenceUnitMetadata().getXmlPersistenceUnitMetadataForUpdate();
- }
-
- protected XmlPersistenceUnitDefaults buildXmlDefaults(XmlPersistenceUnitMetadata xmlMetadata) {
- XmlPersistenceUnitDefaults xmlDefaults = this.buildXmlPersistenceUnitDefaults();
- xmlMetadata.setPersistenceUnitDefaults(xmlDefaults);
- return xmlDefaults;
- }
-
- protected abstract XmlPersistenceUnitDefaults buildXmlPersistenceUnitDefaults();
-
- /**
- * clear the XML defaults (and the XML metadata) if appropriate
- */
- protected void removeXmlDefaultsIfUnset() {
- if (this.getXmlDefaults().isUnset()) {
- this.getXmlPersistenceUnitMetadata().setPersistenceUnitDefaults(null);
- this.removeXmlPersistenceUnitMetadataIfUnset();
- }
- }
-
- protected void removeXmlPersistenceUnitMetadataIfUnset() {
- this.getPersistenceUnitMetadata().removeXmlPersistenceUnitMetadataIfUnset();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmPersistenceUnitMetadata getParent() {
- return (OrmPersistenceUnitMetadata) super.getParent();
- }
-
- public OrmPersistenceUnitMetadata getPersistenceUnitMetadata() {
- return this.getParent();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlTextRange();
- return (textRange != null) ? textRange : this.getPersistenceUnitMetadata().getValidationTextRange();
- }
-
- protected TextRange getXmlTextRange() {
- XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
- return (xmlDefaults == null) ? null : xmlDefaults.getValidationTextRange();
- }
-
- // ********** completion proposals *********
-
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.schemaTouches(pos)) {
- return this.getCandidateSchemata();
- }
- if (this.catalogTouches(pos)) {
- return this.getCandidateCatalogs();
- }
- return null;
- }
-
- // ********** content assist: schema
-
- protected boolean schemaTouches(int pos) {
- return (this.getXmlDefaults() != null) && this.getXmlDefaults().schemaTouches(pos);
- }
-
- protected Iterable<String> getCandidateSchemata() {
- SchemaContainer schemaContainer = this.getDbSchemaContainer();
- return (schemaContainer != null) ? schemaContainer.getSortedSchemaIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** content assist: catalog
-
- protected boolean catalogTouches(int pos) {
- return (this.getXmlDefaults() != null) && this.getXmlDefaults().catalogTouches(pos);
- }
-
- protected Iterable<String> getCandidateCatalogs() {
- Database db = this.getDatabase();
- return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitMetadata.java
deleted file mode 100644
index a7bd86e6ce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmPersistenceUnitMetadata.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistenceUnitMetadata2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata;
-
-/**
- * <code>orm.xml</code> file
- * <br>
- * <code>persistence-unit-metadata</code> element
- */
-public abstract class AbstractOrmPersistenceUnitMetadata
- extends AbstractOrmXmlContextNode
- implements OrmPersistenceUnitMetadata2_0
-{
- protected boolean xmlMappingMetadataComplete;
-
- protected String description;
-
- // never null
- protected final OrmPersistenceUnitDefaults persistenceUnitDefaults;
-
-
- protected AbstractOrmPersistenceUnitMetadata(EntityMappings parent) {
- super(parent);
- this.xmlMappingMetadataComplete = this.buildXmlMappingMetadataComplete();
- this.description = this.buildDescription();
- this.persistenceUnitDefaults = this.buildPersistenceUnitDefaults();
- }
-
- protected OrmPersistenceUnitDefaults buildPersistenceUnitDefaults() {
- return this.getContextNodeFactory().buildOrmPersistenceUnitDefaults(this);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setXmlMappingMetadataComplete_(this.buildXmlMappingMetadataComplete());
- this.setDescription_(this.buildDescription());
- this.persistenceUnitDefaults.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.persistenceUnitDefaults.update();
- }
-
-
- // ********** XML metadata **********
-
- /**
- * Return <code>null</code> if the XML metadata does not exist.
- */
- public XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata() {
- return this.getXmlEntityMappings().getPersistenceUnitMetadata();
- }
-
- /**
- * Build the XML metadata if it does not exist.
- */
- public XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadataForUpdate() {
- XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
- return (xmlMetadata != null) ? xmlMetadata : this.buildXmlPersistenceUnitMetadata();
- }
-
- protected XmlPersistenceUnitMetadata buildXmlPersistenceUnitMetadata() {
- XmlPersistenceUnitMetadata xmlMetadata = this.buildXmlPersistenceUnitMetadata_();
- this.getXmlEntityMappings().setPersistenceUnitMetadata(xmlMetadata);
- return xmlMetadata;
- }
-
- protected abstract XmlPersistenceUnitMetadata buildXmlPersistenceUnitMetadata_();
-
- public void removeXmlPersistenceUnitMetadataIfUnset() {
- if (this.getXmlPersistenceUnitMetadata().isUnset()) {
- this.getXmlEntityMappings().setPersistenceUnitMetadata(null);
- }
- }
-
-
- // ********** XML mapping metadata complete **********
-
- public boolean isXmlMappingMetadataComplete() {
- return this.xmlMappingMetadataComplete;
- }
-
- public void setXmlMappingMetadataComplete(boolean xmlMappingMetadataComplete) {
- if (this.xmlMappingMetadataComplete != xmlMappingMetadataComplete) {
- XmlPersistenceUnitMetadata xmlPersistenceUnitMetadata = this.getXmlPersistenceUnitMetadataForUpdate();
- this.setXmlMappingMetadataComplete_(xmlMappingMetadataComplete);
- xmlPersistenceUnitMetadata.setXmlMappingMetadataComplete(xmlMappingMetadataComplete);
- this.removeXmlPersistenceUnitMetadataIfUnset();
- }
- }
-
- protected void setXmlMappingMetadataComplete_(boolean xmlMappingMetadataComplete) {
- boolean old = this.xmlMappingMetadataComplete;
- this.xmlMappingMetadataComplete = xmlMappingMetadataComplete;
- this.firePropertyChanged(XML_MAPPING_METADATA_COMPLETE_PROPERTY, old, xmlMappingMetadataComplete);
- }
-
- protected boolean buildXmlMappingMetadataComplete() {
- XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
- return (xmlMetadata != null) ? xmlMetadata.isXmlMappingMetadataComplete() : false;
- }
-
-
- // ********** description **********
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- if (this.valuesAreDifferent(this.description, description)) {
- XmlPersistenceUnitMetadata xmlPersistenceUnitMetadata = this.getXmlPersistenceUnitMetadataForUpdate();
- this.setDescription_(description);
- xmlPersistenceUnitMetadata.setDescription(description);
- this.removeXmlPersistenceUnitMetadataIfUnset();
- }
- }
-
- protected void setDescription_(String description) {
- String old = this.description;
- this.description = description;
- this.firePropertyChanged(DESCRIPTION_PROPERTY, old, description);
- }
-
- protected String buildDescription() {
- XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
- return (xmlMetadata == null) ? null : xmlMetadata.getDescription();
- }
-
-
- // ********** persistence unit defaults **********
-
- public OrmPersistenceUnitDefaults getPersistenceUnitDefaults() {
- return this.persistenceUnitDefaults;
- }
-
-
- // ********** misc **********
-
- @Override
- public EntityMappings getParent() {
- return (EntityMappings) super.getParent();
- }
-
- protected EntityMappings getEntityMappings() {
- return this.getParent();
- }
-
- public XmlEntityMappings getXmlEntityMappings() {
- return this.getEntityMappings().getXmlEntityMappings();
- }
-
- public boolean resourceExists() {
- return this.getXmlPersistenceUnitMetadata() != null;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlTextRange();
- return (textRange != null) ? textRange : this.getEntityMappings().getValidationTextRange();
- }
-
- protected TextRange getXmlTextRange() {
- XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
- return (xmlMetadata == null) ? null : xmlMetadata.getValidationTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.persistenceUnitDefaults.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java
deleted file mode 100644
index 2a46f57e60..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Virtual <code>orm.xml</code> override
- */
-public abstract class AbstractOrmVirtualOverride<C extends OrmOverrideContainer>
- extends AbstractOrmXmlContextNode
- implements OrmVirtualOverride
-{
- protected final String name; // never null
-
-
- protected AbstractOrmVirtualOverride(C parent, String name) {
- super(parent);
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
-
- public boolean isVirtual() {
- return true;
- }
-
- public OrmOverride convertToSpecified() {
- return this.getContainer().convertOverrideToSpecified(this);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public C getParent() {
- return (C) super.getParent();
- }
-
- protected C getContainer() {
- return this.getParent();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getContainer().getTypeMapping();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getContainer().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getContainer().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.buildValidator().validate(messages, reporter);
- }
-
- protected JptValidator buildValidator() {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver());
- }
-
- protected OverrideTextRangeResolver buildTextRangeResolver() {
- return new OrmOverrideTextRangeResolver(this);
- }
-
- public TextRange getValidationTextRange() {
- return this.getContainer().getValidationTextRange();
- }
-
- public TextRange getNameTextRange() {
- return this.getValidationTextRange();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getContainer().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getContainer().getCandidateTableNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericEntityMappings.java
deleted file mode 100644
index a6ae9ee62b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericEntityMappings.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-
-/**
- * <code>orm.xml</code> file
- * <br>
- * <code>entity-mappings</code> element
- */
-public class GenericEntityMappings
- extends AbstractEntityMappings
-{
- public GenericEntityMappings(OrmXml parent, XmlEntityMappings resource) {
- super(parent, resource);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
deleted file mode 100644
index af85f006d0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverride2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Specified <code>orm.xml</code> association override
- */
-public class GenericOrmAssociationOverride
- extends AbstractOrmOverride<OrmAssociationOverrideContainer, XmlAssociationOverride>
- implements OrmAssociationOverride2_0
-{
- protected final OrmOverrideRelationship relationship;
-
-
- public GenericOrmAssociationOverride(OrmAssociationOverrideContainer parent, XmlAssociationOverride xmlOverride) {
- super(parent, xmlOverride);
- this.relationship = this.buildRelationship();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.relationship.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.relationship.update();
- }
-
-
- // ********** specified/virtual **********
-
- @Override
- public OrmVirtualAssociationOverride convertToVirtual() {
- return (OrmVirtualAssociationOverride) super.convertToVirtual();
- }
-
-
- // ********** relationship **********
-
- public OrmOverrideRelationship getRelationship() {
- return this.relationship;
- }
-
- protected OrmOverrideRelationship buildRelationship() {
- return this.getContextNodeFactory().buildOrmOverrideRelationship(this);
- }
-
-
- // ********** misc **********
-
- protected OrmAssociationOverrideContainer2_0 getContainer2_0() {
- return (OrmAssociationOverrideContainer2_0) this.getContainer();
- }
-
- public RelationshipMapping getMapping() {
- return this.getContainer().getRelationshipMapping(this.name);
- }
-
- public void initializeFrom(ReadOnlyAssociationOverride oldOverride) {
- super.initializeFrom(oldOverride);
- this.relationship.initializeFrom(oldOverride.getRelationship());
- }
-
- public void initializeFromVirtual(ReadOnlyAssociationOverride virtualOverride) {
- super.initializeFromVirtual(virtualOverride);
- this.relationship.initializeFromVirtual(virtualOverride.getRelationship());
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.relationship.validate(messages, reporter);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.relationship.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
deleted file mode 100644
index f0d01182d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-
-/**
- * <code>orm.xml</code> association override container
- */
-public class GenericOrmAssociationOverrideContainer
- extends AbstractOrmOverrideContainer<
- OrmAssociationOverrideContainer.Owner,
- OrmReadOnlyAssociationOverride,
- OrmAssociationOverride,
- OrmVirtualAssociationOverride,
- XmlAssociationOverride
- >
- implements OrmAssociationOverrideContainer2_0
-{
- public GenericOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner) {
- super(parent, owner);
- }
-
-
- public RelationshipMapping getRelationshipMapping(String attributeName) {
- return MappingTools.getRelationshipMapping(attributeName, this.owner.getOverridableTypeMapping());
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship(String associationOverrideName) {
- return this.owner.resolveOverriddenRelationship(associationOverrideName);
- }
-
- protected OrmAssociationOverrideContainer2_0.Owner getOwner2_0() {
- return (OrmAssociationOverrideContainer2_0.Owner) this.owner;
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner columnOwner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableJoinColumnValidator(override, column, columnOwner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner columnOwner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableInverseJoinColumnValidator(override, column, columnOwner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableValidator(override, table, textRangeResolver);
- }
-
- @Override
- protected Iterable<XmlAssociationOverride> getXmlOverrides_() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneIterable<XmlAssociationOverride>(this.owner.getXmlOverrides());
- }
-
- @Override
- protected XmlAssociationOverride buildXmlOverride() {
- return OrmFactory.eINSTANCE.createXmlAssociationOverride();
- }
-
- @Override
- protected OrmAssociationOverride buildSpecifiedOverride(XmlAssociationOverride xmlOverride) {
- return this.getContextNodeFactory().buildOrmAssociationOverride(this, xmlOverride);
- }
-
- @Override
- protected void initializeSpecifiedOverride(OrmAssociationOverride specifiedOverride, OrmVirtualAssociationOverride virtualOverride) {
- specifiedOverride.initializeFromVirtual(virtualOverride);
- }
-
- @Override
- protected OrmVirtualAssociationOverride buildVirtualOverride(String name) {
- return this.getContextNodeFactory().buildOrmVirtualAssociationOverride(this, name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
deleted file mode 100644
index 22ea7a8b00..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Specified <code>orm.xml</code> attribute override
- */
-public class GenericOrmAttributeOverride
- extends AbstractOrmOverride<OrmAttributeOverrideContainer, XmlAttributeOverride>
- implements OrmAttributeOverride, OrmColumn.Owner
-{
- protected final OrmColumn column;
-
-
- public GenericOrmAttributeOverride(OrmAttributeOverrideContainer parent, XmlAttributeOverride xmlOverride) {
- super(parent, xmlOverride);
- this.column = this.buildColumn();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.column.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- }
-
-
- // ********** specified/virtual **********
-
- @Override
- public OrmVirtualAttributeOverride convertToVirtual() {
- return (OrmVirtualAttributeOverride) super.convertToVirtual();
- }
-
-
- // ********** column **********
-
- public OrmColumn getColumn() {
- return this.column;
- }
-
- protected OrmColumn buildColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this);
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyAttributeOverride oldOverride) {
- super.initializeFrom(oldOverride);
- this.column.initializeFrom(oldOverride.getColumn());
- }
-
- public void initializeFromVirtual(ReadOnlyAttributeOverride oldOverride) {
- super.initializeFromVirtual(oldOverride);
- this.column.initializeFromVirtual(oldOverride.getColumn());
- }
-
-
- // ********** column owner implementation **********
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.name;
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
-
- public XmlColumn getXmlColumn() {
- return this.getXmlOverride().getColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.getXmlOverride().setColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.getXmlOverride().setColumn(null);
- }
-
-
- // ********** mapped by relationship **********
-
- protected boolean attributeIsDerivedId() {
- return this.getTypeMapping().attributeIsDerivedId(this.name);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (this.attributeIsDerivedId()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ATTRIBUTE_OVERRIDE_DERIVED_AND_SPECIFIED,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange()
- )
- );
-
- // validate the column if it is specified
- if (this.xmlColumnIsSpecified()) {
- this.column.validate(messages, reporter);
- }
- } else {
- this.column.validate(messages, reporter);
- }
- }
-
- protected boolean xmlColumnIsSpecified() {
- return this.getXmlColumn() != null;
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java
deleted file mode 100644
index 6b56484f04..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-
-/**
- * <code>orm.xml</code> attribute override container
- */
-public class GenericOrmAttributeOverrideContainer
- extends AbstractOrmOverrideContainer<
- OrmAttributeOverrideContainer.Owner,
- OrmReadOnlyAttributeOverride,
- OrmAttributeOverride,
- OrmVirtualAttributeOverride,
- XmlAttributeOverride
- >
- implements OrmAttributeOverrideContainer
-{
- public GenericOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner) {
- super(parent, owner);
- }
-
-
- public ReadOnlyColumn resolveOverriddenColumn(String attributeName) {
- return (attributeName == null) ? null : this.owner.resolveOverriddenColumn(attributeName);
- }
-
- @Override
- protected Iterable<XmlAttributeOverride> getXmlOverrides_() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneIterable<XmlAttributeOverride>(this.owner.getXmlOverrides());
- }
-
- @Override
- protected XmlAttributeOverride buildXmlOverride() {
- return OrmFactory.eINSTANCE.createXmlAttributeOverride();
- }
-
- @Override
- protected OrmAttributeOverride buildSpecifiedOverride(XmlAttributeOverride xmlOverride) {
- return this.getContextNodeFactory().buildOrmAttributeOverride(this, xmlOverride);
- }
-
- public void initializeFrom(OrmAttributeOverrideContainer oldContainer) {
- for (OrmAttributeOverride oldOverride : oldContainer.getSpecifiedOverrides()) {
- this.addSpecifiedOverride().initializeFrom(oldOverride);
- }
- }
-
- @Override
- protected void initializeSpecifiedOverride(OrmAttributeOverride specifiedOverride, OrmVirtualAttributeOverride virtualOverride) {
- specifiedOverride.initializeFromVirtual(virtualOverride);
- }
-
- @Override
- protected OrmVirtualAttributeOverride buildVirtualOverride(String name) {
- return this.getContextNodeFactory().buildOrmVirtualAttributeOverride(this, name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseEnumeratedConverter.java
deleted file mode 100644
index 915c56d91b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseEnumeratedConverter.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.EnumType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseEnumeratedConverter;
-
-public class GenericOrmBaseEnumeratedConverter
- extends AbstractOrmConverter
- implements OrmBaseEnumeratedConverter
-{
- protected EnumType specifiedEnumType;
- protected EnumType defaultEnumType;
-
-
- public GenericOrmBaseEnumeratedConverter(OrmAttributeMapping parent, OrmBaseEnumeratedConverter.Owner owner) {
- super(parent, owner);
- this.specifiedEnumType = this.buildSpecifiedEnumType();
- }
-
- @Override
- protected OrmBaseEnumeratedConverter.Owner getOwner() {
- return (OrmBaseEnumeratedConverter.Owner) super.getOwner();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedEnumType_(this.buildSpecifiedEnumType());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultEnumType(this.buildDefaultEnumType());
- }
-
-
- // ********** enum type **********
-
- public EnumType getEnumType() {
- return (this.specifiedEnumType != null) ? this.specifiedEnumType : this.getDefaultEnumType();
- }
-
- public EnumType getSpecifiedEnumType() {
- return this.specifiedEnumType;
- }
-
- public void setSpecifiedEnumType(EnumType enumType) {
- this.setSpecifiedEnumType_(enumType);
- this.setXmlEnumerated(enumType);
- }
-
- protected void setSpecifiedEnumType_(EnumType enumType) {
- EnumType old = this.specifiedEnumType;
- this.specifiedEnumType = enumType;
- this.firePropertyChanged(SPECIFIED_ENUM_TYPE_PROPERTY, old, enumType);
- }
-
- protected void setXmlEnumerated(EnumType enumType) {
- this.getOwner().setXmlEnumType(EnumType.toOrmResourceModel(enumType));
- }
-
- protected EnumType buildSpecifiedEnumType() {
- return EnumType.fromOrmResourceModel(this.getOwner().getXmlEnumType());
- }
-
- public EnumType getDefaultEnumType() {
- return this.defaultEnumType;
- }
-
- protected void setDefaultEnumType(EnumType enumType) {
- EnumType old = this.defaultEnumType;
- this.defaultEnumType = enumType;
- this.firePropertyChanged(DEFAULT_ENUM_TYPE_PROPERTY, old, enumType);
- }
-
- /**
- * There is no default enum type in XML.
- * If you specify the enumerated element, you must
- * specify either {@link EnumType#ORDINAL} or
- * {@link EnumType#STRING}.
- */
- protected EnumType buildDefaultEnumType() {
- return null;
- }
-
-
- // ********** misc **********
-
- public Class<? extends Converter> getType() {
- return BaseEnumeratedConverter.class;
- }
-
- public void initialize() {
- this.specifiedEnumType = DEFAULT_ENUM_TYPE;
- this.setXmlEnumerated(this.specifiedEnumType);
- }
-
-
- // ********** validation **********
-
- @Override
- protected TextRange getXmlValidationTextRange() {
- return this.getOwner().getEnumTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseTemporalConverter.java
deleted file mode 100644
index eeb2a12a30..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBaseTemporalConverter.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.TemporalType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
-
-public class GenericOrmBaseTemporalConverter
- extends AbstractOrmConverter
- implements OrmBaseTemporalConverter
-{
- protected TemporalType temporalType;
-
- public GenericOrmBaseTemporalConverter(OrmAttributeMapping parent, OrmTemporalConverter.Owner owner) {
- super(parent, owner);
- this.temporalType = this.buildTemporalType();
- }
-
- @Override
- protected OrmTemporalConverter.Owner getOwner() {
- return (OrmTemporalConverter.Owner) super.getOwner();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setTemporalType_(this.buildTemporalType());
- }
-
-
- // ********** temporal type **********
-
- public TemporalType getTemporalType() {
- return this.temporalType;
- }
-
- public void setTemporalType(TemporalType temporalType) {
- this.setTemporalType_(temporalType);
- this.setXmlTemporal(temporalType);
- }
-
- protected void setTemporalType_(TemporalType temporalType) {
- TemporalType old = this.temporalType;
- this.temporalType = temporalType;
- this.firePropertyChanged(TEMPORAL_TYPE_PROPERTY, old, temporalType);
- }
-
- protected void setXmlTemporal(TemporalType temporalType) {
- this.getOwner().setXmlTemporalType(TemporalType.toOrmResourceModel(temporalType));
- }
-
- protected TemporalType buildTemporalType() {
- return TemporalType.fromOrmResourceModel(this.getOwner().getXmlTemporalType());
- }
-
-
- // ********** misc **********
-
- public Class<? extends Converter> getType() {
- return BaseTemporalConverter.class;
- }
-
- public void initialize() {
- // start with DATE(?)
- this.temporalType = TemporalType.DATE;
- this.setXmlTemporal(this.temporalType);
- }
-
-
- // ********** validation **********
-
- @Override
- protected TextRange getXmlValidationTextRange() {
- return this.getOwner().getTemporalTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java
deleted file mode 100644
index 99f763d272..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBasicMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic;
-
-/**
- * <code>orm.xml</code> basic mapping
- */
-public class GenericOrmBasicMapping
- extends AbstractOrmBasicMapping<XmlBasic>
-{
- public GenericOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmCascade.java
deleted file mode 100644
index 76cba3a5c8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmCascade.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Cascade;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cascade2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCascade2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.CascadeType;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-
-public class GenericOrmCascade
- extends AbstractOrmXmlContextNode
- implements OrmCascade2_0
-{
- protected boolean all;
-
- protected boolean persist;
-
- protected boolean merge;
-
- protected boolean remove;
-
- protected boolean refresh;
-
- /* JPA 2.0 */
- protected boolean detach;
-
-
- /**
- * This is built directly by the mapping implementation; as opposed to via
- * a platform-specific factory.
- * @see AbstractOrmRelationshipMapping#buildCascade()
- */
- public GenericOrmCascade(OrmRelationshipMapping parent) {
- super(parent);
- this.all = this.buildAll();
- this.persist = this.buildPersist();
- this.merge = this.buildMerge();
- this.remove = this.buildRemove();
- this.refresh = this.buildRefresh();
- this.detach = this.buildDetach();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setAll_(this.buildAll());
- this.setPersist_(this.buildPersist());
- this.setMerge_(this.buildMerge());
- this.setRemove_(this.buildRemove());
- this.setRefresh_(this.buildRefresh());
- this.setDetach_(this.buildDetach());
- }
-
-
- // ********** all **********
-
- public boolean isAll() {
- return this.all;
- }
-
- public void setAll(boolean all) {
- if (this.all != all) {
- CascadeType xmlCascade = this.getXmlCascadeForUpdate();
- this.setAll_(all);
- xmlCascade.setCascadeAll(all);
- this.removeXmlCascadeIfUnset();
- }
- }
-
- protected void setAll_(boolean all) {
- boolean old = this.all;
- this.all = all;
- this.firePropertyChanged(ALL_PROPERTY, old, all);
- }
-
- protected boolean buildAll() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) && xmlCascade.isCascadeAll();
- }
-
-
- // ********** persist **********
-
- public boolean isPersist() {
- return this.persist;
- }
-
- public void setPersist(boolean persist) {
- if (this.persist != persist) {
- CascadeType xmlCascade = this.getXmlCascadeForUpdate();
- this.setPersist_(persist);
- xmlCascade.setCascadePersist(persist);
- this.removeXmlCascadeIfUnset();
- }
- }
-
- protected boolean setPersist_(boolean persist) {
- boolean old = this.persist;
- this.persist = persist;
- return this.firePropertyChanged(PERSIST_PROPERTY, old, persist);
- }
-
- protected boolean buildPersist() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) && xmlCascade.isCascadePersist();
- }
-
-
- // ********** merge **********
-
- public boolean isMerge() {
- return this.merge;
- }
-
- public void setMerge(boolean merge) {
- if (this.merge != merge) {
- CascadeType xmlCascade = this.getXmlCascadeForUpdate();
- this.setMerge_(merge);
- xmlCascade.setCascadeMerge(merge);
- this.removeXmlCascadeIfUnset();
- }
- }
-
- protected boolean setMerge_(boolean merge) {
- boolean old = this.merge;
- this.merge = merge;
- return this.firePropertyChanged(MERGE_PROPERTY, old, merge);
- }
-
- protected boolean buildMerge() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) && xmlCascade.isCascadeMerge();
- }
-
-
- // ********** remove **********
-
- public boolean isRemove() {
- return this.remove;
- }
-
- public void setRemove(boolean remove) {
- if (this.remove != remove) {
- CascadeType xmlCascade = this.getXmlCascadeForUpdate();
- this.setRemove_(remove);
- xmlCascade.setCascadeRemove(remove);
- this.removeXmlCascadeIfUnset();
- }
- }
-
- protected boolean setRemove_(boolean remove) {
- boolean old = this.remove;
- this.remove = remove;
- return this.firePropertyChanged(REMOVE_PROPERTY, old, remove);
- }
-
- protected boolean buildRemove() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) && xmlCascade.isCascadeRemove();
- }
-
-
- // ********** refresh **********
-
- public boolean isRefresh() {
- return this.refresh;
- }
-
- public void setRefresh(boolean refresh) {
- if (this.refresh != refresh) {
- CascadeType xmlCascade = this.getXmlCascadeForUpdate();
- this.setRefresh_(refresh);
- xmlCascade.setCascadeRefresh(refresh);
- this.removeXmlCascadeIfUnset();
- }
- }
-
- protected boolean setRefresh_(boolean refresh) {
- boolean old = this.refresh;
- this.refresh = refresh;
- return this.firePropertyChanged(REFRESH_PROPERTY, old, refresh);
- }
-
- protected boolean buildRefresh() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) && xmlCascade.isCascadeRefresh();
- }
-
-
- // ********** detach **********
-
- public boolean isDetach() {
- return this.detach;
- }
-
- public void setDetach(boolean detach) {
- if (this.detach != detach) {
- CascadeType xmlCascade = this.getXmlCascadeForUpdate();
- this.setDetach_(detach);
- xmlCascade.setCascadeDetach(detach);
- this.removeXmlCascadeIfUnset();
- }
- }
-
- protected boolean setDetach_(boolean detach) {
- boolean old = this.detach;
- this.detach = detach;
- return this.firePropertyChanged(DETACH_PROPERTY, old, detach);
- }
-
- protected boolean buildDetach() {
- return this.isJpa2_0Compatible() && this.buildDetach_();
- }
-
- protected boolean buildDetach_() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) && xmlCascade.isCascadeDetach();
- }
-
-
- // ********** XML cascade **********
-
- /**
- * Return <code>null</code> if XML cascade does not exists.
- */
- protected CascadeType getXmlCascade() {
- return this.getXmlRelationshipMapping().getCascade();
- }
-
- /**
- * Build the XML cascade if it does not exist.
- */
- protected CascadeType getXmlCascadeForUpdate() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade != null) ? xmlCascade : this.buildXmlCascade();
- }
-
- protected CascadeType buildXmlCascade() {
- CascadeType xmlCascade = OrmFactory.eINSTANCE.createCascadeType();
- this.getXmlRelationshipMapping().setCascade(xmlCascade);
- return xmlCascade;
- }
-
- protected void removeXmlCascadeIfUnset() {
- if (this.getXmlCascade().isUnset()) {
- this.removeXmlCascade();
- }
- }
-
- protected void removeXmlCascade() {
- this.getXmlRelationshipMapping().setCascade(null);
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmRelationshipMapping getParent() {
- return (OrmRelationshipMapping) super.getParent();
- }
-
- protected OrmRelationshipMapping getRelationshipMapping() {
- return this.getParent();
- }
-
- protected AbstractXmlRelationshipMapping getXmlRelationshipMapping() {
- return this.getRelationshipMapping().getXmlAttributeMapping();
- }
-
- public void initializeFrom(Cascade oldCascade) {
- this.setAll(oldCascade.isAll());
- this.setPersist(oldCascade.isPersist());
- this.setMerge(oldCascade.isMerge());
- this.setRemove(oldCascade.isRemove());
- this.setRefresh(oldCascade.isRefresh());
- if (this.isJpa2_0Compatible()) {
- this.setDetach(((Cascade2_0) oldCascade).isDetach());
- }
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlTextRange();
- return (textRange != null) ? textRange : this.getRelationshipMapping().getValidationTextRange();
- }
-
- protected TextRange getXmlTextRange() {
- CascadeType xmlCascade = this.getXmlCascade();
- return (xmlCascade == null) ? null : xmlCascade.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmColumn.java
deleted file mode 100644
index 6e254476eb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmColumn.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-
-/**
- * <code>orm.xml</code> column
- */
-public class GenericOrmColumn
- extends AbstractOrmBaseColumn<XmlColumn, OrmColumn.Owner>
- implements OrmColumn
-{
- // TODO defaults from java for all of these settings
- protected Integer specifiedLength;
-
- protected Integer specifiedPrecision;
-
- protected Integer specifiedScale;
-
-
- public GenericOrmColumn(XmlContextNode parent, OrmColumn.Owner owner) {
- super(parent, owner);
- this.specifiedLength = this.buildSpecifiedLength();
- this.specifiedPrecision = this.buildSpecifiedPrecision();
- this.specifiedScale = this.buildSpecifiedScale();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedLength_(this.buildSpecifiedLength());
- this.setSpecifiedPrecision_(this.buildSpecifiedPrecision());
- this.setSpecifiedScale_(this.buildSpecifiedScale());
- }
-
-
- // ********** XML column **********
-
- @Override
- public XmlColumn getXmlColumn() {
- return this.owner.getXmlColumn();
- }
-
- @Override
- protected XmlColumn buildXmlColumn() {
- return this.owner.buildXmlColumn();
- }
-
- @Override
- protected void removeXmlColumn() {
- this.owner.removeXmlColumn();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.getDefaultLength();
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- public void setSpecifiedLength(Integer length) {
- if (this.valuesAreDifferent(this.specifiedLength, length)) {
- XmlColumn xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedLength_(length);
- xmlColumn.setLength(length);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedLength_(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- XmlColumn xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getLength();
- }
-
- public int getDefaultLength() {
- return DEFAULT_LENGTH;
- }
-
-
- // ********** precision **********
-
- public int getPrecision() {
- return (this.specifiedPrecision != null) ? this.specifiedPrecision.intValue() : this.getDefaultPrecision();
- }
-
- public Integer getSpecifiedPrecision() {
- return this.specifiedPrecision;
- }
-
- public void setSpecifiedPrecision(Integer precision) {
- if (this.valuesAreDifferent(this.specifiedPrecision, precision)) {
- XmlColumn xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedPrecision_(precision);
- xmlColumn.setPrecision(precision);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedPrecision_(Integer precision) {
- Integer old = this.specifiedPrecision;
- this.specifiedPrecision = precision;
- this.firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, old, precision);
- }
-
- protected Integer buildSpecifiedPrecision() {
- XmlColumn xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getPrecision();
- }
-
- public int getDefaultPrecision() {
- return DEFAULT_PRECISION;
- }
-
-
- // ********** scale **********
-
- public int getScale() {
- return (this.specifiedScale != null) ? this.specifiedScale.intValue() : this.getDefaultScale();
- }
-
- public Integer getSpecifiedScale() {
- return this.specifiedScale;
- }
-
- public void setSpecifiedScale(Integer scale) {
- if (this.valuesAreDifferent(this.specifiedScale, scale)) {
- XmlColumn xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedScale_(scale);
- xmlColumn.setScale(scale);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedScale_(Integer scale) {
- Integer old = this.specifiedScale;
- this.specifiedScale = scale;
- this.firePropertyChanged(SPECIFIED_SCALE_PROPERTY, old, scale);
- }
-
- protected Integer buildSpecifiedScale() {
- XmlColumn xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getScale();
- }
-
- public int getDefaultScale() {
- return DEFAULT_SCALE;
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedLength(oldColumn.getSpecifiedLength());
- this.setSpecifiedPrecision(oldColumn.getSpecifiedPrecision());
- this.setSpecifiedScale(oldColumn.getSpecifiedScale());
- }
-
- public void initializeFromVirtual(ReadOnlyColumn virtualColumn) {
- super.initializeFromVirtual(virtualColumn);
- // ignore other settings?
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java
deleted file mode 100644
index 0424412001..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
-
-/**
- * <code>orm.xml</code> discriminator column
- */
-public class GenericOrmDiscriminatorColumn
- extends AbstractOrmNamedDiscriminatorColumn<XmlDiscriminatorColumn, OrmDiscriminatorColumn.Owner>
- implements OrmDiscriminatorColumn
-{
-
- public GenericOrmDiscriminatorColumn(XmlContextNode parent, OrmDiscriminatorColumn.Owner owner) {
- super(parent, owner);
- }
-
-
- // ********** XML column **********
-
- @Override
- public XmlDiscriminatorColumn getXmlColumn() {
- return this.owner.getXmlColumn();
- }
-
- @Override
- protected XmlDiscriminatorColumn buildXmlColumn() {
- return this.owner.buildXmlColumn();
- }
-
- @Override
- protected void removeXmlColumn() {
- this.owner.removeXmlColumn();
- }
-
- // ********** validation **********
-
- @Override
- public boolean isVirtual() {
- return this.getXmlColumn() == null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java
deleted file mode 100644
index 9ecf827277..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java
+++ /dev/null
@@ -1,31 +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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEmbeddable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-
-/**
- * <code>orm.xml</code> embeddable type mapping
- */
-public class GenericOrmEmbeddable
- extends AbstractOrmEmbeddable<XmlEmbeddable>
-{
- public GenericOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
- super(parent, resourceMapping);
- }
-
- @Override
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return ArrayTools.contains(GenericJavaEmbeddable.ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java
deleted file mode 100644
index ffa8df64d6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId;
-
-/**
- * <code>orm.xml</code> embedded ID mapping
- */
-public class GenericOrmEmbeddedIdMapping
- extends AbstractOrmEmbeddedIdMapping<XmlEmbeddedId>
-{
-
- public GenericOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java
deleted file mode 100644
index 3266c65927..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded;
-
-/**
- * <code>orm.xml</code> embedded mapping
- */
-public class GenericOrmEmbeddedMapping
- extends AbstractOrmEmbeddedMapping<XmlEmbedded>
-{
- public GenericOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEntity.java
deleted file mode 100644
index 839ccc846d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmEntity.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEntity;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.NullOrmCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.CacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0;
-
-public class GenericOrmEntity
- extends AbstractOrmEntity<XmlEntity>
-{
- // EclipseLink holds its cacheable in its caching
- protected final OrmCacheable2_0 cacheable;
-
-
- public GenericOrmEntity(OrmPersistentType parent, XmlEntity xmlEntity) {
- super(parent, xmlEntity);
- this.cacheable = this.buildCacheable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.cacheable.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.cacheable.update();
- }
-
-
- // ********** cacheable **********
-
- public OrmCacheable2_0 getCacheable() {
- return this.cacheable;
- }
-
- protected OrmCacheable2_0 buildCacheable() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmCacheable(this) :
- new NullOrmCacheable2_0(this);
- }
-
- public boolean calculateDefaultCacheable() {
- CacheableHolder2_0 javaEntity = (CacheableHolder2_0) this.getJavaTypeMappingForDefaults();
- if (javaEntity != null) {
- return javaEntity.getCacheable().isCacheable();
- }
-
- Cacheable2_0 parentCacheable = this.getParentCacheable();
- return (parentCacheable != null) ?
- parentCacheable.isCacheable() :
- ((PersistenceUnit2_0) this.getPersistenceUnit()).calculateDefaultCacheable();
- }
-
- protected Cacheable2_0 getParentCacheable() {
- CacheableHolder2_0 parentEntity = (CacheableHolder2_0) this.getParentEntity();
- return (parentEntity == null) ? null : parentEntity.getCacheable();
- }
-
- public XmlCacheable_2_0 getXmlCacheable() {
- return this.getXmlTypeMapping();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java
deleted file mode 100644
index 049ec7fcbb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.GenerationType;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratedValue;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> generated value
- */
-public class GenericOrmGeneratedValue
- extends AbstractOrmXmlContextNode
- implements OrmGeneratedValue
-{
- protected final XmlGeneratedValue xmlGeneratedValue;
-
- protected GenerationType specifiedStrategy;
- protected GenerationType defaultStrategy;
-
- protected String specifiedGenerator;
- protected String defaultGenerator;
-
-
- public GenericOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue xmlGeneratedValue) {
- super(parent);
- this.xmlGeneratedValue = xmlGeneratedValue;
- this.specifiedStrategy = this.buildSpecifiedStrategy();
- this.specifiedGenerator = xmlGeneratedValue.getGenerator();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedStrategy_(this.buildSpecifiedStrategy());
- this.setSpecifiedGenerator_(this.xmlGeneratedValue.getGenerator());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultStrategy(this.buildDefaultStrategy());
- this.setDefaultGenerator(this.buildDefaultGenerator());
- }
-
-
- // ********** strategy **********
-
- public GenerationType getStrategy() {
- return (this.specifiedStrategy != null) ? this.specifiedStrategy : this.defaultStrategy;
- }
-
- public GenerationType getSpecifiedStrategy() {
- return this.specifiedStrategy;
- }
-
- public void setSpecifiedStrategy(GenerationType strategy) {
- this.setSpecifiedStrategy_(strategy);
- this.xmlGeneratedValue.setStrategy(GenerationType.toOrmResourceModel(strategy));
- }
-
- protected void setSpecifiedStrategy_(GenerationType strategy) {
- GenerationType old = this.specifiedStrategy;
- this.specifiedStrategy = strategy;
- this.firePropertyChanged(SPECIFIED_STRATEGY_PROPERTY, old, strategy);
- }
-
- protected GenerationType buildSpecifiedStrategy() {
- return GenerationType.fromOrmResourceModel(this.xmlGeneratedValue.getStrategy());
- }
-
- public GenerationType getDefaultStrategy() {
- return this.defaultStrategy;
- }
-
- protected void setDefaultStrategy(GenerationType strategy) {
- GenerationType old = this.defaultStrategy;
- this.defaultStrategy = strategy;
- this.firePropertyChanged(DEFAULT_STRATEGY_PROPERTY, old, strategy);
- }
-
- // TODO
- protected GenerationType buildDefaultStrategy() {
- return DEFAULT_STRATEGY;
- }
-
-
- // ********** generator **********
-
- public String getGenerator() {
- return (this.specifiedGenerator != null) ? this.specifiedGenerator : this.defaultGenerator;
- }
-
- public String getSpecifiedGenerator() {
- return this.specifiedGenerator;
- }
-
- public void setSpecifiedGenerator(String generator) {
- this.setSpecifiedGenerator_(generator);
- this.xmlGeneratedValue.setGenerator(generator);
- }
-
- protected void setSpecifiedGenerator_(String generator) {
- String old = this.specifiedGenerator;
- this.specifiedGenerator = generator;
- this.firePropertyChanged(SPECIFIED_GENERATOR_PROPERTY, old, generator);
- }
-
- public String getDefaultGenerator() {
- return this.defaultGenerator;
- }
-
- protected void setDefaultGenerator(String generator) {
- String old = this.defaultGenerator;
- this.defaultGenerator = generator;
- this.firePropertyChanged(DEFAULT_GENERATOR_PROPERTY, old, generator);
- }
-
- // TODO
- protected String buildDefaultGenerator() {
- return null;
- }
-
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public XmlGeneratedValue getXmlGeneratedValue() {
- return this.xmlGeneratedValue;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- String generator = this.getGenerator();
- if (generator == null) {
- return;
- }
-
- for (Generator next : this.getPersistenceUnit().getGenerators()) {
- if (generator.equals(next.getName())) {
- return;
- }
- }
-
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ID_MAPPING_UNRESOLVED_GENERATOR_NAME,
- new String[] {generator},
- this.getParent(),
- this.getGeneratorTextRange()
- )
- );
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlGeneratedValue.getValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
- public TextRange getGeneratorTextRange() {
- return this.getValidationTextRange(this.xmlGeneratedValue.getGeneratorTextRange());
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.generatorTouches(pos)) {
- return this.getCandidateGeneratorNames();
- }
- return null;
- }
-
- protected boolean generatorTouches(int pos) {
- return this.xmlGeneratedValue.generatorTouches(pos);
- }
-
- protected Iterable<String> getCandidateGeneratorNames() {
- return this.getPersistenceUnit().getUniqueGeneratorNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java
deleted file mode 100644
index 0cf8af22e9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTableGenerator;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmGeneratorContainer
- extends AbstractOrmXmlContextNode
- implements OrmGeneratorContainer
-{
- protected final XmlGeneratorContainer xmlGeneratorContainer;
-
- protected OrmSequenceGenerator sequenceGenerator;
-
- protected OrmTableGenerator tableGenerator;
-
-
- public GenericOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer xmlGeneratorContainer) {
- super(parent);
- this.xmlGeneratorContainer = xmlGeneratorContainer;
- this.sequenceGenerator = this.buildSequenceGenerator();
- this.tableGenerator = this.buildTableGenerator();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSequenceGenerator();
- this.syncTableGenerator();
- }
-
- @Override
- public void update() {
- super.update();
- if (this.sequenceGenerator != null) {
- this.sequenceGenerator.update();
- }
- if (this.tableGenerator != null) {
- this.tableGenerator.update();
- }
- }
-
-
- // ********** sequence generator **********
-
- public OrmSequenceGenerator getSequenceGenerator() {
- return this.sequenceGenerator;
- }
-
- public OrmSequenceGenerator addSequenceGenerator() {
- if (this.sequenceGenerator != null) {
- throw new IllegalStateException("sequence generator already exists: " + this.sequenceGenerator); //$NON-NLS-1$
- }
- XmlSequenceGenerator xmlGenerator = this.buildXmlSequenceGenerator();
- OrmSequenceGenerator generator = this.buildSequenceGenerator(xmlGenerator);
- this.setSequenceGenerator_(generator);
- this.xmlGeneratorContainer.setSequenceGenerator(xmlGenerator);
- return generator;
- }
-
- protected XmlSequenceGenerator buildXmlSequenceGenerator() {
- return OrmFactory.eINSTANCE.createXmlSequenceGenerator();
- }
-
- public void removeSequenceGenerator() {
- if (this.sequenceGenerator == null) {
- throw new IllegalStateException("sequence generator does not exist"); //$NON-NLS-1$
- }
- this.setSequenceGenerator_(null);
- this.xmlGeneratorContainer.setSequenceGenerator(null);
- }
-
- protected OrmSequenceGenerator buildSequenceGenerator() {
- XmlSequenceGenerator xmlGenerator = this.getXmlSequenceGenerator();
- return (xmlGenerator == null) ? null : this.buildSequenceGenerator(xmlGenerator);
- }
-
- protected XmlSequenceGenerator getXmlSequenceGenerator() {
- return this.xmlGeneratorContainer.getSequenceGenerator();
- }
-
- protected OrmSequenceGenerator buildSequenceGenerator(XmlSequenceGenerator xmlSequenceGenerator) {
- return this.getContextNodeFactory().buildOrmSequenceGenerator(this, xmlSequenceGenerator);
- }
-
- protected void syncSequenceGenerator() {
- XmlSequenceGenerator xmlGenerator = this.getXmlSequenceGenerator();
- if (xmlGenerator == null) {
- if (this.sequenceGenerator != null) {
- this.setSequenceGenerator_(null);
- }
- } else {
- if ((this.sequenceGenerator != null) && (this.sequenceGenerator.getXmlGenerator() == xmlGenerator)) {
- this.sequenceGenerator.synchronizeWithResourceModel();
- } else {
- this.setSequenceGenerator_(this.buildSequenceGenerator(xmlGenerator));
- }
- }
- }
-
- protected void setSequenceGenerator_(OrmSequenceGenerator sequenceGenerator) {
- OrmSequenceGenerator old = this.sequenceGenerator;
- this.sequenceGenerator = sequenceGenerator;
- this.firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, old, sequenceGenerator);
- }
-
-
- // ********** table generator **********
-
- public OrmTableGenerator getTableGenerator() {
- return this.tableGenerator;
- }
-
- public OrmTableGenerator addTableGenerator() {
- if (this.tableGenerator != null) {
- throw new IllegalStateException("table generator already exists: " + this.tableGenerator); //$NON-NLS-1$
- }
- XmlTableGenerator xmlGenerator = this.buildXmlTableGenerator();
- OrmTableGenerator generator = this.buildTableGenerator(xmlGenerator);
- this.setTableGenerator_(generator);
- this.xmlGeneratorContainer.setTableGenerator(xmlGenerator);
- return generator;
- }
-
- protected XmlTableGenerator buildXmlTableGenerator() {
- return OrmFactory.eINSTANCE.createXmlTableGenerator();
- }
-
- public void removeTableGenerator() {
- if (this.tableGenerator == null) {
- throw new IllegalStateException("table generator does not exist"); //$NON-NLS-1$
- }
- this.setTableGenerator_(null);
- this.xmlGeneratorContainer.setTableGenerator(null);
- }
-
- protected OrmTableGenerator buildTableGenerator() {
- XmlTableGenerator xmlGenerator = this.getXmlTableGenerator();
- return (xmlGenerator == null) ? null : this.buildTableGenerator(xmlGenerator);
- }
-
- protected XmlTableGenerator getXmlTableGenerator() {
- return this.xmlGeneratorContainer.getTableGenerator();
- }
-
- protected OrmTableGenerator buildTableGenerator(XmlTableGenerator xmlTableGenerator) {
- return this.getContextNodeFactory().buildOrmTableGenerator(this, xmlTableGenerator);
- }
-
- protected void syncTableGenerator() {
- XmlTableGenerator xmlGenerator = this.getXmlTableGenerator();
- if (xmlGenerator == null) {
- if (this.tableGenerator != null) {
- this.setTableGenerator_(null);
- }
- } else {
- if ((this.tableGenerator != null) && (this.tableGenerator.getXmlGenerator() == xmlGenerator)) {
- this.tableGenerator.synchronizeWithResourceModel();
- } else {
- this.setTableGenerator_(this.buildTableGenerator(xmlGenerator));
- }
- }
- }
-
- protected void setTableGenerator_(OrmTableGenerator tableGenerator) {
- OrmTableGenerator old = this.tableGenerator;
- this.tableGenerator = tableGenerator;
- this.firePropertyChanged(TABLE_GENERATOR_PROPERTY, old, tableGenerator);
- }
-
-
- // ********** validation **********
-
- /**
- * The generators are validated in the persistence unit.
- * @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateGenerators(List, IReporter)
- */
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // generators are validated in the persistence unit
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlGeneratorContainer.getValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.tableGenerator != null) {
- result = this.tableGenerator.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- if (this.sequenceGenerator != null) {
- result = this.sequenceGenerator.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public Iterable<Generator> getGenerators() {
- return new FilteringIterable<Generator>(this.getGenerators_(), NotNullFilter.<Generator>instance());
- }
-
- protected Iterable<Generator> getGenerators_() {
- return new ArrayIterable<Generator>(this.sequenceGenerator, this.tableGenerator);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmIdMapping.java
deleted file mode 100644
index 958b87ddf5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmIdMapping.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmIdMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlId;
-
-/**
- * <code>orm.xml</code> ID mapping
- */
-public class GenericOrmIdMapping
- extends AbstractOrmIdMapping<XmlId>
-{
- public GenericOrmIdMapping(OrmPersistentAttribute parent, XmlId xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
deleted file mode 100644
index 82c9b8b39a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * <code>orm.xml</code> join column
- */
-public class GenericOrmJoinColumn
- extends AbstractOrmBaseColumn<XmlJoinColumn, OrmReadOnlyJoinColumn.Owner>
- implements OrmJoinColumn
-{
- /** @see org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn#AbstractOrmNamedColumn(XmlContextNode, org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn) */
- protected /* final */ XmlJoinColumn xmlColumn; // null for default join columns
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner) {
- this(parent, owner, null);
- }
-
- public GenericOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn xmlColumn) {
- super(parent, owner, xmlColumn);
- this.specifiedReferencedColumnName = this.buildSpecifiedReferencedColumnName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedReferencedColumnName_(this.buildSpecifiedReferencedColumnName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** XML column **********
-
- @Override
- public XmlJoinColumn getXmlColumn() {
- return this.xmlColumn;
- }
-
- @Override
- protected void setXmlColumn(XmlJoinColumn xmlColumn) {
- this.xmlColumn = xmlColumn;
- }
-
- /**
- * join columns are part of a collection;
- * the 'join-column' element will be removed/added
- * when the XML join column is removed from/added to
- * the owner's collection
- */
- @Override
- protected XmlJoinColumn buildXmlColumn() {
- throw new IllegalStateException("XML join column is missing"); //$NON-NLS-1$
- }
-
- /**
- * @see #buildXmlColumn()
- */
- @Override
- protected void removeXmlColumn() {
- // do nothing
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- public void setSpecifiedReferencedColumnName(String name) {
- this.setSpecifiedReferencedColumnName_(name);
- this.getXmlColumn().setReferencedColumnName(name);
- }
-
- protected void setSpecifiedReferencedColumnName_(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- XmlJoinColumn joinColumn = this.getXmlColumn();
- return (joinColumn == null) ? null : joinColumn.getReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultReferencedColumnName() {
- return MappingTools.buildJoinColumnDefaultReferencedColumnName(this.owner);
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyJoinColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedReferencedColumnName(oldColumn.getSpecifiedReferencedColumnName());
- }
-
- public void initializeFromVirtual(ReadOnlyJoinColumn virtualColumn) {
- super.initializeFromVirtual(virtualColumn);
- this.setSpecifiedReferencedColumnName(virtualColumn.getReferencedColumnName());
- }
-
-
- // ********** validation **********
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.getValidationTextRange(this.xmlColumn.getReferencedColumnNameTextRange());
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmJoinColumnTextRangeResolver(this);
- }
-
- // ********** completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.referencedColumnNameTouches(pos)) {
- return this.getCandidateReferencedColumnNames();
- }
- return null;
- }
-
- protected boolean referencedColumnNameTouches(int pos) {
- XmlJoinColumn joinColumn = this.getXmlColumn();
- return (joinColumn != null) && (joinColumn.referencedColumnNameTouches(pos));
- }
-
- protected Iterable<String> getCandidateReferencedColumnNames() {
- Table table = this.owner.getReferencedColumnDbTable();
- return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
deleted file mode 100644
index 6a69301767..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> join table
- */
-public class GenericOrmJoinTable
- extends GenericOrmReferenceTable<XmlJoinTable>
- implements OrmJoinTable
-{
- protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedInverseJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
-
- protected OrmJoinColumn defaultInverseJoinColumn;
-
-
- public GenericOrmJoinTable(OrmJoinTableRelationshipStrategy parent, Owner owner) {
- super(parent, owner);
- this.inverseJoinColumnOwner = this.buildInverseJoinColumnOwner();
- this.specifiedInverseJoinColumnContainer = this.buildSpecifiedInverseJoinColumnContainer();
- }
-
- @Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedInverseJoinColumns();
- if (this.defaultInverseJoinColumn != null) {
- this.defaultInverseJoinColumn.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedInverseJoinColumns());
- this.updateDefaultInverseJoinColumn();
- }
-
-
- // ********** XML table **********
-
- @Override
- protected XmlJoinTable getXmlTable() {
- return this.getRelationshipStrategy().getXmlJoinTable();
- }
-
- @Override
- protected XmlJoinTable buildXmlTable() {
- return this.getRelationshipStrategy().buildXmlJoinTable();
- }
-
- @Override
- protected void removeXmlTable() {
- this.getRelationshipStrategy().removeXmlJoinTable();
- }
-
-
- // ********** inverse join columns **********
-
- public ListIterable<OrmJoinColumn> getInverseJoinColumns() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumns() : this.getDefaultInverseJoinColumns();
- }
-
- public int getInverseJoinColumnsSize() {
- return this.hasSpecifiedInverseJoinColumns() ? this.getSpecifiedInverseJoinColumnsSize() : this.getDefaultInverseJoinColumnsSize();
- }
-
- public void convertDefaultInverseJoinColumnToSpecified() {
- MappingTools.convertJoinTableDefaultToSpecifiedInverseJoinColumn(this);
- }
-
-
- // ********** specified inverse join columns **********
-
- public ListIterable<OrmJoinColumn> getSpecifiedInverseJoinColumns() {
- return this.specifiedInverseJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedInverseJoinColumnsSize() {
- return this.specifiedInverseJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedInverseJoinColumns() {
- return this.getSpecifiedInverseJoinColumnsSize() != 0;
- }
-
- public OrmJoinColumn getSpecifiedInverseJoinColumn(int index) {
- return this.specifiedInverseJoinColumnContainer.getContextElement(index);
- }
-
- public OrmJoinColumn addSpecifiedInverseJoinColumn() {
- return this.addSpecifiedInverseJoinColumn(this.getSpecifiedInverseJoinColumnsSize());
- }
-
- public OrmJoinColumn addSpecifiedInverseJoinColumn(int index) {
- XmlJoinTable xmlTable = this.getXmlTableForUpdate();
- XmlJoinColumn xmlJoinColumn = this.buildXmlJoinColumn();
- OrmJoinColumn joinColumn = this.specifiedInverseJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- xmlTable.getInverseJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- public void removeSpecifiedInverseJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumnContainer.indexOfContextElement((OrmJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedInverseJoinColumn(int index) {
- this.specifiedInverseJoinColumnContainer.removeContextElement(index);
- this.getXmlTable().getInverseJoinColumns().remove(index);
- this.removeXmlTableIfUnset();
- }
-
- public void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedInverseJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlTable().getInverseJoinColumns().move(targetIndex, sourceIndex);
- }
-
- public void clearSpecifiedInverseJoinColumns() {
- this.specifiedInverseJoinColumnContainer.clearContextList();
- this.getXmlTable().getInverseJoinColumns().clear();
- }
-
- protected void syncSpecifiedInverseJoinColumns() {
- this.specifiedInverseJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJoinColumn> getXmlInverseJoinColumns() {
- XmlJoinTable xmlTable = this.getXmlTable();
- return (xmlTable == null) ?
- EmptyListIterable.<XmlJoinColumn>instance() :
- // clone to reduce chance of concurrency problems
- new LiveCloneListIterable<XmlJoinColumn>(xmlTable.getInverseJoinColumns());
- }
-
- protected ContextListContainer<OrmJoinColumn, XmlJoinColumn> buildSpecifiedInverseJoinColumnContainer() {
- SpecifiedInverseJoinColumnContainer container = new SpecifiedInverseJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified inverse join column container
- */
- protected class SpecifiedInverseJoinColumnContainer
- extends ContextListContainer<OrmJoinColumn, XmlJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_INVERSE_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmJoinColumn buildContextElement(XmlJoinColumn resourceElement) {
- return GenericOrmJoinTable.this.buildInverseJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlJoinColumn> getResourceElements() {
- return GenericOrmJoinTable.this.getXmlInverseJoinColumns();
- }
- @Override
- protected XmlJoinColumn getResourceElement(OrmJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected OrmReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
- return new InverseJoinColumnOwner();
- }
-
-
- // ********** default inverse join column **********
-
- public OrmJoinColumn getDefaultInverseJoinColumn() {
- return this.defaultInverseJoinColumn;
- }
-
- protected void setDefaultInverseJoinColumn(OrmJoinColumn joinColumn) {
- OrmJoinColumn old = this.defaultInverseJoinColumn;
- this.defaultInverseJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, old, joinColumn);
- }
-
- protected ListIterable<OrmJoinColumn> getDefaultInverseJoinColumns() {
- return (this.defaultInverseJoinColumn != null) ?
- new SingleElementListIterable<OrmJoinColumn>(this.defaultInverseJoinColumn) :
- EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- protected int getDefaultInverseJoinColumnsSize() {
- return (this.defaultInverseJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultInverseJoinColumn() {
- if (this.buildsDefaultInverseJoinColumn()) {
- if (this.defaultInverseJoinColumn == null) {
- this.setDefaultInverseJoinColumn(this.buildInverseJoinColumn(null));
- } else {
- this.defaultInverseJoinColumn.update();
- }
- } else {
- this.setDefaultInverseJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultInverseJoinColumn() {
- return ! this.hasSpecifiedInverseJoinColumns();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmJoinTableRelationshipStrategy getParent() {
- return (OrmJoinTableRelationshipStrategy) super.getParent();
- }
-
- protected OrmJoinTableRelationshipStrategy getRelationshipStrategy() {
- return this.getParent();
- }
-
- @Override
- protected String buildDefaultName() {
- return this.getRelationshipStrategy().getJoinTableDefaultName();
- }
-
- public void initializeFrom(ReadOnlyJoinTable oldTable) {
- super.initializeFrom(oldTable);
- for (ReadOnlyJoinColumn joinColumn : oldTable.getSpecifiedInverseJoinColumns()) {
- this.addSpecifiedInverseJoinColumn().initializeFrom(joinColumn);
- }
- }
-
- public void initializeFromVirtual(ReadOnlyJoinTable virtualTable) {
- super.initializeFromVirtual(virtualTable);
- for (ReadOnlyJoinColumn joinColumn : virtualTable.getInverseJoinColumns()) {
- this.addSpecifiedInverseJoinColumn().initializeFromVirtual(joinColumn);
- }
- }
-
- protected OrmJoinColumn buildInverseJoinColumn(XmlJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmJoinColumn(this, this.inverseJoinColumnOwner, xmlJoinColumn);
- }
-
- public RelationshipMapping getRelationshipMapping() {
- return this.getRelationshipStrategy().getRelationship().getMapping();
- }
-
- public PersistentAttribute getPersistentAttribute() {
- return this.getRelationshipMapping().getPersistentAttribute();
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
- super.validateJoinColumns(messages, reporter);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter);
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationshipStrategy().validatesAgainstDatabase();
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmJoinColumn column : this.getInverseJoinColumns()) {
- result = column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** join column owners **********
-
- /**
- * just a little common behavior
- */
- protected abstract class AbstractJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected AbstractJoinColumnOwner() {
- super();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. The table is always the join table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- /**
- * the join column can only be on the join table itself
- */
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return Tools.valuesAreEqual(GenericOrmJoinTable.this.getName(), tableName) ?
- GenericOrmJoinTable.this.getDbTable() :
- null;
- }
-
- /**
- * by default, the join column is, obviously, in the join table;
- * not sure whether it can be anywhere else...
- */
- public String getDefaultTableName() {
- return GenericOrmJoinTable.this.getName();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmJoinTable.this.getValidationTextRange();
- }
-
- protected OrmRelationship getRelationship() {
- return this.getRelationshipStrategy().getRelationship();
- }
-
- protected OrmJoinTableRelationshipStrategy getRelationshipStrategy() {
- return GenericOrmJoinTable.this.getRelationshipStrategy();
- }
- }
-
-
- /**
- * owner for "back-pointer" join columns;
- * these point at the source/owning entity
- */
- protected class JoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- return this.getRelationship().getEntity();
- }
-
- public String getAttributeName() {
- return MappingTools.getTargetAttributeName(GenericOrmJoinTable.this.getRelationshipMapping());
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- org.eclipse.jpt.jpa.db.Table dbTable = super.resolveDbTable(tableName);
- return (dbTable != null) ? dbTable : this.getTypeMapping().resolveDbTable(tableName);
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return this.getTypeMapping().getPrimaryDbTable();
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getRelationship().getTypeMapping();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmJoinTable.this.getJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-
-
- /**
- * owner for "forward-pointer" join columns;
- * these point at the target/inverse entity
- */
- protected class InverseJoinColumnOwner
- extends AbstractJoinColumnOwner
- {
- protected InverseJoinColumnOwner() {
- super();
- }
-
- public Entity getRelationshipTarget() {
- RelationshipMapping relationshipMapping = GenericOrmJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getResolvedTargetEntity();
- }
-
- public String getAttributeName() {
- RelationshipMapping relationshipMapping = GenericOrmJoinTable.this.getRelationshipMapping();
- return (relationshipMapping == null) ? null : relationshipMapping.getName();
- }
-
- @Override
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- org.eclipse.jpt.jpa.db.Table dbTable = super.resolveDbTable(tableName);
- if (dbTable != null) {
- return dbTable;
- }
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.resolveDbTable(tableName);
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- Entity relationshipTarget = this.getRelationshipTarget();
- return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmJoinTable.this.getInverseJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmLobConverter.java
deleted file mode 100644
index 411ec159ef..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmLobConverter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.LobConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmLobConverter;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
-
-public class GenericOrmLobConverter
- extends AbstractOrmConverter
- implements OrmLobConverter
-{
- public GenericOrmLobConverter(OrmAttributeMapping parent, OrmConverter.Owner owner) {
- super(parent, owner);
- }
-
- protected XmlConvertibleMapping getXmlConvertibleMapping() {
- return (XmlConvertibleMapping) this.getXmlAttributeMapping();
- }
-
-
- // ********** misc **********
-
- public Class<? extends Converter> getType() {
- return LobConverter.class;
- }
-
- public void initialize() {
- this.getXmlConvertibleMapping().setLob(true);
- }
-
-
- // ********** validation **********
-
- @Override
- protected TextRange getXmlValidationTextRange() {
- return this.getXmlConvertibleMapping().getLobTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java
deleted file mode 100644
index 6a002b3d2e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmManyToManyMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany;
-
-public class GenericOrmManyToManyMapping
- extends AbstractOrmManyToManyMapping<XmlManyToMany>
-{
- public GenericOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java
deleted file mode 100644
index 740c4e01e3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmManyToOneMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne;
-
-public class GenericOrmManyToOneMapping
- extends AbstractOrmManyToOneMapping<XmlManyToOne>
-{
- public GenericOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java
deleted file mode 100644
index 45014549d5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass;
-
-/**
- * <code>orm.xml</code> mapped superclass
- */
-public class GenericOrmMappedSuperclass
- extends AbstractOrmMappedSuperclass<XmlMappedSuperclass>
-{
- public GenericOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping) {
- super(parent, resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java
deleted file mode 100644
index 6c0ebef097..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmQuery;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> named native query
- */
-public class GenericOrmNamedNativeQuery
- extends AbstractOrmQuery<XmlNamedNativeQuery>
- implements OrmNamedNativeQuery
-{
- protected String resultClass;
- protected String fullyQualifiedResultClass;
-
- protected String resultSetMapping;
-
-
- public GenericOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery xmlNamedNativeQuery) {
- super(parent, xmlNamedNativeQuery);
- this.resultClass = xmlNamedNativeQuery.getResultClass();
- this.resultSetMapping = xmlNamedNativeQuery.getResultSetMapping();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setResultClass_(this.xmlQuery.getResultClass());
- this.setResultSetMapping_(this.xmlQuery.getResultSetMapping());
- }
- @Override
- public void update() {
- super.update();
- this.setFullyQualifiedResultClass(this.buildFullyQualifiedResultClass());
- }
-
-
- // ********** result class **********
-
- public String getResultClass() {
- return this.resultClass;
- }
-
- public void setResultClass(String resultClass) {
- this.setResultClass_(resultClass);
- this.xmlQuery.setResultClass(resultClass);
- }
-
- protected void setResultClass_(String resultClass) {
- String old = this.resultClass;
- this.resultClass = resultClass;
- this.firePropertyChanged(RESULT_CLASS_PROPERTY, old, resultClass);
- }
-
- public String getFullyQualifiedResultClass() {
- return this.fullyQualifiedResultClass;
- }
-
- protected void setFullyQualifiedResultClass(String resultClass) {
- String old = this.fullyQualifiedResultClass;
- this.fullyQualifiedResultClass = resultClass;
- this.firePropertyChanged(FULLY_QUALIFIED_RESULT_CLASS_PROPERTY, old, resultClass);
- }
-
- protected String buildFullyQualifiedResultClass() {
- return this.getMappingFileRoot().getFullyQualifiedName(this.resultClass);
- }
-
- public char getResultClassEnclosingTypeSeparator() {
- return '$';
- }
-
-
- // ********** result set mapping **********
-
- public String getResultSetMapping() {
- return this.resultSetMapping;
- }
-
- public void setResultSetMapping(String resultSetMapping) {
- this.setResultSetMapping_(resultSetMapping);
- this.xmlQuery.setResultSetMapping(resultSetMapping);
- }
-
- protected void setResultSetMapping_(String resultSetMapping) {
- String old = this.resultSetMapping;
- this.resultSetMapping = resultSetMapping;
- this.firePropertyChanged(RESULT_SET_MAPPING_PROPERTY, old, resultSetMapping);
- }
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaNamedNativeQuery javaQuery) {
- super.convertFrom(javaQuery);
- this.setResultClass(javaQuery.getResultClass());
- this.setResultSetMapping(javaQuery.getResultSetMapping());
- }
-
- // ********** validation **********
-
- @Override
- protected void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- // nothing yet
- }
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((NamedNativeQuery) node);
- }
-
- protected boolean isEquivalentTo(NamedNativeQuery nnQuery) {
- return Tools.valuesAreEqual(this.resultClass, nnQuery.getResultClass()) &&
- Tools.valuesAreEqual(this.resultSetMapping, nnQuery.getResultSetMapping());
- }
-
- // ********** misc **********
-
- public Class<NamedNativeQuery> getType() {
- return NamedNativeQuery.class;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java
deleted file mode 100644
index 2447464860..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedQuery;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmQuery;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-import org.eclipse.persistence.jpa.jpql.ExpressionTools;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> named query
- */
-public class GenericOrmNamedQuery
- extends AbstractOrmQuery<XmlNamedQuery>
- implements OrmNamedQuery
-{
- public GenericOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
- super(parent, resourceNamedQuery);
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
-
- // Convert the literal escape characters into actual escape characters
- String jpqlQuery = ExpressionTools.unescape(this.query, new int[1]);
-
- queryHelper.validate(this, jpqlQuery, this.getQueryTextRange(), 0, messages);
- }
-
- // ********** misc **********
-
- public Class<NamedQuery> getType() {
- return NamedQuery.class;
- }
-
- public void convertFrom(JavaNamedQuery javaQuery) {
- super.convertFrom(javaQuery);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java
deleted file mode 100644
index 374f84e338..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping;
-
-/**
- * <code>orm.xml</code> null attribute mapping
- */
-public class GenericOrmNullAttributeMapping
- extends AbstractOrmAttributeMapping<XmlNullAttributeMapping>
-{
- public GenericOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping xmlMapping) {
- super(parent, xmlMapping);
- }
-
- public String getKey() {
- return null;
- }
-
- public int getXmlSequence() {
- return -1;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmAttributeMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- throw new UnsupportedOperationException();
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- throw new UnsupportedOperationException();
- }
-
- // ********** metamodel **********
-
- @Override
- public MetamodelField getMetamodelField() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java
deleted file mode 100644
index 4fdad7ce7b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmOneToManyMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
-
-public class GenericOrmOneToManyMapping
- extends AbstractOrmOneToManyMapping<XmlOneToMany>
-{
- public GenericOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java
deleted file mode 100644
index e89cef7e89..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmOneToOneMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne;
-
-/**
- * <code>orm.xml</code> 1:1 mapping
- */
-public class GenericOrmOneToOneMapping
- extends AbstractOrmOneToOneMapping<XmlOneToOne>
-{
- public GenericOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java
deleted file mode 100644
index 9f1dc107fe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.OrderColumnValidator;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderable2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> ordering
- * <p>
- * <strong>NB:</strong> Setting any flag to <code>false</code> (or setting the
- * specified "order by" to <code>null</code>) can be a bit unpredictable. The
- * intent is to set a flag to <code>true</code> (or set the specified "order by"
- * to a non-<code>null</code> value).
- * <p>
- * <strong>(JPA 2.0 only) NB:</strong> If both the "order-by" and the
- * "order-column" elements are present (which is prohibited by the JPA spec),
- * both are ignored.
- */
-public class GenericOrmOrderable
- extends AbstractOrmXmlContextNode
- implements OrmOrderable2_0
-{
- protected String specifiedOrderBy;
- protected boolean noOrdering = false;
- protected boolean pkOrdering = false;
- protected boolean customOrdering = false;
-
- // JPA 2.0
- protected final Owner owner; // this is null for JPA 1.0 mappings
- protected boolean orderColumnOrdering = false;
- protected final OrmOrderColumn2_0 orderColumn; // this is null for JPA 1.0 mappings
-
-
- /**
- * JPA 1.0
- */
- public GenericOrmOrderable(OrmAttributeMapping parent) {
- this(parent, null);
- }
-
- /**
- * JPA 2.0
- */
- public GenericOrmOrderable(OrmAttributeMapping parent, Owner owner) {
- super(parent);
-
- this.specifiedOrderBy = this.buildSpecifiedOrderBy();
- this.noOrdering = this.buildNoOrdering();
- this.pkOrdering = this.buildPkOrdering();
- this.customOrdering = this.buildCustomOrdering();
-
- this.owner = owner;
- this.orderColumnOrdering = this.buildOrderColumnOrdering();
- this.orderColumn = this.buildOrderColumn();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
-
- this.setSpecifiedOrderBy_(this.buildSpecifiedOrderBy());
- this.setNoOrdering_(this.buildNoOrdering());
- this.setPkOrdering_(this.buildPkOrdering());
- this.setCustomOrdering_(this.buildCustomOrdering());
-
- this.setOrderColumnOrdering_(this.buildOrderColumnOrdering());
- if (this.orderColumn != null) {
- this.orderColumn.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- if (this.orderColumn != null) {
- this.orderColumn.update();
- }
- }
-
-
- // ********** specified order by **********
-
- public String getSpecifiedOrderBy() {
- return this.specifiedOrderBy;
- }
-
- public void setSpecifiedOrderBy(String orderBy) {
- if (orderBy != null) {
- this.setSpecifiedOrderBy_(orderBy);
- this.setNoOrdering_(false);
- this.setPkOrdering_(orderBy.length() == 0);
- this.setCustomOrdering_(orderBy.length() != 0);
- this.setOrderColumnOrdering_(false);
-
- this.removeXmlOrderColumn();
- this.getXmlOrderable().setOrderBy(orderBy);
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setSpecifiedOrderBy_(String orderBy) {
- String old = this.specifiedOrderBy;
- this.specifiedOrderBy = orderBy;
- this.firePropertyChanged(SPECIFIED_ORDER_BY_PROPERTY, old, orderBy);
- }
-
- protected String buildSpecifiedOrderBy() {
- if (this.xmlOrderColumnIsPresent()) {
- return null;
- }
- return this.getXmlOrderBy();
- }
-
-
- // ********** no ordering **********
-
- public boolean isNoOrdering() {
- return this.noOrdering;
- }
-
- public void setNoOrdering(boolean noOrdering) {
- if (noOrdering) {
- this.setSpecifiedOrderBy_(null);
- this.setNoOrdering_(true);
- this.setPkOrdering_(false);
- this.setCustomOrdering_(false);
- this.setOrderColumnOrdering_(false);
-
- this.removeXmlOrderColumn();
- this.getXmlOrderable().setOrderBy(null);
- } else {
- this.setPkOrdering(true); // hmmm...
- }
- }
-
- protected void setNoOrdering_(boolean noOrdering) {
- boolean old = this.noOrdering;
- this.noOrdering = noOrdering;
- this.firePropertyChanged(NO_ORDERING_PROPERTY, old, noOrdering);
- }
-
- protected boolean buildNoOrdering() {
- return this.isJpa2_0Compatible() ? this.buildNoOrdering2_0() : this.buildNoOrdering1_0();
- }
-
- /**
- * both elements are missing <em>or</em> both are present
- */
- protected boolean buildNoOrdering2_0() {
- boolean orderByMissing = (this.getXmlOrderBy() == null);
- boolean orderByPresent = ! orderByMissing;
- boolean orderColumnMissing = (this.getXmlOrderColumn() == null);
- boolean orderColumnPresent = ! orderColumnMissing;
- return (orderByMissing && orderColumnMissing) || (orderByPresent && orderColumnPresent);
- }
-
- /**
- * the order-by element is missing
- */
- protected boolean buildNoOrdering1_0() {
- return this.getXmlOrderBy() == null;
- }
-
-
- // ********** pk ordering **********
-
- public boolean isPkOrdering() {
- return this.pkOrdering;
- }
-
- public void setPkOrdering(boolean pkOrdering) {
- if (pkOrdering) {
- this.setSpecifiedOrderBy(""); //$NON-NLS-1$
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setPkOrdering_(boolean pkOrdering) {
- boolean old = this.pkOrdering;
- this.pkOrdering = pkOrdering;
- this.firePropertyChanged(PK_ORDERING_PROPERTY, old, pkOrdering);
- }
-
- /**
- * the order-by element is present but no value specified
- */
- protected boolean buildPkOrdering() {
- if (this.xmlOrderColumnIsPresent()) {
- return false;
- }
- String xmlOrderBy = this.getXmlOrderBy();
- return (xmlOrderBy != null) && (xmlOrderBy.length() == 0);
- }
-
-
- // ********** custom ordering **********
-
- public boolean isCustomOrdering() {
- return this.customOrdering;
- }
-
- /**
- * Unfortunately, setting the "custom ordering" flag directly is a bit hacky:
- * The "specified order-by" is initially set to an empty string, which is
- * the same as a "primary key ordering" state....
- */
- public void setCustomOrdering(boolean customOrdering) {
- if (customOrdering) {
- this.setSpecifiedOrderBy_(""); // hmmm... //$NON-NLS-1$
- this.setNoOrdering_(false);
- this.setPkOrdering_(false);
- this.setCustomOrdering_(true);
- this.setOrderColumnOrdering_(false);
-
- this.removeXmlOrderColumn();
- this.getXmlOrderable().setOrderBy(""); //$NON-NLS-1$
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setCustomOrdering_(boolean customOrdering) {
- boolean old = this.customOrdering;
- this.customOrdering = customOrdering;
- this.firePropertyChanged(CUSTOM_ORDERING_PROPERTY, old, customOrdering);
- }
-
- /**
- * the order-by element is present and it has a specified value
- */
- protected boolean buildCustomOrdering() {
- if (this.xmlOrderColumnIsPresent()) {
- return false;
- }
- String xmlOrderBy = this.getXmlOrderBy();
- return (xmlOrderBy != null) && (xmlOrderBy.length() != 0);
- }
-
-
- // ********** order column ordering **********
-
- public boolean isOrderColumnOrdering() {
- return this.orderColumnOrdering;
- }
-
- public void setOrderColumnOrdering(boolean orderColumnOrdering) {
- if (orderColumnOrdering) {
- this.setSpecifiedOrderBy_(null);
- this.setNoOrdering_(false);
- this.setPkOrdering_(false);
- this.setCustomOrdering_(false);
- this.setOrderColumnOrdering_(true);
-
- this.getXmlOrderable().setOrderBy(null);
- this.buildXmlOrderColumn();
- } else {
- this.setNoOrdering(true); // hmmm...
- }
- }
-
- protected void setOrderColumnOrdering_(boolean orderColumnOrdering) {
- boolean old = this.orderColumnOrdering;
- this.orderColumnOrdering = orderColumnOrdering;
- this.firePropertyChanged(ORDER_COLUMN_ORDERING_PROPERTY, old, orderColumnOrdering);
- }
-
- /**
- * JPA 2.0 only;
- * the <code>order-column</code> element is present <em>and</em>
- * the <code>order-by</code> element is missing
- */
- protected boolean buildOrderColumnOrdering() {
- return this.xmlOrderColumnIsPresent() &&
- (this.getXmlOrderBy() == null);
- }
-
-
- // ********** order column **********
-
- public OrmOrderColumn2_0 getOrderColumn() {
- return this.orderColumn;
- }
-
- /**
- * JPA 2.0 only
- */
- protected OrmOrderColumn2_0 buildOrderColumn() {
- return this.isOrmXml2_0Compatible() ?
- this.getContextNodeFactory2_0().buildOrmOrderColumn(this, new OrderColumnOwner()) :
- null;
- }
-
-
- // ********** xml order by **********
-
- protected String getXmlOrderBy() {
- return this.getXmlOrderable().getOrderBy();
- }
-
-
- // ********** xml order column **********
-
- protected XmlOrderColumn getXmlOrderColumn() {
- return this.getXmlOrderable().getOrderColumn();
- }
-
- /**
- * NB: Only return <code>true</code> for JPA 2.0 mappings.
- */
- protected boolean xmlOrderColumnIsPresent() {
- return this.isJpa2_0Compatible() && (this.getXmlOrderColumn() != null);
- }
-
- protected XmlOrderColumn buildXmlOrderColumn() {
- XmlOrderColumn xmlColumn = OrmFactory.eINSTANCE.createXmlOrderColumn();
- GenericOrmOrderable.this.getXmlOrderable().setOrderColumn(xmlColumn);
- return xmlColumn;
- }
-
- protected void removeXmlOrderColumn() {
- if (this.xmlOrderColumnIsPresent()) {
- this.getXmlOrderable().setOrderColumn(null);
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmAttributeMapping getParent() {
- return (OrmAttributeMapping) super.getParent();
- }
-
- protected OrmAttributeMapping getAttributeMapping() {
- return this.getParent();
- }
-
- protected OrmPersistentAttribute getPersistentAttribute() {
- return this.getAttributeMapping().getPersistentAttribute();
- }
-
- protected XmlOrderable getXmlOrderable() {
- return (XmlOrderable) this.getAttributeMapping().getXmlAttributeMapping();
- }
-
- // JPA 2.0
- public String getDefaultTableName() {
- return this.owner.getTableName();
- }
-
- // JPA 2.0
- protected Table resolveDbTable(String tableName) {
- return this.owner.resolveDbTable(tableName);
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlOrderable().getValidationTextRange();
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // order-column and order-by both specified is handled with schema validation
- if (this.orderColumnOrdering) {
- // TODO validation message if type is not List
- this.orderColumn.validate(messages, reporter);
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.orderColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** order column owner (JPA 2.0) **********
-
- protected class OrderColumnOwner
- implements OrmOrderColumn2_0.Owner
- {
- public String getDefaultTableName() {
- return GenericOrmOrderable.this.getDefaultTableName();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericOrmOrderable.this.resolveDbTable(tableName);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getPersistentAttribute().getName() + "_ORDER"; //$NON-NLS-1$
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmOrderable.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OrderColumnValidator(this.getPersistentAttribute(), (OrderColumn2_0) column, textRangeResolver);
- }
-
- public XmlOrderColumn getXmlColumn() {
- return GenericOrmOrderable.this.getXmlOrderColumn();
- }
-
- public XmlOrderColumn buildXmlColumn() {
- return GenericOrmOrderable.this.buildXmlOrderColumn();
- }
-
- public void removeXmlColumn() {
- GenericOrmOrderable.this.removeXmlOrderColumn();
- }
-
- protected OrmPersistentAttribute getPersistentAttribute() {
- return GenericOrmOrderable.this.getPersistentAttribute();
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java
deleted file mode 100644
index 0f010df5af..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmOverrideJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.orm.NullOrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.GenericOrmOverrideJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverride2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmOverrideRelationship
- extends AbstractOrmXmlContextNode
- implements OrmOverrideRelationship2_0
-{
- protected OrmRelationshipStrategy strategy;
-
- protected final OrmJoinColumnRelationshipStrategy joinColumnStrategy;
-
- // JPA 2.0
- protected final OrmJoinTableRelationshipStrategy joinTableStrategy;
-
-
- public GenericOrmOverrideRelationship(OrmAssociationOverride parent) {
- super(parent);
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.joinColumnStrategy.synchronizeWithResourceModel();
- this.joinTableStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.setStrategy(this.buildStrategy());
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- public OrmRelationshipStrategy getStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(OrmRelationshipStrategy strategy) {
- OrmRelationshipStrategy old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- protected OrmRelationshipStrategy buildStrategy() {
- return this.isJpa2_0Compatible() ?
- this.buildStrategy2_0() :
- this.joinColumnStrategy;
- }
-
- /**
- * The overridden mapping determines the override's strategy.
- */
- protected OrmRelationshipStrategy buildStrategy2_0() {
- MappingRelationshipStrategy2_0 mappingStrategy = this.getMappingStrategy();
- return (mappingStrategy != null) ?
- (OrmRelationshipStrategy) mappingStrategy.selectOverrideStrategy(this) :
- this.buildMissingMappingStrategy();
- }
-
- /**
- * Get the strategy from the overridden mapping.
- */
- protected MappingRelationshipStrategy2_0 getMappingStrategy() {
- RelationshipMapping mapping = this.getMapping();
- return (mapping == null) ? null : (MappingRelationshipStrategy2_0) mapping.getRelationship().getStrategy();
- }
-
- /**
- * Return the strategy to use when the override's name does not match the
- * name of an appropriate relationship mapping.
- */
- protected OrmRelationshipStrategy buildMissingMappingStrategy() {
- return this.joinColumnStrategy.hasSpecifiedJoinColumns() ?
- this.joinColumnStrategy :
- this.joinTableStrategy;
- }
-
-
- // ********** join column strategy **********
-
- public OrmJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public void setStrategyToJoinColumn() {
- this.joinColumnStrategy.addStrategy();
- this.joinTableStrategy.removeStrategy();
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- // association overrides do not have defaults
- return false;
- }
-
- protected OrmJoinColumnRelationshipStrategy buildJoinColumnStrategy() {
- return new GenericOrmOverrideJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public OrmJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public void setStrategyToJoinTable() {
- this.joinTableStrategy.addStrategy();
- this.joinColumnStrategy.removeStrategy();
- }
-
- public boolean mayHaveDefaultJoinTable() {
- // association overrides do not have defaults
- return false;
- }
-
- protected OrmJoinTableRelationshipStrategy buildJoinTableStrategy() {
- return this.isJpa2_0Compatible() ?
- new GenericOrmOverrideJoinTableRelationshipStrategy2_0(this) :
- new NullOrmJoinTableRelationshipStrategy(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeFrom(ReadOnlyRelationship oldRelationship) {
- oldRelationship.initializeOn(this);
- }
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- }
-
- public void initializeFromMappedByRelationship(MappedByRelationship oldRelationship) {
- // NOP
- }
-
- public void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship) {
- this.joinTableStrategy.initializeFrom(oldRelationship.getJoinTableStrategy());
- }
-
- public void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship) {
- this.joinColumnStrategy.initializeFrom(oldRelationship.getJoinColumnStrategy());
- }
-
- public void initializeFromVirtual(ReadOnlyOverrideRelationship virtualRelationship) {
- virtualRelationship.initializeOnSpecified(this);
- }
-
- public void initializeOnSpecified(OverrideRelationship specifiedRelationship) {
- throw new UnsupportedOperationException();
- }
-
- public void initializeFromVirtualJoinTableRelationship(ReadOnlyJoinTableRelationship virtualRelationship) {
- this.joinTableStrategy.initializeFromVirtual(virtualRelationship.getJoinTableStrategy());
- }
-
- public void initializeFromVirtualJoinColumnRelationship(ReadOnlyJoinColumnRelationship virtualRelationship) {
- this.joinColumnStrategy.initializeFromVirtual(virtualRelationship.getJoinColumnStrategy());
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmAssociationOverride getParent() {
- return (OrmAssociationOverride) super.getParent();
- }
-
- protected OrmAssociationOverride getAssociationOverride() {
- return this.getParent();
- }
-
- protected OrmAssociationOverride2_0 getAssociationOverride2_0() {
- return (OrmAssociationOverride2_0) this.getAssociationOverride();
- }
-
- public XmlAssociationOverride getXmlContainer() {
- return this.getAssociationOverride().getXmlOverride();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getAssociationOverride().getTypeMapping();
- }
-
- public String getAttributeName() {
- return this.getAssociationOverride().getName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getAssociationOverride().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getAssociationOverride().getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getAssociationOverride().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getAssociationOverride().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- public RelationshipMapping getMapping() {
- return this.getAssociationOverride().getMapping();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getAssociationOverride().getValidationTextRange();
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.strategy.validate(messages, reporter);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.strategy.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitDefaults.java
deleted file mode 100644
index 3b24185b6b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitDefaults.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults;
-
-/**
- * <code>orm.xml</code> file
- * <br>
- * <code>persistence-unit-defaults</code> element
- */
-public class GenericOrmPersistenceUnitDefaults
- extends AbstractOrmPersistenceUnitDefaults
-{
-
-
- // ********** constructor/initialization **********
-
- public GenericOrmPersistenceUnitDefaults(OrmPersistenceUnitMetadata parent) {
- super(parent);
- }
-
- @Override
- protected XmlPersistenceUnitDefaults buildXmlPersistenceUnitDefaults() {
- return OrmFactory.eINSTANCE.createXmlPersistenceUnitDefaults();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitMetadata.java
deleted file mode 100644
index 4a4b5d79c3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistenceUnitMetadata.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-/**
- * <code>orm.xml</code> file
- * <br>
- * <code>persistence-unit-metadata</code> element
- */
-public class GenericOrmPersistenceUnitMetadata
- extends AbstractOrmPersistenceUnitMetadata
-{
-
- public GenericOrmPersistenceUnitMetadata(EntityMappings parent) {
- super(parent);
- }
-
- @Override
- protected XmlPersistenceUnitMetadata buildXmlPersistenceUnitMetadata_() {
- return EmfTools.create(
- this.getResourceNodeFactory(),
- OrmPackage.eINSTANCE.getXmlPersistenceUnitMetadata(),
- XmlPersistenceUnitMetadata.class
- );
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
deleted file mode 100644
index 83ce2991a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.orm.SpecifiedOrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> persistent attribute
- */
-public class GenericOrmPersistentAttribute
- extends SpecifiedOrmPersistentAttribute
-{
- public GenericOrmPersistentAttribute(OrmPersistentType parent, XmlAttributeMapping xmlMapping) {
- super(parent, xmlMapping);
- }
-
-
- // ********** validation **********
-
- @Override
- protected void validateAttribute(List<IMessage> messages, IReporter reporter) {
- super.validateAttribute(messages, reporter);
- if (this.javaPersistentAttribute != null) {
- JavaPersistentType javaPersistentType = this.getOwningPersistentType().getJavaPersistentType();
- if ((javaPersistentType != null) && (javaPersistentType.getAttributeNamed(this.javaPersistentAttribute.getName()) == null)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED,
- new String[] {
- this.getName(),
- this.getOwningPersistentType().getMapping().getClass_()
- },
- this.mapping,
- this.mapping.getNameTextRange()
- )
- );
- }
- }
- }
-
- @Override
- protected JptValidator buildAttibuteValidator() {
- return this.getJavaPersistentAttribute().getAccessor().buildAttributeValidator(this, buildTextRangeResolver());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
deleted file mode 100644
index 750bfb8d7e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.internal.context.orm.SpecifiedOrmPersistentType;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
-
-/**
- * <code>orm.xml</code> persistent type:<ul>
- * <li>mapping
- * <li>access
- * <li>attributes
- * <li>super persistent type
- * <li>Java persistent type
- * </ul>
- */
-public class GenericOrmPersistentType
- extends SpecifiedOrmPersistentType
-{
-
- public GenericOrmPersistentType(EntityMappings parent, XmlTypeMapping xmlTypeMapping) {
- super(parent, xmlTypeMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
deleted file mode 100644
index 26c08d3df7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmPrimaryKeyJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * <code>orm.xml</code> primary key join column
- */
-public class GenericOrmPrimaryKeyJoinColumn
- extends AbstractOrmNamedColumn<XmlPrimaryKeyJoinColumn, OrmReadOnlyBaseJoinColumn.Owner>
- implements OrmPrimaryKeyJoinColumn
-{
- /** @see org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn#AbstractOrmNamedColumn(XmlContextNode, org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn) */
- protected /* final */ XmlPrimaryKeyJoinColumn xmlColumn; // null for default pk join columns
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn xmlColumn) {
- super(parent, owner, xmlColumn);
- this.specifiedReferencedColumnName = this.buildSpecifiedReferencedColumnName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedReferencedColumnName_(this.buildSpecifiedReferencedColumnName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** XML column **********
-
- @Override
- public XmlPrimaryKeyJoinColumn getXmlColumn() {
- return this.xmlColumn;
- }
-
- @Override
- protected void setXmlColumn(XmlPrimaryKeyJoinColumn xmlColumn) {
- this.xmlColumn = xmlColumn;
- }
-
- /**
- * primary key join columns are part of a collection;
- * the 'primary-key-join-column' element will be removed/added
- * when the XML join column is removed from/added to
- * the owner's collection
- */
- @Override
- protected XmlPrimaryKeyJoinColumn buildXmlColumn() {
- throw new IllegalStateException("XML primary key join column is missing"); //$NON-NLS-1$
- }
-
- /**
- * @see #buildXmlColumn()
- */
- @Override
- protected void removeXmlColumn() {
- // do nothing
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- public void setSpecifiedReferencedColumnName(String name) {
- this.setSpecifiedReferencedColumnName_(name);
- this.xmlColumn.setReferencedColumnName(name);
- }
-
- protected void setSpecifiedReferencedColumnName_(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- return (this.xmlColumn == null) ? null : this.xmlColumn.getReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- // TODO not correct when we start supporting
- // primary key join columns in 1-1 mappings
- protected String buildDefaultReferencedColumnName() {
- return this.buildDefaultName();
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** misc **********
-
- public void initializeFrom(ReadOnlyPrimaryKeyJoinColumn oldColumn) {
- super.initializeFrom(oldColumn);
- this.setSpecifiedReferencedColumnName(oldColumn.getSpecifiedReferencedColumnName());
- }
-
- @Override
- public String getTable() {
- return this.owner.getDefaultTableName();
- }
-
-
- // ********** validation **********
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmPrimaryKeyJoinColumnTextRangeResolver(this);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.getValidationTextRange(this.xmlColumn.getReferencedColumnNameTextRange());
- }
-
- // ********** completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.referencedColumnNameTouches(pos)) {
- return this.getCandidateReferencedColumnNames();
- }
- return null;
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- XmlPrimaryKeyJoinColumn column = this.getXmlColumn();
- return (column != null) && (column.referencedColumnNameTouches(pos));
- }
-
- protected Iterable<String> getCandidateReferencedColumnNames() {
- Table table = this.owner.getReferencedColumnDbTable();
- return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
deleted file mode 100644
index 2a18873415..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> query container
- */
-public class GenericOrmQueryContainer
- extends AbstractOrmXmlContextNode
- implements OrmQueryContainer
-{
- protected final XmlQueryContainer xmlQueryContainer;
-
- protected final ContextListContainer<OrmNamedQuery, XmlNamedQuery> namedQueryContainer;
- protected final ContextListContainer<OrmNamedNativeQuery, XmlNamedNativeQuery> namedNativeQueryContainer;
-
-
- public GenericOrmQueryContainer(XmlContextNode parent, XmlQueryContainer xmlQueryContainer) {
- super(parent);
- this.xmlQueryContainer = xmlQueryContainer;
- this.namedQueryContainer = this.buildNamedQueryContainer();
- this.namedNativeQueryContainer = this.buildNamedNativeQueryContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncNamedQueries();
- this.syncNamedNativeQueries();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getNamedQueries());
- this.updateNodes(this.getNamedNativeQueries());
- }
-
-
- // ********** queries **********
-
- @SuppressWarnings("unchecked")
- public Iterable<Query> getQueries() {
- return new CompositeIterable<Query>(this.getNamedQueries(), this.getNamedNativeQueries());
- }
-
-
- // ********** named queries **********
-
- public ListIterable<OrmNamedQuery> getNamedQueries() {
- return this.namedQueryContainer.getContextElements();
- }
-
- public int getNamedQueriesSize() {
- return this.namedQueryContainer.getContextElementsSize();
- }
-
- public OrmNamedQuery addNamedQuery() {
- return this.addNamedQuery(this.getNamedQueriesSize());
- }
-
- public OrmNamedQuery addNamedQuery(int index) {
- XmlNamedQuery xmlQuery = this.buildXmlNamedQuery();
- OrmNamedQuery query = this.namedQueryContainer.addContextElement(index, xmlQuery);
- this.xmlQueryContainer.getNamedQueries().add(index, xmlQuery);
- return query;
- }
-
- protected XmlNamedQuery buildXmlNamedQuery() {
- return OrmFactory.eINSTANCE.createXmlNamedQuery();
- }
-
- public void removeNamedQuery(NamedQuery namedQuery) {
- this.removeNamedQuery(this.namedQueryContainer.indexOfContextElement((OrmNamedQuery) namedQuery));
- }
-
- public void removeNamedQuery(int index) {
- this.namedQueryContainer.removeContextElement(index);
- this.xmlQueryContainer.getNamedQueries().remove(index);
- }
-
- public void moveNamedQuery(int targetIndex, int sourceIndex) {
- this.namedQueryContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlQueryContainer.getNamedQueries().move(targetIndex, sourceIndex);
- }
-
- protected OrmNamedQuery buildNamedQuery(XmlNamedQuery xmlNamedQuery) {
- return this.getContextNodeFactory().buildOrmNamedQuery(this, xmlNamedQuery);
- }
-
- protected void syncNamedQueries() {
- this.namedQueryContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlNamedQuery> getXmlNamedQueries() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlNamedQuery>(this.xmlQueryContainer.getNamedQueries());
- }
-
- protected ContextListContainer<OrmNamedQuery, XmlNamedQuery> buildNamedQueryContainer() {
- NamedQueryContainer container = new NamedQueryContainer();
- container.initialize();
- return container;
- }
-
- /**
- * named query container
- */
- protected class NamedQueryContainer
- extends ContextListContainer<OrmNamedQuery, XmlNamedQuery>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return NAMED_QUERIES_LIST;
- }
- @Override
- protected OrmNamedQuery buildContextElement(XmlNamedQuery resourceElement) {
- return GenericOrmQueryContainer.this.buildNamedQuery(resourceElement);
- }
- @Override
- protected ListIterable<XmlNamedQuery> getResourceElements() {
- return GenericOrmQueryContainer.this.getXmlNamedQueries();
- }
- @Override
- protected XmlNamedQuery getResourceElement(OrmNamedQuery contextElement) {
- return contextElement.getXmlQuery();
- }
- }
-
- // ********** named native queries **********
-
- public ListIterable<OrmNamedNativeQuery> getNamedNativeQueries() {
- return this.namedNativeQueryContainer.getContextElements();
- }
-
- public int getNamedNativeQueriesSize() {
- return this.namedNativeQueryContainer.getContextElementsSize();
- }
-
- public OrmNamedNativeQuery addNamedNativeQuery() {
- return this.addNamedNativeQuery(this.getNamedNativeQueriesSize());
- }
-
- public OrmNamedNativeQuery addNamedNativeQuery(int index) {
- XmlNamedNativeQuery xmlQuery = this.buildXmlNamedNativeQuery();
- OrmNamedNativeQuery query = this.namedNativeQueryContainer.addContextElement(index, xmlQuery);
- this.xmlQueryContainer.getNamedNativeQueries().add(index, xmlQuery);
- return query;
- }
-
- protected XmlNamedNativeQuery buildXmlNamedNativeQuery() {
- return OrmFactory.eINSTANCE.createXmlNamedNativeQuery();
- }
-
- public void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery) {
- this.removeNamedNativeQuery(this.namedNativeQueryContainer.indexOfContextElement((OrmNamedNativeQuery) namedNativeQuery));
- }
-
- public void removeNamedNativeQuery(int index) {
- this.namedNativeQueryContainer.removeContextElement(index);
- this.xmlQueryContainer.getNamedNativeQueries().remove(index);
- }
-
- public void moveNamedNativeQuery(int targetIndex, int sourceIndex) {
- this.namedNativeQueryContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlQueryContainer.getNamedNativeQueries().move(targetIndex, sourceIndex);
- }
-
- protected OrmNamedNativeQuery buildNamedNativeQuery(XmlNamedNativeQuery xmlNamedNativeQuery) {
- return this.getContextNodeFactory().buildOrmNamedNativeQuery(this, xmlNamedNativeQuery);
- }
-
- protected void syncNamedNativeQueries() {
- this.namedNativeQueryContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlNamedNativeQuery> getXmlNamedNativeQueries() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlNamedNativeQuery>(this.xmlQueryContainer.getNamedNativeQueries());
- }
-
- protected ContextListContainer<OrmNamedNativeQuery, XmlNamedNativeQuery> buildNamedNativeQueryContainer() {
- NamedNativeQueryContainer container = new NamedNativeQueryContainer();
- container.initialize();
- return container;
- }
-
- /**
- * named query container
- */
- protected class NamedNativeQueryContainer
- extends ContextListContainer<OrmNamedNativeQuery, XmlNamedNativeQuery>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return NAMED_NATIVE_QUERIES_LIST;
- }
- @Override
- protected OrmNamedNativeQuery buildContextElement(XmlNamedNativeQuery resourceElement) {
- return GenericOrmQueryContainer.this.buildNamedNativeQuery(resourceElement);
- }
- @Override
- protected ListIterable<XmlNamedNativeQuery> getResourceElements() {
- return GenericOrmQueryContainer.this.getXmlNamedNativeQueries();
- }
- @Override
- protected XmlNamedNativeQuery getResourceElement(OrmNamedNativeQuery contextElement) {
- return contextElement.getXmlQuery();
- }
- }
-
-
- // ********** validation **********
-
- /**
- * The queries are validated in the persistence unit.
- * @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateQueries(List, IReporter)
- */
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // queries are validated in the persistence unit
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlQueryContainer.getValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryHint.java
deleted file mode 100644
index 3bf4a14837..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryHint.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryHint;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint;
-
-/**
- * <code>orm.xml</code> query hint
- */
-public class GenericOrmQueryHint
- extends AbstractOrmXmlContextNode
- implements OrmQueryHint
-{
- protected final XmlQueryHint xmlQueryHint;
-
- protected String name;
- protected String value;
-
-
- public GenericOrmQueryHint(OrmQuery parent, XmlQueryHint xmlQueryHint) {
- super(parent);
- this.xmlQueryHint = xmlQueryHint;
- this.name = xmlQueryHint.getName();
- this.value = xmlQueryHint.getValue();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.xmlQueryHint.getName());
- this.setValue_(this.xmlQueryHint.getValue());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlQueryHint.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
-
- // ********** value **********
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- this.setValue_(value);
- this.xmlQueryHint.setValue(value);
- }
-
- protected void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaQueryHint javaHint) {
- this.setName(javaHint.getName());
- this.setValue(javaHint.getValue());
- }
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlQueryHint.getValidationTextRange();
- return (textRange != null) ? textRange : this.getQuery().getValidationTextRange();
- }
-
- public boolean isEquivalentTo(QueryHint hint) {
- return StringTools.stringsAreEqual(this.getName(), hint.getName()) &&
- StringTools.stringsAreEqual(this.getValue(), hint.getValue()) ;
- }
-
- // ********** misc **********
-
- @Override
- public OrmQuery getParent() {
- return (OrmQuery) super.getParent();
- }
-
- protected OrmQuery getQuery() {
- return this.getParent();
- }
-
- public XmlQueryHint getXmlQueryHint() {
- return this.xmlQueryHint;
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
deleted file mode 100644
index 0c1005835b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReferenceTable;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmTable;
-import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> join table or collection table
- */
-public abstract class GenericOrmReferenceTable<X extends AbstractXmlReferenceTable>
- extends AbstractOrmTable<X>
- implements OrmReferenceTable
-{
- protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
-
- protected OrmJoinColumn defaultJoinColumn;
-
-
- protected GenericOrmReferenceTable(XmlContextNode parent, Owner owner) {
- super(parent, owner);
- this.joinColumnOwner = this.buildJoinColumnOwner();
- this.specifiedJoinColumnContainer = this.buildSpecifiedJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedJoinColumns());
- this.updateDefaultJoinColumn();
- }
-
-
- // ********** join columns **********
-
- public ListIterable<OrmJoinColumn> getJoinColumns() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumns() : this.getDefaultJoinColumns();
- }
-
- public int getJoinColumnsSize() {
- return this.hasSpecifiedJoinColumns() ? this.getSpecifiedJoinColumnsSize() : this.getDefaultJoinColumnsSize();
- }
-
- public void convertDefaultJoinColumnToSpecified() {
- MappingTools.convertReferenceTableDefaultToSpecifiedJoinColumn(this);
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<OrmJoinColumn> getSpecifiedJoinColumns() {
- return this.specifiedJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return this.specifiedJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return this.getSpecifiedJoinColumnsSize() != 0;
- }
-
- public OrmJoinColumn getSpecifiedJoinColumn(int index) {
- return this.specifiedJoinColumnContainer.getContextElement(index);
- }
-
- public OrmJoinColumn addSpecifiedJoinColumn() {
- return this.addSpecifiedJoinColumn(this.getSpecifiedJoinColumnsSize());
- }
-
- public OrmJoinColumn addSpecifiedJoinColumn(int index) {
- X xmlTable = this.getXmlTableForUpdate();
- XmlJoinColumn xmlJoinColumn = this.buildXmlJoinColumn();
- OrmJoinColumn joinColumn = this.specifiedJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- xmlTable.getJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- protected XmlJoinColumn buildXmlJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlJoinColumn();
- }
-
- public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedJoinColumn(this.specifiedJoinColumnContainer.indexOfContextElement((OrmJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedJoinColumn(int index) {
- this.specifiedJoinColumnContainer.removeContextElement(index);
- this.getXmlTable().getJoinColumns().remove(index);
- this.removeXmlTableIfUnset();
- }
-
- public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlTable().getJoinColumns().move(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedJoinColumns() {
- this.specifiedJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJoinColumn> getXmlJoinColumns() {
- X xmlTable = this.getXmlTable();
- return (xmlTable == null) ?
- EmptyListIterable.<XmlJoinColumn>instance() :
- // clone to reduce chance of concurrency problems
- new LiveCloneListIterable<XmlJoinColumn>(xmlTable.getJoinColumns());
- }
-
- protected ContextListContainer<OrmJoinColumn, XmlJoinColumn> buildSpecifiedJoinColumnContainer() {
- SpecifiedJoinColumnContainer container = new SpecifiedJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedJoinColumnContainer
- extends ContextListContainer<OrmJoinColumn, XmlJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmJoinColumn buildContextElement(XmlJoinColumn resourceElement) {
- return GenericOrmReferenceTable.this.buildJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlJoinColumn> getResourceElements() {
- return GenericOrmReferenceTable.this.getXmlJoinColumns();
- }
- @Override
- protected XmlJoinColumn getResourceElement(OrmJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected abstract OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner();
-
-
- // ********** default join column **********
-
- public OrmJoinColumn getDefaultJoinColumn() {
- return this.defaultJoinColumn;
- }
-
- protected void setDefaultJoinColumn(OrmJoinColumn joinColumn) {
- OrmJoinColumn old = this.defaultJoinColumn;
- this.defaultJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
- }
-
- protected ListIterable<OrmJoinColumn> getDefaultJoinColumns() {
- return (this.defaultJoinColumn != null) ?
- new SingleElementListIterable<OrmJoinColumn>(this.defaultJoinColumn) :
- EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- protected int getDefaultJoinColumnsSize() {
- return (this.defaultJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultJoinColumn() {
- if (this.buildsDefaultJoinColumn()) {
- if (this.defaultJoinColumn == null) {
- this.setDefaultJoinColumn(this.buildJoinColumn(null));
- } else {
- this.defaultJoinColumn.update();
- }
- } else {
- this.setDefaultJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultJoinColumn() {
- return ! this.hasSpecifiedJoinColumns();
- }
-
-
- // ********** misc **********
-
- protected void initializeFrom(ReadOnlyReferenceTable oldTable) {
- super.initializeFrom(oldTable);
- for (ReadOnlyJoinColumn joinColumn : oldTable.getSpecifiedJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFrom(joinColumn);
- }
- }
-
- protected void initializeFromVirtual(ReadOnlyReferenceTable virtualTable) {
- super.initializeFromVirtual(virtualTable);
- for (ReadOnlyJoinColumn joinColumn : virtualTable.getJoinColumns()) {
- this.addSpecifiedJoinColumn().initializeFromVirtual(joinColumn);
- }
- }
-
- protected OrmJoinColumn buildJoinColumn(XmlJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmJoinColumn(this, this.joinColumnOwner, xmlJoinColumn);
- }
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- this.validateJoinColumns(messages, reporter);
- }
- }
-
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
- this.validateNodes(this.getJoinColumns(), messages, reporter);
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmJoinColumn column : this.getJoinColumns()) {
- result = column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
deleted file mode 100644
index f91546bee1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-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.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmTable;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTablePrimaryKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>orm.xml</code> secondary table
- */
-public class GenericOrmSecondaryTable
- extends AbstractOrmTable<XmlSecondaryTable>
- implements OrmSecondaryTable
-{
- /** @see AbstractOrmTable#AbstractOrmTable(org.eclipse.jpt.jpa.core.context.XmlContextNode, org.eclipse.jpt.jpa.core.context.Table.Owner, org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable) */
- protected /* final */ XmlSecondaryTable xmlSecondaryTable;
-
- protected final ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumnContainer;
- protected final OrmReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
-
- protected OrmPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
-
-
- public GenericOrmSecondaryTable(OrmEntity parent, Owner owner, XmlSecondaryTable xmlSecondaryTable) {
- super(parent, owner, xmlSecondaryTable);
- this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
- this.specifiedPrimaryKeyJoinColumnContainer = this.buildSpecifiedPrimaryKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncSpecifiedPrimaryKeyJoinColumns();
- if (this.defaultPrimaryKeyJoinColumn != null) {
- this.defaultPrimaryKeyJoinColumn.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getSpecifiedPrimaryKeyJoinColumns());
- this.updateDefaultPrimaryKeyJoinColumn();
- }
-
-
- // ********** XML table **********
-
- @Override
- public XmlSecondaryTable getXmlTable() {
- return this.xmlSecondaryTable;
- }
-
- /**
- * @see AbstractOrmTable
- */
- @Override
- protected void setXmlTable(XmlSecondaryTable xmlTable) {
- this.xmlSecondaryTable = xmlTable;
- }
-
- /**
- * secondary tables are part of a collection;
- * the 'secondary-table' element will be removed from/added
- * when the XML secondary table is removed/added to
- * the XML entity's collection
- */
- @Override
- protected XmlSecondaryTable buildXmlTable() {
- throw new IllegalStateException("XML secondary table is missing"); //$NON-NLS-1$
- }
-
- /**
- * @see #buildXmlTable()
- */
- @Override
- protected void removeXmlTable() {
- // do nothing
- }
-
-
- // ********** primary key join columns **********
-
- public ListIterable<OrmPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumns() : this.getDefaultPrimaryKeyJoinColumns();
- }
-
- public int getPrimaryKeyJoinColumnsSize() {
- return this.hasSpecifiedPrimaryKeyJoinColumns() ? this.getSpecifiedPrimaryKeyJoinColumnsSize() : this.getDefaultPrimaryKeyJoinColumnsSize();
- }
-
-
- // ********** specified primary key join columns **********
-
- public ListIterable<OrmPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedPrimaryKeyJoinColumnsSize() {
- return this.specifiedPrimaryKeyJoinColumnContainer.getContextElementsSize();
- }
-
- protected boolean hasSpecifiedPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumnsSize() != 0;
- }
-
- public OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn() {
- return this.addSpecifiedPrimaryKeyJoinColumn(this.getSpecifiedPrimaryKeyJoinColumnsSize());
- }
-
- public OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
- XmlPrimaryKeyJoinColumn xmlJoinColumn = this.buildXmlPrimaryKeyJoinColumn();
- OrmPrimaryKeyJoinColumn joinColumn = this.specifiedPrimaryKeyJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- this.xmlSecondaryTable.getPrimaryKeyJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- protected XmlPrimaryKeyJoinColumn buildXmlPrimaryKeyJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn();
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn joinColumn) {
- this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumnContainer.indexOfContextElement((OrmPrimaryKeyJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
- this.specifiedPrimaryKeyJoinColumnContainer.removeContextElement(index);
- this.xmlSecondaryTable.getPrimaryKeyJoinColumns().remove(index);
- }
-
- public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedPrimaryKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlSecondaryTable.getPrimaryKeyJoinColumns().move(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedPrimaryKeyJoinColumns() {
- this.specifiedPrimaryKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlPrimaryKeyJoinColumn> getXmlPrimaryKeyJoinColumns() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlPrimaryKeyJoinColumn>(this.xmlSecondaryTable.getPrimaryKeyJoinColumns());
- }
-
- protected ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> buildSpecifiedPrimaryKeyJoinColumnContainer() {
- SpecifiedPrimaryKeyJoinColumnContainer container = new SpecifiedPrimaryKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified primary key join column container
- */
- protected class SpecifiedPrimaryKeyJoinColumnContainer
- extends ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmPrimaryKeyJoinColumn buildContextElement(XmlPrimaryKeyJoinColumn resourceElement) {
- return GenericOrmSecondaryTable.this.buildPrimaryKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlPrimaryKeyJoinColumn> getResourceElements() {
- return GenericOrmSecondaryTable.this.getXmlPrimaryKeyJoinColumns();
- }
- @Override
- protected XmlPrimaryKeyJoinColumn getResourceElement(OrmPrimaryKeyJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected OrmReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
- return new PrimaryKeyJoinColumnOwner();
- }
-
-
- // ********** default primary key join column **********
-
- public OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
- return this.defaultPrimaryKeyJoinColumn;
- }
-
- protected void setDefaultPrimaryKeyJoinColumn(OrmPrimaryKeyJoinColumn joinColumn) {
- OrmPrimaryKeyJoinColumn old = this.defaultPrimaryKeyJoinColumn;
- this.defaultPrimaryKeyJoinColumn = joinColumn;
- this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, old, joinColumn);
- }
-
- protected ListIterable<OrmPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- return (this.defaultPrimaryKeyJoinColumn != null) ?
- new SingleElementListIterable<OrmPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn) :
- EmptyListIterable.<OrmPrimaryKeyJoinColumn>instance();
- }
-
- protected int getDefaultPrimaryKeyJoinColumnsSize() {
- return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultPrimaryKeyJoinColumn() {
- if (this.buildsDefaultPrimaryKeyJoinColumn()) {
- if (this.defaultPrimaryKeyJoinColumn == null) {
- this.setDefaultPrimaryKeyJoinColumn(this.buildPrimaryKeyJoinColumn(null));
- } else {
- this.defaultPrimaryKeyJoinColumn.update();
- }
- } else {
- this.setDefaultPrimaryKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultPrimaryKeyJoinColumn() {
- return ! this.hasSpecifiedPrimaryKeyJoinColumns();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmEntity getParent() {
- return (OrmEntity) super.getParent();
- }
-
- protected OrmEntity getEntity() {
- return this.getParent();
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- public void initializeFrom(ReadOnlySecondaryTable oldSecondaryTable) {
- super.initializeFrom(oldSecondaryTable);
- for (ReadOnlyPrimaryKeyJoinColumn pkJoinColumn : oldSecondaryTable.getSpecifiedPrimaryKeyJoinColumns()) {
- this.addSpecifiedPrimaryKeyJoinColumn().initializeFrom(pkJoinColumn);
- }
- }
-
- protected OrmPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(XmlPrimaryKeyJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner, xmlJoinColumn);
- }
-
-
- // ********** defaults **********
-
- /**
- * a secondary table doesn't have a default name
- */
- @Override
- protected String buildDefaultName() {
- return null;
- }
-
- @Override
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.connectionProfileIsActive();
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
-
- //join column validation will handle the check for whether to validate against the database
- //some validation messages are not database specific. If the database validation for the
- //table fails we will stop there and not validate the join columns at all
- if (continueValidating) {
- this.validateNodes(this.getPrimaryKeyJoinColumns(), messages, reporter);
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmPrimaryKeyJoinColumn column : this.getPrimaryKeyJoinColumns()) {
- result = column.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** primary key join column owner adapter **********
-
- protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyBaseJoinColumn.Owner
- {
- protected OrmEntity getEntity() {
- return GenericOrmSecondaryTable.this.getEntity();
- }
-
- public String getDefaultTableName() {
- return GenericOrmSecondaryTable.this.getName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- if (this.getJoinColumnsSize() != 1) {
- return null;
- }
- Entity parentEntity = this.getEntity().getParentEntity();
- return (parentEntity != null) ?
- parentEntity.getPrimaryKeyColumnName() :
- this.getEntity().getPrimaryKeyColumnName();
- }
-
- public Table resolveDbTable(String tableName) {
- return GenericOrmSecondaryTable.this.getDbTable();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmSecondaryTable.this.getPrimaryKeyJoinColumnsSize();
- }
-
- public Table getReferencedColumnDbTable() {
- return this.getEntity().getPrimaryDbTable();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmSecondaryTable.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericOrmSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java
deleted file mode 100644
index 24ade86bd7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-
-/**
- * <code>orm.xml</code> sequence generator
- */
-public class GenericOrmSequenceGenerator
- extends AbstractOrmSequenceGenerator
-{
- public GenericOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator xmlSequenceGenerator) {
- super(parent, xmlSequenceGenerator);
- }
-
- // ********** database stuff **********
-
- /**
- * The JPA 1.0 spec does not allow a sequence to specify a catalog.
- */
- @Override
- protected String getCatalog() {
- return this.getContextDefaultCatalog();
- }
-
- /**
- * The JPA 1.0 spec does not allow a sequence to specify a schema.
- */
- @Override
- protected String getSchema() {
- return this.getContextDefaultSchema();
- }
-
- // ********** validation **********
-
- @Override
- protected boolean isEquivalentTo(SequenceGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.getDbSchema(), generator.getDbSchema()) &&
- Tools.valuesAreEqual(this.getDbCatalog(), generator.getDbCatalog());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java
deleted file mode 100644
index 0832952ada..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmTable;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTable;
-
-/**
- * <code>orm.xml</code> table
- */
-public class GenericOrmTable
- extends AbstractOrmTable<XmlTable>
-{
- public GenericOrmTable(OrmEntity parent, Owner owner) {
- super(parent, owner);
- }
-
-
- // ********** XML table **********
-
- @Override
- protected XmlTable getXmlTable() {
- return this.getXmlEntity().getTable();
- }
-
- @Override
- protected XmlTable buildXmlTable() {
- XmlTable xmlTable = OrmFactory.eINSTANCE.createXmlTable();
- this.getXmlEntity().setTable(xmlTable);
- return xmlTable;
- }
-
- @Override
- protected void removeXmlTable() {
- this.getXmlEntity().setTable(null);
- }
-
- protected XmlEntity getXmlEntity() {
- return this.getEntity().getXmlTypeMapping();
- }
-
-
- // ********** defaults **********
-
- @Override
- protected String buildDefaultName() {
- return this.getEntity().getDefaultTableName();
- }
-
- @Override
- protected String buildDefaultSchema() {
- return this.getEntity().getDefaultSchema();
- }
-
- @Override
- protected String buildDefaultCatalog() {
- return this.getEntity().getDefaultCatalog();
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.connectionProfileIsActive();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmEntity getParent() {
- return (OrmEntity) super.getParent();
- }
-
- protected OrmEntity getEntity() {
- return this.getParent();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java
deleted file mode 100644
index 6ce0ac56e3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.TableGenerator;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaTableGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTableGenerator;
-import org.eclipse.jpt.jpa.core.context.orm.OrmUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * <code>orm.xml</code> table generator
- */
-public class GenericOrmTableGenerator
- extends AbstractOrmGenerator<XmlTableGenerator>
- implements OrmTableGenerator, UniqueConstraint.Owner
-{
- protected String specifiedTable;
- protected String defaultTable;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected String specifiedPkColumnName;
- protected String defaultPkColumnName;
-
- protected String specifiedValueColumnName;
- protected String defaultValueColumnName;
-
- protected String specifiedPkColumnValue;
- protected String defaultPkColumnValue;
-
- protected final ContextListContainer<OrmUniqueConstraint, XmlUniqueConstraint> uniqueConstraintContainer;
-
-
- // ********** constructor **********
-
- public GenericOrmTableGenerator(XmlContextNode parent, XmlTableGenerator xmlTableGenerator) {
- super(parent, xmlTableGenerator);
- this.specifiedTable = xmlTableGenerator.getTable();
- this.specifiedSchema = xmlTableGenerator.getSchema();
- this.specifiedCatalog = xmlTableGenerator.getCatalog();
- this.specifiedPkColumnName = xmlTableGenerator.getPkColumnName();
- this.specifiedValueColumnName = xmlTableGenerator.getValueColumnName();
- this.specifiedPkColumnValue = xmlTableGenerator.getPkColumnValue();
- this.uniqueConstraintContainer = this.buildUniqueConstraintContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTable_(this.xmlGenerator.getTable());
- this.setSpecifiedSchema_(this.xmlGenerator.getSchema());
- this.setSpecifiedCatalog_(this.xmlGenerator.getCatalog());
- this.setSpecifiedPkColumnName_(this.xmlGenerator.getPkColumnName());
- this.setSpecifiedValueColumnName_(this.xmlGenerator.getValueColumnName());
- this.setSpecifiedPkColumnValue_(this.xmlGenerator.getPkColumnValue());
- this.syncUniqueConstraints();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTable(this.buildDefaultTable());
- this.setDefaultSchema(this.buildDefaultSchema());
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.setDefaultPkColumnName(this.buildDefaultPkColumnName());
- this.setDefaultValueColumnName(this.buildDefaultValueColumnName());
- this.setDefaultPkColumnValue(this.buildDefaultPkColumnValue());
- this.updateNodes(this.getUniqueConstraints());
- }
-
-
- // ********** initial value **********
-
- @Override
- protected int buildDefaultInitialValue() {
- return DEFAULT_INITIAL_VALUE;
- }
-
-
- // ********** table **********
-
- public String getTable() {
- return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
- }
-
- public String getSpecifiedTable() {
- return this.specifiedTable;
- }
-
- public void setSpecifiedTable(String table) {
- this.setSpecifiedTable_(table);
- this.xmlGenerator.setTable(table);
- }
-
- protected void setSpecifiedTable_(String table) {
- String old = this.specifiedTable;
- this.specifiedTable = table;
- this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
- }
-
- public String getDefaultTable() {
- return this.defaultTable;
- }
-
- protected void setDefaultTable(String table) {
- String old = this.defaultTable;
- this.defaultTable = table;
- this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
- }
-
- protected String buildDefaultTable() {
- return null; // TODO the default table is determined by the runtime provider...
- }
-
- public Table getDbTable() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getTable());
- }
-
-
- // ********** schema **********
-
- @Override
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- this.setSpecifiedSchema_(schema);
- this.xmlGenerator.setSchema(schema);
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
-
- // ********** catalog **********
-
- @Override
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- this.setSpecifiedCatalog_(catalog);
- this.xmlGenerator.setCatalog(catalog);
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** primary key column name **********
-
- public String getPkColumnName() {
- return (this.specifiedPkColumnName != null) ? this.specifiedPkColumnName : this.defaultPkColumnName;
- }
-
- public String getSpecifiedPkColumnName() {
- return this.specifiedPkColumnName;
- }
-
- public void setSpecifiedPkColumnName(String name) {
- this.setSpecifiedPkColumnName_(name);
- this.xmlGenerator.setPkColumnName(name);
- }
-
- protected void setSpecifiedPkColumnName_(String name) {
- String old = this.specifiedPkColumnName;
- this.specifiedPkColumnName = name;
- this.firePropertyChanged(SPECIFIED_PK_COLUMN_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultPkColumnName() {
- return this.defaultPkColumnName;
- }
-
- protected void setDefaultPkColumnName(String name) {
- String old = this.defaultPkColumnName;
- this.defaultPkColumnName = name;
- this.firePropertyChanged(DEFAULT_PK_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultPkColumnName() {
- return null; // TODO the default pk column name is determined by the runtime provider...
- }
-
-
- // ********** value column name **********
-
- public String getValueColumnName() {
- return (this.specifiedValueColumnName != null) ? this.specifiedValueColumnName : this.defaultValueColumnName;
- }
-
- public String getSpecifiedValueColumnName() {
- return this.specifiedValueColumnName;
- }
-
- public void setSpecifiedValueColumnName(String name) {
- this.setSpecifiedValueColumnName_(name);
- this.xmlGenerator.setValueColumnName(name);
- }
-
- protected void setSpecifiedValueColumnName_(String name) {
- String old = this.specifiedValueColumnName;
- this.specifiedValueColumnName = name;
- this.firePropertyChanged(SPECIFIED_VALUE_COLUMN_NAME_PROPERTY, old, name);
- }
-
- public String getDefaultValueColumnName() {
- return this.defaultValueColumnName;
- }
-
- protected void setDefaultValueColumnName(String name) {
- String old = this.defaultValueColumnName;
- this.defaultValueColumnName = name;
- this.firePropertyChanged(DEFAULT_VALUE_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultValueColumnName() {
- return null; // TODO the default value column name is determined by the runtime provider...
- }
-
-
- // ********** primary key column value **********
-
- public String getPkColumnValue() {
- return (this.specifiedPkColumnValue != null) ? this.specifiedPkColumnValue : this.defaultPkColumnValue;
- }
-
- public String getSpecifiedPkColumnValue() {
- return this.specifiedPkColumnValue;
- }
-
- public void setSpecifiedPkColumnValue(String value) {
- this.setSpecifiedPkColumnValue_(value);
- this.xmlGenerator.setPkColumnValue(value);
- }
-
- protected void setSpecifiedPkColumnValue_(String value) {
- String old = this.specifiedPkColumnValue;
- this.specifiedPkColumnValue = value;
- this.firePropertyChanged(SPECIFIED_PK_COLUMN_VALUE_PROPERTY, old, value);
- }
-
- public String getDefaultPkColumnValue() {
- return this.defaultPkColumnValue;
- }
-
- protected void setDefaultPkColumnValue(String value) {
- String old = this.defaultPkColumnValue;
- this.defaultPkColumnValue = value;
- this.firePropertyChanged(DEFAULT_PK_COLUMN_VALUE_PROPERTY, old, value);
- }
-
- protected String buildDefaultPkColumnValue() {
- return null; // TODO the default pk column value is determined by the runtime provider...
- }
-
-
- // ********** unique constraints **********
-
- public ListIterable<OrmUniqueConstraint> getUniqueConstraints() {
- return this.uniqueConstraintContainer.getContextElements();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintContainer.getContextElementsSize();
- }
-
- public OrmUniqueConstraint getUniqueConstraint(int index) {
- return this.uniqueConstraintContainer.getContextElement(index);
- }
-
- public OrmUniqueConstraint addUniqueConstraint() {
- return this.addUniqueConstraint(this.getUniqueConstraintsSize());
- }
-
- public OrmUniqueConstraint addUniqueConstraint(int index) {
- XmlUniqueConstraint xmlConstraint = this.buildXmlUniqueConstraint();
- OrmUniqueConstraint constraint = this.uniqueConstraintContainer.addContextElement(index, xmlConstraint);
- this.xmlGenerator.getUniqueConstraints().add(index, xmlConstraint);
- return constraint;
- }
-
- protected XmlUniqueConstraint buildXmlUniqueConstraint() {
- return OrmFactory.eINSTANCE.createXmlUniqueConstraint();
- }
-
- public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
- this.removeUniqueConstraint(this.uniqueConstraintContainer.indexOfContextElement((OrmUniqueConstraint) uniqueConstraint));
- }
-
- public void removeUniqueConstraint(int index) {
- this.uniqueConstraintContainer.removeContextElement(index);
- this.xmlGenerator.getUniqueConstraints().remove(index);
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- this.uniqueConstraintContainer.moveContextElement(targetIndex, sourceIndex);
- this.xmlGenerator.getUniqueConstraints().move(targetIndex, sourceIndex);
- }
-
- protected OrmUniqueConstraint buildUniqueConstraint(XmlUniqueConstraint resourceUniqueConstraint) {
- return this.getContextNodeFactory().buildOrmUniqueConstraint(this, this, resourceUniqueConstraint);
- }
-
- protected void syncUniqueConstraints() {
- this.uniqueConstraintContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlUniqueConstraint> getXmlUniqueConstraints() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlUniqueConstraint>(this.xmlGenerator.getUniqueConstraints());
- }
-
- protected ContextListContainer<OrmUniqueConstraint, XmlUniqueConstraint> buildUniqueConstraintContainer() {
- UniqueConstraintContainer container = new UniqueConstraintContainer();
- container.initialize();
- return container;
- }
-
- /**
- * unique constraint container
- */
- protected class UniqueConstraintContainer
- extends ContextListContainer<OrmUniqueConstraint, XmlUniqueConstraint>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected OrmUniqueConstraint buildContextElement(XmlUniqueConstraint resourceElement) {
- return GenericOrmTableGenerator.this.buildUniqueConstraint(resourceElement);
- }
- @Override
- protected ListIterable<XmlUniqueConstraint> getResourceElements() {
- return GenericOrmTableGenerator.this.getXmlUniqueConstraints();
- }
- @Override
- protected XmlUniqueConstraint getResourceElement(OrmUniqueConstraint contextElement) {
- return contextElement.getXmlUniqueConstraint();
- }
- }
-
-
- // ********** UniqueConstraint.Owner implementation **********
-
- public Iterable<String> getCandidateUniqueConstraintColumnNames() {
- org.eclipse.jpt.jpa.db.Table dbTable = this.getDbTable();
- return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String>instance();
- }
-
- // ********** misc **********
-
- public Class<TableGenerator> getType() {
- return TableGenerator.class;
- }
-
- // ********** validation **********
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((TableGenerator) node);
- }
-
- protected boolean isEquivalentTo(TableGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.specifiedTable, generator.getSpecifiedTable()) &&
- Tools.valuesAreEqual(this.specifiedSchema, generator.getSpecifiedSchema()) &&
- Tools.valuesAreEqual(this.specifiedCatalog, generator.getSpecifiedCatalog()) &&
- Tools.valuesAreEqual(this.specifiedPkColumnName, generator.getSpecifiedPkColumnName()) &&
- Tools.valuesAreEqual(this.specifiedValueColumnName, generator.getSpecifiedValueColumnName()) &&
- Tools.valuesAreEqual(this.specifiedPkColumnValue, generator.getSpecifiedPkColumnValue()) &&
- uniqueConstrainsAreEquivalentTo(generator);
- }
-
- protected boolean uniqueConstrainsAreEquivalentTo(TableGenerator generator) {
- if (this.getUniqueConstraintsSize() != generator.getUniqueConstraintsSize()) {
- return false;
- }
-
- for (int i=0; i<this.getUniqueConstraintsSize(); i++) {
- if (! this.uniqueConstraintContainer.get(i).isEquivalentTo(generator.getUniqueConstraint(i))) {
- return false;
- }
- }
- return true;
- }
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaTableGenerator javaTableGenerator) {
- super.convertFrom(javaTableGenerator);
- this.setSpecifiedTable(javaTableGenerator.getSpecifiedTable());
- this.setSpecifiedSchema(javaTableGenerator.getSpecifiedSchema());
- this.setSpecifiedCatalog(javaTableGenerator.getSpecifiedCatalog());
- this.setSpecifiedPkColumnName(javaTableGenerator.getSpecifiedPkColumnName());
- this.setSpecifiedValueColumnName(javaTableGenerator.getSpecifiedValueColumnName());
- this.setSpecifiedPkColumnValue(javaTableGenerator.getSpecifiedPkColumnValue());
- for (JavaUniqueConstraint javaUniqueConstraint : javaTableGenerator.getUniqueConstraints()) {
- this.addUniqueConstraint().convertFrom(javaUniqueConstraint);
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmUniqueConstraint constraint : this.getUniqueConstraints()) {
- result = constraint.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * called if the database is connected:
- * table, schema, catalog, pkColumnName, valueColumnName
- */
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.tableTouches(pos)) {
- return this.getCandidateTables();
- }
- if (this.pkColumnNameTouches(pos)) {
- return this.getCandidateColumnNames();
- }
- if (this.valueColumnNameTouches(pos)) {
- return this.getCandidateColumnNames();
- }
- return null;
- }
-
- // ********** content assist: table
-
- protected boolean tableTouches(int pos) {
- return this.xmlGenerator.tableTouches(pos);
- }
-
- protected Iterable<String> getCandidateTables() {
- Schema dbSchema = this.getDbSchema();
- return (dbSchema != null) ? dbSchema.getSortedTableIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** content assist: pkColumnName
-
- protected boolean pkColumnNameTouches(int pos) {
- return this.xmlGenerator.pkColumnNameTouches(pos);
- }
-
- protected Iterable<String> getCandidateColumnNames() {
- Table table = this.getDbTable();
- return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
- }
-
- // ********** content assist: valueColumnName
-
- protected boolean valueColumnNameTouches(int pos) {
- return this.xmlGenerator.valueColumnNameTouches(pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java
deleted file mode 100644
index fdd0cbbe07..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTransientMapping;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient;
-
-/**
- * <code>orm.xml</code> transient mapping
- */
-public class GenericOrmTransientMapping
- extends AbstractOrmAttributeMapping<XmlTransient>
- implements OrmTransientMapping
-{
- public GenericOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient xmlMapping) {
- super(parent, xmlMapping);
- }
-
- public String getKey() {
- return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 90;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmTransientMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getTransients().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getTransients().remove(this.xmlAttributeMapping);
- }
-
- // ********** metamodel **********
-
- @Override
- public MetamodelField getMetamodelField() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java
deleted file mode 100644
index 04c89c27dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
-
-public class GenericOrmUniqueConstraint
- extends AbstractOrmReadOnlyUniqueConstraint
- implements OrmUniqueConstraint
-{
- protected Owner owner;
- protected final XmlUniqueConstraint xmlUniqueConstraint;
-
-
- public GenericOrmUniqueConstraint(XmlContextNode parent, Owner owner, XmlUniqueConstraint xmlUniqueConstraint) {
- super(parent);
- this.owner = owner;
- this.xmlUniqueConstraint = xmlUniqueConstraint;
- this.initializeColumnNames();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncColumnNames();
- }
-
-
- // ********** column names **********
-
- public void addColumnName(String columnName) {
- this.addColumnName(this.columnNames.size(), columnName);
- }
-
- public void addColumnName(int index, String columnName) {
- this.addItemToList(index, columnName, this.columnNames, COLUMN_NAMES_LIST);
- this.xmlUniqueConstraint.getColumnNames().add(index, columnName);
- }
-
- public void removeColumnName(String columnName) {
- this.removeColumnName(this.columnNames.indexOf(columnName));
- }
-
- public void removeColumnName(int index) {
- this.removeItemFromList(index, this.columnNames, COLUMN_NAMES_LIST);
- this.xmlUniqueConstraint.getColumnNames().remove(index);
- }
-
- public void moveColumnName(int targetIndex, int sourceIndex) {
- this.moveItemInList(targetIndex, sourceIndex, this.columnNames, COLUMN_NAMES_LIST);
- this.xmlUniqueConstraint.getColumnNames().move(targetIndex, sourceIndex);
- }
-
- protected void initializeColumnNames() {
- for (String xmlColumnName : this.xmlUniqueConstraint.getColumnNames()) {
- this.columnNames.add(xmlColumnName);
- }
- }
-
- @Override
- protected Iterable<String> getResourceColumnNames() {
- return this.xmlUniqueConstraint.getColumnNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlUniqueConstraint.getValidationTextRange();
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
- }
-
- public boolean isEquivalentTo(UniqueConstraint uniqueConstraint) {
- return columnNamesAreEquivalent(uniqueConstraint);
- }
-
- protected boolean columnNamesAreEquivalent(UniqueConstraint uniqueConstraint) {
- if (this.getColumnNamesSize() != uniqueConstraint.getColumnNamesSize()) {
- return false;
- }
-
- for (int i=0; i<this.getColumnNamesSize(); i++) {
- if (! Tools.valuesAreEqual(this.columnNames.get(i), uniqueConstraint.getColumnName(i))) {
- return false;
- }
- }
- return true;
- }
-
- // ********** completion proposals **********
-
- @Override
- protected Iterable<String> getConnectedXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getConnectedXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.columnNamesTouches(pos)) {
- return this.getCandidateColumnNames();
- }
- return null;
- }
-
- protected boolean columnNamesTouches(int pos) {
- return this.xmlUniqueConstraint.columnNamesTouches(pos);
- }
-
- protected Iterable<String> getCandidateColumnNames() {
- return this.owner.getCandidateUniqueConstraintColumnNames();
- }
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public XmlUniqueConstraint getXmlUniqueConstraint() {
- return this.xmlUniqueConstraint;
- }
-
- public void initializeFrom(ReadOnlyUniqueConstraint oldUniqueConstraint) {
- for (String columnName : oldUniqueConstraint.getColumnNames()) {
- this.addColumnName(columnName);
- }
- }
-
- public void convertFrom(JavaUniqueConstraint javaUniqueConstraint) {
- this.initializeFrom(javaUniqueConstraint);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java
deleted file mode 100644
index 5cd6602686..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVersionMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
-
-
-public class GenericOrmVersionMapping
- extends AbstractOrmVersionMapping<XmlVersion>
-{
- public GenericOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion xmlMapping) {
- super(parent, xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java
deleted file mode 100644
index 4618e9f0cc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmVirtualAssociationOverride2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Virtual <code>orm.xml</code> association override
- */
-public class GenericOrmVirtualAssociationOverride
- extends AbstractOrmVirtualOverride<OrmAssociationOverrideContainer>
- implements OrmVirtualAssociationOverride2_0
-{
- protected final OrmVirtualOverrideRelationship relationship;
-
-
- public GenericOrmVirtualAssociationOverride(OrmAssociationOverrideContainer parent, String name) {
- super(parent, name);
- this.relationship = this.buildRelationship();
- }
-
- @Override
- public void update() {
- super.update();
- this.relationship.update();
- }
-
- @Override
- public OrmAssociationOverride convertToSpecified() {
- return (OrmAssociationOverride) super.convertToSpecified();
- }
-
- public RelationshipMapping getMapping() {
- return this.getContainer().getRelationshipMapping(this.name);
- }
-
- protected OrmAssociationOverrideContainer2_0 getContainer2_0() {
- return (OrmAssociationOverrideContainer2_0) this.getContainer();
- }
-
-
- // ********** relationship **********
-
- public OrmVirtualOverrideRelationship getRelationship() {
- return this.relationship;
- }
-
- /**
- * The relationship should be available (since its presence precipitated the
- * creation of the virtual override).
- */
- protected OrmVirtualOverrideRelationship buildRelationship() {
- return this.getContextNodeFactory().buildOrmVirtualOverrideRelationship(this);
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getContainer().resolveOverriddenRelationship(this.name);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.relationship.validate(messages, reporter);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java
deleted file mode 100644
index ca5d64aba2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Virtual <code>orm.xml</code> attribute override
- */
-public class GenericOrmVirtualAttributeOverride
- extends AbstractOrmVirtualOverride<OrmAttributeOverrideContainer>
- implements OrmVirtualAttributeOverride, OrmVirtualColumn.Owner
-{
- protected final OrmVirtualColumn column;
-
-
- public GenericOrmVirtualAttributeOverride(OrmAttributeOverrideContainer parent, String name) {
- super(parent, name);
- this.column = this.buildColumn();
- }
-
- @Override
- public void update() {
- super.update();
- this.column.update();
- }
-
- @Override
- public OrmAttributeOverride convertToSpecified() {
- return (OrmAttributeOverride) super.convertToSpecified();
- }
-
-
- // ********** column **********
-
- public OrmVirtualColumn getColumn() {
- return this.column;
- }
-
- /**
- * The original column should be available (since the presence of its
- * attribute is what precipitated the creation of the virtual override).
- */
- protected OrmVirtualColumn buildColumn() {
- return this.getContextNodeFactory().buildOrmVirtualColumn(this, this);
- }
-
-
- // ********** column owner implementation **********
-
- @Override
- public String getDefaultTableName() {
- String overriddenColumnTable = this.getOverriddenColumnTable();
- return (overriddenColumnTable != null) ? overriddenColumnTable : super.getDefaultTableName();
- }
-
- protected String getOverriddenColumnTable() {
- ReadOnlyColumn overriddenColumn = this.resolveOverriddenColumn();
- // pretty sure this is the *specified* table...
- return (overriddenColumn == null) ? null : overriddenColumn.getSpecifiedTable();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- String overriddenColumnName = this.getOverriddenColumnName();
- return (overriddenColumnName != null) ? overriddenColumnName : this.name;
- }
-
- protected String getOverriddenColumnName() {
- ReadOnlyColumn overriddenColumn = this.resolveOverriddenColumn();
- return (overriddenColumn == null) ? null : overriddenColumn.getName();
- }
-
- public ReadOnlyColumn resolveOverriddenColumn() {
- return this.getContainer().resolveOverriddenColumn(this.name);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.column.validate(messages, reporter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualColumn.java
deleted file mode 100644
index 8797fb7aa9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualColumn.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVirtualBaseColumn;
-
-/**
- * <code>orm.xml</code> virtual column
- */
-public class GenericOrmVirtualColumn
- extends AbstractOrmVirtualBaseColumn<OrmVirtualColumn.Owner, ReadOnlyColumn>
- implements OrmVirtualColumn
-{
- protected Integer specifiedLength;
- protected int defaultLength;
-
- protected Integer specifiedPrecision;
- protected int defaultPrecision;
-
- protected Integer specifiedScale;
- protected int defaultScale;
-
-
- public GenericOrmVirtualColumn(XmlContextNode parent, OrmVirtualColumn.Owner owner) {
- super(parent, owner);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedLength(this.buildSpecifiedLength());
- this.setDefaultLength(this.buildDefaultLength());
-
- this.setSpecifiedPrecision(this.buildSpecifiedPrecision());
- this.setDefaultPrecision(this.buildDefaultPrecision());
-
- this.setSpecifiedScale(this.buildSpecifiedScale());
- this.setDefaultScale(this.buildDefaultScale());
- }
-
-
- // ********** column **********
-
- @Override
- public ReadOnlyColumn getOverriddenColumn() {
- return this.owner.resolveOverriddenColumn();
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return (this.specifiedLength != null) ? this.specifiedLength.intValue() : this.defaultLength;
- }
-
- public Integer getSpecifiedLength() {
- return this.specifiedLength;
- }
-
- protected void setSpecifiedLength(Integer length) {
- Integer old = this.specifiedLength;
- this.specifiedLength = length;
- this.firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, old, length);
- }
-
- protected Integer buildSpecifiedLength() {
- return this.getOverriddenColumn().getSpecifiedLength();
- }
-
- public int getDefaultLength() {
- return this.defaultLength;
- }
-
- protected void setDefaultLength(int length) {
- int old = this.defaultLength;
- this.defaultLength = length;
- this.firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, length);
- }
-
- protected int buildDefaultLength() {
- return DEFAULT_LENGTH;
- }
-
-
- // ********** precision **********
-
- public int getPrecision() {
- return (this.specifiedPrecision != null) ? this.specifiedPrecision.intValue() : this.defaultPrecision;
- }
-
- public Integer getSpecifiedPrecision() {
- return this.specifiedPrecision;
- }
-
- protected void setSpecifiedPrecision(Integer precision) {
- Integer old = this.specifiedPrecision;
- this.specifiedPrecision = precision;
- this.firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, old, precision);
- }
-
- protected Integer buildSpecifiedPrecision() {
- return this.getOverriddenColumn().getSpecifiedPrecision();
- }
-
- public int getDefaultPrecision() {
- return this.defaultPrecision;
- }
-
- protected void setDefaultPrecision(int precision) {
- int old = this.defaultPrecision;
- this.defaultPrecision = precision;
- this.firePropertyChanged(DEFAULT_PRECISION_PROPERTY, old, precision);
- }
-
- protected int buildDefaultPrecision() {
- return DEFAULT_PRECISION;
- }
-
-
- // ********** scale **********
-
- public int getScale() {
- return (this.specifiedScale != null) ? this.specifiedScale.intValue() : this.defaultScale;
- }
-
- public Integer getSpecifiedScale() {
- return this.specifiedScale;
- }
-
- protected void setSpecifiedScale(Integer scale) {
- Integer old = this.specifiedScale;
- this.specifiedScale = scale;
- this.firePropertyChanged(SPECIFIED_SCALE_PROPERTY, old, scale);
- }
-
- protected Integer buildSpecifiedScale() {
- return this.getOverriddenColumn().getSpecifiedScale();
- }
-
- public int getDefaultScale() {
- return this.defaultScale;
- }
-
- protected void setDefaultScale(int scale) {
- int old = this.defaultScale;
- this.defaultScale = scale;
- this.firePropertyChanged(DEFAULT_SCALE_PROPERTY, old, scale);
- }
-
- protected int buildDefaultScale() {
- return DEFAULT_SCALE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java
deleted file mode 100644
index 25909adac9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVirtualBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * <code>orm.xml</code> virtual join column
- */
-public class GenericOrmVirtualJoinColumn
- extends AbstractOrmVirtualBaseColumn<OrmReadOnlyJoinColumn.Owner, ReadOnlyJoinColumn>
- implements OrmVirtualJoinColumn
-{
- protected final ReadOnlyJoinColumn overriddenColumn;
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
- super(parent, owner);
- this.overriddenColumn = overriddenColumn;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedReferencedColumnName(this.buildSpecifiedReferencedColumnName());
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** column **********
-
- @Override
- public ReadOnlyJoinColumn getOverriddenColumn() {
- return this.overriddenColumn;
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- protected void setSpecifiedReferencedColumnName(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- return this.getOverriddenColumn().getSpecifiedReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultReferencedColumnName() {
- return MappingTools.buildJoinColumnDefaultReferencedColumnName(this.owner);
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** validation **********
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.getValidationTextRange();
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmJoinColumnTextRangeResolver(this);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java
deleted file mode 100644
index e77e69ed0c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmVirtualOverrideJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyAssociationOverride2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmVirtualOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.db.Table;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmVirtualOverrideRelationship
- extends AbstractOrmXmlContextNode
- implements OrmVirtualOverrideRelationship2_0
-{
- protected OrmVirtualRelationshipStrategy strategy;
-
- protected final OrmVirtualJoinColumnRelationshipStrategy joinColumnStrategy;
-
- // JPA 2.0
- protected final OrmVirtualJoinTableRelationshipStrategy joinTableStrategy;
-
-
- public GenericOrmVirtualOverrideRelationship(OrmVirtualAssociationOverride parent) {
- super(parent);
- this.joinColumnStrategy = this.buildJoinColumnStrategy();
- this.joinTableStrategy = this.buildJoinTableStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.setStrategy(this.buildStrategy());
- this.joinColumnStrategy.update();
- this.joinTableStrategy.update();
- }
-
-
- // ********** strategy **********
-
- public OrmVirtualRelationshipStrategy getStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(OrmVirtualRelationshipStrategy strategy) {
- OrmVirtualRelationshipStrategy old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- protected OrmVirtualRelationshipStrategy buildStrategy() {
- return this.isJpa2_0Compatible() ?
- this.buildStrategy2_0() :
- this.joinColumnStrategy;
- }
-
- /**
- * The overridden mapping determines the override's strategy.
- */
- protected OrmVirtualRelationshipStrategy buildStrategy2_0() {
- MappingRelationshipStrategy2_0 mappingStrategy = this.getMappingStrategy();
- return (mappingStrategy != null) ?
- (OrmVirtualRelationshipStrategy) mappingStrategy.selectOverrideStrategy(this) :
- this.buildMissingMappingStrategy();
- }
-
- /**
- * Get the strategy from the overridden mapping.
- */
- protected MappingRelationshipStrategy2_0 getMappingStrategy() {
- RelationshipMapping mapping = this.getMapping();
- return (mapping == null) ? null : (MappingRelationshipStrategy2_0) mapping.getRelationship().getStrategy();
- }
-
- /**
- * Return the strategy to use when the override's name does not match the
- * name of an appropriate relationship mapping.
- */
- protected OrmVirtualRelationshipStrategy buildMissingMappingStrategy() {
- return this.joinColumnStrategy.hasSpecifiedJoinColumns() ?
- this.joinColumnStrategy :
- this.joinTableStrategy;
- }
-
-
- // ********** join column strategy **********
-
- public OrmVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy() {
- return this.joinColumnStrategy;
- }
-
- public boolean strategyIsJoinColumn() {
- return this.strategy == this.joinColumnStrategy;
- }
-
- public boolean mayHaveDefaultJoinColumn() {
- // association overrides do not have defaults
- return false;
- }
-
- protected OrmVirtualJoinColumnRelationshipStrategy buildJoinColumnStrategy() {
- return new GenericOrmVirtualOverrideJoinColumnRelationshipStrategy(this);
- }
-
-
- // ********** join table strategy **********
-
- public OrmVirtualJoinTableRelationshipStrategy getJoinTableStrategy() {
- return this.joinTableStrategy;
- }
-
- public boolean strategyIsJoinTable() {
- return this.strategy == this.joinTableStrategy;
- }
-
- public boolean mayHaveDefaultJoinTable() {
- // association overrides do not have defaults
- return false;
- }
-
- protected OrmVirtualJoinTableRelationshipStrategy buildJoinTableStrategy() {
- return new GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0(this);
- }
-
-
- // ********** conversions **********
-
- public void initializeOn(Relationship newRelationship) {
- newRelationship.initializeFromJoinTableRelationship(this);
- newRelationship.initializeFromJoinColumnRelationship(this);
- }
-
- public void initializeOnSpecified(OverrideRelationship specifiedRelationship) {
- specifiedRelationship.initializeFromVirtualJoinColumnRelationship(this);
- specifiedRelationship.initializeFromVirtualJoinTableRelationship(this);
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmVirtualAssociationOverride getParent() {
- return (OrmVirtualAssociationOverride) super.getParent();
- }
-
- protected OrmVirtualAssociationOverride getAssociationOverride() {
- return this.getParent();
- }
-
- protected ReadOnlyAssociationOverride2_0 getAssociationOverride2_0() {
- return (ReadOnlyAssociationOverride2_0) this.getAssociationOverride();
- }
-
- public TypeMapping getTypeMapping() {
- return this.getAssociationOverride().getTypeMapping();
- }
-
- public String getAttributeName() {
- return this.getAssociationOverride().getName();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return this.getAssociationOverride().tableNameIsInvalid(tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return this.getAssociationOverride().getCandidateTableNames();
- }
-
- public Table resolveDbTable(String tableName) {
- return this.getAssociationOverride().resolveDbTable(tableName);
- }
-
- public String getDefaultTableName() {
- return this.getAssociationOverride().getDefaultTableName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public boolean isVirtual() {
- return true;
- }
-
- public RelationshipMapping getMapping() {
- return this.getAssociationOverride().getMapping();
- }
-
- public ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getAssociationOverride().resolveOverriddenRelationship();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getAssociationOverride().getValidationTextRange();
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.strategy.validate(messages, reporter);
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java
deleted file mode 100644
index 03c99592bb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVirtualNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmPrimaryKeyJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.db.Column;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * <code>orm.xml</code> virtual primary key join column
- */
-public class GenericOrmVirtualPrimaryKeyJoinColumn
- extends AbstractOrmVirtualNamedColumn<OrmReadOnlyBaseJoinColumn.Owner, JavaPrimaryKeyJoinColumn>
- implements OrmVirtualPrimaryKeyJoinColumn
-{
- protected final JavaPrimaryKeyJoinColumn javaColumn;
-
- protected String specifiedReferencedColumnName;
- protected String defaultReferencedColumnName;
-
-
- public GenericOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaColumn) {
- super(parent, owner);
- this.javaColumn = javaColumn;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
-
- this.setSpecifiedReferencedColumnName(this.buildSpecifiedReferencedColumnName());
- this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
- }
-
-
- // ********** column **********
-
- @Override
- public JavaPrimaryKeyJoinColumn getOverriddenColumn() {
- return this.javaColumn;
- }
-
-
- // ********** referenced column name **********
-
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName != null) ? this.specifiedReferencedColumnName : this.defaultReferencedColumnName;
- }
-
- public String getSpecifiedReferencedColumnName() {
- return this.specifiedReferencedColumnName;
- }
-
- protected void setSpecifiedReferencedColumnName(String name) {
- String old = this.specifiedReferencedColumnName;
- this.specifiedReferencedColumnName = name;
- this.firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildSpecifiedReferencedColumnName() {
- return this.getOverriddenColumn().getSpecifiedReferencedColumnName();
- }
-
- public String getDefaultReferencedColumnName() {
- return this.defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String name) {
- String old = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = name;
- this.firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, old, name);
- }
-
- protected String buildDefaultReferencedColumnName() {
- return this.buildDefaultName();
- }
-
-
- // ********** database stuff **********
-
- public Table getReferencedColumnDbTable() {
- return this.owner.getReferencedColumnDbTable();
- }
-
- protected Column getReferencedDbColumn() {
- Table table = this.getReferencedColumnDbTable();
- return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
- }
-
- public boolean referencedColumnIsResolved() {
- return this.getReferencedDbColumn() != null;
- }
-
-
- // ********** misc **********
-
- public String getTable() {
- return this.owner.getDefaultTableName();
- }
-
-
- // ********** validation **********
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmPrimaryKeyJoinColumnTextRangeResolver(this);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualUniqueConstraint.java
deleted file mode 100644
index 3b2c7d8298..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualUniqueConstraint.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualUniqueConstraint;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmReadOnlyUniqueConstraint;
-
-public class GenericOrmVirtualUniqueConstraint
- extends AbstractOrmReadOnlyUniqueConstraint
- implements OrmVirtualUniqueConstraint
-{
- protected final ReadOnlyUniqueConstraint overriddenUniqueConstraint;
-
-
- public GenericOrmVirtualUniqueConstraint(XmlContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint) {
- super(parent);
- this.overriddenUniqueConstraint = overriddenUniqueConstraint;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.syncColumnNames();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getParent().getValidationTextRange();
- }
-
-
- // ********** misc **********
-
- @Override
- public XmlContextNode getParent() {
- return (XmlContextNode) super.getParent();
- }
-
- public ReadOnlyUniqueConstraint getOverriddenUniqueConstraint() {
- return this.overriddenUniqueConstraint;
- }
-
- @Override
- protected Iterable<String> getResourceColumnNames() {
- return this.overriddenUniqueConstraint.getColumnNames();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXml.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXml.java
deleted file mode 100644
index 92a2f1d3ec..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXml.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.orm;
-
-import java.util.List;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.Generator;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * JPA <code>orm.xml</code> file.
- */
-public class GenericOrmXml
- extends AbstractOrmXmlContextNode
- implements OrmXml
-{
- /**
- * If the XML resource's content type changes, the mapping file
- * ref will throw out its current mapping file.
- */
- protected final JpaXmlResource xmlResource; // never null
-
- /**
- * The resource type will only change if the XML file's version changes
- * (since, if the content type changes, we get garbage-collected).
- */
- protected JptResourceType resourceType;
-
- /**
- * Cache the <code>orm.xml</code> definition alongside the resource type.
- * (The definition is determined by the resource type.)
- */
- protected OrmXmlDefinition definition;
-
- /**
- * The root element of the <code>orm.xml</code> file.
- */
- protected EntityMappings root;
-
-
- public GenericOrmXml(MappingFileRef parent, JpaXmlResource xmlResource) {
- super(parent);
- this.checkXmlResource(xmlResource);
- this.xmlResource = xmlResource;
- this.resourceType = xmlResource.getResourceType();
- this.definition = this.buildDefinition();
-
- XmlEntityMappings xmlEntityMappings = (XmlEntityMappings) xmlResource.getRootObject();
- if (xmlEntityMappings != null) {
- this.root = this.buildRoot(xmlEntityMappings);
- }
- }
-
-
- // ********** synchronize/update **********
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml#synchronizeWithResourceModel()
- */
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- XmlEntityMappings oldXmlEntityMappings = (this.root == null) ? null : this.root.getXmlEntityMappings();
- XmlEntityMappings newXmlEntityMappings = (XmlEntityMappings) this.xmlResource.getRootObject();
- JptResourceType newResourceType = this.xmlResource.getResourceType();
-
- // If the old and new XML entity mappings are different instances,
- // we scrap the old context entity mappings and rebuild.
- // (This can happen when the resource model changes drastically,
- // such as a CVS checkout or an edit reversion.)
- if ((oldXmlEntityMappings != newXmlEntityMappings) ||
- (newXmlEntityMappings == null) ||
- this.valuesAreDifferent(this.resourceType, newResourceType)
- ) {
- if (this.root != null) {
- this.unregisterRootStructureNode();
- this.root.dispose();
- this.setRoot(null);
- }
- }
-
- this.resourceType = newResourceType;
- this.definition = this.buildDefinition();
-
- if (newXmlEntityMappings != null) {
- if (this.root == null) {
- this.setRoot(this.buildRoot(newXmlEntityMappings));
- } else {
- // the context entity mappings already holds the XML entity mappings
- this.root.synchronizeWithResourceModel();
- }
- }
- }
-
- @Override
- public void update() {
- super.update();
- if (this.root != null) {
- this.root.update();
- // this will happen redundantly - need to hold JpaFile?
- this.registerRootStructureNode();
- }
- }
-
-
- // ********** resource type/definition **********
-
- @Override
- public JptResourceType getResourceType() {
- return this.resourceType;
- }
-
- @Override
- public OrmXmlDefinition getMappingFileDefinition() {
- return this.definition;
- }
-
- protected OrmXmlDefinition buildDefinition() {
- return (OrmXmlDefinition) this.getJpaPlatform().getResourceDefinition(this.resourceType);
- }
-
-
- // ********** root **********
-
- public EntityMappings getRoot() {
- return this.root;
- }
-
- protected void setRoot(EntityMappings root) {
- EntityMappings old = this.root;
- this.root = root;
- this.firePropertyChanged(ROOT_PROPERTY, old, root);
- }
-
- protected EntityMappings buildRoot(XmlEntityMappings xmlEntityMappings) {
- return this.getContextNodeFactory().buildEntityMappings(this, xmlEntityMappings);
- }
-
-
- // ********** queries/generators **********
-
- public Iterable<Query> getMappingFileQueries() {
- return (this.root != null) ? this.root.getMappingFileQueries() : EmptyIterable.<Query>instance();
- }
-
- public Iterable<Generator> getMappingFileGenerators() {
- return (this.root != null) ? this.root.getMappingFileGenerators() : EmptyIterable.<Generator>instance();
- }
-
-
- // ********** misc **********
-
- protected void checkXmlResource(JpaXmlResource resource) {
- if (resource == null) {
- throw new NullPointerException();
- }
- if ( ! resource.getContentType().isKindOf(JptJpaCorePlugin.MAPPING_FILE_CONTENT_TYPE)) {
- throw new IllegalArgumentException("Content type is not 'mapping file': " + resource); //$NON-NLS-1$
- }
- }
-
- @Override
- public MappingFileRef getParent() {
- return (MappingFileRef) super.getParent();
- }
-
- @Override
- public IResource getResource() {
- return this.xmlResource.getFile();
- }
-
- protected JpaFile getJpaFile() {
- return this.getJpaFile(this.xmlResource.getFile());
- }
-
- public boolean isLatestSupportedVersion() {
- return XmlFile_.isLatestSupportedVersion(this);
- }
-
- public boolean isIn(IFolder folder) {
- IResource member = folder.findMember(this.xmlResource.getFile().getName());
- IFile file = this.xmlResource.getFile();
- return Tools.valuesAreEqual(member, file);
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<OrmXml> getType() {
- return OrmXml.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- if ((this.root != null) && this.root.containsOffset(textOffset)) {
- return this.root.getStructureNode(textOffset);
- }
- return this;
- }
-
- // never actually selected
- public TextRange getSelectionTextRange() {
- return TextRange.Empty.instance();
- }
-
- public void dispose() {
- if (this.root != null) {
- JpaFile jpaFile = this.getJpaFile();
- if (jpaFile != null) {
- this.unregisterRootStructureNode();
- }
- this.root.dispose();
- }
- }
-
- // TODO hold the JpaFile?
- protected void registerRootStructureNode() {
- this.getJpaFile().addRootStructureNode(this.xmlResource, this.root);
- }
-
- protected void unregisterRootStructureNode() {
- this.getJpaFile().removeRootStructureNode(this.xmlResource, this.root);
- }
-
-
- // ********** MappingFile implementation **********
-
- public JpaXmlResource getXmlResource() {
- return this.xmlResource;
- }
-
- public OrmPersistentType getPersistentType(String name) {
- return (this.root == null) ? null : this.root.getPersistentType(name);
- }
-
-
- // ********** PersistentTypeContainer implementation **********
-
- /**
- * All <code>orm.xml</code> mapping files must be able to generate a static metamodel
- * because 1.0 <code>orm.xml</code> files can be referenced from 2.0
- * <code>persistence.xml</code>
- * files.
- */
- public Iterable<OrmPersistentType> getPersistentTypes() {
- return (this.root != null) ? this.root.getPersistentTypes() : EmptyIterable.<OrmPersistentType>instance();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<DeleteEdit> createDeleteTypeEdits(IType type) {
- return (this.root != null) ?
- this.root.createDeleteTypeEdits(type) :
- EmptyIterable.<DeleteEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return (this.root != null) ?
- this.root.createRenameTypeEdits(originalType, newName) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return (this.root != null) ?
- this.root.createMoveTypeEdits(originalType, newPackage) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return (this.root != null) ?
- this.root.createRenamePackageEdits(originalPackage, newName) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- if (this.root != null) {
- this.root.validate(messages, reporter);
- }
- }
-
- public TextRange getValidationTextRange() {
- // since this is the entire file, point to the top of the file
- return TextRange.Empty.instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java
deleted file mode 100644
index af8d7cc6c7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.jpa1.context.orm;
-
-import java.util.ArrayList;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.orm.NullOrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmBasicMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmEmbeddedIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmEmbeddedMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmManyToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmManyToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOneToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOneToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmTransientMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmVersionMappingDefinition;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-
-public class GenericOrmXmlDefinition
- extends AbstractOrmXmlDefinition
-{
- // singleton
- private static final OrmXmlDefinition INSTANCE = new GenericOrmXmlDefinition();
-
- /**
- * Return the singleton
- */
- public static OrmXmlDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private GenericOrmXmlDefinition() {
- super();
- }
-
- public JptResourceType getResourceType() {
- return JptJpaCorePlugin.ORM_XML_1_0_RESOURCE_TYPE;
- }
-
- public EFactory getResourceNodeFactory() {
- return OrmFactory.eINSTANCE;
- }
-
- @Override
- protected OrmXmlContextNodeFactory buildContextNodeFactory() {
- return new GenericOrmXmlContextNodeFactory();
- }
-
- @Override
- protected void addAttributeMappingDefinitionsTo(ArrayList<OrmAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- /**
- * Order should not matter here; but we'll use the same order as for Java.
- * @see GenericJpaPlatformProvider
- */
- protected static final OrmAttributeMappingDefinition[] ATTRIBUTE_MAPPING_DEFINITIONS = new OrmAttributeMappingDefinition[] {
- OrmTransientMappingDefinition.instance(),
- OrmIdMappingDefinition.instance(),
- OrmVersionMappingDefinition.instance(),
- OrmBasicMappingDefinition.instance(),
- OrmEmbeddedMappingDefinition.instance(),
- OrmEmbeddedIdMappingDefinition.instance(),
- OrmManyToManyMappingDefinition.instance(),
- OrmManyToOneMappingDefinition.instance(),
- OrmOneToManyMappingDefinition.instance(),
- OrmOneToOneMappingDefinition.instance(),
- NullOrmAttributeMappingDefinition.instance()
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmConverter.java
deleted file mode 100644
index 8ea7e1a03d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmConverter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-
-public class NullOrmConverter
- extends AbstractOrmXmlContextNode
- implements OrmConverter
-{
- public NullOrmConverter(OrmAttributeMapping parent) {
- super(parent);
- }
-
- @Override
- public OrmAttributeMapping getParent() {
- return (OrmAttributeMapping) super.getParent();
- }
-
- public void initialize() {
- // NOP
- }
-
- public Class<? extends Converter> getType() {
- return null;
- }
-
- public TextRange getValidationTextRange() {
- return this.getParent().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmJoinColumnRelationshipStrategy.java
deleted file mode 100644
index 5cd0538991..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/NullOrmJoinColumnRelationshipStrategy.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa1.context.orm;
-
-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.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinColumnRelationshipStrategy2_0;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Used by
- * {@link org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmOneToManyRelationship#buildJoinColumnStrategy()}
- * in a JPA 1.0 project.
- */
-public class NullOrmJoinColumnRelationshipStrategy
- extends AbstractOrmXmlContextNode
- implements OrmMappingJoinColumnRelationshipStrategy2_0
-{
- public NullOrmJoinColumnRelationshipStrategy(OrmJoinColumnRelationship parent) {
- super(parent);
- }
-
-
- // ********** join columns **********
-
- public ListIterable<OrmJoinColumn> getJoinColumns() {
- return EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- public int getJoinColumnsSize() {
- return 0;
- }
-
-
- // ********** specified join columns **********
-
- public ListIterable<OrmJoinColumn> getSpecifiedJoinColumns() {
- return EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- public int getSpecifiedJoinColumnsSize() {
- return 0;
- }
-
- public boolean hasSpecifiedJoinColumns() {
- return false;
- }
-
- public OrmJoinColumn getSpecifiedJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public OrmJoinColumn addSpecifiedJoinColumn() {
- throw new UnsupportedOperationException();
- }
-
- public OrmJoinColumn addSpecifiedJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
- throw new UnsupportedOperationException();
- }
-
- public void removeSpecifiedJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** default join column **********
-
- public OrmJoinColumn getDefaultJoinColumn() {
- return null;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- public String getColumnTableNotValidDescription() {
- return null;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmJoinColumnRelationship getParent() {
- return (OrmJoinColumnRelationship) super.getParent();
- }
-
- public OrmJoinColumnRelationship getRelationship() {
- return this.getParent();
- }
-
- public void initializeFrom(ReadOnlyJoinColumnRelationshipStrategy oldStrategy) {
- // NOP
- }
-
- public void initializeFromVirtual(ReadOnlyJoinColumnRelationshipStrategy oldStrategy) {
- // NOP
- }
-
- public ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship) {
- return null;
- }
-
- public void addStrategy() {
- // NOP
- }
-
- public void removeStrategy() {
- // NOP
- }
-
- public boolean isTargetForeignKey() {
- return false;
- }
-
- public TypeMapping getRelationshipTarget() {
- return null;
- }
-
- public String getTableName() {
- return null;
- }
-
- public boolean isOverridable() {
- return false;
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return true;
- }
-
- public Table resolveDbTable(String tableName) {
- return null;
- }
-
- public TypeMapping getRelationshipSource() {
- return this.getRelationshipMapping().getTypeMapping();
- }
-
- protected RelationshipMapping getRelationshipMapping() {
- return this.getRelationship().getMapping();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java
deleted file mode 100644
index 1cba7cb9d6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa1.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping;
-
-/**
- * This will be used in cases where Java-supported attribute mapping types
- * are not supported by the particular version of the <code>orm.xml</code>
- * file. For example, EclipseLink supports variable 1:1 mappings, but the
- * generic <code>orm.xml</code> file does not.
- */
-public class UnsupportedOrmAttributeMapping
- extends AbstractOrmAttributeMapping<XmlNullAttributeMapping>
-{
- public UnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping xmlMapping) {
- super(parent, xmlMapping);
- }
-
- public String getKey() {
- //this ends up returning the java attribute mapping key
- return this.xmlAttributeMapping.getMappingKey();
- }
-
- public int getXmlSequence() {
- return -1;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmAttributeMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes xmlAttributes) {
- throw new UnsupportedOperationException();
- }
-
- public void removeXmlAttributeMappingFrom(Attributes xmlAttributes) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** metamodel **********
-
- @Override
- public MetamodelField getMetamodelField() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java
deleted file mode 100644
index 5ad77e09a5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.persistence;
-
-import java.util.List;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.persistence.ClassRef;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>persistence.xml</code> file
- * <br>
- * <code>class</code> element
- */
-public class GenericClassRef
- extends AbstractPersistenceXmlContextNode
- implements ClassRef
-{
- /**
- * This is <code>null</code> for a <em>virtual</em> class ref.
- */
- protected final XmlJavaClassRef xmlJavaClassRef;
-
- protected String className;
-
- /**
- * The Java persistent type corresponding to the ref's class name;
- * this can be <code>null</code> if the className is invalid or
- * refers to an enum instead of a class or interface.
- */
- protected JavaPersistentType javaPersistentType;
-
-
- // ********** constructors **********
-
- /**
- * Construct a <em>specified</em> class ref; i.e. a class ref with
- * an explicit entry in the <code>persistence.xml</code>.
- */
- public GenericClassRef(PersistenceUnit parent, XmlJavaClassRef xmlJavaClassRef) {
- this(parent, xmlJavaClassRef, xmlJavaClassRef.getJavaClass());
- }
-
- /**
- * Construct an <em>virtual</em> class ref; i.e. a class ref without
- * an explicit entry in the <code>persistence.xml</code>.
- */
- public GenericClassRef(PersistenceUnit parent, String className) {
- this(parent, null, className);
- }
-
- protected GenericClassRef(PersistenceUnit parent, XmlJavaClassRef xmlJavaClassRef, String className) {
- super(parent);
- this.xmlJavaClassRef = xmlJavaClassRef;
- this.className = className;
- // 'javaPersistentType' is resolved in the update
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- // virtual class refs are matched by name in the persistence unit
- // so no need to sync it here (also, 'xmlJavaClassRef' is null...)
- if (this.isNotVirtual()) {
- // the name probably never changes...
- this.setClassName_(this.xmlJavaClassRef.getJavaClass());
- }
- if (this.javaPersistentType != null) {
- this.javaPersistentType.synchronizeWithResourceModel();
- }
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJavaPersistentType();
- }
-
-
- // ********** class name **********
-
- public String getClassName() {
- return this.className;
- }
-
- public void setClassName(String className) {
- if (this.isVirtual()) {
- throw new IllegalStateException("The name of a virtual class ref cannot be changed: " + this); //$NON-NLS-1$
- }
- this.setClassName_(className);
- this.xmlJavaClassRef.setJavaClass(className);
- }
-
- protected void setClassName_(String className) {
- String old = this.className;
- this.className = className;
- this.firePropertyChanged(CLASS_NAME_PROPERTY, old, className);
- }
-
- /**
- * Nested classes will be qualified with a '$'; the Java name is qualified
- * with a '.'. Like <code>className</code>, this can be <code>null</code>.
- */
- protected String getJavaClassName() {
- return StringTools.stringIsEmpty(this.className) ? null : this.className.replace('$', '.');
- }
-
-
- // ********** java persistent type **********
-
- public JavaPersistentType getJavaPersistentType() {
- return this.javaPersistentType;
- }
-
- protected void setJavaPersistentType(JavaPersistentType javaPersistentType) {
- JavaPersistentType old = this.javaPersistentType;
- this.javaPersistentType = javaPersistentType;
- this.firePropertyChanged(JAVA_PERSISTENT_TYPE_PROPERTY, old, javaPersistentType);
- }
-
- protected void updateJavaPersistentType() {
- JavaResourceType resourceType = this.resolveJavaResourceType();
- if (resourceType == null) {
- if (this.javaPersistentType != null) {
- this.javaPersistentType.dispose();
- this.setJavaPersistentType(null);
- }
- } else {
- if (this.javaPersistentType == null) {
- this.setJavaPersistentType(this.buildJavaPersistentType(resourceType));
- } else {
- if (this.javaPersistentType.getJavaResourceType() == resourceType) {
- this.javaPersistentType.update();
- } else {
- this.javaPersistentType.dispose();
- this.setJavaPersistentType(this.buildJavaPersistentType(resourceType));
- }
- }
- }
- }
-
- protected JavaResourceType resolveJavaResourceType() {
- String javaClassName = this.getJavaClassName();
- return (javaClassName == null) ? null : (JavaResourceType) this.getJpaProject().getJavaResourceType(javaClassName, Kind.TYPE);
- }
-
- protected JavaPersistentType buildJavaPersistentType(JavaResourceType jrpt) {
- return this.getJpaFactory().buildJavaPersistentType(this, jrpt);
- }
-
-
- // ********** misc **********
-
- @Override
- public PersistenceUnit getParent() {
- return (PersistenceUnit) super.getParent();
- }
-
- public XmlJavaClassRef getXmlClassRef() {
- return this.xmlJavaClassRef;
- }
-
- protected boolean isFor(IType type) {
- return this.isFor(type.getFullyQualifiedName('.'));
- }
-
- public boolean isFor(String typeName) {
- return Tools.valuesAreEqual(typeName, this.getJavaClassName());
- }
-
- protected boolean isInPackage(IPackageFragment packageFragment) {
- return Tools.valuesAreEqual(this.getPackageName(), packageFragment.getElementName());
- }
-
- protected String getPackageName() {
- int lastPeriod = this.className.lastIndexOf('.');
- return (lastPeriod == -1) ? null : this.className.substring(0, lastPeriod);
- }
-
- public boolean isVirtual() {
- return this.xmlJavaClassRef == null;
- }
-
- protected boolean isNotVirtual() {
- return ! this.isVirtual();
- }
-
- public boolean containsOffset(int textOffset) {
- return this.isNotVirtual() && this.xmlJavaClassRef.containsOffset(textOffset);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.getJavaClassName());
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<ClassRef> getType() {
- return ClassRef.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- return this;
- }
-
- public TextRange getSelectionTextRange() {
- return this.isVirtual() ? null : this.xmlJavaClassRef.getSelectionTextRange();
- }
-
- public void dispose() {
- if (this.javaPersistentType != null) {
- this.javaPersistentType.dispose();
- }
- }
-
-
- // ********** PersistentType.Owner implementation **********
-
- public AccessType getOverridePersistentTypeAccess() {
- // no access type at this level overrides any local access type specification
- return null;
- }
-
- public AccessType getDefaultPersistentTypeAccess() {
- return this.getPersistenceUnit().getDefaultAccess();
- }
-
-
- //*********** refactoring ***********
-
- public Iterable<DeleteEdit> createDeleteTypeEdits(final IType type) {
- if (this.isVirtual()) {
- throw new IllegalStateException();
- }
- return this.isFor(type) ?
- new SingleElementIterable<DeleteEdit>(this.createDeleteEdit()) :
- EmptyIterable.<DeleteEdit>instance();
- }
-
- protected DeleteEdit createDeleteEdit() {
- return this.xmlJavaClassRef.createDeleteEdit();
- }
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- if (this.isVirtual()) {
- throw new IllegalStateException();
- }
- return this.isFor(originalType) ?
- new SingleElementIterable<ReplaceEdit>(this.createReplaceEdit(originalType, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createReplaceEdit(IType originalType, String newName) {
- return this.xmlJavaClassRef.createRenameEdit(originalType, newName);
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- if (this.isVirtual()) {
- throw new IllegalStateException();
- }
- return this.isFor(originalType) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newPackage.getElementName())) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- if (this.isVirtual()) {
- throw new IllegalStateException();
- }
- return this.isInPackage(originalPackage) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenamePackageEdit(String newName) {
- return this.xmlJavaClassRef.createRenamePackageEdit(newName);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (StringTools.stringIsEmpty(this.className)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_CLASS,
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
-
- if (this.javaPersistentType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_NONEXISTENT_CLASS,
- new String[] {this.getJavaClassName()},
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
-
- // 190062 validate Java class only if this is the only reference to it
- // i.e. the persistence.xml ref is the only ref - none of the mapping
- // files reference the same class
- boolean validateJavaPersistentType = true;
- for (MappingFileRef mappingFileRef : this.getPersistenceUnit().getMappingFileRefsContaining(this.getJavaClassName())) {
- validateJavaPersistentType = false;
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.LOW_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_REDUNDANT_CLASS,
- new String[] {this.getJavaClassName(), mappingFileRef.getFileName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
-
- if (validateJavaPersistentType) {
- this.validateJavaPersistentType(messages, reporter);
- }
- }
-
- protected void validateJavaPersistentType(List<IMessage> messages, IReporter reporter) {
- try {
- this.javaPersistentType.validate(messages, reporter);
- } catch (Throwable t) {
- JptJpaCorePlugin.log(t);
- }
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlValidationTextRange();
- return (textRange != null) ? textRange : this.getPersistenceUnit().getValidationTextRange();
- }
-
- public TextRange getXmlValidationTextRange() {
- return this.isVirtual() ? null : this.xmlJavaClassRef.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericJarFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericJarFileRef.java
deleted file mode 100644
index eec257e95c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericJarFileRef.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.jpa1.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractJarFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef;
-
-/**
- * Context JAR file reference (from the persistence unit)
- */
-public class GenericJarFileRef
- extends AbstractJarFileRef
-{
- public GenericJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef) {
- super(parent, xmlJarFileRef);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericMappingFileRef.java
deleted file mode 100644
index 5d5b555a53..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericMappingFileRef.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.persistence;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractMappingFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * <code>persistence.xml</code> file
- * <br>
- * <code>mapping-file</code> element
- */
-public class GenericMappingFileRef
- extends AbstractMappingFileRef
-{
- protected final XmlMappingFileRef xmlMappingFileRef;
-
-
- public GenericMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef) {
- super(parent, xmlMappingFileRef.getFileName());
- this.xmlMappingFileRef = xmlMappingFileRef;
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- // set the file name *before* calling super
- this.setFileName_(this.xmlMappingFileRef.getFileName());
- super.synchronizeWithResourceModel();
- }
-
-
- // ********** file name **********
-
- public void setFileName(String fileName) {
- this.setFileName_(fileName);
- this.xmlMappingFileRef.setFileName(fileName);
- }
-
- protected void setFileName_(String xmlFileName) {
- String old = this.fileName;
- this.fileName = xmlFileName;
- if (this.firePropertyChanged(FILE_NAME_PROPERTY, old, xmlFileName)) {
- if (this.mappingFile != null) {
- this.mappingFile.dispose();
- this.setMappingFile(null);
- }
- }
- }
-
-
- // ********** misc **********
-
- public XmlMappingFileRef getXmlMappingFileRef() {
- return this.xmlMappingFileRef;
- }
-
- public boolean isImplied() {
- return false;
- }
-
- public boolean containsOffset(int textOffset) {
- return this.xmlMappingFileRef.containsOffset(textOffset);
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public TextRange getSelectionTextRange() {
- return this.xmlMappingFileRef.getSelectionTextRange();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlValidationTextRange();
- return (textRange != null) ? textRange : this.getPersistenceUnit().getValidationTextRange();
- }
-
- protected TextRange getXmlValidationTextRange() {
- return this.xmlMappingFileRef.getValidationTextRange();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<DeleteEdit> createDeleteMappingFileEdits(IFile file) {
- return this.isFor(file) ?
- new SingleElementIterable<DeleteEdit>(this.createDeleteEdit()) :
- EmptyIterable.<DeleteEdit>instance();
- }
-
- protected DeleteEdit createDeleteEdit() {
- return this.xmlMappingFileRef.createDeleteEdit();
- }
-
- @Override
- protected ReplaceEdit createRenameEdit(IFile originalFile, String newName) {
- return this.xmlMappingFileRef.createRenameEdit(originalFile, newName);
- }
-
- public Iterable<ReplaceEdit> createRenameFolderEdits(IFolder originalFolder, String newName) {
- return this.isIn(originalFolder) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenameFolderEdit(originalFolder, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenameFolderEdit(IFolder originalFolder, String newName) {
- return this.xmlMappingFileRef.createRenameFolderEdit(originalFolder, newName);
- }
-
- @Override
- protected ReplaceEdit createMoveEdit(IFile originalFile, IPath runtineDestination) {
- return this.xmlMappingFileRef.createMoveEdit(originalFile, runtineDestination);
- }
-
- public Iterable<ReplaceEdit> createMoveFolderEdits(IFolder originalFolder, IPath runtimeDestination) {
- return this.isIn(originalFolder) ?
- new SingleElementIterable<ReplaceEdit>(this.createMoveEdit(originalFolder, runtimeDestination)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createMoveEdit(IFolder originalFolder, IPath runtimeDestination) {
- IProject project = originalFolder.getProject();
- IPath fullPath = originalFolder.getFullPath();
- ProjectResourceLocator locator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
- IPath originalLocation = locator.getRuntimePath(fullPath);
- return this.createMoveEdit(originalLocation, runtimeDestination);
- }
-
- protected ReplaceEdit createMoveEdit(IPath originalLocation, IPath runtineDestination) {
- return this.xmlMappingFileRef.createMoveEdit(originalLocation, runtineDestination);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistence.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistence.java
deleted file mode 100644
index 636afafeca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistence.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.persistence;
-
-import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.Persistence2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * <code>persistence.xml</code> file
- * <br>
- * <code>persistence</code> element
- */
-public class GenericPersistence
- extends AbstractPersistenceXmlContextNode
- implements Persistence2_0
-{
- protected final XmlPersistence xmlPersistence;
-
- // The implementation here is a single persistence unit, although the API
- // is for a list. We want to support multiple persistence units someday....
- protected PersistenceUnit persistenceUnit;
-
-
- public GenericPersistence(PersistenceXml parent, XmlPersistence xmlPersistence) {
- super(parent);
- this.xmlPersistence = xmlPersistence;
- this.initializePersistenceUnits();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncPersistenceUnits();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getPersistenceUnits());
- }
-
-
- // ********** persistence units **********
-
- public ListIterable<PersistenceUnit> getPersistenceUnits() {
- return (this.persistenceUnit == null) ? EmptyListIterable.<PersistenceUnit>instance() : this.getPersistenceUnits_();
- }
-
- protected ListIterable<PersistenceUnit> getPersistenceUnits_() {
- return new SingleElementListIterable<PersistenceUnit>(this.persistenceUnit);
- }
-
- public int getPersistenceUnitsSize() {
- return (this.persistenceUnit == null) ? 0 : 1;
- }
-
- public PersistenceUnit getPersistenceUnit(int index) {
- if ((index != 0) || (this.persistenceUnit == null)) {
- throw this.buildIOOBE(index);
- }
- return this.persistenceUnit;
- }
-
- protected IndexOutOfBoundsException buildIOOBE(int index) {
- return new IndexOutOfBoundsException("index: " + index); //$NON-NLS-1$
- }
-
- public PersistenceUnit addPersistenceUnit() {
- return this.addPersistenceUnit(this.getPersistenceUnitsSize());
- }
-
- public PersistenceUnit addPersistenceUnit(int index) {
- if ((index != 0) || (this.persistenceUnit != null)) {
- throw this.buildIOOBE(index);
- }
- XmlPersistenceUnit xmlPersistenceUnit = PersistenceFactory.eINSTANCE.createXmlPersistenceUnit();
- this.persistenceUnit = this.buildPersistenceUnit(xmlPersistenceUnit);
- this.xmlPersistence.getPersistenceUnits().add(xmlPersistenceUnit);
- this.fireItemAdded(PERSISTENCE_UNITS_LIST, index, this.persistenceUnit);
- this.persistenceUnit.setName(this.getJpaProject().getName()); // default to the project name
- return this.persistenceUnit;
- }
-
- public void removePersistenceUnit(PersistenceUnit pu) {
- if (pu != this.persistenceUnit) {
- throw new IllegalArgumentException("Invalid persistence unit: " + pu); //$NON-NLS-1$
- }
- this.removePersistenceUnit(0);
- }
-
- public void removePersistenceUnit(int index) {
- if ((index != 0) || (this.persistenceUnit == null)) {
- throw this.buildIOOBE(index);
- }
- PersistenceUnit old = this.persistenceUnit;
- this.persistenceUnit.dispose();
- this.persistenceUnit = null;
- this.xmlPersistence.getPersistenceUnits().remove(index);
- this.fireItemRemoved(PERSISTENCE_UNITS_LIST, index, old);
- }
-
- // only building one here, until we support multiple persistence units...
- protected void initializePersistenceUnits() {
- XmlPersistenceUnit xmlPersistenceUnit = this.getXmlPersistenceUnit();
- if (xmlPersistenceUnit != null) {
- this.persistenceUnit = this.buildPersistenceUnit(xmlPersistenceUnit);
- }
- }
-
- protected void syncPersistenceUnits() {
- XmlPersistenceUnit xmlPersistenceUnit = this.getXmlPersistenceUnit();
- if (this.persistenceUnit == null) {
- if (xmlPersistenceUnit != null) {
- this.addPersistenceUnit_(this.buildPersistenceUnit(xmlPersistenceUnit));
- }
- } else {
- if (xmlPersistenceUnit == null) {
- this.removePersistenceUnit_();
- } else {
- if (this.persistenceUnit.getXmlPersistenceUnit() == xmlPersistenceUnit) {
- this.persistenceUnit.synchronizeWithResourceModel();
- } else {
- this.removePersistenceUnit_();
- this.addPersistenceUnit_(this.buildPersistenceUnit(xmlPersistenceUnit));
- }
- }
- }
- }
-
- protected XmlPersistenceUnit getXmlPersistenceUnit() {
- List<XmlPersistenceUnit> xmlPersistenceUnits = this.xmlPersistence.getPersistenceUnits();
- return xmlPersistenceUnits.isEmpty() ? null : xmlPersistenceUnits.get(0);
- }
-
- protected void addPersistenceUnit_(PersistenceUnit pu) {
- this.persistenceUnit = pu;
- this.fireItemAdded(PERSISTENCE_UNITS_LIST, 0, pu);
- }
-
- protected void removePersistenceUnit_() {
- PersistenceUnit old = this.persistenceUnit;
- this.persistenceUnit = null;
- old.dispose();
- this.fireItemRemoved(PERSISTENCE_UNITS_LIST, 0, old);
- }
-
- protected PersistenceUnit buildPersistenceUnit(XmlPersistenceUnit xmlPersistenceUnit) {
- return this.getContextNodeFactory().buildPersistenceUnit(this, xmlPersistenceUnit);
- }
-
- // ********** metamodel **********
-
- public void initializeMetamodel() {
- for (PersistenceUnit pu : this.getPersistenceUnits()) {
- ((PersistenceUnit2_0) pu).initializeMetamodel();
- }
- }
-
- public IStatus synchronizeMetamodel(IProgressMonitor monitor) {
- for (PersistenceUnit pu : this.getPersistenceUnits()) {
- IStatus status = ((PersistenceUnit2_0) pu).synchronizeMetamodel(monitor);
- if (status.getSeverity() == IStatus.CANCEL) {
- return status; // seems reasonable...
- }
- }
- return Status.OK_STATUS;
- }
-
- public void disposeMetamodel() {
- for (PersistenceUnit pu : this.getPersistenceUnits()) {
- ((PersistenceUnit2_0) pu).disposeMetamodel();
- }
- }
-
-
- // ********** Persistence implementation **********
-
- public XmlPersistence getXmlPersistence() {
- return this.xmlPersistence;
- }
-
- public boolean containsOffset(int textOffset) {
- return (this.xmlPersistence == null) ? false : this.xmlPersistence.containsOffset(textOffset);
- }
-
-
- // ********** XmlContextNode implementation **********
-
- @Override
- public PersistenceXml getParent() {
- return (PersistenceXml) super.getParent();
- }
-
- public PersistenceXml getPersistenceXml() {
- return this.getParent();
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlPersistence.getValidationTextRange();
- return (textRange != null) ? textRange : this.getPersistenceXml().getValidationTextRange();
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<Persistence> getType() {
- return Persistence.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- for (PersistenceUnit pu : this.getPersistenceUnits()) {
- if (pu.containsOffset(textOffset)) {
- return pu.getStructureNode(textOffset);
- }
- }
- return this;
- }
-
- public TextRange getSelectionTextRange() {
- return this.xmlPersistence.getSelectionTextRange();
- }
-
- public void dispose() {
- for (PersistenceUnit pu : this.getPersistenceUnits()) {
- pu.dispose();
- }
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateVersion(messages);
- this.checkForMultiplePersistenceUnits(messages);
- this.validatePersistenceUnit(messages, reporter);
- }
-
- protected void validateVersion(List<IMessage> messages) {
- if (! this.getLatestDocumentVersion().equals(this.xmlPersistence.getVersion())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.LOW_SEVERITY,
- JpaValidationMessages.XML_VERSION_NOT_LATEST,
- this,
- this.xmlPersistence.getVersionTextRange()));
- }
- }
-
- protected String getLatestDocumentVersion() {
- return this.getJpaPlatform().getMostRecentSupportedResourceType(
- JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE).getVersion();
- }
-
- /**
- * extraneous persistence units can be
- * accessed through the XmlPersistence resource object
- */
- protected void checkForMultiplePersistenceUnits(List<IMessage> messages) {
- if (this.xmlPersistence.getPersistenceUnits().size() > 1) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.NORMAL_SEVERITY,
- JpaValidationMessages.PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS,
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- protected void validatePersistenceUnit(List<IMessage> messages, IReporter reporter) {
- if (this.persistenceUnit == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_NO_PERSISTENCE_UNIT,
- this,
- this.getValidationTextRange()
- )
- );
- return;
- }
- this.persistenceUnit.validate(messages, reporter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java
deleted file mode 100644
index 9e4a3fa8a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.persistence;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.internal.GenericJpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * generic <code>persistence-unit</code>
- */
-public class GenericPersistenceUnit
- extends AbstractPersistenceUnit
-{
- public GenericPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) {
- super(parent, xmlPersistenceUnit);
- }
-
- public JpaJpqlQueryHelper createJpqlQueryHelper() {
- return new GenericJpaJpqlQueryHelper(this.getJpaPlatform().getJpqlGrammar());
- }
-
- @Override
- protected void validateProperties(List<IMessage> messages, IReporter reporter) {
- // do nothing
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java
deleted file mode 100644
index 66e1110763..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.context.persistence;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Straightforward implementation of the persistence unit property.
- * Notifies the persistence unit of any changes to the property.
- */
-public class GenericPersistenceUnitProperty
- extends AbstractPersistenceXmlContextNode
- implements PersistenceUnit.Property
-{
- protected final XmlProperty xmlProperty;
- protected String name;
- protected String value;
-
-
- public GenericPersistenceUnitProperty(PersistenceUnit parent, XmlProperty xmlProperty) {
- super(parent);
- this.xmlProperty = xmlProperty;
- this.name = xmlProperty.getName();
- this.value = xmlProperty.getValue();
- }
-
- @Override
- public PersistenceUnit getParent() {
- return (PersistenceUnit) super.getParent();
- }
-
- public XmlProperty getXmlProperty() {
- return this.xmlProperty;
- }
-
-
- // ********** synchronize **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setName_(this.xmlProperty.getName());
- this.setValue_(this.xmlProperty.getValue());
- }
-
-
- // ********** name **********
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.setName_(name);
- this.xmlProperty.setName(name);
- }
-
- protected void setName_(String name) {
- String old = this.name;
- this.name = name;
- if (this.firePropertyChanged(NAME_PROPERTY, old, name)) {
- this.getPersistenceUnit().propertyNameChanged(old, name, this.value);
- }
- }
-
-
- // ********** value **********
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- this.setValue_(value);
- this.xmlProperty.setValue(value);
- }
-
- protected void setValue_(String value) {
- String old = this.value;
- this.value = value;
- if (this.firePropertyChanged(VALUE_PROPERTY, old, value)) {
- this.getPersistenceUnit().propertyValueChanged(this.name, value);
- }
- }
-
- protected String getValuePackageName() {
- return (this.value == null) ? null : this.getValuePackageName_();
- }
-
- /**
- * pre-condition: {@link #value} is not <code>null</code>
- */
- protected String getValuePackageName_() {
- int lastPeriod = this.value.lastIndexOf('.');
- return (lastPeriod == -1) ? null : this.value.substring(0, lastPeriod);
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.xmlProperty.getValidationTextRange();
- return (textRange != null) ? textRange : this.getPersistenceUnit().getValidationTextRange();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return Tools.valuesAreEqual(this.value, originalType.getFullyQualifiedName('.')) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenameTypeEdit(originalType, newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenameTypeEdit(IType originalType, String newName) {
- return this.xmlProperty.createRenameTypeEdit(originalType, newName);
- }
-
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return Tools.valuesAreEqual(this.value, originalType.getFullyQualifiedName('.')) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newPackage.getElementName())) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return Tools.valuesAreEqual(this.getValuePackageName(), originalPackage.getElementName()) ?
- new SingleElementIterable<ReplaceEdit>(this.createRenamePackageEdit(newName)) :
- EmptyIterable.<ReplaceEdit>instance();
- }
-
- protected ReplaceEdit createRenamePackageEdit(String newName) {
- return this.xmlProperty.createRenamePackageEdit(newName);
- }
-
-
- // ********** misc **********
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- sb.append(" = "); //$NON-NLS-1$
- sb.append(this.value);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXml.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXml.java
deleted file mode 100644
index 37bcb619c5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXml.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa1.context.persistence;
-
-import java.util.List;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.JpaFile;
-import org.eclipse.jpt.jpa.core.JpaStructureNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.Persistence2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceXml2_0;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * context model <code>persistence.xml</code> file
- */
-public class GenericPersistenceXml
- extends AbstractPersistenceXmlContextNode
- implements PersistenceXml2_0
-{
- /**
- * If the XML resource's content type changes, the root context
- * node will throw out its current persistence XML.
- */
- protected final JpaXmlResource xmlResource; // never null
-
- /**
- * The resource type will only change if the XML file's version changes
- * (since, if the content type changes, we get garbage-collected).
- */
- protected JptResourceType resourceType;
-
- /**
- * The root element of the <code>persistence.xml</code> file.
- */
- protected Persistence persistence;
-
-
- public GenericPersistenceXml(JpaRootContextNode parent, JpaXmlResource xmlResource) {
- super(parent);
- this.checkXmlResource(xmlResource);
- this.xmlResource = xmlResource;
- this.resourceType = xmlResource.getResourceType();
-
- XmlPersistence xmlPersistence = (XmlPersistence) xmlResource.getRootObject();
- if (xmlPersistence != null) {
- this.persistence = this.buildPersistence(xmlPersistence);
- }
- }
-
-
- // ********** synchronize/update **********
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXml#synchronizeWithResourceModel()
- */
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- XmlPersistence oldXmlPersistence = (this.persistence == null) ? null : this.persistence.getXmlPersistence();
- XmlPersistence newXmlPersistence = (XmlPersistence) this.xmlResource.getRootObject();
- JptResourceType newResourceType = this.xmlResource.getResourceType();
-
- // If the old and new XML persistences are different instances,
- // we scrap the old context persistence and rebuild.
- // (This can happen when the resource model changes drastically,
- // such as a CVS checkout or an edit reversion.)
- if ((oldXmlPersistence != newXmlPersistence) ||
- (newXmlPersistence == null) ||
- this.valuesAreDifferent(this.resourceType, newResourceType)
- ) {
- if (this.persistence != null) {
- this.unregisterRootStructureNode();
- this.persistence.dispose();
- this.setPersistence(null);
- }
- }
-
- this.resourceType = newResourceType;
-
- if (newXmlPersistence != null) {
- if (this.persistence == null) {
- this.setPersistence(this.buildPersistence(newXmlPersistence));
- } else {
- // the context persistence already holds the XML persistence
- this.persistence.synchronizeWithResourceModel();
- }
- }
- }
-
- @Override
- public void update() {
- super.update();
- if (this.persistence != null) {
- this.persistence.update();
- // this will happen redundantly - need to hold JpaFile?
- this.registerRootStructureNode();
- }
- }
-
-
- // ********** persistence **********
-
- public Persistence getPersistence() {
- return this.persistence;
- }
-
- protected void setPersistence(Persistence persistence) {
- Persistence old = this.persistence;
- this.persistence = persistence;
- this.firePropertyChanged(PERSISTENCE_PROPERTY, old, persistence);
- }
-
- protected Persistence buildPersistence(XmlPersistence xmlPersistence) {
- return this.getContextNodeFactory().buildPersistence(this, xmlPersistence);
- }
-
-
- // ********** misc **********
-
- protected void checkXmlResource(JpaXmlResource resource) {
- if (resource == null) {
- throw new NullPointerException();
- }
- if ( ! resource.getContentType().isKindOf(JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
- throw new IllegalArgumentException("Content type is not 'persistence': " + resource); //$NON-NLS-1$
- }
- }
-
- public JpaXmlResource getXmlResource() {
- return this.xmlResource;
- }
-
- @Override
- public IResource getResource() {
- return this.xmlResource.getFile();
- }
-
- @Override
- public JptResourceType getResourceType() {
- return this.xmlResource.getResourceType();
- }
-
- protected JpaFile getJpaFile() {
- return this.getJpaFile(this.xmlResource.getFile());
- }
-
- public boolean isLatestSupportedVersion() {
- return XmlFile_.isLatestSupportedVersion(this);
- }
-
-
- // ********** metamodel **********
-
- public void initializeMetamodel() {
- if (this.persistence != null) {
- ((Persistence2_0) this.persistence).initializeMetamodel();
- }
- }
-
- public IStatus synchronizeMetamodel(IProgressMonitor monitor) {
- return (this.persistence != null) ?
- ((Persistence2_0) this.persistence).synchronizeMetamodel(monitor) :
- Status.OK_STATUS;
- }
-
- public void disposeMetamodel() {
- if (this.persistence != null) {
- ((Persistence2_0) this.persistence).disposeMetamodel();
- }
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public ContextType getContextType() {
- return new ContextType(this);
- }
-
- public Class<PersistenceXml> getType() {
- return PersistenceXml.class;
- }
-
- public JpaStructureNode getStructureNode(int textOffset) {
- if (this.persistence.containsOffset(textOffset)) {
- return this.persistence.getStructureNode(textOffset);
- }
- return this;
- }
-
- // never actually selected
- public TextRange getSelectionTextRange() {
- return TextRange.Empty.instance();
- }
-
- public void dispose() {
- if (this.persistence != null) {
- JpaFile jpaFile = this.getJpaFile();
- if (jpaFile != null) {
- this.unregisterRootStructureNode();
- }
- this.persistence.dispose();
- }
- }
-
- // TODO hold the JpaFile?
- protected void registerRootStructureNode() {
- this.getJpaFile().addRootStructureNode(this.xmlResource, this.persistence);
- }
-
- protected void unregisterRootStructureNode() {
- this.getJpaFile().removeRootStructureNode(this.xmlResource, this.persistence);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
-
- if (this.persistence == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_XML_INVALID_CONTENT,
- this
- )
- );
- return;
- }
-
- this.persistence.validate(messages, reporter);
- }
-
- public TextRange getValidationTextRange() {
- // since this is the entire file, point to the top of the file
- return TextRange.Empty.instance();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java
deleted file mode 100644
index 57d9a22b6e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.internal.jpa1.context.persistence;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.GenericPersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
-
-public class GenericPersistenceXmlDefinition
- extends AbstractPersistenceXmlDefinition
-{
- // singleton
- private static final PersistenceXmlDefinition INSTANCE = new GenericPersistenceXmlDefinition();
-
- /**
- * Return the singleton
- */
- public static PersistenceXmlDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private GenericPersistenceXmlDefinition() {
- super();
- }
-
- public JptResourceType getResourceType() {
- return JptJpaCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE;
- }
-
- public EFactory getResourceNodeFactory() {
- return PersistenceFactory.eINSTANCE;
- }
-
- @Override
- protected PersistenceXmlContextNodeFactory buildContextNodeFactory() {
- return new GenericPersistenceXmlContextNodeFactory();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java
deleted file mode 100644
index dca36559d9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.jpa1.context.persistence;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractMappingFileRef;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * Used by the persistence unit for the
- * <code>META-INF/orm.xml</code> file when it is not explicitly listed
- * in the <code>persistence.xml</code> file.
- */
-public class ImpliedMappingFileRef
- extends AbstractMappingFileRef
-{
-
- // ********** construction/initialization **********
-
- public ImpliedMappingFileRef(PersistenceUnit parent, String fileName) {
- super(parent, fileName);
- }
-
-
- // ********** MappingFileRef implementation **********
-
- public XmlMappingFileRef getXmlMappingFileRef() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isImplied() {
- return true;
- }
-
- public void setFileName(String fileName) {
- throw new UnsupportedOperationException("Cannot set an implied mapping file ref's 'fileName': " + fileName); //$NON-NLS-1$
- }
-
- public boolean containsOffset(int textOffset) {
- return false;
- }
-
-
- // ********** JpaStructureNode implementation **********
-
- public TextRange getSelectionTextRange() {
- return null;
- }
-
-
- // ********** XmlContextNode implementation **********
-
- public TextRange getValidationTextRange() {
- return this.getPersistenceUnit().getValidationTextRange();
- }
-
-
- // ********** refactoring **********
-
- public Iterable<DeleteEdit> createDeleteMappingFileEdits(IFile file) {
- throw new IllegalStateException("This reference cannot be deleted - it is implied"); //$NON-NLS-1$
- }
-
- public Iterable<ReplaceEdit> createRenameFolderEdits(IFolder originalFolder, String newName) {
- throw new IllegalStateException("This reference cannot be moved - it is implied"); //$NON-NLS-1$
- }
-
- @Override
- protected ReplaceEdit createRenameEdit(IFile originalFile, String newName) {
- return this.createReplaceEdit(this.fileName.substring(0, this.fileName.lastIndexOf('/') + 1) + newName);
- }
-
- @Override
- protected ReplaceEdit createMoveEdit(IFile originalFile, IPath runtimeDestination) {
- return this.createReplaceEdit(runtimeDestination.append(originalFile.getName()).toString());
- }
-
- protected ReplaceEdit createReplaceEdit(String newMappingFileName) {
- StringBuilder sb = new StringBuilder();
- sb.append(StringTools.CR);
- sb.append("\t\t<mapping-file>"); //$NON-NLS-1$
- sb.append(newMappingFileName);
- sb.append("</mapping-file>"); //$NON-NLS-1$
- int offset = this.getPersistenceUnit().findInsertLocationForMappingFileRef();
- return new ReplaceEdit(offset, 0, sb.toString());
- }
-
- public Iterable<ReplaceEdit> createMoveFolderEdits(IFolder originalFolder, IPath runtimeDestination) {
- throw new IllegalStateException("This reference cannot be moved - it is implied"); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java
deleted file mode 100644
index a9e3b009a8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryAssociationOverrideAnnotation;
-
-/**
- * javax.persistence.AssociationOverride
- */
-public final class BinaryAssociationOverride1_0Annotation
- extends BinaryAssociationOverrideAnnotation
-{
-
- public BinaryAssociationOverride1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java
deleted file mode 100644
index 34bd911323..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa1.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryNamedQueryAnnotation;
-
-/**
- * javax.persistence.NamedQuery
- */
-public final class BinaryNamedQuery1_0Annotation
- extends BinaryNamedQueryAnnotation
-{
-
- public BinaryNamedQuery1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java
deleted file mode 100644
index 8079c4b62b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa1.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinarySequenceGeneratorAnnotation;
-
-/**
- * javax.persistence.SequenceGenerator
- */
-public final class BinarySequenceGenerator1_0Annotation
- extends BinarySequenceGeneratorAnnotation
-{
-
- public BinarySequenceGenerator1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
deleted file mode 100644
index 987867e3c4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceAssociationOverrideAnnotation;
-
-/**
- * <code>javax.persistence.AssociationOverride</code>
- */
-public final class SourceAssociationOverride1_0Annotation
- extends SourceAssociationOverrideAnnotation
-{
-
- public static SourceAssociationOverride1_0Annotation buildSourceAssociationOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element) {
-
- return new SourceAssociationOverride1_0Annotation(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public static SourceAssociationOverride1_0Annotation buildSourceAssociationOverrideAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildAssociationOverrideDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildAssociationOverrideAnnotationAdapter(annotatedElement, idaa);
- return new SourceAssociationOverride1_0Annotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
- public static SourceAssociationOverride1_0Annotation buildNestedSourceAssociationOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourceAssociationOverride1_0Annotation(parent, element, idaa);
- }
-
- private SourceAssociationOverride1_0Annotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- DeclarationAnnotationAdapter daa) {
-
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- private SourceAssociationOverride1_0Annotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- private SourceAssociationOverride1_0Annotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java
deleted file mode 100644
index 3ce0b644b0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa1.resource.java.source;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceNamedQueryAnnotation;
-
-/**
- * <code>javax.persistence.NamedQuery</code>
- */
-public final class SourceNamedQuery1_0Annotation
- extends SourceNamedQueryAnnotation
-{
- public static SourceNamedQuery1_0Annotation buildSourceNamedQueryAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildNamedQueryDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildNamedQueryAnnotationAdapter(annotatedElement, idaa);
- return new SourceNamedQuery1_0Annotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
- private SourceNamedQuery1_0Annotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- IndexedDeclarationAnnotationAdapter daa,
- IndexedAnnotationAdapter annotationAdapter) {
- super(parent, annotatedElement, daa, annotationAdapter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java
deleted file mode 100644
index 99cc3b6c72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.jpa1.resource.java.source;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceSequenceGeneratorAnnotation;
-
-/**
- * javax.persistence.SequenceGenerator
- */
-public final class SourceSequenceGenerator1_0Annotation
- extends SourceSequenceGeneratorAnnotation
-{
-
- public SourceSequenceGenerator1_0Annotation(JavaResourceNode parent, AnnotatedElement element) {
- super(parent, element);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java
deleted file mode 100644
index 948eff2c22..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2;
-
-import java.util.ArrayList;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.Access2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.AssociationOverride2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.Cacheable2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.CollectionTable2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.ElementCollection2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.GeneratedAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapKeyClass2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapKeyColumn2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapKeyEnumerated2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapKeyJoinColumn2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapKeyJoinColumns2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapKeyTemporal2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.MapsId2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.NamedQuery2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.OrderColumn2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.SequenceGenerator2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.StaticMetamodelAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AssociationOverridesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AttributeOverrideAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.AttributeOverridesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.BasicAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.ColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.DiscriminatorColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.DiscriminatorValueAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EmbeddableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EmbeddedAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EmbeddedIdAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EntityAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.EnumeratedAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.GeneratedValueAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.IdAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.IdClassAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.InheritanceAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.JoinColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.JoinColumnsAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.JoinTableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.LobAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.ManyToManyAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.ManyToOneAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.MapKeyAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.MappedSuperclassAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedNativeQueriesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedNativeQueryAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NamedQueriesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.OneToManyAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.OneToOneAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.OrderByAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.PrimaryKeyJoinColumnAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.PrimaryKeyJoinColumnsAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.SecondaryTableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.SecondaryTablesAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TableAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TableGeneratorAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TemporalAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.TransientAnnotationDefinition;
-import org.eclipse.jpt.jpa.core.internal.resource.java.VersionAnnotationDefinition;
-
-/**
- * Support for existing JPA 1.0 annotations, new JPA 2.0 annotations, and
- * augmented support for annotations changed from 1.0 to 2.0
- */
-public class Generic2_0JpaAnnotationDefinitionProvider
- extends AbstractJpaAnnotationDefinitionProvider
-{
- // singleton
- private static final JpaAnnotationDefinitionProvider INSTANCE = new Generic2_0JpaAnnotationDefinitionProvider();
-
- /**
- * Return the singleton
- */
- public static JpaAnnotationDefinitionProvider instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private Generic2_0JpaAnnotationDefinitionProvider() {
- super();
- }
-
- @Override
- protected void addAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions) {
- CollectionTools.addAll(definitions, ANNOTATION_DEFINITIONS);
- }
-
- protected static final AnnotationDefinition[] ANNOTATION_DEFINITIONS = new AnnotationDefinition[] {
- AttributeOverridesAnnotationDefinition.instance(),
- AssociationOverridesAnnotationDefinition.instance(),
- Access2_0AnnotationDefinition.instance(),
- BasicAnnotationDefinition.instance(),
- Cacheable2_0AnnotationDefinition.instance(),
- CollectionTable2_0AnnotationDefinition.instance(),
- ColumnAnnotationDefinition.instance(),
- DiscriminatorColumnAnnotationDefinition.instance(),
- DiscriminatorValueAnnotationDefinition.instance(),
- ElementCollection2_0AnnotationDefinition.instance(),
- EmbeddableAnnotationDefinition.instance(),
- EmbeddedAnnotationDefinition.instance(),
- EmbeddedIdAnnotationDefinition.instance(),
- EntityAnnotationDefinition.instance(),
- EnumeratedAnnotationDefinition.instance(),
- GeneratedAnnotationDefinition.instance(),
- GeneratedValueAnnotationDefinition.instance(),
- IdAnnotationDefinition.instance(),
- IdClassAnnotationDefinition.instance(),
- InheritanceAnnotationDefinition.instance(),
- JoinColumnsAnnotationDefinition.instance(),
- JoinTableAnnotationDefinition.instance(),
- LobAnnotationDefinition.instance(),
- ManyToManyAnnotationDefinition.instance(),
- ManyToOneAnnotationDefinition.instance(),
- MappedSuperclassAnnotationDefinition.instance(),
- MapsId2_0AnnotationDefinition.instance(),
- MapKeyAnnotationDefinition.instance(),
- MapKeyClass2_0AnnotationDefinition.instance(),
- MapKeyColumn2_0AnnotationDefinition.instance(),
- MapKeyEnumerated2_0AnnotationDefinition.instance(),
- MapKeyJoinColumns2_0AnnotationDefinition.instance(),
- MapKeyTemporal2_0AnnotationDefinition.instance(),
- NamedQueriesAnnotationDefinition.instance(),
- NamedNativeQueriesAnnotationDefinition.instance(),
- OneToManyAnnotationDefinition.instance(),
- OneToOneAnnotationDefinition.instance(),
- OrderByAnnotationDefinition.instance(),
- OrderColumn2_0AnnotationDefinition.instance(),
- PrimaryKeyJoinColumnsAnnotationDefinition.instance(),
- SecondaryTablesAnnotationDefinition.instance(),
- SequenceGenerator2_0AnnotationDefinition.instance(),
- StaticMetamodelAnnotationDefinition.instance(),
- TableAnnotationDefinition.instance(),
- TableGeneratorAnnotationDefinition.instance(),
- TemporalAnnotationDefinition.instance(),
- TransientAnnotationDefinition.instance(),
- VersionAnnotationDefinition.instance()
- };
-
- @Override
- protected void addNestableAnnotationDefinitionsTo(ArrayList<NestableAnnotationDefinition> definitions) {
- CollectionTools.addAll(definitions, NESTABLE_ANNOTATION_DEFINITIONS);
- }
-
- protected static final NestableAnnotationDefinition[] NESTABLE_ANNOTATION_DEFINITIONS = new NestableAnnotationDefinition[] {
- AssociationOverride2_0AnnotationDefinition.instance(),
- AttributeOverrideAnnotationDefinition.instance(),
- JoinColumnAnnotationDefinition.instance(),
- MapKeyJoinColumn2_0AnnotationDefinition.instance(),
- NamedQuery2_0AnnotationDefinition.instance(),
- NamedNativeQueryAnnotationDefinition.instance(),
- PrimaryKeyJoinColumnAnnotationDefinition.instance(),
- SecondaryTableAnnotationDefinition.instance(),
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
deleted file mode 100644
index e647b07bd5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaPlatformFactory;
-import org.eclipse.jpt.jpa.core.JpaPlatformVariation;
-import org.eclipse.jpt.jpa.core.context.AccessType;
-import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
-import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformFactory.SimpleVersion;
-import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
-import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar2_0;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public class Generic2_0JpaPlatformFactory
- implements JpaPlatformFactory
-{
- /**
- * zero-argument constructor
- */
- public Generic2_0JpaPlatformFactory() {
- super();
- }
-
- public JpaPlatform buildJpaPlatform(String id) {
- return new GenericJpaPlatform(
- id,
- this.buildJpaVersion(),
- new GenericJpaFactory2_0(),
- new JpaAnnotationProvider(Generic2_0JpaAnnotationDefinitionProvider.instance()),
- Generic2_0JpaPlatformProvider.instance(),
- this.buildJpaPlatformVariation(),
- JPQLGrammar2_0.instance());
- }
-
- private JpaPlatform.Version buildJpaVersion() {
- return new SimpleVersion(JpaFacet.VERSION_2_0.getVersionString());
- }
-
- protected JpaPlatformVariation buildJpaPlatformVariation() {
- return new JpaPlatformVariation() {
- //table_per_class inheritance support is optional in the 2.0 spec
- public Supported getTablePerConcreteClassInheritanceIsSupported() {
- return Supported.MAYBE;
- }
- public boolean isJoinTableOverridable() {
- return true;
- }
- public AccessType[] getSupportedAccessTypes(JptResourceType resourceType) {
- return GENERIC_SUPPORTED_ACCESS_TYPES;
- }
- };
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformProvider.java
deleted file mode 100644
index 6e3847bb5a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformProvider.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.ResourceDefinition;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.internal.JarResourceModelProvider;
-import org.eclipse.jpt.jpa.core.internal.JavaResourceModelProvider;
-import org.eclipse.jpt.jpa.core.internal.OrmResourceModelProvider;
-import org.eclipse.jpt.jpa.core.internal.PersistenceResourceModelProvider;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTransientMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaBasicMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaElementCollectionMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaEmbeddableDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaEmbeddedIdMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaEmbeddedMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaEntityDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaIdMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaManyToManyMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaManyToOneMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaMappedSuperclassDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaOneToManyMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaOneToOneMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaVersionMappingDefinition2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.GenericOrmXml2_0Definition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.Generic2_0PersistenceXmlDefinition;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public class Generic2_0JpaPlatformProvider
- extends AbstractJpaPlatformProvider
-{
- // singleton
- private static final JpaPlatformProvider INSTANCE = new Generic2_0JpaPlatformProvider();
-
- /**
- * Return the singleton
- */
- public static JpaPlatformProvider instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private Generic2_0JpaPlatformProvider() {
- super();
- }
-
-
- // ********** resource models **********
-
- public JptResourceType getMostRecentSupportedResourceType(IContentType contentType) {
- if (contentType.equals(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
- return JptCommonCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptCommonCorePlugin.JAR_CONTENT_TYPE)) {
- return JptCommonCorePlugin.JAR_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
- return JptJpaCorePlugin.PERSISTENCE_XML_2_0_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptJpaCorePlugin.ORM_XML_CONTENT_TYPE)) {
- return JptJpaCorePlugin.ORM_XML_2_0_RESOURCE_TYPE;
- }
- else {
- throw new IllegalArgumentException(contentType.toString());
- }
- }
-
- @Override
- protected void addResourceModelProvidersTo(ArrayList<JpaResourceModelProvider> providers) {
- CollectionTools.addAll(providers, RESOURCE_MODEL_PROVIDERS);
- }
-
- // order should not be important here
- protected static final JpaResourceModelProvider[] RESOURCE_MODEL_PROVIDERS = new JpaResourceModelProvider[] {
- JavaResourceModelProvider.instance(),
- JarResourceModelProvider.instance(),
- PersistenceResourceModelProvider.instance(),
- OrmResourceModelProvider.instance()
- };
-
-
- // ********** Java type mappings **********
-
- @Override
- protected void addJavaTypeMappingDefinitionsTo(ArrayList<JavaTypeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, JAVA_TYPE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by the Reference Implementation (EclipseLink)
- protected static final JavaTypeMappingDefinition[] JAVA_TYPE_MAPPING_DEFINITIONS = new JavaTypeMappingDefinition[] {
- JavaEntityDefinition2_0.instance(),
- JavaEmbeddableDefinition2_0.instance(),
- JavaMappedSuperclassDefinition2_0.instance()
- };
-
-
- // ********** Java attribute mappings **********
-
- @Override
- protected void addDefaultJavaAttributeMappingDefinitionsTo(ArrayList<DefaultJavaAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by the Reference Implementation (EclipseLink)
- protected static final DefaultJavaAttributeMappingDefinition[] DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new DefaultJavaAttributeMappingDefinition[] {
- JavaEmbeddedMappingDefinition2_0.instance(),
- JavaBasicMappingDefinition2_0.instance()
- };
-
- @Override
- protected void addSpecifiedJavaAttributeMappingDefinitionsTo(ArrayList<JavaAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by the Reference Implementation (EclipseLink)
- protected static final JavaAttributeMappingDefinition[] SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new JavaAttributeMappingDefinition[] {
- JavaTransientMappingDefinition.instance(),
- JavaElementCollectionMappingDefinition2_0.instance(),
- JavaIdMappingDefinition2_0.instance(),
- JavaVersionMappingDefinition2_0.instance(),
- JavaBasicMappingDefinition2_0.instance(),
- JavaEmbeddedMappingDefinition2_0.instance(),
- JavaEmbeddedIdMappingDefinition2_0.instance(),
- JavaManyToManyMappingDefinition2_0.instance(),
- JavaManyToOneMappingDefinition2_0.instance(),
- JavaOneToManyMappingDefinition2_0.instance(),
- JavaOneToOneMappingDefinition2_0.instance()
- };
-
-
- // ********** resource definitions **********
-
- @Override
- protected void addResourceDefinitionsTo(ArrayList<ResourceDefinition> definitions) {
- CollectionTools.addAll(definitions, RESOURCE_DEFINITIONS);
- }
-
- protected static final ResourceDefinition[] RESOURCE_DEFINITIONS = new ResourceDefinition[] {
- GenericPersistenceXmlDefinition.instance(),
- Generic2_0PersistenceXmlDefinition.instance(),
- GenericOrmXmlDefinition.instance(),
- GenericOrmXml2_0Definition.instance()
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java
deleted file mode 100644
index ba5dcfefa7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2;
-
-import java.util.Iterator;
-
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0;
-import org.eclipse.jpt.jpa.db.DatabaseIdentifierAdapter;
-
-/**
- * Conversions are determined by the <code>delimited-identifiers</code>
- * flag in <code>orm.xml</code>.
- * <p>
- * Assume we are in a JPA 2.0-compatible project.
- */
-public class GenericJpaDatabaseIdentifierAdapter
- implements DatabaseIdentifierAdapter
-{
- private final JpaDataSource dataSource;
-
- public GenericJpaDatabaseIdentifierAdapter(JpaDataSource dataSource) {
- super();
- this.dataSource = dataSource;
- }
-
- /**
- * If the flag is set, "identifiers" are treated as "names".
- */
- public boolean treatIdentifiersAsDelimited() {
- return this.getDefaultDelimitedIdentifiers();
- }
-
- protected boolean getDefaultDelimitedIdentifiers() {
- PersistenceUnit2_0 pu = this.getPersistenceUnit();
- return (pu != null) && pu.getDefaultDelimitedIdentifiers();
- }
-
- protected PersistenceUnit2_0 getPersistenceUnit() {
- Persistence p = this.getPersistence();
- if (p == null) {
- return null;
- }
- Iterator<PersistenceUnit> units = this.getPersistence().getPersistenceUnits().iterator();
- return (PersistenceUnit2_0) (units.hasNext() ? units.next() : null);
- }
-
- protected Persistence getPersistence() {
- PersistenceXml pxml = this.getPersistenceXml();
- return (pxml == null) ? null : pxml.getPersistence();
- }
-
- protected PersistenceXml getPersistenceXml() {
- // TODO this null check can be removed if the data source is moved to the persistence unit;
- // the root context node can be null during construction;
- // this shouldn't be a problem since the default-delimiters flag
- // is recalculated during the initial, post-project construction, "update"
- JpaRootContextNode rcn = this.dataSource.getJpaProject().getRootContextNode();
- return (rcn == null) ? null : rcn.getPersistenceXml();
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, Boolean.valueOf(this.treatIdentifiersAsDelimited()));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaFactory2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaFactory2_0.java
deleted file mode 100644
index 067d77dcb9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericJpaFactory2_0.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProject.Config;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.internal.AbstractJpaFactory;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaOrderable;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaEmbeddable2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaNamedQuery2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaOrphanRemoval2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaPersistentType2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaSequenceGenerator2_0;
-import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
-import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0.Owner;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaEmbeddedMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.NamedQuery2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.db.DatabaseIdentifierAdapter;
-
-
-/**
- * Central class that allows extenders to easily replace implementations of
- * various Dali interfaces.
- */
-public class GenericJpaFactory2_0
- extends AbstractJpaFactory
- implements JpaFactory2_0
-{
-
- public GenericJpaFactory2_0() {
- super();
- }
-
-
- // ********** Core Model **********
-
- @Override
- public JpaProject buildJpaProject(Config config) {
- if ( ! (config instanceof JpaProject2_0.Config)) {
- throw new IllegalArgumentException("config must be 2.0-compatible: " + config); //$NON-NLS-1$
- }
- return super.buildJpaProject(config);
- }
-
- public MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType sourceType) {
- return new GenericMetamodelSynchronizer(sourceType);
- }
-
- public DatabaseIdentifierAdapter buildDatabaseIdentifierAdapter(JpaDataSource dataSource) {
- return new GenericJpaDatabaseIdentifierAdapter(dataSource);
- }
-
-
- // ********** Java Context Model **********
-
- @Override
- public JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourceType jrt) {
- return new GenericJavaPersistentType2_0(owner, jrt);
- }
-
- @Override
- public JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent, EmbeddableAnnotation embeddableAnnotation) {
- return new GenericJavaEmbeddable2_0(parent, embeddableAnnotation);
- }
-
- @Override
- public JavaSequenceGenerator buildJavaSequenceGenerator(JavaGeneratorContainer parent, SequenceGeneratorAnnotation annotation) {
- return new GenericJavaSequenceGenerator2_0(parent, (SequenceGenerator2_0Annotation) annotation);
- }
-
- //The 2.0 JPA spec supports association overrides on an embedded mapping while the 1.0 spec did not
- public JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaEmbeddedMapping2_0 parent, JavaAssociationOverrideContainer.Owner owner) {
- return new GenericJavaAssociationOverrideContainer(parent, owner);
- }
-
- public JavaDerivedIdentity2_0 buildJavaDerivedIdentity(JavaSingleRelationshipMapping2_0 parent) {
- return new GenericJavaDerivedIdentity2_0(parent);
- }
-
- public JavaElementCollectionMapping2_0 buildJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
- return new GenericJavaElementCollectionMapping2_0(parent);
- }
-
- public JavaCacheable2_0 buildJavaCacheable(JavaCacheableHolder2_0 parent) {
- return new GenericJavaCacheable2_0(parent);
- }
-
- public JavaOrphanRemovable2_0 buildJavaOrphanRemoval(JavaOrphanRemovalHolder2_0 parent) {
- return new GenericJavaOrphanRemoval2_0(parent);
- }
-
- @Override
- public JavaNamedQuery buildJavaNamedQuery(JavaQueryContainer parent, NamedQueryAnnotation annotation) {
- return new GenericJavaNamedQuery2_0(parent, (NamedQuery2_0Annotation) annotation);
- }
-
- public JavaCollectionTable2_0 buildJavaCollectionTable(JavaElementCollectionMapping2_0 parent, Table.Owner owner) {
- return new GenericJavaCollectionTable2_0(parent, owner);
- }
-
- public JavaOrderColumn2_0 buildJavaOrderColumn(JavaOrderable2_0 parent, JavaReadOnlyNamedColumn.Owner owner) {
- return new GenericJavaOrderColumn2_0(parent, owner);
- }
-
- public JavaColumn buildJavaMapKeyColumn(JavaJpaContextNode parent, JavaColumn.Owner owner) {
- return new GenericJavaColumn(parent, owner);
- }
-
- public JavaOrderable2_0 buildJavaOrderable(JavaAttributeMapping parent, Owner owner) {
- return new GenericJavaOrderable(parent, owner);
- }
-
- @Override
- public JavaOrderable buildJavaOrderable(JavaAttributeMapping parent) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer.java
deleted file mode 100644
index ecd2df254e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.utility.BodySourceWriter;
-import org.eclipse.jpt.common.utility.internal.ClassName;
-import org.eclipse.jpt.common.utility.internal.SimpleStack;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
-import org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer;
-import org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.GeneratedAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.text.SimpleDateFormat;
-
-/**
- * For now, the "synchronization" is simple brute-force: we generate the source
- * code and then compare it with what is already present in the file.
- * If the new source is different, we replace the file contents; otherwise, we
- * leave the file unchanged.
- */
-@SuppressWarnings("nls")
-public class GenericMetamodelSynchronizer
- implements MetamodelSourceType.Synchronizer
-{
- protected final MetamodelSourceType sourceType;
-
-
- public GenericMetamodelSynchronizer(MetamodelSourceType sourceType) {
- super();
- this.sourceType = sourceType;
- }
-
- public IFile getFile() {
- return (IFile) this.getPackageFragment().getCompilationUnit(this.getFileName()).getResource();
- }
-
-
- // ********** synchronize **********
-
- public void synchronize(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- try {
- this.synchronize_(memberTypeTree);
- } catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- protected void synchronize_(Map<String, Collection<MetamodelSourceType>> memberTypeTree) throws JavaModelException {
- IPackageFragment pkg = this.getPackageFragment();
- String fileName = this.getFileName();
-
- ICompilationUnit compilationUnit = pkg.getCompilationUnit(fileName);
- if (compilationUnit.exists()) {
- // overwrite existing file if it has changed (ignoring the timestamp)
- String newSource = this.buildSource(compilationUnit, memberTypeTree);
- if (newSource != null) {
- pkg.createCompilationUnit(fileName, newSource, true, null); // true=force
- }
- } else {
- // write a new file, creating the package folders if necessary
- if ( ! pkg.exists()) {
- this.getSourceFolder().createPackageFragment(pkg.getElementName(), true, null); // true=force
- }
- pkg.createCompilationUnit(fileName, this.buildSource(memberTypeTree), false, null); // false=no force
- }
- }
-
- /**
- * pre-condition: the compilation unit exists
- *
- * return null if the old source is not to be replaced
- */
- protected String buildSource(ICompilationUnit compilationUnit, Map<String, Collection<MetamodelSourceType>> memberTypeTree) throws JavaModelException {
- IFile file = (IFile) compilationUnit.getResource();
- JavaResourceAbstractType genType = this.getJpaProject().getGeneratedMetamodelTopLevelType(file);
- if (genType == null) {
- return null; // the file exists, but its source is not a generated metamodel top-level class
- }
-
- String oldSource = compilationUnit.getSource();
- int oldLength = oldSource.length();
-
- String newSource = this.buildSource(memberTypeTree);
- int newLength = newSource.length();
- if (newLength != oldLength) {
- return newSource;
- }
-
- String date = ((GeneratedAnnotation) genType.getAnnotation(GeneratedAnnotation.ANNOTATION_NAME)).getDate(); // if we get here, this will be non-empty
- int dateBegin = oldSource.indexOf(date);
- if (dateBegin == -1) {
- return null; // hmmm...
- }
- int dateEnd = dateBegin + date.length();
- if (dateEnd > oldLength) {
- return null; // hmmm...
- }
-
- if (newSource.regionMatches(0, oldSource, 0, dateBegin) &&
- newSource.regionMatches(dateEnd, oldSource, dateEnd, oldLength - dateEnd)) {
- return null;
- }
- return newSource;
- }
-
-
- // ********** package/file **********
-
- protected IPackageFragment getPackageFragment() {
- return this.getSourceFolder().getPackageFragment(this.getPackageName());
- }
-
- protected IPackageFragmentRoot getSourceFolder() {
- return this.getJpaProject().getMetamodelPackageFragmentRoot();
- }
-
- protected JpaProject2_0 getJpaProject() {
- return (JpaProject2_0) this.sourceType.getJpaProject();
- }
-
- protected String getPackageName() {
- return this.buildPackageName(this.sourceType.getName());
- }
-
- protected String buildPackageName(String topLevelSourceTypeName) {
- return this.buildPackageName_(ClassName.getPackageName(topLevelSourceTypeName));
- }
-
- // TODO
- protected String buildPackageName_(String sourcePackageName) {
- // the default is to store the metamodel class in the same package as the source type
- return sourcePackageName;
- }
-
- protected String getFileName() {
- return ClassName.getSimpleName(this.getClassName()) + ".java";
- }
-
- protected String getClassName() {
- return this.buildClassName(this.sourceType.getName());
- }
-
- protected String buildClassName(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- return this.buildClassName(this.sourceType.getName(), memberTypeTree);
- }
-
- protected String buildClassName(String sourceTypeName, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- String current = sourceTypeName;
- SimpleStack<String> stack = new SimpleStack<String>();
-
- while (true) {
- stack.push(ClassName.getSimpleName(current));
- String declaringTypeName = this.getDeclaringTypeName(current, memberTypeTree);
- if (declaringTypeName == null) {
- break;
- }
- current = declaringTypeName;
- }
-
- StringBuilder sb = new StringBuilder(sourceTypeName.length() + 10);
- sb.append(this.buildPackageName(current));
- while ( ! stack.isEmpty()) {
- sb.append('.');
- sb.append(this.buildSimpleClassName(stack.pop()));
- }
- return sb.toString();
- }
-
- protected String buildClassName(String topLevelSourceTypeName) {
- return this.buildPackageName(topLevelSourceTypeName) + '.' + this.buildSimpleClassName(ClassName.getSimpleName(topLevelSourceTypeName));
- }
-
- protected String getSimpleClassName() {
- return this.buildSimpleClassName(ClassName.getSimpleName(this.sourceType.getName()));
- }
-
- // TODO
- protected String buildSimpleClassName(String simpleSourceTypeName) {
- // the default is to simply append an underscore to the source type name
- return simpleSourceTypeName + '_';
- }
-
-
- // ********** source code **********
-
- /**
- * build the "body" source first; then build the "package" and "imports" source
- * and concatenate the "body" source to it
- */
- protected String buildSource(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- // build the body source first so we can gather up the import statements
- BodySourceWriter bodySourceWriter = this.buildBodySourceWriter(memberTypeTree);
-
- StringWriter sw = new StringWriter(bodySourceWriter.getLength() + 2000);
- PrintWriter pw = new PrintWriter(sw);
- this.printPackageAndImportsOn(pw, bodySourceWriter);
- pw.print(bodySourceWriter.getSource());
- return sw.toString();
- }
-
- protected BodySourceWriter buildBodySourceWriter(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- BodySourceWriter pw = new BodySourceWriter(this.getPackageName(), this.getClassName());
- this.printBodySourceOn(pw, memberTypeTree);
- return pw;
- }
-
- public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- this.printClassDeclarationOn(pw, memberTypeTree);
- pw.print(" {");
- pw.println();
-
- pw.indent();
- boolean attributesPrinted = this.printAttributesOn(pw);
- this.printMemberTypesOn(pw, memberTypeTree, attributesPrinted);
- pw.undent();
-
- pw.print('}');
- pw.println(); // EOF
- }
-
-
- // ********** class declaration **********
-
- protected void printClassDeclarationOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- boolean topLevel = this.sourceTypeIsTopLevel(memberTypeTree);
- if (topLevel) {
- this.printGeneratedAnnotationOn(pw);
- }
- if (this.sourceType.isManaged()) {
- this.printStaticMetamodelAnnotationOn(pw);
- }
-
- pw.print("public ");
- if ( ! topLevel) {
- pw.print("static ");
- }
- pw.print("class ");
- pw.print(this.getSimpleClassName()); // this is always the simple name
- PersistentType superPersistentType = this.sourceType.getSuperPersistentType();
- if (superPersistentType != null) {
- pw.print(" extends ");
- pw.printTypeDeclaration(this.buildClassName(superPersistentType.getName(), memberTypeTree));
- }
- }
-
- /**
- * Return whether the source type is a top level type.
- * This can be inferred from the specified member type tree.
- */
- protected boolean sourceTypeIsTopLevel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- return this.sourceTypeIsTopLevel(this.sourceType.getName(), memberTypeTree);
- }
-
- /**
- * Return whether the specified source type is a top level type.
- * This can be inferred from the specified member type tree.
- */
- protected boolean sourceTypeIsTopLevel(String sourceTypeName, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- return this.getDeclaringTypeName(sourceTypeName, memberTypeTree) == null;
- }
-
- /**
- * Return the name of the specified source type's declaring type, as
- * implied by the specified member type tree. Return null if the source
- * type is a top-level type.
- */
- protected String getDeclaringTypeName(String sourceTypeName, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- int lastPeriod = sourceTypeName.lastIndexOf('.');
- if (lastPeriod == -1) {
- return null; // default package top-level type
- }
- String declaringTypeName = sourceTypeName.substring(0, lastPeriod);
- return (memberTypeTree.get(declaringTypeName) == null) ? null : declaringTypeName;
- }
-
- protected void printGeneratedAnnotationOn(BodySourceWriter pw) {
- pw.printAnnotation("javax.annotation.Generated");
- pw.print('(');
- pw.print("value=");
- pw.printStringLiteral(MetamodelSynchronizer.METAMODEL_GENERATED_ANNOTATION_VALUE);
- pw.print(", ");
- pw.print("date=");
- pw.printStringLiteral(format(new Date()));
- pw.print(')');
- pw.println();
- }
-
- protected void printStaticMetamodelAnnotationOn(BodySourceWriter pw) {
- pw.printAnnotation(JPA2_0.STATIC_METAMODEL);
- pw.print('(');
- pw.printTypeDeclaration(this.sourceType.getName());
- pw.print(".class");
- pw.print(')');
- pw.println();
- }
-
- /**
- * {@link SimpleDateFormat} is not thread-safe.
- */
- protected static synchronized String format(Date date) {
- return DATE_FORMAT.format(date);
- }
- /**
- * Recommended date format is ISO 8601.
- * See javax.annotation.Generated
- */
- private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
-
-
- // ********** attributes **********
-
- /**
- * Return whether any attributes were printed.
- */
- protected boolean printAttributesOn(BodySourceWriter pw) {
- boolean printed = false;
- for (ReadOnlyPersistentAttribute att : this.sourceType.getAttributes()) {
- this.printAttributeOn(att, pw);
- printed = true;
- }
- return printed;
- }
-
- protected void printAttributeOn(ReadOnlyPersistentAttribute persistentAttribute, BodySourceWriter pw) {
- AttributeMapping attributeMapping = persistentAttribute.getMapping();
- if (attributeMapping != null) { // probably shouldn't be null?
- this.printAttributeMappingOn(attributeMapping, pw);
- }
- }
-
- protected void printAttributeMappingOn(AttributeMapping attributeMapping, BodySourceWriter pw) {
- MetamodelField field = ((AttributeMapping2_0) attributeMapping).getMetamodelField();
- if (field != null) {
- this.printFieldOn(field, pw);
- }
- }
-
- protected void printFieldOn(MetamodelField field, BodySourceWriter pw) {
- for (String modifier : field.getModifiers()) {
- pw.print(modifier);
- pw.print(' ');
- }
- pw.printTypeDeclaration(field.getTypeName());
- pw.print('<');
- for (Iterator<String> stream = field.getTypeArgumentNames().iterator(); stream.hasNext(); ) {
- pw.printTypeDeclaration(stream.next());
- if (stream.hasNext()) {
- pw.print(", ");
- }
- }
- pw.print('>');
- pw.print(' ');
- pw.print(field.getName());
- pw.print(';');
- pw.println();
- }
-
-
- // ********** member types **********
-
- protected void printMemberTypesOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree, boolean attributesPrinted) {
- Collection<MetamodelSourceType> memberTypes = memberTypeTree.get(this.sourceType.getName());
- if (memberTypes != null) {
- if (attributesPrinted) {
- pw.println();
- }
- for (Iterator<MetamodelSourceType> stream = memberTypes.iterator(); stream.hasNext(); ) {
- stream.next().printBodySourceOn(pw, memberTypeTree);
- if (stream.hasNext()) {
- pw.println();
- }
- }
- }
- }
-
-
- // ********** package and imports **********
-
- protected void printPackageAndImportsOn(PrintWriter pw, BodySourceWriter bodySourceWriter) {
- if (this.getPackageName().length() != 0) {
- pw.print("package ");
- pw.print(this.getPackageName());
- pw.print(';');
- pw.println();
- pw.println();
- }
-
- for (String import_ : bodySourceWriter.getImports()) {
- pw.print("import ");
- pw.print(import_);
- pw.print(';');
- pw.println();
- }
- pw.println();
- }
-
-
- // ********** misc **********
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.sourceType.getName());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java
deleted file mode 100644
index f3e45023da..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTableValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
-
-public class CollectionTableValidator
- extends AbstractTableValidator
-{
- public CollectionTableValidator(ReadOnlyPersistentAttribute persistentAttribute, CollectionTable2_0 table, TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
- }
-
- @Override
- protected String getUnresolvedCatalogMessage() {
- return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_CATALOG;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedCatalogMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG;
- }
-
- @Override
- protected String getUnresolvedSchemaMessage() {
- return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_SCHEMA;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedSchemaMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA;
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java
deleted file mode 100644
index 082cd49b87..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.BaseJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class MapKeyJoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyJoinColumn, JoinColumnTextRangeResolver>
-{
- protected MapKeyJoinColumnValidator(
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
- }
-
- public MapKeyJoinColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyJoinColumn column,
- ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
- TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
- }
-
- @Override
- protected JptValidator buildTableValidator() {
- return new TableValidator();
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.MAP_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.MAP_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
- protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.MAP_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_MAP_KEY_JOIN_COLUMNS;
- }
-
- @Override
- protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
- }
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_MAP_KEY_JOIN_COLUMNS;
- }
-
-
- // ********** table validator **********
-
- protected class TableValidator
- extends BaseColumnTableValidator
- {
- protected TableValidator() {
- super();
- }
-
- @Override
- protected String getColumnTableNotValidMessage() {
- return JpaValidationMessages.MAP_KEY_JOIN_COLUMN_TABLE_NOT_VALID;
- }
-
- @Override
- protected String getVirtualAttributeColumnTableNotValidMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_TABLE_NOT_VALID;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java
deleted file mode 100644
index 4714555ae3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractNamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
-
-public class OrderColumnValidator
- extends AbstractNamedColumnValidator<OrderColumn2_0, NamedColumnTextRangeResolver>
-{
- public OrderColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- OrderColumn2_0 column,
- NamedColumnTextRangeResolver textRangeResolver) {
- super(persistentAttribute, column, textRangeResolver);
- }
-
- @Override
- protected String getUnresolvedNameMessage() {
- return JpaValidationMessages.ORDER_COLUMN_UNRESOLVED_NAME;
- }
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/SimpleMetamodelField.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/SimpleMetamodelField.java
deleted file mode 100644
index 7720bfbd30..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/SimpleMetamodelField.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.jpa2.context;
-
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-
-/**
- * Straightforward implementation.
- */
-public class SimpleMetamodelField
- implements MetamodelField
-{
- protected final Iterable<String> modifiers;
- protected final String typeName;
- protected final Iterable<String> typeArgumentNames;
- protected final String name;
-
- public SimpleMetamodelField(
- Iterable<String> modifiers,
- String typeName,
- Iterable<String> typeArgumentNames,
- String name
- ) {
- super();
- if (modifiers == null) {
- throw new NullPointerException();
- }
- if (typeName == null) {
- throw new NullPointerException();
- }
- if (typeArgumentNames == null) {
- throw new NullPointerException();
- }
- if (name == null) {
- throw new NullPointerException();
- }
- this.modifiers = modifiers;
- this.typeName = typeName;
- this.typeArgumentNames = typeArgumentNames;
- this.name = name;
- }
-
- public Iterable<String> getModifiers() {
- return this.modifiers;
- }
-
- public String getTypeName() {
- return this.typeName;
- }
-
- public Iterable<String> getTypeArgumentNames() {
- return this.typeArgumentNames;
- }
-
- public String getName() {
- return this.name;
- }
-
- @Override
- public int hashCode() {
- return CollectionTools.hashCode(this.modifiers) ^
- this.typeName.hashCode() ^
- CollectionTools.hashCode(this.typeArgumentNames) ^
- this.name.hashCode();
- }
-
- @Override
- public boolean equals(Object o) {
- if ( ! (o instanceof MetamodelField)) {
- return false;
- }
- MetamodelField other = (MetamodelField) o;
- return CollectionTools.elementsAreEqual(this.getModifiers(), other.getModifiers()) &&
- this.getTypeName().equals(other.getTypeName()) &&
- CollectionTools.elementsAreEqual(this.getTypeArgumentNames(), other.getTypeArgumentNames()) &&
- this.getName().equals(other.getName());
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- for (String modifier : this.modifiers) {
- sb.append(modifier);
- sb.append(' ');
- }
- sb.append(this.typeName);
- sb.append('<');
- for (String typeArgumentName : this.typeArgumentNames) {
- sb.append(typeArgumentName);
- sb.append(", "); //$NON-NLS-1$
- }
- sb.setLength(sb.length() - 2);
- sb.append('>');
- sb.append(' ');
- sb.append(this.name);
- return sb.toString();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
deleted file mode 100644
index 9ea5f1432e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,2118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.java;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.Association;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.SimpleAssociation;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubListIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.CollectionTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.CollectionTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.MapKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.NullMapKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAttributeOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapKeyEnumeratedConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapKeyTemporalConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ElementCollection2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * JPA 2.0 Frankenstein mapping
- */
-public abstract class AbstractJavaElementCollectionMapping2_0
- extends AbstractJavaAttributeMapping<ElementCollection2_0Annotation>
- implements JavaElementCollectionMapping2_0
-{
- protected String specifiedTargetClass;
- protected String defaultTargetClass;
- protected String fullyQualifiedTargetClass;
-
- protected FetchType specifiedFetch;
- protected FetchType defaultFetch;
-
- protected final JavaOrderable2_0 orderable;
-
- protected final JavaCollectionTable2_0 collectionTable;
-
- protected Type valueType;
- protected final JavaColumn valueColumn;
- protected JavaConverter converter; // value converter - never null
- protected final JavaAttributeOverrideContainer valueAttributeOverrideContainer;
- protected final JavaAssociationOverrideContainer valueAssociationOverrideContainer;
-
- protected Type keyType;
-
- //MapKey is not supported by the spec, so this is only for EclipseLink
- //In the generic case we can handle this with validation and not showing the UI widgets
- protected String specifiedMapKey;
- protected boolean noMapKey = false;
- protected boolean pkMapKey = false;
- protected boolean customMapKey = false;
-
- protected String specifiedMapKeyClass;
- protected String defaultMapKeyClass;
- protected String fullyQualifiedMapKeyClass;
-
- protected final JavaColumn mapKeyColumn;
- protected JavaConverter mapKeyConverter; // map key converter - never null
-
- protected final JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer;
-
- protected final ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> specifiedMapKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
-
- protected JavaJoinColumn defaultMapKeyJoinColumn;
-
- protected static final JavaConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new JavaConverter.Adapter[] {
- JavaEnumeratedConverter.Adapter.instance(),
- JavaTemporalConverter.ElementCollectionAdapter.instance(),
- JavaLobConverter.Adapter.instance()
- };
- protected static final Iterable<JavaConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<JavaConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
-
- protected static final JavaConverter.Adapter[] MAP_KEY_CONVERTER_ADAPTER_ARRAY = new JavaConverter.Adapter[] {
- JavaMapKeyEnumeratedConverter2_0.Adapter.instance(),
- JavaMapKeyTemporalConverter2_0.Adapter.instance()
- };
- protected static final Iterable<JavaConverter.Adapter> MAP_KEY_CONVERTER_ADAPTERS = new ArrayIterable<JavaConverter.Adapter>(MAP_KEY_CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
- super(parent);
- this.specifiedTargetClass = this.buildSpecifiedTargetClass();
- this.specifiedFetch = this.buildSpecifiedFetch();
- this.orderable = this.buildOrderable();
- this.collectionTable = this.buildCollectionTable();
-
- this.valueColumn = this.buildValueColumn();
- this.converter = this.buildConverter();
- this.valueAttributeOverrideContainer = this.buildValueAttributeOverrideContainer();
- this.valueAssociationOverrideContainer = this.buildValueAssociationOverrideContainer();
-
- this.specifiedMapKey = this.buildSpecifiedMapKey();
- this.noMapKey = this.buildNoMapKey();
- this.pkMapKey = this.buildPkMapKey();
- this.customMapKey = this.buildCustomMapKey();
- this.specifiedMapKeyClass = this.buildSpecifiedMapKeyClass();
-
- this.mapKeyColumn = this.buildMapKeyColumn();
- this.mapKeyConverter = this.buildMapKeyConverter();
- this.mapKeyAttributeOverrideContainer = this.buildMapKeyAttributeOverrideContainer();
- this.mapKeyJoinColumnOwner = this.buildMapKeyJoinColumnOwner();
- this.specifiedMapKeyJoinColumnContainer = this.buildSpecifiedMapKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTargetClass_(this.buildSpecifiedTargetClass());
- this.setSpecifiedFetch_(this.buildSpecifiedFetch());
- this.orderable.synchronizeWithResourceModel();
- this.collectionTable.synchronizeWithResourceModel();
-
- this.valueColumn.synchronizeWithResourceModel();
- this.syncConverter();
- this.valueAttributeOverrideContainer.synchronizeWithResourceModel();
- this.valueAssociationOverrideContainer.synchronizeWithResourceModel();
-
- this.setSpecifiedMapKey_(this.buildSpecifiedMapKey());
- this.setNoMapKey_(this.buildNoMapKey());
- this.setPkMapKey_(this.buildPkMapKey());
- this.setCustomMapKey_(this.buildCustomMapKey());
- this.setSpecifiedMapKeyClass_(this.buildSpecifiedMapKeyClass());
-
- this.mapKeyColumn.synchronizeWithResourceModel();
- this.syncMapKeyConverter();
- this.mapKeyAttributeOverrideContainer.synchronizeWithResourceModel();
- this.syncSpecifiedMapKeyJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
-
- this.setDefaultTargetClass(this.buildDefaultTargetClass());
- this.setFullyQualifiedTargetClass(this.buildFullyQualifiedTargetClass());
- this.setDefaultFetch(this.buildDefaultFetch());
-
- this.orderable.update();
- this.collectionTable.update();
-
- this.setValueType(this.buildValueType());
- this.valueColumn.update();
- this.converter.update();
- this.valueAttributeOverrideContainer.update();
- this.valueAssociationOverrideContainer.update();
-
- this.setKeyType(this.buildKeyType());
- this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
- this.setFullyQualifiedMapKeyClass(this.buildFullyQualifiedMapKeyClass());
-
- this.mapKeyColumn.update();
- this.mapKeyConverter.update();
- this.mapKeyAttributeOverrideContainer.update();
- this.updateNodes(this.getSpecifiedMapKeyJoinColumns());
- this.updateDefaultMapKeyJoinColumn();
- }
-
-
- // ********** target class **********
-
- public String getTargetClass() {
- return (this.specifiedTargetClass != null) ? this.specifiedTargetClass : this.defaultTargetClass;
- }
-
- public String getSpecifiedTargetClass() {
- return this.specifiedTargetClass;
- }
-
- public void setSpecifiedTargetClass(String targetClass) {
- if (this.valuesAreDifferent(targetClass, this.specifiedTargetClass)) {
- this.getAnnotationForUpdate().setTargetClass(targetClass);
- this.setSpecifiedTargetClass_(targetClass);
- }
- }
-
- protected void setSpecifiedTargetClass_(String targetClass) {
- String old = this.specifiedTargetClass;
- this.specifiedTargetClass = targetClass;
- this.firePropertyChanged(SPECIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- protected String buildSpecifiedTargetClass() {
- ElementCollection2_0Annotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTargetClass();
- }
-
- public String getDefaultTargetClass() {
- return this.defaultTargetClass;
- }
-
- protected void setDefaultTargetClass(String targetClass) {
- String old = this.defaultTargetClass;
- this.defaultTargetClass = targetClass;
- this.firePropertyChanged(DEFAULT_TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- protected String buildDefaultTargetClass() {
- return this.getPersistentAttribute().getMultiReferenceTargetTypeName();
- }
-
- public String getFullyQualifiedTargetClass() {
- return this.fullyQualifiedTargetClass;
- }
-
- protected void setFullyQualifiedTargetClass(String targetClass) {
- String old = this.fullyQualifiedTargetClass;
- this.fullyQualifiedTargetClass = targetClass;
- this.firePropertyChanged(FULLY_QUALIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- protected String buildFullyQualifiedTargetClass() {
- return (this.specifiedTargetClass == null) ?
- this.defaultTargetClass :
- this.getMappingAnnotation().getFullyQualifiedTargetClassName();
- }
-
- public char getTargetClassEnclosingTypeSeparator() {
- return '.';
- }
-
-
- // ********** resolved target type/embeddable/entity **********
-
- public PersistentType getResolvedTargetType() {
- return this.getPersistenceUnit().getPersistentType(this.fullyQualifiedTargetClass);
- }
-
- protected Embeddable getResolvedTargetEmbeddable() {
- return this.getPersistenceUnit().getEmbeddable(this.fullyQualifiedTargetClass);
- }
-
- protected Entity getResolvedTargetEntity() {
- return this.getPersistenceUnit().getEntity(this.fullyQualifiedTargetClass);
- }
-
-
- // ********** fetch **********
-
- public FetchType getFetch() {
- return (this.specifiedFetch != null) ? this.specifiedFetch : this.defaultFetch;
- }
-
- public FetchType getSpecifiedFetch() {
- return this.specifiedFetch;
- }
-
- public void setSpecifiedFetch(FetchType fetch) {
- if (this.valuesAreDifferent(fetch, this.specifiedFetch)) {
- this.getAnnotationForUpdate().setFetch(FetchType.toJavaResourceModel(fetch));
- this.setSpecifiedFetch_(fetch);
- }
- }
-
- protected void setSpecifiedFetch_(FetchType fetch) {
- FetchType old = this.specifiedFetch;
- this.specifiedFetch = fetch;
- this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildSpecifiedFetch() {
- ElementCollection2_0Annotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : FetchType.fromJavaResourceModel(annotation.getFetch());
- }
-
- public FetchType getDefaultFetch() {
- return this.defaultFetch;
- }
-
- protected void setDefaultFetch(FetchType fetch) {
- FetchType old = this.defaultFetch;
- this.defaultFetch = fetch;
- this.firePropertyChanged(DEFAULT_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
-
- // ********** orderable **********
-
- public JavaOrderable2_0 getOrderable() {
- return this.orderable;
- }
-
- protected JavaOrderable2_0 buildOrderable() {
- return this.getJpaFactory().buildJavaOrderable(this, this.buildOrderableOwner());
- }
-
- protected Orderable2_0.Owner buildOrderableOwner() {
- return new OrderableOwner();
- }
-
- protected class OrderableOwner
- implements Orderable2_0.Owner
- {
- public String getTableName() {
- return this.getCollectionTable().getName();
- }
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return this.getCollectionTable().getDbTable();
- }
- protected JavaCollectionTable2_0 getCollectionTable() {
- return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable();
- }
- }
-
-
- // ********** collection table **********
-
- public JavaCollectionTable2_0 getCollectionTable() {
- return this.collectionTable;
- }
-
- protected JavaCollectionTable2_0 buildCollectionTable() {
- return this.getJpaFactory().buildJavaCollectionTable(this, this.buildCollectionTableOwner());
- }
-
- protected Table.Owner buildCollectionTableOwner() {
- return new CollectionTableOwner();
- }
-
- protected class CollectionTableOwner
- implements ReadOnlyTable.Owner
- {
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new CollectionTableValidator(AbstractJavaElementCollectionMapping2_0.this.getPersistentAttribute(), (CollectionTable2_0) table, textRangeResolver);
- }
- }
-
-
- // ********** value type **********
-
- public Type getValueType() {
- return this.valueType;
- }
-
- protected void setValueType(Type valueType) {
- Type old = this.valueType;
- this.valueType = valueType;
- this.firePropertyChanged(VALUE_TYPE_PROPERTY, old, valueType);
- }
-
- protected Type buildValueType() {
- if (this.getResolvedTargetEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getResolvedTargetEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getTargetClass() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
-
- // ********** value column **********
-
- public JavaColumn getValueColumn() {
- return this.valueColumn;
- }
-
- protected JavaColumn buildValueColumn() {
- return this.getJpaFactory().buildJavaColumn(this, this.buildValueColumnOwner());
- }
-
- protected JavaColumn.Owner buildValueColumnOwner() {
- return new ValueColumnOwner();
- }
-
- protected ColumnAnnotation getValueColumnAnnotation() {
- return (ColumnAnnotation) this.getResourceAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- protected void removeValueColumnAnnotation() {
- this.getResourceAttribute().removeAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
-
- // ********** converter **********
-
- public JavaConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- this.converter.dispose();
- JavaConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.retainConverterAnnotation(converterAdapter);
- this.setConverter_(this.buildConverter(converterAdapter));
- }
- }
-
- protected JavaConverter buildConverter(JavaConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getJpaFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(JavaConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- /**
- * Clear all the converter annotations <em>except</em> for the annotation
- * corresponding to the specified adapter. If the specified adapter is
- * <code>null</code>, remove <em>all</em> the converter annotations.
- */
- protected void retainConverterAnnotation(JavaConverter.Adapter converterAdapter) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter != converterAdapter) {
- adapter.removeConverterAnnotation(resourceAttribute);
- }
- }
- }
-
- protected JavaConverter buildConverter() {
- JpaFactory jpaFactory = this.getJpaFactory();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- JavaConverter javaConverter = adapter.buildConverter(this, jpaFactory);
- if (javaConverter != null) {
- return javaConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- Association<JavaConverter.Adapter, Annotation> assoc = this.getConverterAnnotation();
- if (assoc == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- JavaConverter.Adapter adapter = assoc.getKey();
- Annotation annotation = assoc.getValue();
- if ((this.converter.getType() == adapter.getConverterType()) &&
- (this.converter.getConverterAnnotation() == annotation)) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildConverter(annotation, this, this.getJpaFactory()));
- }
- }
- }
-
- /**
- * Return the first converter annotation we find along with its corresponding
- * adapter. Return <code>null</code> if there are no converter annotations.
- */
- protected Association<JavaConverter.Adapter, Annotation> getConverterAnnotation() {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- Annotation annotation = adapter.getConverterAnnotation(resourceAttribute);
- if (annotation != null) {
- return new SimpleAssociation<JavaConverter.Adapter, Annotation>(adapter, annotation);
- }
- }
- return null;
- }
-
- protected JavaConverter buildNullConverter() {
- return new NullJavaConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected JavaConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (JavaConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<JavaConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** value attribute override container **********
-
- public JavaAttributeOverrideContainer getValueAttributeOverrideContainer() {
- return this.valueAttributeOverrideContainer;
- }
-
- protected JavaAttributeOverrideContainer buildValueAttributeOverrideContainer() {
- return this.getJpaFactory().buildJavaAttributeOverrideContainer(this, this.buildValueAttributeOverrideContainerOwner());
- }
-
- protected JavaAttributeOverrideContainer.Owner buildValueAttributeOverrideContainerOwner() {
- return new ValueAttributeOverrideContainerOwner();
- }
-
-
- // ********** value association override container **********
-
- public JavaAssociationOverrideContainer getValueAssociationOverrideContainer() {
- return this.valueAssociationOverrideContainer;
- }
-
- protected JavaAssociationOverrideContainer buildValueAssociationOverrideContainer() {
- return this.getJpaFactory().buildJavaAssociationOverrideContainer(this, this.buildValueAssociationOverrideContainerOwner());
- }
-
- protected JavaAssociationOverrideContainer2_0.Owner buildValueAssociationOverrideContainerOwner() {
- return new ValueAssociationOverrideContainerOwner();
- }
-
-
- // ********** key type **********
-
- public Type getKeyType() {
- return this.keyType;
- }
-
- protected void setKeyType(Type keyType) {
- Type old = this.keyType;
- this.keyType = keyType;
- this.firePropertyChanged(KEY_TYPE_PROPERTY, old, keyType);
- }
-
- protected Type buildKeyType() {
- if (this.getResolvedMapKeyEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getResolvedMapKeyEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getMapKeyClass() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
-
- // ********** map key **********
-
- public String getMapKey() {
- if (this.noMapKey) {
- return null;
- }
- if (this.pkMapKey) {
- // the target is either embeddable or basic, so a key will have to be specified
- return null;
- }
- if (this.customMapKey) {
- return this.specifiedMapKey;
- }
- throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
- }
-
-
- // ********** specified map key **********
-
- public String getSpecifiedMapKey() {
- return this.specifiedMapKey;
- }
-
- public void setSpecifiedMapKey(String mapKey) {
- if (mapKey != null) {
- this.getMapKeyAnnotationForUpdate().setName(mapKey);
-
- this.setSpecifiedMapKey_(mapKey);
- this.setNoMapKey_(false);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(true);
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setSpecifiedMapKey_(String mapKey) {
- String old = this.specifiedMapKey;
- this.specifiedMapKey = mapKey;
- this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
- }
-
- protected String buildSpecifiedMapKey() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation == null) ? null : mapKeyAnnotation.getName();
- }
-
-
- // ********** no map key **********
-
- public boolean isNoMapKey() {
- return this.noMapKey;
- }
-
- public void setNoMapKey(boolean noMapKey) {
- if (noMapKey) {
- if (this.getMapKeyAnnotation() != null) {
- this.removeMapKeyAnnotation();
- }
-
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(true);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(false);
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setNoMapKey_(boolean noMapKey) {
- boolean old = this.noMapKey;
- this.noMapKey = noMapKey;
- this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);
- }
-
- protected boolean buildNoMapKey() {
- return this.getMapKeyAnnotation() == null;
- }
-
-
- // ********** pk map key **********
-
- public boolean isPkMapKey() {
- return this.pkMapKey;
- }
-
- public void setPkMapKey(boolean pkMapKey) {
- if (pkMapKey) {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- if (mapKeyAnnotation == null) {
- mapKeyAnnotation = this.addMapKeyAnnotation();
- } else {
- mapKeyAnnotation.setName(null);
- }
-
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(false);
- this.setPkMapKey_(true);
- this.setCustomMapKey_(false);
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setPkMapKey_(boolean pkMapKey) {
- boolean old = this.pkMapKey;
- this.pkMapKey = pkMapKey;
- this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
- }
-
- protected boolean buildPkMapKey() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) && (mapKeyAnnotation.getName() == null);
- }
-
-
- // ********** custom map key **********
-
- public boolean isCustomMapKey() {
- return this.customMapKey;
- }
-
- public void setCustomMapKey(boolean customMapKey) {
- if (customMapKey) {
- this.setSpecifiedMapKey(""); //$NON-NLS-1$
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setCustomMapKey_(boolean customMapKey) {
- boolean old = this.customMapKey;
- this.customMapKey = customMapKey;
- this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
- }
-
- protected boolean buildCustomMapKey() {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) && (mapKeyAnnotation.getName() != null);
- }
-
-
- // ********** map key annotation **********
-
- protected MapKeyAnnotation getMapKeyAnnotation() {
- return (MapKeyAnnotation) this.getResourceAttribute().getAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
- }
-
- protected MapKeyAnnotation getMapKeyAnnotationForUpdate() {
- MapKeyAnnotation annotation = this.getMapKeyAnnotation();
- return (annotation != null ) ? annotation : this.addMapKeyAnnotation();
- }
-
- protected MapKeyAnnotation addMapKeyAnnotation() {
- return (MapKeyAnnotation) this.getResourceAttribute().addAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyAnnotation() {
- this.getResourceAttribute().removeAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
- }
-
- protected boolean mapKeyNameTouches(int pos) {
- MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
- return (mapKeyAnnotation != null) && mapKeyAnnotation.nameTouches(pos);
- }
-
-
- // ********** map key class **********
-
- public String getMapKeyClass() {
- return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
- }
-
- public String getSpecifiedMapKeyClass() {
- return this.specifiedMapKeyClass;
- }
-
- public void setSpecifiedMapKeyClass(String mapKeyClass) {
- if (this.valuesAreDifferent(mapKeyClass, this.specifiedMapKeyClass)) {
- MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- if (mapKeyClass == null) {
- if (annotation != null) {
- this.removeMapKeyClassAnnotation();
- }
- } else {
- if (annotation == null) {
- annotation = this.addMapKeyClassAnnotation();
- }
- annotation.setValue(mapKeyClass);
- }
-
- this.setSpecifiedMapKeyClass_(mapKeyClass);
- }
- }
-
- protected void setSpecifiedMapKeyClass_(String mapKeyClass) {
- String old = this.specifiedMapKeyClass;
- this.specifiedMapKeyClass = mapKeyClass;
- this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildSpecifiedMapKeyClass() {
- MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- return (annotation == null) ? null : annotation.getValue();
- }
-
- public String getDefaultMapKeyClass() {
- return this.defaultMapKeyClass;
- }
-
- protected void setDefaultMapKeyClass(String mapKeyClass) {
- String old = this.defaultMapKeyClass;
- this.defaultMapKeyClass = mapKeyClass;
- this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildDefaultMapKeyClass() {
- return this.getPersistentAttribute().getMultiReferenceMapKeyTypeName();
- }
-
- public String getFullyQualifiedMapKeyClass() {
- return this.fullyQualifiedMapKeyClass;
- }
-
- protected void setFullyQualifiedMapKeyClass(String mapKeyClass) {
- String old = this.fullyQualifiedMapKeyClass;
- this.fullyQualifiedMapKeyClass = mapKeyClass;
- this.firePropertyChanged(FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildFullyQualifiedMapKeyClass() {
- return (this.specifiedMapKeyClass == null) ?
- this.defaultMapKeyClass :
- this.getMapKeyClassAnnotation().getFullyQualifiedClassName();
- }
-
- public char getMapKeyClassEnclosingTypeSeparator() {
- return '.';
- }
-
-
- // ********** resolved map key embeddable/entity **********
-
- protected Embeddable getResolvedMapKeyEmbeddable() {
- return this.getPersistenceUnit().getEmbeddable(this.fullyQualifiedMapKeyClass);
- }
-
- protected Entity getResolvedMapKeyEntity() {
- return this.getPersistenceUnit().getEntity(this.fullyQualifiedMapKeyClass);
- }
-
-
- // ********** map key class annotation **********
-
- protected MapKeyClass2_0Annotation getMapKeyClassAnnotation() {
- return (MapKeyClass2_0Annotation) this.getResourceAttribute().getAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
- }
-
- protected MapKeyClass2_0Annotation addMapKeyClassAnnotation() {
- return (MapKeyClass2_0Annotation) this.getResourceAttribute().addAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyClassAnnotation() {
- this.getResourceAttribute().removeAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
- }
-
-
- // ********** map key column **********
-
- public JavaColumn getMapKeyColumn() {
- return this.mapKeyColumn;
- }
-
- protected JavaColumn buildMapKeyColumn() {
- return this.getJpaFactory().buildJavaMapKeyColumn(this, this.buildMapKeyColumnOwner());
- }
-
- protected JavaColumn.Owner buildMapKeyColumnOwner() {
- return new MapKeyColumnOwner();
- }
-
- protected MapKeyColumn2_0Annotation getMapKeyColumnAnnotation() {
- return (MapKeyColumn2_0Annotation) this.getResourceAttribute().getNonNullAnnotation(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyColumnAnnotation() {
- this.getResourceAttribute().removeAnnotation(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- // ********** map key converter **********
-
- public JavaConverter getMapKeyConverter() {
- return this.mapKeyConverter;
- }
-
- public void setMapKeyConverter(Class<? extends Converter> converterType) {
- if (this.mapKeyConverter.getType() != converterType) {
- this.mapKeyConverter.dispose();
- JavaConverter.Adapter converterAdapter = this.getMapKeyConverterAdapter(converterType);
- this.retainMapKeyConverterAnnotation(converterAdapter);
- this.setMapKeyConverter_(this.buildKeyConverter(converterAdapter));
- }
- }
-
- protected JavaConverter buildKeyConverter(JavaConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getJpaFactory()) :
- this.buildNullConverter();
- }
-
- protected void setMapKeyConverter_(JavaConverter keyConverter) {
- Converter old = this.mapKeyConverter;
- this.mapKeyConverter = keyConverter;
- this.firePropertyChanged(MAP_KEY_CONVERTER_PROPERTY, old, keyConverter);
- }
-
- /**
- * Clear all the converter annotations <em>except</em> for the annotation
- * corresponding to the specified adapter. If the specified adapter is
- * <code>null</code>, remove <em>all</em> the converter annotations.
- */
- protected void retainMapKeyConverterAnnotation(JavaConverter.Adapter converterAdapter) {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter != converterAdapter) {
- adapter.removeConverterAnnotation(resourceAttribute);
- }
- }
- }
-
- protected JavaConverter buildMapKeyConverter() {
- JpaFactory jpaFactory = this.getJpaFactory();
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- JavaConverter javaConverter = adapter.buildConverter(this, jpaFactory);
- if (javaConverter != null) {
- return javaConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncMapKeyConverter() {
- Association<JavaConverter.Adapter, Annotation> assoc = this.getMapKeyConverterAnnotation();
- if (assoc == null) {
- if (this.mapKeyConverter.getType() != null) {
- this.setMapKeyConverter_(this.buildNullConverter());
- }
- } else {
- JavaConverter.Adapter adapter = assoc.getKey();
- Annotation annotation = assoc.getValue();
- if ((this.mapKeyConverter.getType() == adapter.getConverterType()) &&
- (this.mapKeyConverter.getConverterAnnotation() == annotation)) {
- this.mapKeyConverter.synchronizeWithResourceModel();
- } else {
- this.setMapKeyConverter_(adapter.buildConverter(annotation, this, this.getJpaFactory()));
- }
- }
- }
-
- /**
- * Return the first converter annotation we find along with its corresponding
- * adapter. Return <code>null</code> if there are no converter annotations.
- */
- protected Association<JavaConverter.Adapter, Annotation> getMapKeyConverterAnnotation() {
- JavaResourceAttribute resourceAttribute = this.getResourceAttribute();
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- Annotation annotation = adapter.getConverterAnnotation(resourceAttribute);
- if (annotation != null) {
- return new SimpleAssociation<JavaConverter.Adapter, Annotation>(adapter, annotation);
- }
- }
- return null;
- }
-
-
- // ********** map key converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected JavaConverter.Adapter getMapKeyConverterAdapter(Class<? extends Converter> converterType) {
- for (JavaConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<JavaConverter.Adapter> getMapKeyConverterAdapters() {
- return MAP_KEY_CONVERTER_ADAPTERS;
- }
-
- // ********** map key attribute override container **********
-
- public JavaAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
- return this.mapKeyAttributeOverrideContainer;
- }
-
- protected JavaAttributeOverrideContainer buildMapKeyAttributeOverrideContainer() {
- return this.getJpaFactory().buildJavaAttributeOverrideContainer(this, this.buildMapKeyAttributeOverrideContainerOwner());
- }
-
- protected JavaAttributeOverrideContainer.Owner buildMapKeyAttributeOverrideContainerOwner() {
- return new MapKeyAttributeOverrideContainerOwner();
- }
-
- // ********** map key join columns **********
-
- public ListIterable<JavaJoinColumn> getMapKeyJoinColumns() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumns() : this.getDefaultMapKeyJoinColumns();
- }
-
- public int getMapKeyJoinColumnsSize() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumnsSize() : this.getDefaultMapKeyJoinColumnsSize();
- }
-
-
- // ********** specified map key join columns **********
-
- public ListIterable<JavaJoinColumn> getSpecifiedMapKeyJoinColumns() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedMapKeyJoinColumnsSize() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedMapKeyJoinColumns() {
- return this.getSpecifiedMapKeyJoinColumnsSize() != 0;
- }
-
- public JavaJoinColumn getSpecifiedMapKeyJoinColumn(int index) {
- return this.specifiedMapKeyJoinColumnContainer.getContextElement(index);
- }
-
- public JavaJoinColumn addSpecifiedMapKeyJoinColumn() {
- return this.addSpecifiedMapKeyJoinColumn(this.getSpecifiedMapKeyJoinColumnsSize());
- }
-
- public JavaJoinColumn addSpecifiedMapKeyJoinColumn(int index) {
- MapKeyJoinColumn2_0Annotation annotation = this.addMapKeyJoinColumnAnnotation(index);
- return this.specifiedMapKeyJoinColumnContainer.addContextElement(index, annotation);
- }
-
- public void removeSpecifiedMapKeyJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedMapKeyJoinColumn(this.specifiedMapKeyJoinColumnContainer.indexOfContextElement((JavaJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedMapKeyJoinColumn(int index) {
- this.removeMapKeyJoinColumnAnnotation(index);
- this.specifiedMapKeyJoinColumnContainer.removeContextElement(index);
- }
-
- public void moveSpecifiedMapKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.moveMapKeyJoinColumnAnnotation(targetIndex, sourceIndex);
- this.specifiedMapKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedMapKeyJoinColumns() {
- this.specifiedMapKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> buildSpecifiedMapKeyJoinColumnContainer() {
- SpecifiedMapKeyJoinColumnContainer container = new SpecifiedMapKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified map key join column container
- */
- protected class SpecifiedMapKeyJoinColumnContainer
- extends ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_MAP_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected JavaJoinColumn buildContextElement(MapKeyJoinColumn2_0Annotation resourceElement) {
- return AbstractJavaElementCollectionMapping2_0.this.buildMapKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<MapKeyJoinColumn2_0Annotation> getResourceElements() {
- return AbstractJavaElementCollectionMapping2_0.this.getMapKeyJoinColumnAnnotations();
- }
- @Override
- protected MapKeyJoinColumn2_0Annotation getResourceElement(JavaJoinColumn contextElement) {
- return (MapKeyJoinColumn2_0Annotation) contextElement.getColumnAnnotation();
- }
- }
-
- protected JavaJoinColumn buildMapKeyJoinColumn(MapKeyJoinColumn2_0Annotation joinColumnAnnotation) {
- return this.getJpaFactory().buildJavaJoinColumn(this, this.mapKeyJoinColumnOwner, joinColumnAnnotation);
- }
-
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
- return new MapKeyJoinColumnOwner();
- }
-
-
- // ********** default map key join column **********
-
- public JavaJoinColumn getDefaultMapKeyJoinColumn() {
- return this.defaultMapKeyJoinColumn;
- }
-
- protected void setDefaultMapKeyJoinColumn(JavaJoinColumn mapKeyJoinColumn) {
- JavaJoinColumn old = this.defaultMapKeyJoinColumn;
- this.defaultMapKeyJoinColumn = mapKeyJoinColumn;
- this.firePropertyChanged(DEFAULT_MAP_KEY_JOIN_COLUMN_PROPERTY, old, mapKeyJoinColumn);
- }
-
- protected ListIterable<JavaJoinColumn> getDefaultMapKeyJoinColumns() {
- return (this.defaultMapKeyJoinColumn != null) ?
- new SingleElementListIterable<JavaJoinColumn>(this.defaultMapKeyJoinColumn) :
- EmptyListIterable.<JavaJoinColumn>instance();
- }
-
- protected int getDefaultMapKeyJoinColumnsSize() {
- return (this.defaultMapKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultMapKeyJoinColumn() {
- if (this.buildsDefaultMapKeyJoinColumn()) {
- if (this.defaultMapKeyJoinColumn == null) {
- this.setDefaultMapKeyJoinColumn(this.buildMapKeyJoinColumn(this.buildNullMapKeyJoinColumnAnnotation()));
- } else {
- this.defaultMapKeyJoinColumn.update();
- }
- } else {
- this.setDefaultMapKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultMapKeyJoinColumn() {
- return ! this.hasSpecifiedMapKeyJoinColumns() &&
- getKeyType() == Type.ENTITY_TYPE;
- }
-
- // ********** map key join column annotations **********
-
- protected ListIterable<MapKeyJoinColumn2_0Annotation> getMapKeyJoinColumnAnnotations() {
- return new SubListIterableWrapper<NestableAnnotation, MapKeyJoinColumn2_0Annotation>(this.getNestableMapKeyJoinColumnAnnotations());
- }
-
- protected ListIterable<NestableAnnotation> getNestableMapKeyJoinColumnAnnotations() {
- return this.getResourceAttribute().getAnnotations(MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected MapKeyJoinColumn2_0Annotation addMapKeyJoinColumnAnnotation(int index) {
- return (MapKeyJoinColumn2_0Annotation) this.getResourceAttribute().addAnnotation(index, MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void removeMapKeyJoinColumnAnnotation(int index) {
- this.getResourceAttribute().removeAnnotation(index, MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected void moveMapKeyJoinColumnAnnotation(int targetIndex, int sourceIndex) {
- this.getResourceAttribute().moveAnnotation(targetIndex, sourceIndex, MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME);
- }
-
- protected MapKeyJoinColumn2_0Annotation buildNullMapKeyJoinColumnAnnotation() {
- return new NullMapKeyJoinColumnAnnotation(this.getResourceAttribute());
- }
-
-
- // ********** embedded mappings **********
-
- public Iterable<String> getCandidateMapKeyNames() {
- return this.getAllTargetEmbeddableNonTransientAttributeNames();
- }
-
- protected Iterable<String> getAllTargetEmbeddableNonTransientAttributeNames() {
- return new CompositeIterable<String>(this.getTargetEmbeddableNonTransientAttributeNamesLists());
- }
-
- /**
- * Return a list of lists; each nested list holds the names for one of the
- * embedded mapping's target embeddable type mapping's attribute mappings
- * (non-transient attribute or association mappings, depending on the specified transformer).
- */
- protected Iterable<Iterable<String>> getTargetEmbeddableNonTransientAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getTargetEmbeddableNonTransientAttributeMappings(), AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<AttributeMapping> getTargetEmbeddableNonTransientAttributeMappings() {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return (targetEmbeddable != null) ? targetEmbeddable.getNonTransientAttributeMappings() : EmptyIterable.<AttributeMapping> instance();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<String> getAllMappingNames() {
- return new CompositeIterable<String>(super.getAllMappingNames(), this.getAllEmbeddableAttributeMappingNames());
- }
-
- protected Iterable<String> getAllEmbeddableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllOverridableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllOverridableAssociationMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<String> getQualifiedEmbeddableOverridableMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<String, String>(this.getEmbeddableOverridableMappingNames(transformer), this.buildQualifierTransformer());
- }
-
- protected Iterable<String> getEmbeddableOverridableMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new CompositeIterable<String>(this.getEmbeddableOverridableMappingNamesLists(transformer));
- }
-
- /**
- * Return a list of lists; each nested list holds the names for one of the
- * embedded mapping's target embeddable type mapping's attribute mappings
- * (attribute or association mappings, depending on the specified transformer).
- */
- protected Iterable<Iterable<String>> getEmbeddableOverridableMappingNamesLists(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getEmbeddableAttributeMappings(), transformer);
- }
-
- @Override
- public AttributeMapping resolveAttributeMapping(String attributeName) {
- AttributeMapping resolvedMapping = super.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- // recurse into the embeddable mappings
- for (AttributeMapping mapping : this.getEmbeddableAttributeMappings()) {
- resolvedMapping = mapping.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- }
- return null;
- }
-
- protected Iterable<AttributeMapping> getEmbeddableAttributeMappings() {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return ((targetEmbeddable != null) && (targetEmbeddable != this.getTypeMapping())) ?
- targetEmbeddable.getAttributeMappings() :
- EmptyIterable.<AttributeMapping>instance();
- }
-
- @Override
- public Column resolveOverriddenColumn(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AttributeOverride override = this.valueAttributeOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getColumn() : this.resolveOverriddenColumnInTargetEmbeddable(attributeName);
- }
-
- protected Column resolveOverriddenColumnInTargetEmbeddable(String attributeName) {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return (targetEmbeddable == null) ? null : targetEmbeddable.resolveOverriddenColumn(attributeName);
- }
-
- @Override
- public Relationship resolveOverriddenRelationship(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AssociationOverride override = this.valueAssociationOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getRelationship() : this.resolveRelationshipInTargetEmbeddable(attributeName);
- }
-
- protected Relationship resolveRelationshipInTargetEmbeddable(String attributeName) {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return (targetEmbeddable == null) ? null : targetEmbeddable.resolveOverriddenRelationship(attributeName);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaPersistentAttribute2_0 getParent() {
- return (JavaPersistentAttribute2_0) super.getParent();
- }
-
- @Override
- public JavaPersistentAttribute2_0 getPersistentAttribute() {
- return (JavaPersistentAttribute2_0) super.getPersistentAttribute();
- }
-
- @Override
- protected JpaFactory2_0 getJpaFactory() {
- return (JpaFactory2_0) super.getJpaFactory();
- }
-
- public String getKey() {
- return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- protected String getAnnotationName() {
- return ElementCollection2_0Annotation.ANNOTATION_NAME;
- }
-
- public Entity getEntity() {
- TypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.collectionTable.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.valueColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.converter.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.orderable.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.valueAttributeOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.valueAssociationOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.mapKeyNameTouches(pos)) {
- return this.getJavaCandidateMapKeyNames(filter);
- }
- result = this.mapKeyColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.mapKeyConverter.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.mapKeyAttributeOverrideContainer.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- result = joinColumn.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- protected Iterable<String> getJavaCandidateMapKeyNames(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(this.getCandidateMapKeyNames(filter));
- }
-
- protected Iterable<String> getCandidateMapKeyNames(Filter<String> filter) {
- return new FilteringIterable<String>(this.getCandidateMapKeyNames(), filter);
- }
-
-
- // ********** metamodel **********
-
- @Override
- protected String getMetamodelFieldTypeName() {
- return this.getPersistentAttribute().getMetamodelContainerFieldTypeName();
- }
-
- @Override
- public String getMetamodelTypeName() {
- return (this.fullyQualifiedTargetClass != null) ? this.fullyQualifiedTargetClass : MetamodelField.DEFAULT_TYPE_NAME;
- }
-
- @Override
- protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
- this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
- super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
- }
-
- protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
- String keyTypeName = this.getPersistentAttribute().getMetamodelContainerFieldMapKeyTypeName();
- if (keyTypeName != null) {
- typeArgumentNames.add(keyTypeName);
- }
- }
-
- public String getMetamodelFieldMapKeyTypeName() {
- return MappingTools.getMetamodelFieldMapKeyTypeName(this);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, reporter, astRoot);
- this.validateTargetClass(messages, astRoot);
- this.validateMapKeyClass(messages, astRoot);
- this.orderable.validate(messages, reporter, astRoot);
- this.collectionTable.validate(messages, reporter, astRoot);
- this.validateValue(messages, reporter, astRoot);
- this.validateMapKey(messages, reporter, astRoot);
- this.validateNoEmbeddableInMappingContainsProhibitedMapping(messages, astRoot);
- }
-
- protected void validateNoEmbeddableInMappingContainsProhibitedMapping(List<IMessage> messages, CompilationUnit astRoot) {
- Embeddable embeddableClass = getResolvedTargetEmbeddable();
- if (embeddableClass != null) {
- embeddableContainsElementCollection(messages, astRoot, embeddableClass);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddableClass);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddableClass, new ArrayList<Embeddable>());
- }
- embeddableClass = getResolvedMapKeyEmbeddable();
- if (embeddableClass != null) {
- embeddableContainsElementCollection(messages, astRoot, embeddableClass);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddableClass);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddableClass, new ArrayList<Embeddable>());
- }
- }
-
- private void embeddableHierarchyContainsProhibitedMapping(List<IMessage> messages, CompilationUnit astRoot, Embeddable parentEmbeddable, List<Embeddable> visited) {
- Iterable<AttributeMapping> embeddedIterable = parentEmbeddable.getAllAttributeMappings(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
- for(AttributeMapping mapping : embeddedIterable) {
- Embeddable embeddable = ((BaseEmbeddedMapping)mapping).getTargetEmbeddable();
- if (embeddable != null && embeddable != parentEmbeddable) {
- embeddableContainsElementCollection(messages, astRoot, embeddable);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddable);
- if (!CollectionTools.contains(visited, embeddable)) {
- visited.add(embeddable);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddable, visited);
- }
- }
- }
- Iterable<AttributeMapping> embeddedIdIterable = parentEmbeddable.getAllAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
- for(AttributeMapping mapping : embeddedIdIterable) {
- Embeddable embeddable = ((BaseEmbeddedMapping)mapping).getTargetEmbeddable();
- if (embeddable != null && embeddable != parentEmbeddable) {
- embeddableContainsElementCollection(messages, astRoot, embeddable);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddable);
- if (!CollectionTools.contains(visited, embeddable)) {
- visited.add(embeddable);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddable, visited);
- }
- }
- }
- }
-
- private void embeddableContainsProhibitedRelationshipMapping(List<IMessage> messages, CompilationUnit astRoot, Embeddable embeddable) {
- boolean prohibitedMappingFound = false;
- RelationshipMapping relationshipMapping = null;
- Iterable<AttributeMapping> manyToManyMappings = embeddable.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
- Iterable<AttributeMapping> oneToManyMappings = embeddable.getAllAttributeMappings(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY);
- if (oneToManyMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)oneToManyMappings.iterator().next();
- prohibitedMappingFound = true;
- }
- if (manyToManyMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)manyToManyMappings.iterator().next();
- prohibitedMappingFound = true;
- }
- Iterable<AttributeMapping> manyToOneMappings = embeddable.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
- if (manyToOneMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)manyToOneMappings.iterator().next();
- if (((RelationshipMapping)manyToOneMappings.iterator().next()).getRelationshipOwner() != null
- || ((ManyToOneRelationship2_0)relationshipMapping.getRelationship()).getJoinTableStrategy().getJoinTable() != null) {
- prohibitedMappingFound = true;
- }
- }
- Iterable<AttributeMapping> oneToOneMappings = embeddable.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
- if (oneToOneMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)oneToOneMappings.iterator().next();
- if (relationshipMapping.getRelationshipOwner() != null
- || ((OneToOneRelationship2_0)relationshipMapping.getRelationship()).getJoinTableStrategy().getJoinTable() != null) {
- prohibitedMappingFound = true;
- }
- }
- if (prohibitedMappingFound) {
- if (getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING,
- new String[] {this.getName(),
- embeddable.getName(), relationshipMapping.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING,
- new String[] {embeddable.getName(), relationshipMapping.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
-
- private void embeddableContainsElementCollection(List<IMessage> messages, CompilationUnit astRoot, Embeddable embeddable) {
- Iterable<AttributeMapping> elementCollectionMappings = embeddable.getAllAttributeMappings(MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY);
- if (elementCollectionMappings.iterator().hasNext()) {
- if (getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING,
- new String[] {this.getName(), embeddable.getName(), elementCollectionMappings.iterator().next().getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING,
- new String[] {embeddable.getName(), elementCollectionMappings.iterator().next().getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected void validateTargetClass(List<IMessage> messages, CompilationUnit astRoot) {
- String targetClass = this.getFullyQualifiedTargetClass();
- if (targetClass == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- return;
- }
-
- if (MappingTools.typeIsBasic(this.getJavaProject(), targetClass)) {
- return;
- }
- if (this.getResolvedTargetEmbeddable() == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getName(), targetClass},
- this,
- this.getTargetClassTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {targetClass},
- this,
- this.getTargetClassTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected TextRange getTargetClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getAnnotationTargetClassTextRange(), astRoot);
- }
-
- protected TextRange getAnnotationTargetClassTextRange() {
- ElementCollection2_0Annotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTargetClassTextRange();
- }
-
- protected void validateMapKeyClass(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.getPersistentAttribute().getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages, astRoot);
- }
- }
-
- protected void validateMapKeyClass_(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.getMapKeyClass() == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
- new String[] {this.getName()},
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getValidationTextRange(astRoot)
- )
- );
- }
- }
-
- if (MappingTools.typeIsBasic(this.getJavaProject(), this.getFullyQualifiedMapKeyClass())) {
- return;
- }
-
- if (this.getResolvedMapKeyEmbeddable() == null && this.getResolvedMapKeyEntity() == null) {
- if (this.getPersistentAttribute().isVirtual()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getName(), this.getFullyQualifiedMapKeyClass()},
- this,
- this.getTargetClassTextRange(astRoot)
- )
- );
- } else {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getFullyQualifiedMapKeyClass()},
- this,
- this.getTargetClassTextRange(astRoot)
- )
- );
- }
- }
- }
-
- protected void validateValue(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.converter.validate(messages, reporter, astRoot);
- //TODO should we handle validation when the type is embeddable,
- //but a value column is specified, or things like that if that is invalid?
- switch (this.valueType) {
- case BASIC_TYPE :
- this.valueColumn.validate(messages, reporter, astRoot);
- break;
- case EMBEDDABLE_TYPE :
- this.valueAttributeOverrideContainer.validate(messages, reporter, astRoot);
- this.valueAssociationOverrideContainer.validate(messages, reporter, astRoot);
- break;
- default :
- break;
- }
- }
-
- protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (this.getMapKey() == null) {
- this.validateMapKey_(messages, reporter, astRoot);
- } else {
- //TODO validate that the map key refers to an existing attribute
- }
- }
-
- protected void validateMapKey_(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- switch (this.keyType) {
- case BASIC_TYPE :
- this.mapKeyColumn.validate(messages, reporter, astRoot);
- this.mapKeyConverter.validate(messages, reporter, astRoot);
- break;
- case ENTITY_TYPE :
- for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
- }
- break;
- case EMBEDDABLE_TYPE :
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter, astRoot);
- //validate map key association overrides - for eclipselink
- break;
- default :
- break;
- }
- }
-
-
- // ********** abstract owner **********
-
- /**
- * the various (column and override) owners have lots of common
- * interactions with the mapping
- */
- protected abstract class AbstractOwner
- {
- public JavaResourceMember getResourceMember() {
- return AbstractJavaElementCollectionMapping2_0.this.getResourceAttribute();
- }
-
- public TypeMapping getTypeMapping() {
- return AbstractJavaElementCollectionMapping2_0.this.getTypeMapping();
- }
-
- public String getDefaultTableName() {
- return this.getCollectionTable().getName();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- JavaCollectionTable2_0 table = this.getCollectionTable();
- return Tools.valuesAreEqual(table.getName(), tableName) ? table.getDbTable() : null;
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. the table is always the collection table
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange(astRoot);
- }
-
- protected String getMappingName() {
- return AbstractJavaElementCollectionMapping2_0.this.getName();
- }
-
- protected JavaCollectionTable2_0 getCollectionTable() {
- return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable();
- }
-
- protected JavaPersistentAttribute2_0 getPersistentAttribute() {
- return AbstractJavaElementCollectionMapping2_0.this.getPersistentAttribute();
- }
- }
-
-
- // ********** value column owner **********
-
- protected class ValueColumnOwner
- extends AbstractOwner
- implements JavaColumn.Owner
- {
- public CompleteColumnAnnotation getColumnAnnotation() {
- return AbstractJavaElementCollectionMapping2_0.this.getValueColumnAnnotation();
- }
-
- public void removeColumnAnnotation() {
- AbstractJavaElementCollectionMapping2_0.this.removeValueColumnAnnotation();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getMappingName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** map key column owner **********
-
- protected class MapKeyColumnOwner
- extends AbstractOwner
- implements JavaColumn.Owner
- {
- public MapKeyColumn2_0Annotation getColumnAnnotation() {
- return AbstractJavaElementCollectionMapping2_0.this.getMapKeyColumnAnnotation();
- }
-
- public void removeColumnAnnotation() {
- AbstractJavaElementCollectionMapping2_0.this.removeMapKeyColumnAnnotation();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getMappingName() + "_KEY"; //$NON-NLS-1$
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** value override container owner **********
-
- protected abstract class ValueOverrideContainerOwner
- extends AbstractOwner
- {
- protected static final String POSSIBLE_PREFIX = "value"; //$NON-NLS-1$
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractJavaElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
- }
-
- public String getPossiblePrefix() {
- return POSSIBLE_PREFIX;
- }
-
- public String getWritePrefix() {
- return this.getPersistentAttribute().getJpaContainerDefinition().isMap() ? this.getPossiblePrefix() : null;
- }
-
- //return false if the override is prefixed with "key.", these will be part of the MapKeyAttributeOverrideContainer.
- //a prefix of "value." or no prefix at all is relevant. If the type is not a Map then return true since all attribute overrides
- //need to apply to the value.
- public boolean isRelevant(String overrideName) {
- if (AbstractJavaElementCollectionMapping2_0.this.getKeyType() != Type.EMBEDDABLE_TYPE) {
- return true;
- }
- return ! overrideName.startsWith(MapKeyAttributeOverrideContainerOwner.RELEVANT_PREFIX_);
- }
- }
-
-
- // ********** value attribute override container owner **********
-
- protected class ValueAttributeOverrideContainerOwner
- extends ValueOverrideContainerOwner
- implements JavaAttributeOverrideContainer2_0.Owner
- {
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? overriddenTypeMapping.getAllOverridableAttributeNames() : EmptyIterable.<String>instance();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** value association override container owner **********
-
- protected class ValueAssociationOverrideContainerOwner
- extends ValueOverrideContainerOwner
- implements JavaAssociationOverrideContainer2_0.Owner
- {
- public Iterable<String> getAllOverridableNames() {
- TypeMapping typeMapping = this.getOverridableTypeMapping();
- return (typeMapping != null) ? typeMapping.getAllOverridableAssociationNames() : EmptyIterable.<String>instance();
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) columnOwner, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
- }
-
- // ********** map key join column owner **********
-
- protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected MapKeyJoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable().getName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return AbstractJavaElementCollectionMapping2_0.this.getName() + "_KEY"; //$NON-NLS-1$
- }
-
- public String getAttributeName() {
- return AbstractJavaElementCollectionMapping2_0.this.getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return AbstractJavaElementCollectionMapping2_0.this.getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return AbstractJavaElementCollectionMapping2_0.this.getResolvedMapKeyEntity();
- }
-
- /**
- * If there is a specified table name it needs to be the same as
- * the default table name. The table is always the collection table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable().getDbTable();
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return AbstractJavaElementCollectionMapping2_0.this.getResolvedMapKeyEntity().getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return AbstractJavaElementCollectionMapping2_0.this.getMapKeyJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange(astRoot);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyJoinColumnValidator(
- this.getPersistentAttribute(),
- (ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
- new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** map key attribute override container owner **********
-
- protected class MapKeyAttributeOverrideContainerOwner
- extends AbstractOwner
- implements JavaAttributeOverrideContainer2_0.Owner
- {
- protected static final String POSSIBLE_PREFIX = "key"; //$NON-NLS-1$
- protected static final String RELEVANT_PREFIX_ = "key."; //$NON-NLS-1$
-
- public TypeMapping getOverridableTypeMapping() {
- return AbstractJavaElementCollectionMapping2_0.this.getResolvedMapKeyEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? overriddenTypeMapping.getAllOverridableAttributeNames() : EmptyIterable.<String>instance();
- }
-
- public String getPossiblePrefix() {
- return POSSIBLE_PREFIX;
- }
-
- public String getWritePrefix() {
- return this.getPossiblePrefix();
- }
-
- // the only relevant overrides are those that start with "key.";
- // no prefix will be a value attribute override
- public boolean isRelevant(String overrideName) {
- if (AbstractJavaElementCollectionMapping2_0.this.getValueType() != Type.EMBEDDABLE_TYPE) {
- return true;
- }
- return overrideName.startsWith(RELEVANT_PREFIX_);
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
deleted file mode 100644
index 5b8595bab7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Cacheable2_0Annotation;
-
-/**
- * Java cacheable
- */
-public class GenericJavaCacheable2_0
- extends AbstractJavaJpaContextNode
- implements JavaCacheable2_0
-{
- protected Boolean specifiedCacheable;
- protected boolean defaultCacheable;
-
-
- public GenericJavaCacheable2_0(JavaCacheableHolder2_0 parent) {
- super(parent);
- this.specifiedCacheable = this.buildSpecifiedCacheable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedCacheable_(this.buildSpecifiedCacheable());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultCacheable(this.buildDefaultCacheable());
- }
-
-
- // ********** cacheable **********
-
- public boolean isCacheable() {
- return (this.specifiedCacheable != null) ? this.specifiedCacheable.booleanValue() : this.defaultCacheable;
- }
-
- public Boolean getSpecifiedCacheable() {
- return this.specifiedCacheable;
- }
-
- public void setSpecifiedCacheable(Boolean cacheable) {
- if (this.valuesAreDifferent(cacheable, this.specifiedCacheable)) {
- if (cacheable == null) {
- this.removeCacheableAnnotation();
- } else {
- Cacheable2_0Annotation annotation = this.getCacheableAnnotationForUpdate();
- Boolean value = annotation.getValue();
- if (cacheable.booleanValue()) {
- if ((value != null) && ! value.booleanValue()) { // @Cacheable(false)
- annotation.setValue(null); // set to @Cacheable
- }
- } else {
- annotation.setValue(Boolean.FALSE);
- }
- }
-
- this.setSpecifiedCacheable_(cacheable);
- }
- }
-
- protected void setSpecifiedCacheable_(Boolean cacheable) {
- Boolean old = this.specifiedCacheable;
- this.specifiedCacheable = cacheable;
- this.firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, old, cacheable);
- }
-
- private Boolean buildSpecifiedCacheable() {
- Cacheable2_0Annotation annotation = this.getCacheableAnnotation();
- if (annotation == null) {
- return null;
- }
- Boolean value = annotation.getValue();
- // @Cacheable is equivalent to @Cacheable(true)
- return (value != null) ? value : Boolean.TRUE;
- }
-
- public boolean isDefaultCacheable() {
- return this.defaultCacheable;
- }
-
- protected void setDefaultCacheable(boolean cacheable) {
- boolean old = this.defaultCacheable;
- this.defaultCacheable = cacheable;
- this.firePropertyChanged(DEFAULT_CACHEABLE_PROPERTY, old, cacheable);
- }
-
- protected boolean buildDefaultCacheable() {
- return this.getCacheableHolder().calculateDefaultCacheable();
- }
-
-
- // ********** cacheable annotation **********
-
- /**
- * Return <code>null</code> if the annotation does not exists.
- */
- protected Cacheable2_0Annotation getCacheableAnnotation() {
- return (Cacheable2_0Annotation) this.getJavaResourceType().getAnnotation(this.getCacheableAnnotationName());
- }
-
- /**
- * Build the annotation if it does not exist.
- */
- protected Cacheable2_0Annotation getCacheableAnnotationForUpdate() {
- Cacheable2_0Annotation annotation = this.getCacheableAnnotation();
- return (annotation != null) ? annotation : this.buildCacheableAnnotation();
- }
-
- protected Cacheable2_0Annotation buildCacheableAnnotation() {
- return (Cacheable2_0Annotation) this.getJavaResourceType().addAnnotation(this.getCacheableAnnotationName());
- }
-
- protected void removeCacheableAnnotation() {
- this.getJavaResourceType().removeAnnotation(this.getCacheableAnnotationName());
- }
-
- protected String getCacheableAnnotationName() {
- return Cacheable2_0Annotation.ANNOTATION_NAME;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaCacheableHolder2_0 getParent() {
- return (JavaCacheableHolder2_0) super.getParent();
- }
-
- protected JavaCacheableHolder2_0 getCacheableHolder() {
- return this.getParent();
- }
-
- protected JavaResourceType getJavaResourceType() {
- return this.getCacheableHolder().getJavaResourceType();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getCacheableHolder().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- Cacheable2_0Annotation annotation = this.getCacheableAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
deleted file mode 100644
index dbcea8372c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.CollectionTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaReferenceTable;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-
-/**
- * Java collection table
- */
-public class GenericJavaCollectionTable2_0
- extends GenericJavaReferenceTable<CollectionTable2_0Annotation>
- implements JavaCollectionTable2_0
-{
- public GenericJavaCollectionTable2_0(JavaElementCollectionMapping2_0 parent, Owner owner) {
- super(parent, owner);
- }
-
- @Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
-
- // ********** table annotation **********
-
- @Override
- public CollectionTable2_0Annotation getTableAnnotation() {
- return (CollectionTable2_0Annotation) this.getElementCollectionMapping().getResourceAttribute().getNonNullAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
- }
-
- @Override
- protected void removeTableAnnotation() {
- this.getElementCollectionMapping().getResourceAttribute().removeAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
- }
-
-
- // ********** misc **********
-
- public PersistentAttribute getPersistentAttribute() {
- return this.getElementCollectionMapping().getPersistentAttribute();
- }
-
- @Override
- public JavaElementCollectionMapping2_0 getParent() {
- return (JavaElementCollectionMapping2_0) super.getParent();
- }
-
- protected JavaElementCollectionMapping2_0 getElementCollectionMapping() {
- return this.getParent();
- }
-
- @Override
- protected String buildDefaultName() {
- return MappingTools.buildCollectionTableDefaultName(this.getElementCollectionMapping());
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.getElementCollectionMapping().validatesAgainstDatabase();
- }
-
-
- // ********** join column owner **********
-
- /**
- * owner for "back-pointer" join columns;
- * these point at the source/owning entity
- */
- protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- protected TypeMapping getTypeMapping() {
- return GenericJavaCollectionTable2_0.this.getElementCollectionMapping().getTypeMapping();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return Tools.valuesAreEqual(GenericJavaCollectionTable2_0.this.getName(), tableName) ?
- GenericJavaCollectionTable2_0.this.getDbTable() :
- null;
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- /**
- * by default, the join column is, obviously, in the collection table;
- * not sure whether it can be anywhere else...
- */
- public String getDefaultTableName() {
- return GenericJavaCollectionTable2_0.this.getName();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaCollectionTable2_0.this.getValidationTextRange(astRoot);
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return this.getTypeMapping().getPrimaryDbTable();
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. The table is always the collection table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return ! StringTools.stringsAreEqual(this.getDefaultTableName(), tableName);
- }
-
- /**
- * the join column can only be on the collection table itself
- */
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public Entity getRelationshipTarget() {
- return GenericJavaCollectionTable2_0.this.getElementCollectionMapping().getEntity();
- }
-
- public String getAttributeName() {
- return null; //I *think* this is correct
- //return GenericJavaCollectionTable2_0.this.getParent().getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return GenericJavaCollectionTable2_0.this.getElementCollectionMapping().getPersistentAttribute();
- }
-
- public int getJoinColumnsSize() {
- return GenericJavaCollectionTable2_0.this.getJoinColumnsSize();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
deleted file mode 100644
index 6050364ba3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaDerivedIdentity2_0
- extends AbstractJavaJpaContextNode
- implements JavaDerivedIdentity2_0
-{
- /** this can be <code>null</code> */
- protected DerivedIdentityStrategy2_0 strategy;
-
- protected final JavaIdDerivedIdentityStrategy2_0 idStrategy;
-
- protected final JavaMapsIdDerivedIdentityStrategy2_0 mapsIdStrategy;
-
-
- public GenericJavaDerivedIdentity2_0(JavaSingleRelationshipMapping2_0 parent) {
- super(parent);
- this.idStrategy = this.buildIdStrategy();
- this.mapsIdStrategy = this.buildMapsIdStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.idStrategy.synchronizeWithResourceModel();
- this.mapsIdStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.idStrategy.update();
- this.mapsIdStrategy.update();
- this.updateStrategy();
- }
-
-
- // ********** strategy **********
-
- public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(DerivedIdentityStrategy2_0 strategy) {
- DerivedIdentityStrategy2_0 old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(PREDOMINANT_DERIVED_IDENTITY_STRATEGY_PROPERTY, old, strategy);
- }
-
- protected void updateStrategy() {
- this.setStrategy(this.buildStrategy());
- }
-
- protected DerivedIdentityStrategy2_0 buildStrategy() {
- if (this.mapsIdStrategy.isSpecified()) {
- return this.mapsIdStrategy;
- }
- if (this.idStrategy.isSpecified()) {
- return this.idStrategy;
- }
- return null;
- }
-
-
- // ********** null strategy **********
-
- public boolean usesNullDerivedIdentityStrategy() {
- return this.strategy == null;
- }
-
- public void setNullDerivedIdentityStrategy() {
- this.mapsIdStrategy.removeStrategy();
- this.idStrategy.removeStrategy();
- this.updateStrategy();
- }
-
-
- // ********** ID strategy **********
-
- public JavaIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
- return this.idStrategy;
- }
-
- public void setIdDerivedIdentityStrategy() {
- this.idStrategy.addStrategy();
- this.mapsIdStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean usesIdDerivedIdentityStrategy() {
- return this.strategy == this.idStrategy;
- }
-
- protected JavaIdDerivedIdentityStrategy2_0 buildIdStrategy() {
- return new GenericJavaIdDerivedIdentityStrategy2_0(this);
- }
-
-
- // ********** maps ID strategy **********
-
- public JavaMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
- return this.mapsIdStrategy;
- }
-
- public void setMapsIdDerivedIdentityStrategy() {
- this.mapsIdStrategy.addStrategy();
- this.idStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean usesMapsIdDerivedIdentityStrategy() {
- return this.strategy == this.mapsIdStrategy;
- }
-
- protected JavaMapsIdDerivedIdentityStrategy2_0 buildMapsIdStrategy() {
- return new GenericJavaMapsIdDerivedIdentityStrategy2_0(this);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaSingleRelationshipMapping2_0 getParent() {
- return (JavaSingleRelationshipMapping2_0) super.getParent();
- }
-
- public JavaSingleRelationshipMapping2_0 getMapping() {
- return this.getParent();
- }
-
-
- // ********** java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.strategy != null) {
- result = ((JavaJpaContextNode) this.strategy).getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- if (this.strategy != null) {
- ((JavaJpaContextNode) this.strategy).validate(messages, reporter, astRoot);
- }
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getMapping().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java
deleted file mode 100644
index acaed18545..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-
-public class GenericJavaElementCollectionMapping2_0
- extends AbstractJavaElementCollectionMapping2_0
-{
- public GenericJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
- super(parent);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java
deleted file mode 100644
index 2635174885..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEmbeddable;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * JPA 2.0
- * Java embeddable type mapping
- */
-public class GenericJavaEmbeddable2_0
- extends AbstractJavaEmbeddable
-{
- public GenericJavaEmbeddable2_0(JavaPersistentType parent, EmbeddableAnnotation mappingAnnotation) {
- super(parent, mappingAnnotation);
- }
-
- @Override
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return ArrayTools.contains(ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
- }
-
- public static final String[] ALLOWED_ATTRIBUTE_MAPPING_KEYS =
- new String[] {
- MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY,
- MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index bdd4cd8ed6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaIdDerivedIdentityStrategy2_0
- extends AbstractJavaJpaContextNode
- implements JavaIdDerivedIdentityStrategy2_0
-{
- protected boolean value;
-
-
- public GenericJavaIdDerivedIdentityStrategy2_0(JavaDerivedIdentity2_0 parent) {
- super(parent);
- this.value = this.buildValue();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** value **********
-
- public boolean getValue() {
- return this.value;
- }
-
- public void setValue(boolean value) {
- if (value != this.value) {
- if (value) {
- this.addAnnotation();
- } else {
- this.removeAnnotation();
- }
- this.setValue_(value);
- }
- }
-
- protected void setValue_(boolean value) {
- boolean old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- protected boolean buildValue() {
- return this.getAnnotation() != null;
- }
-
-
- // ********** annotation **********
-
- protected IdAnnotation getAnnotation() {
- return (IdAnnotation) this.getResourceAttribute().getAnnotation(this.getAnnotationName());
- }
-
- protected void addAnnotation() {
- this.getResourceAttribute().addAnnotation(this.getAnnotationName());
- }
-
- protected void removeAnnotation() {
- this.getResourceAttribute().removeAnnotation(this.getAnnotationName());
- }
-
- protected String getAnnotationName() {
- return IdAnnotation.ANNOTATION_NAME;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaDerivedIdentity2_0 getParent() {
- return (JavaDerivedIdentity2_0) super.getParent();
- }
-
- protected JavaDerivedIdentity2_0 getDerivedIdentity() {
- return this.getParent();
- }
-
- protected JavaSingleRelationshipMapping2_0 getMapping() {
- return this.getDerivedIdentity().getMapping();
- }
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getMapping().getPersistentAttribute().getResourceAttribute();
- }
-
- public boolean isSpecified() {
- return this.value;
- }
-
- public void addStrategy() {
- this.setValue(true);
- }
-
- public void removeStrategy() {
- this.setValue(false);
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- // no validation rules
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- IdAnnotation annotation = this.getAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 114f3fe731..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.java;
-
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaMapsIdDerivedIdentityStrategy2_0
- extends AbstractJavaJpaContextNode
- implements JavaMapsIdDerivedIdentityStrategy2_0
-{
- protected String specifiedIdAttributeName;
- protected String defaultIdAttributeName;
-
-
- public GenericJavaMapsIdDerivedIdentityStrategy2_0(JavaDerivedIdentity2_0 parent) {
- super(parent);
- this.specifiedIdAttributeName = this.buildSpecifiedIdAttributeName();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedIdAttributeName_(this.buildSpecifiedIdAttributeName());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultIdAttributeName(this.buildDefaultIdAttributeName());
- }
-
-
- // ********** ID attribute name **********
-
- public String getIdAttributeName() {
- return (this.specifiedIdAttributeName != null) ? this.specifiedIdAttributeName : this.defaultIdAttributeName;
- }
-
- public String getSpecifiedIdAttributeName() {
- return this.specifiedIdAttributeName;
- }
-
- public void setSpecifiedIdAttributeName(String idAttributeName) {
- if (this.valuesAreDifferent(idAttributeName, this.specifiedIdAttributeName)) {
- this.getAnnotation().setValue(idAttributeName);
- this.setSpecifiedIdAttributeName_(idAttributeName);
- }
- }
-
- protected void setSpecifiedIdAttributeName_(String idAttributeName) {
- String old = this.specifiedIdAttributeName;
- this.specifiedIdAttributeName = idAttributeName;
- this.firePropertyChanged(SPECIFIED_ID_ATTRIBUTE_NAME_PROPERTY, old, idAttributeName);
- }
-
- protected String buildSpecifiedIdAttributeName() {
- return this.getAnnotation().getValue();
- }
-
- public String getDefaultIdAttributeName() {
- return this.defaultIdAttributeName;
- }
-
- protected void setDefaultIdAttributeName(String idAttributeName) {
- String old = this.defaultIdAttributeName;
- this.defaultIdAttributeName = idAttributeName;
- this.firePropertyChanged(DEFAULT_ID_ATTRIBUTE_NAME_PROPERTY, old, idAttributeName);
- }
-
- protected String buildDefaultIdAttributeName() {
- Iterator<AttributeMapping> stream = this.getIdAttributeMappings().iterator();
- if (stream.hasNext()) {
- AttributeMapping mapping = stream.next();
- // return null if we have more than one id mapping
- return stream.hasNext() ? null : mapping.getName();
- }
- return null; // empty
- }
-
- public boolean defaultIdAttributeNameIsPossible() {
- return true;
- }
-
-
- // ********** annotation **********
-
- /**
- * Do <em>not</em> return <code>null</code>.
- */
- protected MapsId2_0Annotation getAnnotation() {
- return (MapsId2_0Annotation) this.getResourceAttribute().getNonNullAnnotation(this.getAnnotationName());
- }
-
- /**
- * Return <code>null</code> if the annotation is not present.
- */
- protected MapsId2_0Annotation getAnnotationOrNull() {
- return (MapsId2_0Annotation) this.getResourceAttribute().getAnnotation(this.getAnnotationName());
- }
-
- protected void addAnnotation() {
- this.getResourceAttribute().addAnnotation(this.getAnnotationName());
- }
-
- protected void removeAnnotation() {
- this.getResourceAttribute().removeAnnotation(this.getAnnotationName());
- }
-
- protected String getAnnotationName() {
- return MapsId2_0Annotation.ANNOTATION_NAME;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaDerivedIdentity2_0 getParent() {
- return (JavaDerivedIdentity2_0) super.getParent();
- }
-
- protected JavaDerivedIdentity2_0 getDerivedIdentity() {
- return this.getParent();
- }
-
- protected JavaSingleRelationshipMapping2_0 getMapping() {
- return this.getDerivedIdentity().getMapping();
- }
-
- protected JavaPersistentAttribute getPersistentAttribute() {
- return this.getMapping().getPersistentAttribute();
- }
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getPersistentAttribute().getResourceAttribute();
- }
-
- protected Iterable<AttributeMapping> getAllAttributeMappings() {
- return CollectionTools.collection(this.getPersistentAttribute().getOwningTypeMapping().getAllAttributeMappings());
- }
-
- public Iterable<String> getSortedCandidateIdAttributeNames() {
- return CollectionTools.sort(this.getAllAttributeMappingChoiceNames());
- }
-
- protected Iterable<String> getAllAttributeMappingChoiceNames() {
- return new TransformationIterable<AttributeMapping, String>(this.getAllAttributeMappingChoices()) {
- @Override
- protected String transform(AttributeMapping mapping) {
- return mapping.getName();
- }
- };
- }
-
- protected Iterable<AttributeMapping> getAllAttributeMappingChoices() {
- return this.buildAttributeMappingChoices(this.getAllAttributeMappings());
- }
-
- protected Iterable<AttributeMapping> buildAttributeMappingChoices(Iterable<AttributeMapping> attributeMappings) {
- return new CompositeIterable<AttributeMapping>(this.getAttributeMappingChoiceIterables(attributeMappings));
- }
-
- /**
- * @see #getEmbeddedIdMappingChoiceIterable(EmbeddedIdMapping)
- */
- protected Iterable<Iterable<AttributeMapping>> getAttributeMappingChoiceIterables(Iterable<AttributeMapping> availableMappings) {
- return new TransformationIterable<AttributeMapping, Iterable<AttributeMapping>>(availableMappings) {
- @Override
- protected Iterable<AttributeMapping> transform(AttributeMapping mapping) {
- if (Tools.valuesAreEqual(mapping.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY)) {
- return GenericJavaMapsIdDerivedIdentityStrategy2_0.this.getEmbeddedIdMappingChoiceIterable((EmbeddedIdMapping) mapping);
- }
- return new SingleElementIterable<AttributeMapping>(mapping);
- }
- };
- }
-
- /**
- * Convert the specified mapping into a collection of its "mappings".
- * Typically, this collection will include just the mapping itself;
- * but, if the mapping is an embedded ID, this collection will include
- * the mapping itself plus all the mappings of its target embeddable.
- */
- protected Iterable<AttributeMapping> getEmbeddedIdMappingChoiceIterable(EmbeddedIdMapping mapping) {
- Embeddable embeddable = mapping.getTargetEmbeddable();
- if (embeddable == null) {
- return new SingleElementIterable<AttributeMapping>(mapping);
- }
- return new CompositeIterable<AttributeMapping>(
- mapping,
- CollectionTools.collection(embeddable.getAllAttributeMappings())
- );
- }
-
- public AttributeMapping getDerivedIdAttributeMapping() {
- String idAttributeName = this.getIdAttributeName();
- if (idAttributeName != null) {
- for (AttributeMapping mapping : this.getAllAttributeMappingChoices()) {
- if (idAttributeName.equals(mapping.getName())) {
- return mapping;
- }
- }
- }
- return null;
- }
-
- public boolean isSpecified() {
- return this.getAnnotationOrNull() != null;
- }
-
- public void addStrategy() {
- if (this.getAnnotationOrNull() == null) {
- this.addAnnotation();
- }
- }
-
- public void removeStrategy() {
- if (this.getAnnotationOrNull() != null) {
- this.removeAnnotation();
- }
- }
-
-
- // ********** Java completion proposals **********
-
- @Override
- public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.getAnnotation().valueTouches(pos)) {
- result = this.getSortedJavaValueChoices(filter);
- }
- return result;
- }
-
- protected Iterable<String> getSortedJavaValueChoices(Filter<String> filter) {
- return StringTools.convertToJavaStringLiterals(new FilteringIterable<String>(this.getSortedCandidateIdAttributeNames(), filter));
- }
-
-
- // ********** ID mappings **********
-
- protected Iterable<AttributeMapping> getIdAttributeMappings() {
- return new FilteringIterable<AttributeMapping>(this.getAllAttributeMappings()) {
- @Override
- protected boolean accept(AttributeMapping mapping) {
- return GenericJavaMapsIdDerivedIdentityStrategy2_0.this.mappingIsIdMapping(mapping);
- }
- };
- }
-
- protected boolean mappingIsIdMapping(AttributeMapping mapping) {
- return CollectionTools.contains(this.getIdMappingKeys(), mapping.getKey());
- }
-
- protected Iterable<String> getIdMappingKeys() {
- return ID_MAPPING_KEYS;
- }
-
- protected static final String[] ID_MAPPING_KEYS_ARRAY = new String[] {
- MappingKeys.ID_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY
- };
-
- protected static final Iterable<String> ID_MAPPING_KEYS = new ArrayIterable<String>(ID_MAPPING_KEYS_ARRAY);
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMapsId(messages, astRoot);
- }
-
- protected void validateMapsId(List<IMessage> messages, CompilationUnit astRoot) {
- if (this.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy()) {
- this.validateMapsId_(messages, astRoot);
- }
- }
-
- protected void validateMapsId_(List<IMessage> messages, CompilationUnit astRoot) {
- // test whether id attribute name can be resolved
- AttributeMapping attributeMapping = this.getDerivedIdAttributeMapping();
- if (attributeMapping == null) {
- // if id attribute name is not specified, use that message
- if (this.specifiedIdAttributeName == null) {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_SPECIFIED, EMPTY_STRING_ARRAY, astRoot));
- } else {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_RESOLVED, new String[] {this.getIdAttributeName()}, astRoot));
- }
- } else {
- // test whether attribute mapping is allowable
- if ( ! CollectionTools.contains(this.getValidAttributeMappingChoices(), attributeMapping)) {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_INVALID, new String[] {this.getIdAttributeName()}, astRoot));
- }
- }
- }
-
- protected Iterable<AttributeMapping> getValidAttributeMappingChoices() {
- return this.buildAttributeMappingChoices(this.getIdAttributeMappings());
- }
-
- protected IMessage buildMessage(String msgID, String[] parms, CompilationUnit astRoot) {
- PersistentAttribute attribute = this.getPersistentAttribute();
- String attributeDescription = attribute.isVirtual() ?
- JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC :
- JpaValidationDescriptionMessages.ATTRIBUTE_DESC;
- attributeDescription = NLS.bind(attributeDescription, attribute.getName());
- parms = ArrayTools.add(parms, 0, attributeDescription);
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- parms,
- this,
- this.getValidationTextRange(astRoot)
- );
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- return this.getAnnotation().getTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java
deleted file mode 100644
index efc9425294..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.java;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery;
-import org.eclipse.jpt.jpa.core.jpa2.context.LockModeType2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.NamedQuery2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaNamedQuery2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.NamedQuery2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * JPA 2.0
- * Java named query
- */
-public class GenericJavaNamedQuery2_0
- extends AbstractJavaQuery<NamedQuery2_0Annotation>
- implements JavaNamedQuery2_0
-{
- protected LockModeType2_0 specifiedLockMode;
- protected LockModeType2_0 defaultLockMode;
-
-
- public GenericJavaNamedQuery2_0(JavaQueryContainer parent, NamedQuery2_0Annotation queryAnnotation) {
- super(parent, queryAnnotation);
- this.specifiedLockMode = this.buildSpecifiedLockMode();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedLockMode_(this.buildSpecifiedLockMode());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultLockMode(this.buildDefaultLockMode());
- }
-
-
- // ********** lock mode **********
-
- public LockModeType2_0 getLockMode() {
- return (this.specifiedLockMode != null) ? this.specifiedLockMode : this.defaultLockMode;
- }
-
- public LockModeType2_0 getSpecifiedLockMode() {
- return this.specifiedLockMode;
- }
-
- public void setSpecifiedLockMode(LockModeType2_0 lockMode) {
- this.queryAnnotation.setLockMode(LockModeType2_0.toJavaResourceModel(lockMode));
- this.setSpecifiedLockMode_(lockMode);
- }
-
- protected void setSpecifiedLockMode_(LockModeType2_0 lockMode) {
- LockModeType2_0 old = this.specifiedLockMode;
- this.specifiedLockMode = lockMode;
- this.firePropertyChanged(SPECIFIED_LOCK_MODE_PROPERTY, old, lockMode);
- }
-
- protected LockModeType2_0 buildSpecifiedLockMode() {
- return LockModeType2_0.fromJavaResourceModel(this.queryAnnotation.getLockMode());
- }
-
- public LockModeType2_0 getDefaultLockMode() {
- return this.defaultLockMode;
- }
-
- protected void setDefaultLockMode(LockModeType2_0 lockMode) {
- LockModeType2_0 old = this.defaultLockMode;
- this.defaultLockMode = lockMode;
- this.firePropertyChanged(DEFAULT_LOCK_MODE_PROPERTY, old, lockMode);
- }
-
- protected LockModeType2_0 buildDefaultLockMode() {
- return LockModeType2_0.NONE;
- }
-
- // ********** metadata conversion *********
-
- public void convertTo(OrmQueryContainer queryContainer) {
- queryContainer.addNamedQuery().convertFrom(this);
- }
-
- public void delete() {
- this.getParent().removeNamedQuery(this);
- }
-
- // ********** validation **********
-
- @Override
- protected void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
- queryHelper.validate(this, this.query, this.getQueryAnnotation().getQueryTextRange(), 1, messages);
- }
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((NamedQuery2_0) node);
- }
-
- protected boolean isEquivalentTo(NamedQuery2_0 namedQuery) {
- return this.specifiedLockMode == namedQuery.getSpecifiedLockMode();
- }
-
- // ********** misc **********
-
- public Class<NamedQuery> getType() {
- return NamedQuery.class;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java
deleted file mode 100644
index 586c676820..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.OrderColumn2_0AnnotationDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-
-/**
- * Java order column
- */
-public class GenericJavaOrderColumn2_0
- extends AbstractJavaNamedColumn<OrderColumn2_0Annotation, JavaReadOnlyNamedColumn.Owner>
- implements JavaOrderColumn2_0
-{
- protected Boolean specifiedNullable;
- protected boolean defaultNullable;
-
- protected Boolean specifiedInsertable;
- protected boolean defaultInsertable;
-
- protected Boolean specifiedUpdatable;
- protected boolean defaultUpdatable;
-
- // JPA 1.0
- protected OrderColumn2_0Annotation nullColumnAnnotation;
-
-
- public GenericJavaOrderColumn2_0(JavaOrderable2_0 parent, JavaReadOnlyNamedColumn.Owner owner) {
- super(parent, owner);
- this.specifiedNullable = this.buildSpecifiedNullable();
- this.specifiedInsertable = this.buildSpecifiedInsertable();
- this.specifiedUpdatable = this.buildSpecifiedUpdatable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedNullable_(this.buildSpecifiedNullable());
- this.setSpecifiedInsertable_(this.buildSpecifiedInsertable());
- this.setSpecifiedUpdatable_(this.buildSpecifiedUpdatable());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultNullable(this.buildDefaultNullable());
- this.setDefaultInsertable(this.buildDefaultInsertable());
- this.setDefaultUpdatable(this.buildDefaultUpdatable());
- }
-
-
- // ********** column annotation **********
-
- /**
- * If we are in a JPA 1.0 project, return a null annotation.
- */
- @Override
- public OrderColumn2_0Annotation getColumnAnnotation() {
- // hmmmm...
- return this.isJpa2_0Compatible() ?
- (OrderColumn2_0Annotation) this.getResourceAttribute().getNonNullAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME) :
- this.getNullColumnAnnotation();
- }
-
- protected OrderColumn2_0Annotation getNullColumnAnnotation() {
- if (this.nullColumnAnnotation == null) {
- this.nullColumnAnnotation = this.buildNullColumnAnnotation();
- }
- return this.nullColumnAnnotation;
- }
-
- protected OrderColumn2_0Annotation buildNullColumnAnnotation() {
- // hmmmm...
- return (OrderColumn2_0Annotation) OrderColumn2_0AnnotationDefinition.instance().buildNullAnnotation(this.getResourceAttribute());
- }
-
- @Override
- protected void removeColumnAnnotation() {
- if (this.isJpa2_0Compatible()) {
- this.getResourceAttribute().removeAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
- } else {
- throw new IllegalStateException();
- }
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return (this.specifiedNullable != null) ? this.specifiedNullable.booleanValue() : this.isDefaultNullable();
- }
-
- public Boolean getSpecifiedNullable() {
- return this.specifiedNullable;
- }
-
- public void setSpecifiedNullable(Boolean nullable) {
- if (this.valuesAreDifferent(this.specifiedNullable, nullable)) {
- this.getColumnAnnotation().setNullable(nullable);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedNullable_(nullable);
- }
- }
-
- protected void setSpecifiedNullable_(Boolean nullable) {
- Boolean old = this.specifiedNullable;
- this.specifiedNullable = nullable;
- this.firePropertyChanged(SPECIFIED_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected Boolean buildSpecifiedNullable() {
- return this.getColumnAnnotation().getNullable();
- }
-
- public boolean isDefaultNullable() {
- return this.defaultNullable;
- }
-
- protected void setDefaultNullable(boolean nullable) {
- boolean old = this.defaultNullable;
- this.defaultNullable = nullable;
- this.firePropertyChanged(DEFAULT_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected boolean buildDefaultNullable() {
- return DEFAULT_NULLABLE;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return (this.specifiedInsertable != null) ? this.specifiedInsertable.booleanValue() : this.isDefaultInsertable();
- }
-
- public Boolean getSpecifiedInsertable() {
- return this.specifiedInsertable;
- }
-
- public void setSpecifiedInsertable(Boolean insertable) {
- if (this.valuesAreDifferent(this.specifiedInsertable, insertable)) {
- this.getColumnAnnotation().setInsertable(insertable);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedInsertable_(insertable);
- }
- }
-
- protected void setSpecifiedInsertable_(Boolean insertable) {
- Boolean old = this.specifiedInsertable;
- this.specifiedInsertable = insertable;
- this.firePropertyChanged(SPECIFIED_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected Boolean buildSpecifiedInsertable() {
- return this.getColumnAnnotation().getInsertable();
- }
-
- public boolean isDefaultInsertable() {
- return this.defaultInsertable;
- }
-
- protected void setDefaultInsertable(boolean insertable) {
- boolean old = this.defaultInsertable;
- this.defaultInsertable = insertable;
- this.firePropertyChanged(DEFAULT_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected boolean buildDefaultInsertable() {
- return DEFAULT_INSERTABLE;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return (this.specifiedUpdatable != null) ? this.specifiedUpdatable.booleanValue() : this.isDefaultUpdatable();
- }
-
- public Boolean getSpecifiedUpdatable() {
- return this.specifiedUpdatable;
- }
-
- public void setSpecifiedUpdatable(Boolean updatable) {
- if (this.valuesAreDifferent(this.specifiedUpdatable, updatable)) {
- this.getColumnAnnotation().setUpdatable(updatable);
- this.removeColumnAnnotationIfUnset();
- this.setSpecifiedUpdatable_(updatable);
- }
- }
-
- protected void setSpecifiedUpdatable_(Boolean updatable) {
- Boolean old = this.specifiedUpdatable;
- this.specifiedUpdatable = updatable;
- this.firePropertyChanged(SPECIFIED_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected Boolean buildSpecifiedUpdatable() {
- return this.getColumnAnnotation().getUpdatable();
- }
-
- public boolean isDefaultUpdatable() {
- return this.defaultUpdatable;
- }
-
- protected void setDefaultUpdatable(boolean updatable) {
- boolean old = this.defaultUpdatable;
- this.defaultUpdatable = updatable;
- this.firePropertyChanged(DEFAULT_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected boolean buildDefaultUpdatable() {
- return DEFAULT_UPDATABLE;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaOrderable2_0 getParent() {
- return (JavaOrderable2_0) super.getParent();
- }
-
- protected JavaOrderable2_0 getOrderable() {
- return this.getParent();
- }
-
- protected JavaResourceAttribute getResourceAttribute() {
- return this.getOrderable().getResourceAttribute();
- }
-
- @Override
- public String getTable() {
- return this.getOrderable().getDefaultTableName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
deleted file mode 100644
index bc15a0356b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OwningRelationshipMapping2_0Annotation;
-
-/**
- * Java orphan removal
- */
-public class GenericJavaOrphanRemoval2_0
- extends AbstractJavaJpaContextNode
- implements JavaOrphanRemovable2_0
-{
- protected Boolean specifiedOrphanRemoval;
- protected boolean defaultOrphanRemoval;
-
-
- public GenericJavaOrphanRemoval2_0(JavaOrphanRemovalHolder2_0 parent) {
- super(parent);
- this.specifiedOrphanRemoval = this.buildSpecifiedOrphanRemoval();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedOrphanRemoval_(this.buildSpecifiedOrphanRemoval());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultOrphanRemoval(this.buildDefaultOrphanRemoval());
- }
-
-
- // ********** orphan removal **********
-
- public boolean isOrphanRemoval() {
- return (this.specifiedOrphanRemoval != null) ? this.specifiedOrphanRemoval.booleanValue() : this.defaultOrphanRemoval;
- }
-
- public Boolean getSpecifiedOrphanRemoval() {
- return this.specifiedOrphanRemoval;
- }
-
- public void setSpecifiedOrphanRemoval(Boolean orphanRemoval) {
- if (this.valuesAreDifferent(orphanRemoval, this.specifiedOrphanRemoval)) {
- this.getMappingAnnotationForUpdate().setOrphanRemoval(orphanRemoval);
- this.setSpecifiedOrphanRemoval_(orphanRemoval);
- }
- }
-
- protected void setSpecifiedOrphanRemoval_(Boolean orphanRemoval) {
- Boolean old = this.specifiedOrphanRemoval;
- this.specifiedOrphanRemoval = orphanRemoval;
- this.firePropertyChanged(SPECIFIED_ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
- }
-
- protected Boolean buildSpecifiedOrphanRemoval() {
- OwningRelationshipMapping2_0Annotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getOrphanRemoval();
- }
-
- public boolean isDefaultOrphanRemoval() {
- return this.defaultOrphanRemoval;
- }
-
- protected void setDefaultOrphanRemoval(boolean orphanRemoval) {
- boolean old = this.defaultOrphanRemoval;
- this.defaultOrphanRemoval = orphanRemoval;
- this.firePropertyChanged(DEFAULT_ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
- }
-
- protected boolean buildDefaultOrphanRemoval() {
- return DEFAULT_ORPHAN_REMOVAL;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaOrphanRemovalHolder2_0 getParent() {
- return (JavaOrphanRemovalHolder2_0) super.getParent();
- }
-
- protected JavaAttributeMapping getMapping() {
- return (JavaAttributeMapping) this.getParent();
- }
-
- protected OwningRelationshipMapping2_0Annotation getMappingAnnotation() {
- return (OwningRelationshipMapping2_0Annotation) this.getMapping().getMappingAnnotation();
- }
-
- protected OwningRelationshipMapping2_0Annotation getMappingAnnotationForUpdate() {
- return (OwningRelationshipMapping2_0Annotation) this.getMapping().getAnnotationForUpdate();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange();
- return (textRange != null) ? textRange : this.getMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange() {
- OwningRelationshipMapping2_0Annotation annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getOrphanRemovalTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java
deleted file mode 100644
index c4a7ab7f72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.AssociationOverride2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-public class GenericJavaOverrideJoinTableRelationshipStrategy2_0
- extends AbstractJavaJoinTableRelationshipStrategy
-{
- public GenericJavaOverrideJoinTableRelationshipStrategy2_0(JavaOverrideRelationship2_0 parent) {
- super(parent);
- }
-
-
- // ********** join table annotation **********
-
- public JoinTableAnnotation getJoinTableAnnotation() {
- return this.getOverrideAnnotation().getNonNullJoinTable();
- }
-
- @Override
- protected JoinTableAnnotation addJoinTableAnnotation() {
- return this.getOverrideAnnotation().addJoinTable();
- }
-
- @Override
- protected void removeJoinTableAnnotation() {
- this.getOverrideAnnotation().removeJoinTable();
- }
-
- protected AssociationOverride2_0Annotation getOverrideAnnotation() {
- // only JPA 2.0 association overrides can have a join table (join strategy)
- return (AssociationOverride2_0Annotation) this.getRelationship().getOverrideAnnotation();
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaOverrideRelationship2_0 getParent() {
- return (JavaOverrideRelationship2_0) super.getParent();
- }
-
- @Override
- public JavaOverrideRelationship2_0 getRelationship() {
- return this.getParent();
- }
-
- public boolean isOverridable() {
- return false;
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationship().getTypeMapping().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java
deleted file mode 100644
index 65f5e159f3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.utility.BodySourceWriter;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentType2_0;
-
-/**
- * JPA 2.0 Java persistent type.
- * Support for specified access and metamodel generation.
- */
-public class GenericJavaPersistentType2_0
- extends AbstractJavaPersistentType
- implements JavaPersistentType2_0
-{
- protected String declaringTypeName;
-
- protected final MetamodelSourceType.Synchronizer metamodelSynchronizer;
-
-
- public GenericJavaPersistentType2_0(PersistentType.Owner parent, JavaResourceType jrt) {
- super(parent, jrt);
- this.declaringTypeName = this.buildDeclaringTypeName();
- this.metamodelSynchronizer = this.buildMetamodelSynchronizer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setDeclaringTypeName(this.buildDeclaringTypeName());
- }
-
-
- // ********** declaring type name **********
-
- public String getDeclaringTypeName() {
- return this.declaringTypeName;
- }
-
- protected void setDeclaringTypeName(String declaringTypeName) {
- String old = this.declaringTypeName;
- this.declaringTypeName = declaringTypeName;
- this.firePropertyChanged(DECLARING_TYPE_NAME_PROPERTY, old, declaringTypeName);
- }
-
- protected String buildDeclaringTypeName() {
- return this.resourceType.getDeclaringTypeName();
- }
-
-
- // ********** metamodel **********
-
- public IFile getMetamodelFile() {
- return this.metamodelSynchronizer.getFile();
- }
-
- public void initializeMetamodel() {
- // do nothing - probably shouldn't be called...
- }
-
- public boolean isManaged() {
- return true;
- }
-
- public void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- this.metamodelSynchronizer.synchronize(memberTypeTree);
- }
-
- public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
- this.metamodelSynchronizer.printBodySourceOn(pw, memberTypeTree);
- }
-
- public void disposeMetamodel() {
- // do nothing - probably shouldn't be called...
- }
-
- protected MetamodelSourceType.Synchronizer buildMetamodelSynchronizer() {
- return this.getJpaFactory2_0().buildMetamodelSynchronizer(this);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java
deleted file mode 100644
index cf9575247d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.java.JavaGeneratorContainer;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.jpa2.context.SequenceGenerator2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSequenceGenerator2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
-
-/**
- * JPA 2.0
- * Java sequence generator
- */
-public class GenericJavaSequenceGenerator2_0
- extends AbstractJavaSequenceGenerator<SequenceGenerator2_0Annotation>
- implements JavaSequenceGenerator2_0
-{
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
-
- public GenericJavaSequenceGenerator2_0(JavaGeneratorContainer parent, SequenceGenerator2_0Annotation generatorAnnotation) {
- super(parent, generatorAnnotation);
- this.specifiedCatalog = generatorAnnotation.getCatalog();
- this.specifiedSchema = generatorAnnotation.getSchema();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedCatalog_(this.generatorAnnotation.getCatalog());
- this.setSpecifiedSchema_(this.generatorAnnotation.getSchema());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.setDefaultSchema(this.buildDefaultSchema());
- }
-
-
- // ********** catalog **********
-
- @Override
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- this.generatorAnnotation.setCatalog(catalog);
- this.setSpecifiedCatalog_(catalog);
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** schema **********
-
- @Override
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- this.generatorAnnotation.setSchema(schema);
- this.setSpecifiedSchema_(schema);
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- // ********** validation **********
-
- @Override
- protected boolean isEquivalentTo(SequenceGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.specifiedSchema, ((SequenceGenerator2_0) generator).getSpecifiedSchema()) &&
- Tools.valuesAreEqual(this.specifiedCatalog, ((SequenceGenerator2_0) generator).getSpecifiedCatalog());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java
deleted file mode 100644
index 4bdd41b7a4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaVirtualOverrideRelationship2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0
- extends AbstractJavaJpaContextNode
- implements JavaVirtualJoinTableRelationshipStrategy, ReadOnlyTable.Owner
-{
- protected JavaVirtualJoinTable joinTable;
-
-
- public GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0(JavaVirtualOverrideRelationship2_0 parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateJoinTable();
- }
-
-
- // ********** join table **********
-
- public JavaVirtualJoinTable getJoinTable() {
- return this.joinTable;
- }
-
- protected void setJoinTable(JavaVirtualJoinTable joinTable) {
- JavaVirtualJoinTable old = this.joinTable;
- this.joinTable = joinTable;
- this.firePropertyChanged(JOIN_TABLE_PROPERTY, old, joinTable);
- }
-
- protected void updateJoinTable() {
- ReadOnlyJoinTable overriddenJoinTable = this.getOverriddenJoinTable();
- if (overriddenJoinTable == null) {
- if (this.joinTable != null) {
- this.setJoinTable(null);
- }
- } else {
- if ((this.joinTable != null) && (this.joinTable.getOverriddenTable() == overriddenJoinTable)) {
- this.joinTable.update();
- } else {
- this.setJoinTable(this.buildJoinTable(overriddenJoinTable));
- }
- }
- }
-
- protected ReadOnlyJoinTable getOverriddenJoinTable() {
- ReadOnlyJoinTableRelationshipStrategy overriddenStrategy = this.getOverriddenStrategy();
- return (overriddenStrategy == null) ? null : overriddenStrategy.getJoinTable();
- }
-
- protected JavaVirtualJoinTable buildJoinTable(ReadOnlyJoinTable overriddenJoinTable) {
- return this.getJpaFactory().buildJavaVirtualJoinTable(this, this, overriddenJoinTable);
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaVirtualOverrideRelationship2_0 getParent() {
- return (JavaVirtualOverrideRelationship2_0) super.getParent();
- }
-
- public JavaVirtualOverrideRelationship2_0 getRelationship() {
- return this.getParent();
- }
-
- protected ReadOnlyJoinTableRelationshipStrategy getOverriddenStrategy() {
- ReadOnlyJoinTableRelationship relationship = this.getOverriddenJoinTableRelationship();
- return (relationship == null) ? null : relationship.getJoinTableStrategy();
- }
-
- protected ReadOnlyJoinTableRelationship getOverriddenJoinTableRelationship() {
- ReadOnlyRelationship relationship = this.resolveOverriddenRelationship();
- return (relationship instanceof ReadOnlyJoinTableRelationship) ? (ReadOnlyJoinTableRelationship) relationship : null;
- }
-
- protected ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getRelationship().resolveOverriddenRelationship();
- }
-
- public String getTableName() {
- return this.joinTable.getName();
- }
-
- public String getJoinTableDefaultName() {
- return MappingTools.buildJoinTableDefaultName(this.getRelationship());
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter, astRoot);
- }
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationship().getTypeMapping().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
- }
-
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaBasicMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaBasicMappingDefinition2_0.java
deleted file mode 100644
index a28fcecd2a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaBasicMappingDefinition2_0.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.DefaultJavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaBasicMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-public class JavaBasicMappingDefinition2_0
- extends DefaultJavaAttributeMappingDefinitionWrapper
-{
- private static final DefaultJavaAttributeMappingDefinition DELEGATE = JavaBasicMappingDefinition.instance();
-
- // singleton
- private static final DefaultJavaAttributeMappingDefinition INSTANCE = new JavaBasicMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static DefaultJavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaBasicMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected DefaultJavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java
deleted file mode 100644
index 6ce75a03cb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ElementCollection2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-public class JavaElementCollectionMappingDefinition2_0
- implements JavaAttributeMappingDefinition
-{
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaElementCollectionMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaElementCollectionMappingDefinition2_0() {
- super();
- }
-
- public String getKey() {
- return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public String getAnnotationName() {
- return ElementCollection2_0Annotation.ANNOTATION_NAME;
- }
-
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- return persistentAttribute.getResourceAttribute().getAnnotation(this.getAnnotationName()) != null;
- }
-
- public Iterable<String> getSupportingAnnotationNames() {
- return SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- AssociationOverrideAnnotation.ANNOTATION_NAME,
- JPA.ASSOCIATION_OVERRIDES,
- AttributeOverrideAnnotation.ANNOTATION_NAME,
- JPA.ATTRIBUTE_OVERRIDES,
- CollectionTable2_0Annotation.ANNOTATION_NAME,
- ColumnAnnotation.ANNOTATION_NAME,
- EnumeratedAnnotation.ANNOTATION_NAME,
- LobAnnotation.ANNOTATION_NAME,
- MapKeyAnnotation.ANNOTATION_NAME,
- MapKeyClass2_0Annotation.ANNOTATION_NAME,
- MapKeyColumn2_0Annotation.ANNOTATION_NAME,
- MapKeyEnumerated2_0Annotation.ANNOTATION_NAME,
- MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME,
- JPA2_0.MAP_KEY_JOIN_COLUMNS,
- MapKeyTemporal2_0Annotation.ANNOTATION_NAME,
- OrderByAnnotation.ANNOTATION_NAME,
- OrderColumn2_0Annotation.ANNOTATION_NAME,
- TemporalAnnotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
-
- public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) {
- return ((JpaFactory2_0) factory).buildJavaElementCollectionMapping2_0(persistentAttribute);
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddableDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddableDefinition2_0.java
deleted file mode 100644
index 4b0f18df5c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddableDefinition2_0.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddableDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTypeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-public class JavaEmbeddableDefinition2_0
- extends JavaTypeMappingDefinitionWrapper
-{
- private static final JavaTypeMappingDefinition DELEGATE = JavaEmbeddableDefinition.instance();
-
- // singleton
- private static final JavaTypeMappingDefinition INSTANCE = new JavaEmbeddableDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEmbeddableDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaTypeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedIdMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedIdMappingDefinition2_0.java
deleted file mode 100644
index 214ca6a5e7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedIdMappingDefinition2_0.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddedIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-public class JavaEmbeddedIdMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaEmbeddedIdMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaEmbeddedIdMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEmbeddedIdMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedMappingDefinition2_0.java
deleted file mode 100644
index 13b275d511..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEmbeddedMappingDefinition2_0.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.DefaultJavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddedMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-public class JavaEmbeddedMappingDefinition2_0
- extends DefaultJavaAttributeMappingDefinitionWrapper
-{
- private static final DefaultJavaAttributeMappingDefinition DELEGATE = JavaEmbeddedMappingDefinition.instance();
-
- // singleton
- private static final DefaultJavaAttributeMappingDefinition INSTANCE = new JavaEmbeddedMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static DefaultJavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEmbeddedMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected DefaultJavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- AssociationOverrideAnnotation.ANNOTATION_NAME,
- JPA.ASSOCIATION_OVERRIDES,
- };
- public static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEntityDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEntityDefinition2_0.java
deleted file mode 100644
index 826c03abd1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaEntityDefinition2_0.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaEntityDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTypeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-public class JavaEntityDefinition2_0
- extends JavaTypeMappingDefinitionWrapper
-{
- private static final JavaTypeMappingDefinition DELEGATE = JavaEntityDefinition.instance();
-
- // singleton
- private static final JavaTypeMappingDefinition INSTANCE = new JavaEntityDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaEntityDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaTypeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java
deleted file mode 100644
index 9ec4396688..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-/**
- * JPA 2.0 Id mapping
- */
-public class JavaIdMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaIdMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaIdMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaIdMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- /**
- * The annotation is "specified" only if it is not "derived" (i.e.
- * accompanied by a M-1 or 1-1 annotation).
- */
- @Override
- public boolean isSpecified(JavaPersistentAttribute persistentAttribute) {
- boolean idSpecified = super.isSpecified(persistentAttribute);
- return idSpecified && ! this.isDerivedId(persistentAttribute);
- }
-
- /**
- * Return whether the specified attribute's <code>Id</code> annotation is
- * a supporting annotation for M-1 or 1-1 mapping, as opposed to a primary
- * mapping annotation.
- * <p>
- * This might produce confusing behavior if the annotations look something
- * like:<pre>
- * @Id @Basic @ManyToOne private int foo;
- * </pre>
- */
- private boolean isDerivedId(JavaPersistentAttribute persistentAttribute) {
- return this.attributeHasManyToOneMapping(persistentAttribute) ||
- this.attributeHasOneToOneMapping(persistentAttribute);
- }
-
- private boolean attributeHasManyToOneMapping(JavaPersistentAttribute persistentAttribute) {
- return JavaManyToOneMappingDefinition2_0.instance().isSpecified(persistentAttribute);
- }
-
- private boolean attributeHasOneToOneMapping(JavaPersistentAttribute persistentAttribute) {
- return JavaOneToOneMappingDefinition2_0.instance().isSpecified(persistentAttribute);
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToManyMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToManyMappingDefinition2_0.java
deleted file mode 100644
index 6349cfa244..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToManyMappingDefinition2_0.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaManyToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-public class JavaManyToManyMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaManyToManyMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaManyToManyMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaManyToManyMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- AttributeOverrideAnnotation.ANNOTATION_NAME,
- JPA.ATTRIBUTE_OVERRIDES,
- MapKeyClass2_0Annotation.ANNOTATION_NAME,
- MapKeyColumn2_0Annotation.ANNOTATION_NAME,
- MapKeyEnumerated2_0Annotation.ANNOTATION_NAME,
- MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME,
- JPA2_0.MAP_KEY_JOIN_COLUMNS,
- MapKeyTemporal2_0Annotation.ANNOTATION_NAME,
- OrderColumn2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToOneMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToOneMappingDefinition2_0.java
deleted file mode 100644
index 18541ac7c8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaManyToOneMappingDefinition2_0.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaManyToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-
-public class JavaManyToOneMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaManyToOneMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaManyToOneMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaManyToOneMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- IdAnnotation.ANNOTATION_NAME,
- MapsId2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java
deleted file mode 100644
index ec9d7da35b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionMapping2_0;
-
-public class JavaMapKeyTemporalConverterValidator extends AbstractTemporalConverterValidator
-{
-
- public JavaMapKeyTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
- }
-
- @Override
- protected JavaCollectionMapping2_0 getAttributeMapping() {
- return (JavaCollectionMapping2_0) super.getAttributeMapping();
- }
-
- @Override
- protected String getTypeName() {
- return this.getAttributeMapping().getFullyQualifiedMapKeyClass();
- }
-
- @Override
- protected String getInvalidTemporalMappingType() {
- return JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE;
- }
-
- @Override
- protected String getVirtualAttributeInvalidTemporalMappingType() {
- return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMappedSuperclassDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMappedSuperclassDefinition2_0.java
deleted file mode 100644
index 550c76293e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMappedSuperclassDefinition2_0.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaMappedSuperclassDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTypeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-public class JavaMappedSuperclassDefinition2_0
- extends JavaTypeMappingDefinitionWrapper
-{
- private static final JavaTypeMappingDefinition DELEGATE = JavaMappedSuperclassDefinition.instance();
-
- // singleton
- private static final JavaTypeMappingDefinition INSTANCE = new JavaMappedSuperclassDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaTypeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaMappedSuperclassDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaTypeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToManyMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToManyMappingDefinition2_0.java
deleted file mode 100644
index b7e729f7b7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToManyMappingDefinition2_0.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaOneToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-public class JavaOneToManyMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaOneToManyMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaOneToManyMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaOneToManyMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- private static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- AttributeOverrideAnnotation.ANNOTATION_NAME,
- JPA.ATTRIBUTE_OVERRIDES,
- MapKeyClass2_0Annotation.ANNOTATION_NAME,
- MapKeyColumn2_0Annotation.ANNOTATION_NAME,
- MapKeyEnumerated2_0Annotation.ANNOTATION_NAME,
- MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME,
- JPA2_0.MAP_KEY_JOIN_COLUMNS,
- MapKeyTemporal2_0Annotation.ANNOTATION_NAME,
- OrderColumn2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToOneMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToOneMappingDefinition2_0.java
deleted file mode 100644
index 6db96e73bb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaOneToOneMappingDefinition2_0.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaOneToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-
-public class JavaOneToOneMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaOneToOneMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaOneToOneMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaOneToOneMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME,
- IdAnnotation.ANNOTATION_NAME,
- MapsId2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaVersionMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaVersionMappingDefinition2_0.java
deleted file mode 100644
index 6a87ebd825..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaVersionMappingDefinition2_0.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaAttributeMappingDefinitionWrapper;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaVersionMappingDefinition;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-public class JavaVersionMappingDefinition2_0
- extends JavaAttributeMappingDefinitionWrapper
-{
- private static final JavaAttributeMappingDefinition DELEGATE = JavaVersionMappingDefinition.instance();
-
- // singleton
- private static final JavaAttributeMappingDefinition INSTANCE = new JavaVersionMappingDefinition2_0();
-
- /**
- * Return the singleton.
- */
- public static JavaAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private JavaVersionMappingDefinition2_0() {
- super();
- }
-
- @Override
- protected JavaAttributeMappingDefinition getDelegate() {
- return DELEGATE;
- }
-
- @Override
- public Iterable<String> getSupportingAnnotationNames() {
- return COMBINED_SUPPORTING_ANNOTATION_NAMES;
- }
-
- public static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
- Access2_0Annotation.ANNOTATION_NAME
- };
- private static final Iterable<String> SUPPORTING_ANNOTATION_NAMES_2_0 = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0);
-
- @SuppressWarnings("unchecked")
- private static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new CompositeIterable<String>(
- DELEGATE.getSupportingAnnotationNames(),
- SUPPORTING_ANNOTATION_NAMES_2_0
- );
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
deleted file mode 100644
index cedad0cb21..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheableHolder2_0;
-
-/**
- * null Java cacheable
- */
-public class NullJavaCacheable2_0
- extends AbstractJavaJpaContextNode
- implements JavaCacheable2_0
-{
- public NullJavaCacheable2_0(JavaCacheableHolder2_0 parent) {
- super(parent);
- }
-
-
- // ********** cacheable **********
-
- public boolean isCacheable() {
- return false;
- }
-
- public Boolean getSpecifiedCacheable() {
- return null;
- }
-
- public void setSpecifiedCacheable(Boolean cacheable) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultCacheable() {
- return false;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaCacheableHolder2_0 getParent() {
- return (JavaCacheableHolder2_0) super.getParent();
- }
-
- protected JavaCacheableHolder2_0 getCacheableHolder() {
- return this.getParent();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getCacheableHolder().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
deleted file mode 100644
index c0259aea44..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaSingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaMapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-
-public class NullJavaDerivedIdentity2_0
- extends AbstractJavaJpaContextNode
- implements JavaDerivedIdentity2_0
-{
- public NullJavaDerivedIdentity2_0(JavaSingleRelationshipMapping mapping) {
- super(mapping);
- }
-
-
- // ********** predominant derived identity strategy **********
-
- public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
- return null;
- }
-
-
- // ********** null derived identity strategy **********
-
- public boolean usesNullDerivedIdentityStrategy() {
- return true;
- }
-
- public void setNullDerivedIdentityStrategy() {
- // NOP
- }
-
-
- // ********** ID derived identity strategy **********
-
- public JavaIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
- return null;
- }
-
- public boolean usesIdDerivedIdentityStrategy() {
- return false;
- }
-
- public void setIdDerivedIdentityStrategy() {
- // NOP
- }
-
-
- // ********** maps ID derived identity strategy **********
-
- public JavaMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
- return null;
- }
-
- public boolean usesMapsIdDerivedIdentityStrategy() {
- return false;
- }
-
- public void setMapsIdDerivedIdentityStrategy() {
- // NOP
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaSingleRelationshipMapping getParent() {
- return (JavaSingleRelationshipMapping) super.getParent();
- }
-
- public JavaSingleRelationshipMapping2_0 getMapping() {
- return null;
- }
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
deleted file mode 100644
index 223f805202..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa2.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.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaMultiRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- *
- */
-public class NullJavaMapKeyColumn2_0
- extends AbstractJavaJpaContextNode
- implements JavaColumn
-{
- public NullJavaMapKeyColumn2_0(JavaMultiRelationshipMapping parent) {
- super(parent);
- }
-
-
- // ********** column annotation **********
-
- public ColumnAnnotation getColumnAnnotation() {
- return (ColumnAnnotation) this.getParent().getPersistentAttribute().getResourceAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
- }
-
- public boolean isVirtual() {
- throw new UnsupportedOperationException();
- }
-
- // ********** name **********
-
- public String getName() {
- return null;
- }
-
- public String getSpecifiedName() {
- return null;
- }
-
- public void setSpecifiedName(String name) {
- throw new UnsupportedOperationException();
- }
-
- public String getDefaultName() {
- return null;
- }
-
-
- // ********** column definition **********
-
- public String getColumnDefinition() {
- return null;
- }
-
- public void setColumnDefinition(String columnDefinition) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** table **********
-
- public String getTable() {
- return null;
- }
-
- public String getSpecifiedTable() {
- return null;
- }
-
- public void setSpecifiedTable(String table) {
- throw new UnsupportedOperationException();
- }
-
- public String getDefaultTable() {
- return null;
- }
-
-
- // ********** unique **********
-
- public boolean isUnique() {
- return false;
- }
-
- public Boolean getSpecifiedUnique() {
- return null;
- }
-
- public void setSpecifiedUnique(Boolean unique) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultUnique() {
- return false;
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return false;
- }
-
- public Boolean getSpecifiedNullable() {
- return null;
- }
-
- public void setSpecifiedNullable(Boolean nullable) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultNullable() {
- return false;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return false;
- }
-
- public Boolean getSpecifiedInsertable() {
- return null;
- }
-
- public void setSpecifiedInsertable(Boolean insertable) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultInsertable() {
- return false;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return false;
- }
-
- public Boolean getSpecifiedUpdatable() {
- return null;
- }
-
- public void setSpecifiedUpdatable(Boolean updatable) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultUpdatable() {
- return false;
- }
-
-
- // ********** length **********
-
- public int getLength() {
- return 0;
- }
-
- public Integer getSpecifiedLength() {
- return null;
- }
-
- public void setSpecifiedLength(Integer length) {
- throw new UnsupportedOperationException();
- }
-
- public int getDefaultLength() {
- return 0;
- }
-
-
- // ********** precision **********
-
- public int getPrecision() {
- return 0;
- }
-
- public Integer getSpecifiedPrecision() {
- return null;
- }
-
- public void setSpecifiedPrecision(Integer precision) {
- throw new UnsupportedOperationException();
- }
-
- public int getDefaultPrecision() {
- return 0;
- }
-
-
- // ********** scale **********
-
- public int getScale() {
- return 0;
- }
-
- public Integer getSpecifiedScale() {
- return null;
- }
-
- public void setSpecifiedScale(Integer scale) {
- throw new UnsupportedOperationException();
- }
-
- public int getDefaultScale() {
- return 0;
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaMultiRelationshipMapping getParent() {
- return (JavaMultiRelationshipMapping) super.getParent();
- }
-
- public void initializeFrom(ReadOnlyColumn oldColumn) {
- // NOP
- }
-
- public void initializeFromVirtual(ReadOnlyColumn virtualColumn) {
- // NOP
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
-
- // ********** database stuff **********
-
- public org.eclipse.jpt.jpa.db.Column getDbColumn() {
- return null;
- }
-
- public Table getDbTable() {
- return null;
- }
-
- public boolean isResolved() {
- return false;
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public boolean tableNameIsInvalid() {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
deleted file mode 100644
index 200f20541b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
-
-/**
- * Null Java orphan removal
- */
-public class NullJavaOrphanRemoval2_0
- extends AbstractJavaJpaContextNode
- implements JavaOrphanRemovable2_0
-{
- public NullJavaOrphanRemoval2_0(JavaOrphanRemovalHolder2_0 parent) {
- super(parent);
- }
-
-
- // ********** orphan removal **********
-
- public boolean isOrphanRemoval() {
- return false;
- }
-
- public Boolean getSpecifiedOrphanRemoval() {
- return null;
- }
-
- public boolean isDefaultOrphanRemoval() {
- return false;
- }
-
- public void setSpecifiedOrphanRemoval(Boolean newSpecifiedOrphanRemoval) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** misc **********
-
- @Override
- public JavaOrphanRemovalHolder2_0 getParent() {
- return (JavaOrphanRemovalHolder2_0) super.getParent();
- }
-
- // ********** validation **********
-
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
deleted file mode 100644
index bb60a432c7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,2101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.orm;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.Transformer;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.AttributeOverride;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.FetchType;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.OverrideContainer;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.Relationship;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmLobConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOrderable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.CollectionTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.CollectionTableValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.MapKeyJoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneRelationship2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapKeyEnumeratedConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapKeyTemporalConverter2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistentAttribute2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.Attributes;
-import org.eclipse.jpt.jpa.core.resource.orm.MapKey;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * JPA 2.0 Frankenstein mapping
- */
-public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElementCollection>
- extends AbstractOrmAttributeMapping<X>
- implements OrmElementCollectionMapping2_0
-{
- protected String specifiedTargetClass;
- protected String defaultTargetClass;
- protected String fullyQualifiedTargetClass;
-
- protected FetchType specifiedFetch;
- protected FetchType defaultFetch;
-
- protected final OrmOrderable2_0 orderable;
-
- protected final OrmCollectionTable2_0 collectionTable;
-
- protected Type valueType;
- protected final OrmColumn valueColumn;
- protected OrmConverter converter; // value converter - never null
- protected final OrmAttributeOverrideContainer valueAttributeOverrideContainer;
- protected final OrmAssociationOverrideContainer valueAssociationOverrideContainer;
-
- protected Type keyType;
-
- protected String specifiedMapKey;
- protected boolean noMapKey = false;
- protected boolean pkMapKey = false;
- protected boolean customMapKey = false;
-
- protected String specifiedMapKeyClass;
- protected String defaultMapKeyClass;
- protected String fullyQualifiedMapKeyClass;
-
- protected final OrmColumn mapKeyColumn;
- protected OrmConverter mapKeyConverter; // map key converter - never null
-
- protected final OrmAttributeOverrideContainer mapKeyAttributeOverrideContainer;
-
- protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedMapKeyJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
-
- protected OrmJoinColumn defaultMapKeyJoinColumn;
-
-
- protected static final OrmConverter.Adapter[] CONVERTER_ADAPTER_ARRAY = new OrmConverter.Adapter[] {
- OrmEnumeratedConverter.Adapter.instance(),
- OrmTemporalConverter.ElementCollectionAdapter.instance(),
- OrmLobConverter.Adapter.instance()
- };
- protected static final Iterable<OrmConverter.Adapter> CONVERTER_ADAPTERS = new ArrayIterable<OrmConverter.Adapter>(CONVERTER_ADAPTER_ARRAY);
-
- protected static final OrmConverter.Adapter[] MAP_KEY_CONVERTER_ADAPTER_ARRAY = new OrmConverter.Adapter[] {
- OrmMapKeyEnumeratedConverter2_0.Adapter.instance(),
- OrmMapKeyTemporalConverter2_0.Adapter.instance()
- };
- protected static final Iterable<OrmConverter.Adapter> MAP_KEY_CONVERTER_ADAPTERS = new ArrayIterable<OrmConverter.Adapter>(MAP_KEY_CONVERTER_ADAPTER_ARRAY);
-
-
- protected AbstractOrmElementCollectionMapping2_0(OrmPersistentAttribute parent, X xmlMapping) {
- super(parent, xmlMapping);
- this.specifiedTargetClass = xmlMapping.getTargetClass();
- this.specifiedFetch = this.buildSpecifiedFetch();
- this.orderable = this.buildOrderable();
- this.collectionTable = this.buildCollectionTable();
-
- this.valueColumn = this.buildValueColumn();
- this.converter = this.buildConverter();
- this.valueAttributeOverrideContainer = this.buildValueAttributeOverrideContainer();
- this.valueAssociationOverrideContainer = this.buildValueAssociationOverrideContainer();
-
- this.specifiedMapKey = this.buildSpecifiedMapKey();
- this.noMapKey = this.buildNoMapKey();
- this.pkMapKey = this.buildPkMapKey();
- this.customMapKey = this.buildCustomMapKey();
- this.specifiedMapKeyClass = this.buildSpecifiedMapKeyClass();
-
- this.mapKeyColumn = this.buildMapKeyColumn();
- this.mapKeyConverter = this.buildMapKeyConverter();
- this.mapKeyAttributeOverrideContainer = this.buildMapKeyAttributeOverrideContainer();
- this.mapKeyJoinColumnOwner = this.buildMapKeyJoinColumnOwner();
- this.specifiedMapKeyJoinColumnContainer = this.buildSpecifiedMapKeyJoinColumnContainer();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedTargetClass_(this.xmlAttributeMapping.getTargetClass());
- this.setSpecifiedFetch_(this.buildSpecifiedFetch());
- this.orderable.synchronizeWithResourceModel();
- this.collectionTable.synchronizeWithResourceModel();
-
- this.valueColumn.synchronizeWithResourceModel();
- this.syncConverter();
- this.valueAttributeOverrideContainer.synchronizeWithResourceModel();
- this.valueAssociationOverrideContainer.synchronizeWithResourceModel();
-
- this.setSpecifiedMapKey_(this.buildSpecifiedMapKey());
- this.setNoMapKey_(this.buildNoMapKey());
- this.setPkMapKey_(this.buildPkMapKey());
- this.setCustomMapKey_(this.buildCustomMapKey());
- this.setSpecifiedMapKeyClass_(this.buildSpecifiedMapKeyClass());
-
- this.mapKeyColumn.synchronizeWithResourceModel();
- this.syncMapKeyConverter();
- this.mapKeyAttributeOverrideContainer.synchronizeWithResourceModel();
- this.syncSpecifiedMapKeyJoinColumns();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultTargetClass(this.buildDefaultTargetClass());
- this.setFullyQualifiedTargetClass(this.buildFullyQualifiedTargetClass());
- this.setDefaultFetch(this.buildDefaultFetch());
- this.orderable.update();
- this.collectionTable.update();
-
- this.setValueType(this.buildValueType());
- this.valueColumn.update();
- this.converter.update();
- this.valueAttributeOverrideContainer.update();
- this.valueAssociationOverrideContainer.update();
-
- this.setKeyType(this.buildKeyType());
- this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
- this.setFullyQualifiedMapKeyClass(this.buildFullyQualifiedMapKeyClass());
-
- this.mapKeyColumn.update();
- this.mapKeyConverter.update();
- this.mapKeyAttributeOverrideContainer.update();
- this.updateNodes(this.getSpecifiedMapKeyJoinColumns());
- this.updateDefaultMapKeyJoinColumn();
- }
-
-
- // ********** fully-qualified target class **********
-
- public String getFullyQualifiedTargetClass() {
- return this.fullyQualifiedTargetClass;
- }
-
- protected void setFullyQualifiedTargetClass(String targetClass) {
- String old = this.fullyQualifiedTargetClass;
- this.fullyQualifiedTargetClass = targetClass;
- this.firePropertyChanged(FULLY_QUALIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- protected String buildFullyQualifiedTargetClass() {
- return (this.specifiedTargetClass == null) ?
- this.defaultTargetClass :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedTargetClass);
- }
-
- // ********** target class **********
-
- public String getTargetClass() {
- return (this.specifiedTargetClass != null) ? this.specifiedTargetClass : this.defaultTargetClass;
- }
-
- public String getSpecifiedTargetClass() {
- return this.specifiedTargetClass;
- }
-
- public void setSpecifiedTargetClass(String targetClass) {
- this.setSpecifiedTargetClass_(targetClass);
- this.xmlAttributeMapping.setTargetClass(targetClass);
- }
-
- protected void setSpecifiedTargetClass_(String targetClass) {
- String old = this.specifiedTargetClass;
- this.specifiedTargetClass = targetClass;
- this.firePropertyChanged(SPECIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- public String getDefaultTargetClass() {
- return this.defaultTargetClass;
- }
-
- protected void setDefaultTargetClass(String targetClass) {
- String old = this.defaultTargetClass;
- this.defaultTargetClass = targetClass;
- this.firePropertyChanged(DEFAULT_TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- protected String buildDefaultTargetClass() {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- return (javaAttribute == null) ? null : javaAttribute.getMultiReferenceTargetTypeName();
- }
-
- public char getTargetClassEnclosingTypeSeparator() {
- return '$';
- }
-
-
- // ********** resolved target type/embeddable/entity **********
-
- public PersistentType getResolvedTargetType() {
- if (this.fullyQualifiedTargetClass == null) {
- return null;
- }
- return this.getPersistenceUnit().getPersistentType(this.fullyQualifiedTargetClass);
- }
-
- protected Embeddable getResolvedTargetEmbeddable() {
- TypeMapping typeMapping = this.getResolvedTargetTypeMapping();
- return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
- }
-
- protected Entity getResolvedTargetEntity() {
- TypeMapping typeMapping = this.getResolvedTargetTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- protected TypeMapping getResolvedTargetTypeMapping() {
- PersistentType resolvedTargetType = this.getResolvedTargetType();
- return (resolvedTargetType == null) ? null : resolvedTargetType.getMapping();
- }
-
-
- // ********** fetch **********
-
- public FetchType getFetch() {
- return (this.specifiedFetch != null) ? this.specifiedFetch : this.defaultFetch;
- }
-
- public FetchType getSpecifiedFetch() {
- return this.specifiedFetch;
- }
-
- public void setSpecifiedFetch(FetchType fetch) {
- this.setSpecifiedFetch_(fetch);
- this.xmlAttributeMapping.setFetch(FetchType.toOrmResourceModel(fetch));
- }
-
- protected void setSpecifiedFetch_(FetchType fetch) {
- FetchType old = this.specifiedFetch;
- this.specifiedFetch = fetch;
- this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildSpecifiedFetch() {
- return FetchType.fromOrmResourceModel(this.xmlAttributeMapping.getFetch());
- }
-
- public FetchType getDefaultFetch() {
- return this.defaultFetch;
- }
-
- protected void setDefaultFetch(FetchType fetch) {
- FetchType old = this.defaultFetch;
- this.defaultFetch = fetch;
- this.firePropertyChanged(DEFAULT_FETCH_PROPERTY, old, fetch);
- }
-
- protected FetchType buildDefaultFetch() {
- return DEFAULT_FETCH_TYPE;
- }
-
-
- // ********** orderable **********
-
- public OrmOrderable getOrderable() {
- return this.orderable;
- }
-
- protected OrmOrderable2_0 buildOrderable() {
- // we wouldn't be here if we weren't orm.xml 2.0 compatible
- return this.getContextNodeFactory2_0().buildOrmOrderable(this, this.buildOrderableOwner());
- }
-
- protected Orderable2_0.Owner buildOrderableOwner() {
- return new OrderableOwner();
- }
-
- protected class OrderableOwner
- implements Orderable2_0.Owner
- {
- public String getTableName() {
- return this.getCollectionTable().getName();
- }
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return this.getCollectionTable().getDbTable();
- }
- protected OrmCollectionTable2_0 getCollectionTable() {
- return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable();
- }
- }
-
-
- // ********** collection table **********
-
- public OrmCollectionTable2_0 getCollectionTable() {
- return this.collectionTable;
- }
-
- protected OrmCollectionTable2_0 buildCollectionTable() {
- // we wouldn't be here if we weren't orm.xml 2.0 compatible
- return this.getContextNodeFactory2_0().buildOrmCollectionTable(this, this.buildCollectionTableOwner());
- }
-
- protected Table.Owner buildCollectionTableOwner() {
- return new CollectionTableOwner();
- }
-
- public XmlCollectionTable getResourceCollectionTable() {
- return this.xmlAttributeMapping.getCollectionTable();
- }
-
- protected class CollectionTableOwner
- implements ReadOnlyTable.Owner
- {
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new CollectionTableValidator(AbstractOrmElementCollectionMapping2_0.this.getPersistentAttribute(), (CollectionTable2_0) table, textRangeResolver);
- }
- }
-
-
- // ********** value type **********
-
- public Type getValueType() {
- return this.valueType;
- }
-
- protected void setValueType(Type valueType) {
- Type old = this.valueType;
- this.valueType = valueType;
- this.firePropertyChanged(VALUE_TYPE_PROPERTY, old, valueType);
- }
-
- protected Type buildValueType() {
- if (this.getResolvedTargetEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getTargetClass() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
-
- // ********** value column **********
-
- public OrmColumn getValueColumn() {
- return this.valueColumn;
- }
-
- protected OrmColumn buildValueColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this.buildValueColumnOwner());
- }
-
- protected OrmColumn.Owner buildValueColumnOwner() {
- return new ValueColumnOwner();
- }
-
-
- // ********** converter **********
-
- public OrmConverter getConverter() {
- return this.converter;
- }
-
- public void setConverter(Class<? extends Converter> converterType) {
- if (this.converter.getType() != converterType) {
- // note: we may also clear the XML value we want;
- // but if we leave it, the resulting sync will screw things up...
- this.clearXmlConverterValues();
- OrmConverter.Adapter converterAdapter = this.getConverterAdapter(converterType);
- this.setConverter_(this.buildConverter(converterAdapter));
- this.converter.initialize();
- }
- }
-
- protected OrmConverter buildConverter(OrmConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getContextNodeFactory()) :
- this.buildNullConverter();
- }
-
- protected void setConverter_(OrmConverter converter) {
- Converter old = this.converter;
- this.converter = converter;
- this.firePropertyChanged(CONVERTER_PROPERTY, old, converter);
- }
-
- protected void clearXmlConverterValues() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- adapter.clearXmlValue(this.xmlAttributeMapping);
- }
- }
-
- protected OrmConverter buildConverter() {
- OrmXmlContextNodeFactory factory = this.getContextNodeFactory();
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- OrmConverter ormConverter = adapter.buildConverter(this, factory);
- if (ormConverter != null) {
- return ormConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncConverter() {
- OrmConverter.Adapter adapter = this.getXmlConverterAdapter();
- if (adapter == null) {
- if (this.converter.getType() != null) {
- this.setConverter_(this.buildNullConverter());
- }
- } else {
- if (this.converter.getType() == adapter.getConverterType()) {
- this.converter.synchronizeWithResourceModel();
- } else {
- this.setConverter_(adapter.buildNewConverter(this, this.getContextNodeFactory()));
- }
- }
- }
-
- /**
- * Return the first adapter whose converter value is set in the XML mapping.
- * Return <code>null</code> if there are no converter values in the XML.
- */
- protected OrmConverter.Adapter getXmlConverterAdapter() {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.isActive(this.xmlAttributeMapping)) {
- return adapter;
- }
- }
- return null;
- }
-
- protected OrmConverter buildNullConverter() {
- return new NullOrmConverter(this);
- }
-
-
- // ********** converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected OrmConverter.Adapter getConverterAdapter(Class<? extends Converter> converterType) {
- for (OrmConverter.Adapter adapter : this.getConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<OrmConverter.Adapter> getConverterAdapters() {
- return CONVERTER_ADAPTERS;
- }
-
-
- // ********** value attribute override container **********
-
- public OrmAttributeOverrideContainer getValueAttributeOverrideContainer() {
- return this.valueAttributeOverrideContainer;
- }
-
- protected OrmAttributeOverrideContainer buildValueAttributeOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAttributeOverrideContainer(this, this.buildValueAttributeOverrideContainerOwner());
- }
-
- protected OrmAttributeOverrideContainer.Owner buildValueAttributeOverrideContainerOwner() {
- return new ValueAttributeOverrideContainerOwner();
- }
-
-
- // ********** value association override container **********
-
- public OrmAssociationOverrideContainer getValueAssociationOverrideContainer() {
- return this.valueAssociationOverrideContainer;
- }
-
- protected OrmAssociationOverrideContainer buildValueAssociationOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAssociationOverrideContainer(this, this.buildValueAssociationOverrideContainerOwner());
- }
-
- protected OrmAssociationOverrideContainer.Owner buildValueAssociationOverrideContainerOwner() {
- return new ValueAssociationOverrideContainerOwner();
- }
-
-
- // ********** key type **********
-
- public Type getKeyType() {
- return this.keyType;
- }
-
- protected void setKeyType(Type keyType) {
- Type old = this.keyType;
- this.keyType = keyType;
- this.firePropertyChanged(KEY_TYPE_PROPERTY, old, keyType);
- }
-
- protected Type buildKeyType() {
- if (this.getResolvedMapKeyEmbeddable() != null) {
- return Type.EMBEDDABLE_TYPE;
- }
- if (this.getResolvedMapKeyEntity() != null) {
- return Type.ENTITY_TYPE;
- }
- if (this.getMapKeyClass() == null) {
- return Type.NO_TYPE;
- }
- return Type.BASIC_TYPE;
- }
-
-
- // ********** map key **********
-
- public String getMapKey() {
- if (this.noMapKey) {
- return null;
- }
- if (this.pkMapKey) {
- // the target is either embeddable or basic, so a key will have to be specified
- return null;
- }
- if (this.customMapKey) {
- return this.specifiedMapKey;
- }
- throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
- }
-
-
- // ********** specified map key **********
-
- public String getSpecifiedMapKey() {
- return this.specifiedMapKey;
- }
-
- public void setSpecifiedMapKey(String mapKey) {
- if (mapKey != null) {
- this.setSpecifiedMapKey_(mapKey);
- this.setNoMapKey_(false);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(true);
-
- MapKey xmlMapKey = this.getXmlMapKey();
- if (xmlMapKey == null) {
- xmlMapKey = this.buildXmlMapKey();
- }
- xmlMapKey.setName(mapKey);
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setSpecifiedMapKey_(String mapKey) {
- String old = this.specifiedMapKey;
- this.specifiedMapKey = mapKey;
- this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
- }
-
- protected String buildSpecifiedMapKey() {
- MapKey xmlMapKey = this.getXmlMapKey();
- return (xmlMapKey == null) ? null : xmlMapKey.getName();
- }
-
-
- // ********** no map key **********
-
- public boolean isNoMapKey() {
- return this.noMapKey;
- }
-
- public void setNoMapKey(boolean noMapKey) {
- if (noMapKey) {
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(true);
- this.setPkMapKey_(false);
- this.setCustomMapKey_(false);
-
- if (this.getXmlMapKey() != null) {
- this.removeXmlMapKey();
- }
- } else {
- this.setPkMapKey(true); // hmmm...
- }
- }
-
- protected void setNoMapKey_(boolean noMapKey) {
- boolean old = this.noMapKey;
- this.noMapKey = noMapKey;
- this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);
- }
-
- protected boolean buildNoMapKey() {
- return this.getXmlMapKey() == null;
- }
-
-
- // ********** pk map key **********
-
- public boolean isPkMapKey() {
- return this.pkMapKey;
- }
-
- public void setPkMapKey(boolean pkMapKey) {
- if (pkMapKey) {
- this.setSpecifiedMapKey_(null);
- this.setNoMapKey_(false);
- this.setPkMapKey_(true);
- this.setCustomMapKey_(false);
-
- MapKey xmlMapKey = this.getXmlMapKey();
- if (xmlMapKey == null) {
- this.buildXmlMapKey();
- } else {
- xmlMapKey.setName(null);
- }
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setPkMapKey_(boolean pkMapKey) {
- boolean old = this.pkMapKey;
- this.pkMapKey = pkMapKey;
- this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
- }
-
- protected boolean buildPkMapKey() {
- MapKey xmlMapKey = this.getXmlMapKey();
- return (xmlMapKey != null) && (xmlMapKey.getName() == null);
- }
-
-
- // ********** custom map key **********
-
- public boolean isCustomMapKey() {
- return this.customMapKey;
- }
-
- public void setCustomMapKey(boolean customMapKey) {
- if (customMapKey) {
- this.setSpecifiedMapKey(""); //$NON-NLS-1$
- } else {
- this.setNoMapKey(true); // hmmm...
- }
- }
-
- protected void setCustomMapKey_(boolean customMapKey) {
- boolean old = this.customMapKey;
- this.customMapKey = customMapKey;
- this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
- }
-
- protected boolean buildCustomMapKey() {
- MapKey xmlMapKey = this.getXmlMapKey();
- return (xmlMapKey != null) && (xmlMapKey.getName() != null);
- }
-
-
- // ********** xml map key **********
-
- protected MapKey getXmlMapKey() {
- return this.xmlAttributeMapping.getMapKey();
- }
-
- protected MapKey buildXmlMapKey() {
- MapKey mapKey = OrmFactory.eINSTANCE.createMapKey();
- this.xmlAttributeMapping.setMapKey(mapKey);
- return mapKey;
- }
-
- protected void removeXmlMapKey() {
- this.xmlAttributeMapping.setMapKey(null);
- }
-
-
- // ********** fully-qualified map key class **********
-
- public String getFullyQualifiedMapKeyClass() {
- return this.fullyQualifiedMapKeyClass;
- }
-
- protected void setFullyQualifiedMapKeyClass(String mapKeyClass) {
- String old = this.fullyQualifiedMapKeyClass;
- this.fullyQualifiedMapKeyClass = mapKeyClass;
- this.firePropertyChanged(FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildFullyQualifiedMapKeyClass() {
- return (this.specifiedMapKeyClass == null) ?
- this.defaultMapKeyClass :
- this.getEntityMappings().getFullyQualifiedName(this.specifiedMapKeyClass);
- }
-
- // ********** map key class **********
-
- public String getMapKeyClass() {
- return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
- }
-
- public String getSpecifiedMapKeyClass() {
- return this.specifiedMapKeyClass;
- }
-
- public void setSpecifiedMapKeyClass(String mapKeyClass) {
- if (this.setSpecifiedMapKeyClass_(mapKeyClass)) {
- XmlClassReference xmlMapKeyClassRef = this.xmlAttributeMapping.getMapKeyClass();
- if (mapKeyClass == null) {
- if (xmlMapKeyClassRef != null) {
- this.xmlAttributeMapping.setMapKeyClass(null);
- }
- } else {
- if (xmlMapKeyClassRef == null) {
- xmlMapKeyClassRef = this.buildXmlMapKeyClassReference();
- }
- xmlMapKeyClassRef.setClassName(mapKeyClass);
- }
- }
- }
-
- protected boolean setSpecifiedMapKeyClass_(String mapKeyClass) {
- String old = this.specifiedMapKeyClass;
- this.specifiedMapKeyClass = mapKeyClass;
- return this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected XmlClassReference buildXmlMapKeyClassReference() {
- XmlClassReference mapKeyClass = OrmFactory.eINSTANCE.createXmlClassReference();
- this.xmlAttributeMapping.setMapKeyClass(mapKeyClass);
- return mapKeyClass;
- }
-
- protected String buildSpecifiedMapKeyClass() {
- XmlClassReference xmlClassRef = this.xmlAttributeMapping.getMapKeyClass();
- return (xmlClassRef == null) ? null : xmlClassRef.getClassName();
- }
-
- public String getDefaultMapKeyClass() {
- return this.defaultMapKeyClass;
- }
-
- protected void setDefaultMapKeyClass(String mapKeyClass) {
- String old = this.defaultMapKeyClass;
- this.defaultMapKeyClass = mapKeyClass;
- this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
- }
-
- protected String buildDefaultMapKeyClass() {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- return (javaAttribute == null) ? null : javaAttribute.getMultiReferenceMapKeyTypeName();
- }
-
- public char getMapKeyClassEnclosingTypeSeparator() {
- return '$';
- }
-
-
- // ********** resolved map key embeddable/entity **********
-
- protected Embeddable getResolvedMapKeyEmbeddable() {
- TypeMapping typeMapping = this.getResolvedMapKeyTypeMapping();
- return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
- }
-
- protected Entity getResolvedMapKeyEntity() {
- TypeMapping typeMapping = this.getResolvedMapKeyTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- protected TypeMapping getResolvedMapKeyTypeMapping() {
- PersistentType resolvedMapKeyType = this.getResolvedMapKeyType();
- return (resolvedMapKeyType == null) ? null : resolvedMapKeyType.getMapping();
- }
-
- protected PersistentType getResolvedMapKeyType() {
- if (this.fullyQualifiedMapKeyClass == null) {
- return null;
- }
- return this.getPersistenceUnit().getPersistentType(this.fullyQualifiedMapKeyClass);
- }
-
-
- // ********** map key column **********
-
- public OrmColumn getMapKeyColumn() {
- return this.mapKeyColumn;
- }
-
- protected OrmColumn buildMapKeyColumn() {
- return this.getContextNodeFactory().buildOrmColumn(this, this.buildMapKeyColumnOwner());
- }
-
- protected OrmColumn.Owner buildMapKeyColumnOwner() {
- return new MapKeyColumnOwner();
- }
-
-
- // ********** map key converter **********
-
- public OrmConverter getMapKeyConverter() {
- return this.mapKeyConverter;
- }
-
- public void setMapKeyConverter(Class<? extends Converter> converterType) {
- if (this.mapKeyConverter.getType() != converterType) {
- // note: we may also clear the XML value we want;
- // but if we leave it, the resulting sync will screw things up...
- this.clearXmlMapKeyConverterValues();
- OrmConverter.Adapter converterAdapter = this.getMapKeyConverterAdapter(converterType);
- this.setMapKeyConverter_(this.buildMapKeyConverter(converterAdapter));
- this.mapKeyConverter.initialize();
- }
- }
-
- protected OrmConverter buildMapKeyConverter(OrmConverter.Adapter converterAdapter) {
- return (converterAdapter != null) ?
- converterAdapter.buildNewConverter(this, this.getContextNodeFactory()) :
- this.buildNullConverter();
- }
-
- protected void setMapKeyConverter_(OrmConverter converter) {
- Converter old = this.mapKeyConverter;
- this.mapKeyConverter = converter;
- this.firePropertyChanged(MAP_KEY_CONVERTER_PROPERTY, old, converter);
- }
-
- protected void clearXmlMapKeyConverterValues() {
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- adapter.clearXmlValue(this.xmlAttributeMapping);
- }
- }
-
- protected OrmConverter buildMapKeyConverter() {
- OrmXmlContextNodeFactory factory = this.getContextNodeFactory();
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- OrmConverter ormConverter = adapter.buildConverter(this, factory);
- if (ormConverter != null) {
- return ormConverter;
- }
- }
- return this.buildNullConverter();
- }
-
- protected void syncMapKeyConverter() {
- OrmConverter.Adapter adapter = this.getXmlMapKeyConverterAdapter();
- if (adapter == null) {
- if (this.mapKeyConverter.getType() != null) {
- this.setMapKeyConverter_(this.buildNullConverter());
- }
- } else {
- if (this.mapKeyConverter.getType() == adapter.getConverterType()) {
- this.mapKeyConverter.synchronizeWithResourceModel();
- } else {
- this.setMapKeyConverter_(adapter.buildNewConverter(this, this.getContextNodeFactory()));
- }
- }
- }
-
- /**
- * Return the first adapter whose converter value is set in the XML mapping.
- * Return <code>null</code> if there are no converter values in the XML.
- */
- protected OrmConverter.Adapter getXmlMapKeyConverterAdapter() {
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter.isActive(this.xmlAttributeMapping)) {
- return adapter;
- }
- }
- return null;
- }
-
- // ********** map key converter adapters **********
-
- /**
- * Return the converter adapter for the specified converter type.
- */
- protected OrmConverter.Adapter getMapKeyConverterAdapter(Class<? extends Converter> converterType) {
- for (OrmConverter.Adapter adapter : this.getMapKeyConverterAdapters()) {
- if (adapter.getConverterType() == converterType) {
- return adapter;
- }
- }
- return null;
- }
-
- protected Iterable<OrmConverter.Adapter> getMapKeyConverterAdapters() {
- return MAP_KEY_CONVERTER_ADAPTERS;
- }
-
- // ********** map key attribute override container **********
-
- public OrmAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
- return this.mapKeyAttributeOverrideContainer;
- }
-
- protected OrmAttributeOverrideContainer buildMapKeyAttributeOverrideContainer() {
- return this.getContextNodeFactory().buildOrmAttributeOverrideContainer(this, this.buildMapKeyAttributeOverrideContainerOwner());
- }
-
- protected OrmAttributeOverrideContainer.Owner buildMapKeyAttributeOverrideContainerOwner() {
- return new MapKeyAttributeOverrideContainerOwner();
- }
-
-
- // ********** map key join columns **********
-
- public ListIterable<OrmJoinColumn> getMapKeyJoinColumns() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumns() : this.getDefaultMapKeyJoinColumns();
- }
-
- public int getMapKeyJoinColumnsSize() {
- return this.hasSpecifiedMapKeyJoinColumns() ? this.getSpecifiedMapKeyJoinColumnsSize() : this.getDefaultMapKeyJoinColumnsSize();
- }
-
-
- // ********** specified map key join columns **********
-
- public ListIterable<OrmJoinColumn> getSpecifiedMapKeyJoinColumns() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElements();
- }
-
- public int getSpecifiedMapKeyJoinColumnsSize() {
- return this.specifiedMapKeyJoinColumnContainer.getContextElementsSize();
- }
-
- public boolean hasSpecifiedMapKeyJoinColumns() {
- return this.getSpecifiedMapKeyJoinColumnsSize() != 0;
- }
-
- public OrmJoinColumn getSpecifiedMapKeyJoinColumn(int index) {
- return this.specifiedMapKeyJoinColumnContainer.getContextElement(index);
- }
-
- public OrmJoinColumn addSpecifiedMapKeyJoinColumn() {
- return this.addSpecifiedMapKeyJoinColumn(this.getSpecifiedMapKeyJoinColumnsSize());
- }
-
- public OrmJoinColumn addSpecifiedMapKeyJoinColumn(int index) {
- XmlJoinColumn xmlJoinColumn = this.buildXmlJoinColumn();
- OrmJoinColumn joinColumn = this.specifiedMapKeyJoinColumnContainer.addContextElement(index, xmlJoinColumn);
- this.getXmlAttributeMapping().getMapKeyJoinColumns().add(index, xmlJoinColumn);
- return joinColumn;
- }
-
- protected XmlJoinColumn buildXmlJoinColumn() {
- return OrmFactory.eINSTANCE.createXmlJoinColumn();
- }
-
- public void removeSpecifiedMapKeyJoinColumn(JoinColumn joinColumn) {
- this.removeSpecifiedMapKeyJoinColumn(this.specifiedMapKeyJoinColumnContainer.indexOfContextElement((OrmJoinColumn) joinColumn));
- }
-
- public void removeSpecifiedMapKeyJoinColumn(int index) {
- this.specifiedMapKeyJoinColumnContainer.removeContextElement(index);
- this.getXmlAttributeMapping().getMapKeyJoinColumns().remove(index);
- }
-
- public void moveSpecifiedMapKeyJoinColumn(int targetIndex, int sourceIndex) {
- this.specifiedMapKeyJoinColumnContainer.moveContextElement(targetIndex, sourceIndex);
- this.getXmlAttributeMapping().getMapKeyJoinColumns().move(targetIndex, sourceIndex);
- }
-
- protected void syncSpecifiedMapKeyJoinColumns() {
- this.specifiedMapKeyJoinColumnContainer.synchronizeWithResourceModel();
- }
-
- protected ListIterable<XmlJoinColumn> getXmlMapKeyJoinColumns() {
- // clone to reduce chance of concurrency problems
- return new LiveCloneListIterable<XmlJoinColumn>(this.getXmlAttributeMapping().getMapKeyJoinColumns());
- }
-
- protected ContextListContainer<OrmJoinColumn, XmlJoinColumn> buildSpecifiedMapKeyJoinColumnContainer() {
- SpecifiedMapKeyJoinColumnContainer container = new SpecifiedMapKeyJoinColumnContainer();
- container.initialize();
- return container;
- }
-
- /**
- * specified join column container
- */
- protected class SpecifiedMapKeyJoinColumnContainer
- extends ContextListContainer<OrmJoinColumn, XmlJoinColumn>
- {
- @Override
- protected String getContextElementsPropertyName() {
- return SPECIFIED_MAP_KEY_JOIN_COLUMNS_LIST;
- }
- @Override
- protected OrmJoinColumn buildContextElement(XmlJoinColumn resourceElement) {
- return AbstractOrmElementCollectionMapping2_0.this.buildMapKeyJoinColumn(resourceElement);
- }
- @Override
- protected ListIterable<XmlJoinColumn> getResourceElements() {
- return AbstractOrmElementCollectionMapping2_0.this.getXmlMapKeyJoinColumns();
- }
- @Override
- protected XmlJoinColumn getResourceElement(OrmJoinColumn contextElement) {
- return contextElement.getXmlColumn();
- }
- }
-
- protected OrmJoinColumn buildMapKeyJoinColumn(XmlJoinColumn xmlJoinColumn) {
- return this.getContextNodeFactory().buildOrmJoinColumn(this, this.mapKeyJoinColumnOwner, xmlJoinColumn);
- }
-
- protected OrmReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
- return new MapKeyJoinColumnOwner();
- }
-
-
- // ********** default map key join column **********
-
- public OrmJoinColumn getDefaultMapKeyJoinColumn() {
- return this.defaultMapKeyJoinColumn;
- }
-
- protected void setDefaultMapKeyJoinColumn(OrmJoinColumn mapKeyJoinColumn) {
- OrmJoinColumn old = this.defaultMapKeyJoinColumn;
- this.defaultMapKeyJoinColumn = mapKeyJoinColumn;
- this.firePropertyChanged(DEFAULT_MAP_KEY_JOIN_COLUMN_PROPERTY, old, mapKeyJoinColumn);
- }
-
- protected ListIterable<OrmJoinColumn> getDefaultMapKeyJoinColumns() {
- return (this.defaultMapKeyJoinColumn != null) ?
- new SingleElementListIterable<OrmJoinColumn>(this.defaultMapKeyJoinColumn) :
- EmptyListIterable.<OrmJoinColumn>instance();
- }
-
- protected int getDefaultMapKeyJoinColumnsSize() {
- return (this.defaultMapKeyJoinColumn == null) ? 0 : 1;
- }
-
- protected void updateDefaultMapKeyJoinColumn() {
- if (this.buildsDefaultMapKeyJoinColumn()) {
- if (this.defaultMapKeyJoinColumn == null) {
- this.setDefaultMapKeyJoinColumn(this.buildMapKeyJoinColumn(null));
- } else {
- this.defaultMapKeyJoinColumn.update();
- }
- } else {
- this.setDefaultMapKeyJoinColumn(null);
- }
- }
-
- protected boolean buildsDefaultMapKeyJoinColumn() {
- return ! this.hasSpecifiedMapKeyJoinColumns() &&
- getKeyType() == Type.ENTITY_TYPE;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmPersistentAttribute2_0 getParent() {
- return (OrmPersistentAttribute2_0) super.getParent();
- }
-
- @Override
- public OrmPersistentAttribute2_0 getPersistentAttribute() {
- return (OrmPersistentAttribute2_0) super.getPersistentAttribute();
- }
-
- public String getKey() {
- return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public int getXmlSequence() {
- return 75;
- }
-
- public Entity getEntity() {
- OrmTypeMapping typeMapping = this.getTypeMapping();
- return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
- }
-
- public void initializeOn(OrmAttributeMapping newMapping) {
- newMapping.initializeFromOrmAttributeMapping(this);
- }
-
- public void addXmlAttributeMappingTo(Attributes resourceAttributes) {
- resourceAttributes.getElementCollections().add(this.xmlAttributeMapping);
- }
-
- public void removeXmlAttributeMappingFrom(Attributes resourceAttributes) {
- resourceAttributes.getElementCollections().remove(this.xmlAttributeMapping);
- }
-
-
- // ********** metamodel **********
-
- @Override
- protected String getMetamodelFieldTypeName() {
- return this.getPersistentAttribute().getMetamodelContainerFieldTypeName();
- }
-
- @Override
- public String getMetamodelTypeName() {
- return (this.fullyQualifiedTargetClass != null) ? this.fullyQualifiedTargetClass : MetamodelField.DEFAULT_TYPE_NAME;
- }
-
- @Override
- protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
- this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
- super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
- }
-
- protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
- String keyTypeName = this.getPersistentAttribute().getMetamodelContainerFieldMapKeyTypeName();
- if (keyTypeName != null) {
- typeArgumentNames.add(keyTypeName);
- }
- }
-
- public String getMetamodelFieldMapKeyTypeName() {
- return MappingTools.getMetamodelFieldMapKeyTypeName(this);
- }
-
-
- // ********** embedded mappings **********
-
- public Iterable<String> getCandidateMapKeyNames() {
- return new CompositeIterable<String>(this.getTargetEmbeddableNonTransientAttributeNamesLists());
- }
-
- /**
- * Return a list of lists; each nested list holds the names for one of the
- * embedded mapping's target embeddable type mapping's attribute mappings
- * (non-transient attribute or association mappings, depending on the specified transformer).
- */
- protected Iterable<Iterable<String>> getTargetEmbeddableNonTransientAttributeNamesLists() {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getTargetEmbeddableNonTransientAttributeMappings(), AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<AttributeMapping> getTargetEmbeddableNonTransientAttributeMappings() {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return (targetEmbeddable != null) ? targetEmbeddable.getNonTransientAttributeMappings() : EmptyIterable.<AttributeMapping> instance();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<String> getAllMappingNames() {
- return new CompositeIterable<String>(super.getAllMappingNames(), this.getAllEmbeddableAttributeMappingNames());
- }
-
- protected Iterable<String> getAllEmbeddableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllOverridableAttributeMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ATTRIBUTE_MAPPING_NAMES_TRANSFORMER);
- }
-
- @Override
- public Iterable<String> getAllOverridableAssociationMappingNames() {
- return this.getQualifiedEmbeddableOverridableMappingNames(AttributeMappingTools.ALL_OVERRIDABLE_ASSOCIATION_MAPPING_NAMES_TRANSFORMER);
- }
-
- protected Iterable<String> getQualifiedEmbeddableOverridableMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<String, String>(this.getEmbeddableOverridableMappingNames(transformer), this.buildQualifierTransformer());
- }
-
- protected Iterable<String> getEmbeddableOverridableMappingNames(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new CompositeIterable<String>(this.getEmbeddableOverridableMappingNamesLists(transformer));
- }
-
- /**
- * Return a list of lists; each nested list holds the names for one of the
- * embedded mapping's target embeddable type mapping's attribute mappings
- * (attribute or association mappings, depending on the specified transformer).
- */
- protected Iterable<Iterable<String>> getEmbeddableOverridableMappingNamesLists(Transformer<AttributeMapping, Iterable<String>> transformer) {
- return new TransformationIterable<AttributeMapping, Iterable<String>>(this.getEmbeddableAttributeMappings(), transformer);
- }
-
- @Override
- public AttributeMapping resolveAttributeMapping(String attributeName) {
- AttributeMapping resolvedMapping = super.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- // recurse into the embeddable mappings
- for (AttributeMapping mapping : this.getEmbeddableAttributeMappings()) {
- resolvedMapping = mapping.resolveAttributeMapping(attributeName);
- if (resolvedMapping != null) {
- return resolvedMapping;
- }
- }
- return null;
- }
-
- protected Iterable<AttributeMapping> getEmbeddableAttributeMappings() {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return ((targetEmbeddable != null) && (targetEmbeddable != this.getTypeMapping())) ?
- targetEmbeddable.getAttributeMappings() :
- EmptyIterable.<AttributeMapping>instance();
- }
-
- @Override
- public Column resolveOverriddenColumn(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AttributeOverride override = this.valueAttributeOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getColumn() : this.resolveOverriddenColumnInTargetEmbeddable(attributeName);
- }
-
- protected Column resolveOverriddenColumnInTargetEmbeddable(String attributeName) {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return (targetEmbeddable == null) ? null : targetEmbeddable.resolveOverriddenColumn(attributeName);
- }
-
- @Override
- public Relationship resolveOverriddenRelationship(String attributeName) {
- attributeName = this.unqualify(attributeName);
- if (attributeName == null) {
- return null;
- }
- AssociationOverride override = this.valueAssociationOverrideContainer.getSpecifiedOverrideNamed(attributeName);
- // recurse into the target embeddable if necessary
- return (override != null) ? override.getRelationship() : this.resolveOverriddenRelationshipInTargetEmbeddable(attributeName);
- }
-
- protected Relationship resolveOverriddenRelationshipInTargetEmbeddable(String attributeName) {
- Embeddable targetEmbeddable = this.getResolvedTargetEmbeddable();
- return (targetEmbeddable == null) ? null : targetEmbeddable.resolveOverriddenRelationship(attributeName);
- }
-
-
- //*********** refactoring ***********
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenameTypeEdits(originalType, newName),
- this.createMapKeyClassRenameTypeEdits(originalType, newName),
- this.createTargetClassRenameTypeEdits(originalType, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createMapKeyClassRenameTypeEdits(IType originalType, String newName) {
- if (this.specifiedMapKeyClass != null) {
- PersistentType mapKeyType = this.getResolvedMapKeyType();
- if ((mapKeyType != null) && mapKeyType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.createRenameMapKeyClassEdit(originalType, newName));
- }
- }
- return EmptyIterable.instance();
- }
-
- protected ReplaceEdit createRenameMapKeyClassEdit(IType originalType, String newName) {
- return this.xmlAttributeMapping.createRenameMapKeyClassEdit(originalType, newName);
- }
-
- protected Iterable<ReplaceEdit> createTargetClassRenameTypeEdits(IType originalType, String newName) {
- if (this.specifiedTargetClass != null) {
- PersistentType targetType = this.getResolvedTargetType();
- if ((targetType != null) && targetType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.xmlAttributeMapping.createRenameTargetClassEdit(originalType, newName));
- }
- }
- return EmptyIterable.instance();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- return new CompositeIterable<ReplaceEdit>(
- super.createMoveTypeEdits(originalType, newPackage),
- this.createMapKeyClassMoveTypeEdits(originalType, newPackage),
- this.createTargetClassMoveTypeEdits(originalType, newPackage)
- );
- }
-
- protected Iterable<ReplaceEdit> createMapKeyClassMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- if (this.specifiedMapKeyClass != null) {
- PersistentType mapKeyType = this.getResolvedMapKeyType();
- if ((mapKeyType != null) && mapKeyType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.createMapKeyClassRenamePackageEdit(newPackage.getElementName()));
- }
- }
- return EmptyIterable.instance();
- }
-
- protected Iterable<ReplaceEdit> createTargetClassMoveTypeEdits(IType originalType, IPackageFragment newPackage) {
- if (this.specifiedTargetClass != null) {
- PersistentType targetType = this.getResolvedTargetType();
- if ((targetType != null) && targetType.isFor(originalType.getFullyQualifiedName('.'))) {
- return new SingleElementIterable<ReplaceEdit>(this.xmlAttributeMapping.createRenameTargetClassPackageEdit(newPackage.getElementName()));
- }
- }
- return EmptyIterable.instance();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- return new CompositeIterable<ReplaceEdit>(
- super.createRenamePackageEdits(originalPackage, newName),
- this.createMapKeyClassRenamePackageEdits(originalPackage, newName),
- this.createTargetClassRenamePackageEdits(originalPackage, newName)
- );
- }
-
- protected Iterable<ReplaceEdit> createMapKeyClassRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- if (this.specifiedMapKeyClass != null) {
- PersistentType mapKeyType = this.getResolvedMapKeyType();
- if ((mapKeyType != null) && mapKeyType.isIn(originalPackage)) {
- return new SingleElementIterable<ReplaceEdit>(this.createMapKeyClassRenamePackageEdit(newName));
- }
- }
- return EmptyIterable.instance();
- }
-
- protected ReplaceEdit createMapKeyClassRenamePackageEdit(String newName) {
- return this.xmlAttributeMapping.createRenameMapKeyClassPackageEdit(newName);
- }
-
- protected Iterable<ReplaceEdit> createTargetClassRenamePackageEdits(IPackageFragment originalPackage, String newName) {
- if (this.specifiedTargetClass != null) {
- PersistentType targetType = this.getResolvedTargetType();
- if ((targetType != null) && targetType.isIn(originalPackage)) {
- return new SingleElementIterable<ReplaceEdit>(this.xmlAttributeMapping.createRenameTargetClassPackageEdit(newName));
- }
- }
- return EmptyIterable.instance();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateAttributeType(messages, reporter);
- this.validateTargetClass(messages);
- this.validateMapKeyClass(messages);
- this.orderable.validate(messages, reporter);
- this.collectionTable.validate(messages, reporter);
- this.validateValue(messages, reporter);
- this.validateMapKey(messages, reporter);
- this.validateNoEmbeddableInMappingContainsProhibitedMapping(messages);
- }
-
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter) {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
- new String[] {this.getFullyQualifiedAttributeType()},
- this,
- this.getAttributeTypeTextRange()
- )
- );
- }
- }
-
- protected TextRange getAttributeTypeTextRange() {
- return this.getValidationTextRange();
- }
-
- protected void validateNoEmbeddableInMappingContainsProhibitedMapping(List<IMessage> messages) {
- Embeddable embeddableClass = getResolvedTargetEmbeddable();
- if (embeddableClass != null) {
- embeddableContainsElementCollection(messages, embeddableClass);
- embeddableContainsProhibitedRelationshipMapping(messages, embeddableClass);
- embeddableHierarchyContainsProhibitedMapping(messages, embeddableClass, new ArrayList<Embeddable>());
- }
- embeddableClass = getResolvedMapKeyEmbeddable();
- if (embeddableClass != null) {
- embeddableContainsElementCollection(messages, embeddableClass);
- embeddableContainsProhibitedRelationshipMapping(messages, embeddableClass);
- embeddableHierarchyContainsProhibitedMapping(messages, embeddableClass, new ArrayList<Embeddable>());
- }
- }
-
- private void embeddableHierarchyContainsProhibitedMapping(List<IMessage> messages, Embeddable parentEmbeddable, List<Embeddable> visited) {
- Iterable<AttributeMapping> embeddedIterable = parentEmbeddable.getAllAttributeMappings(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
- for(AttributeMapping mapping : embeddedIterable) {
- Embeddable embeddable = ((BaseEmbeddedMapping)mapping).getTargetEmbeddable();
- if (embeddable != null && embeddable != parentEmbeddable) {
- embeddableContainsElementCollection(messages, embeddable);
- embeddableContainsProhibitedRelationshipMapping(messages, embeddable);
- if (!CollectionTools.contains(visited, embeddable)) {
- visited.add(embeddable);
- embeddableHierarchyContainsProhibitedMapping(messages, embeddable, visited);
- }
- }
- }
- Iterable<AttributeMapping> embeddedIdIterable = parentEmbeddable.getAllAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
- for(AttributeMapping mapping : embeddedIdIterable) {
- Embeddable embeddable = ((BaseEmbeddedMapping)mapping).getTargetEmbeddable();
- if (embeddable != null && embeddable != parentEmbeddable) {
- embeddableContainsElementCollection(messages, embeddable);
- embeddableContainsProhibitedRelationshipMapping(messages, embeddable);
- if (!CollectionTools.contains(visited, embeddable)) {
- visited.add(embeddable);
- embeddableHierarchyContainsProhibitedMapping(messages, embeddable, visited);
- }
- }
- }
- }
-
- private void embeddableContainsProhibitedRelationshipMapping(List<IMessage> messages, Embeddable embeddable) {
- boolean prohibitedMappingFound = false;
- RelationshipMapping relationshipMapping = null;
- Iterable<AttributeMapping> manyToManyMappings = embeddable.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
- Iterable<AttributeMapping> oneToManyMappings = embeddable.getAllAttributeMappings(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY);
- if (oneToManyMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)oneToManyMappings.iterator().next();
- prohibitedMappingFound = true;
- }
- if (manyToManyMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)manyToManyMappings.iterator().next();
- prohibitedMappingFound = true;
- }
- Iterable<AttributeMapping> manyToOneMappings = embeddable.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
- if (manyToOneMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)manyToOneMappings.iterator().next();
- if (((RelationshipMapping)manyToOneMappings.iterator().next()).getRelationshipOwner() != null
- ||((ManyToOneRelationship2_0)relationshipMapping.getRelationship()).getJoinTableStrategy().getJoinTable() != null) {
- prohibitedMappingFound = true;
- }
- }
- Iterable<AttributeMapping> oneToOneMappings = embeddable.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
- if (oneToOneMappings.iterator().hasNext()) {
- relationshipMapping = (RelationshipMapping)oneToOneMappings.iterator().next();
- if (((RelationshipMapping)oneToOneMappings.iterator().next()).getRelationshipOwner() != null
- || ((OneToOneRelationship2_0)relationshipMapping.getRelationship()).getJoinTableStrategy().getJoinTable() != null) {
- prohibitedMappingFound = true;
- }
- }
- if (prohibitedMappingFound) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING,
- new String[] {embeddable.getName(), relationshipMapping.getName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- private void embeddableContainsElementCollection(List<IMessage> messages, Embeddable embeddable) {
- Iterable<AttributeMapping> elementCollectionMappings = embeddable.getAllAttributeMappings(MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY);
- if (elementCollectionMappings.iterator().hasNext()) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING,
- new String[] {embeddable.getName(), elementCollectionMappings.iterator().next().getName()},
- this,
- this.getValidationTextRange()
- )
- );
- }
- }
-
- protected void validateTargetClass(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.getTargetClass())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getTargetClassTextRange()
- )
- );
- return;
- }
- if (MappingTools.typeIsBasic(this.getJavaProject(), this.getFullyQualifiedTargetClass())) {
- return;
- }
- //If a persistent type exists, but no underlying java class, then
- //you will get validation on that persistent type instead of here
- if (this.getResolvedTargetType() == null) {
- IType jdtType = JDTTools.findType(this.getJavaProject(), this.getFullyQualifiedTargetClass());
- if (jdtType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST,
- new String[] {this.getFullyQualifiedTargetClass()},
- this,
- this.getTargetClassTextRange()
- )
- );
- }
- return;
- }
- if (this.getResolvedTargetEmbeddable() == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getFullyQualifiedTargetClass()},
- this,
- this.getTargetClassTextRange()
- )
- );
- }
- }
- protected TextRange getTargetClassTextRange() {
- return this.getValidationTextRange(this.xmlAttributeMapping.getTargetClassTextRange());
- }
-
- protected void validateMapKeyClass(List<IMessage> messages) {
- JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
- if ((javaAttribute != null) && javaAttribute.getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages);
- }
- }
-
- protected void validateMapKeyClass_(List<IMessage> messages) {
- if (StringTools.stringIsEmpty(this.getMapKeyClass())) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
- EMPTY_STRING_ARRAY,
- this,
- this.getMapKeyClassTextRange()
- )
- );
- return;
- }
-
- if (MappingTools.typeIsBasic(this.getJavaProject(), this.getFullyQualifiedMapKeyClass())) {
- return;
- }
-
- if (this.getResolvedMapKeyType() == null) {
- IType mapKeyJdtType = JDTTools.findType(this.getJavaProject(), this.getFullyQualifiedMapKeyClass());
- if (mapKeyJdtType == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_NOT_EXIST,
- new String[] {this.getFullyQualifiedMapKeyClass()},
- this,
- this.getMapKeyClassTextRange()
- )
- );
- }
- return;
- }
- if (this.getResolvedMapKeyEmbeddable() == null && this.getResolvedMapKeyEntity() == null) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
- new String[] {this.getFullyQualifiedMapKeyClass()},
- this,
- this.getMapKeyClassTextRange()
- )
- );
- }
- }
-
- protected TextRange getMapKeyClassTextRange() {
- return this.getValidationTextRange(this.xmlAttributeMapping.getMapKeyClassTextRange());
- }
-
- public void validateValue(List<IMessage> messages, IReporter reporter) {
- this.converter.validate(messages, reporter);
- //TODO should we handle validation when the type is embeddable,
- //but a value column is specified, or things like that if that is invalid?
- switch (this.valueType) {
- case BASIC_TYPE :
- this.valueColumn.validate(messages, reporter);
- break;
- case EMBEDDABLE_TYPE :
- this.valueAttributeOverrideContainer.validate(messages, reporter);
- this.valueAssociationOverrideContainer.validate(messages, reporter);
- break;
- default :
- break;
- }
- }
-
- protected void validateMapKey(List<IMessage> messages, IReporter reporter) {
- if (this.getMapKey() == null) {
- this.validateMapKey_(messages, reporter);
- } else {
- //TODO validate that the map key refers to an existing attribute
- }
- }
-
- protected void validateMapKey_(List<IMessage> messages, IReporter reporter) {
- switch (this.keyType) {
- case BASIC_TYPE :
- this.mapKeyColumn.validate(messages, reporter);
- this.mapKeyConverter.validate(messages, reporter);
- break;
- case ENTITY_TYPE :
- for (OrmJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter);
- }
- break;
- case EMBEDDABLE_TYPE :
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter);
- //validate map key association overrides
- break;
- default :
- break;
- }
- }
-
- // ********** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.collectionTable.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.valueColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.converter.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.orderable.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.valueAttributeOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.valueAssociationOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.mapKeyNameTouches(pos)) {
- return this.getCandidateMapKeyNames();
- }
- result = this.mapKeyColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mapKeyConverter.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- result = this.mapKeyAttributeOverrideContainer.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- for (OrmJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- result = joinColumn.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- protected boolean mapKeyNameTouches(int pos) {
- return this.xmlAttributeMapping.mapKeyNameTouches(pos);
- }
-
- // ********** abstract owner **********
-
- /**
- * the various (column and override) owners have lots of common
- * interactions with the mapping
- */
- protected abstract class AbstractOwner
- {
- public OrmTypeMapping getTypeMapping() {
- return AbstractOrmElementCollectionMapping2_0.this.getTypeMapping();
- }
-
- public String getDefaultTableName() {
- return this.getCollectionTable().getName();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- OrmCollectionTable2_0 table = this.getCollectionTable();
- return Tools.valuesAreEqual(table.getName(), tableName) ? table.getDbTable() : null;
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- /**
- * If there is a specified table name it needs to be the same
- * the default table name. the table is always the collection table
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
- }
-
- public Iterable<String> getJavaOverrideNames() {
- return null;
- }
-
- protected String getMappingName() {
- return AbstractOrmElementCollectionMapping2_0.this.getName();
- }
-
- protected OrmCollectionTable2_0 getCollectionTable() {
- return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable();
- }
-
- protected OrmPersistentAttribute2_0 getPersistentAttribute() {
- return AbstractOrmElementCollectionMapping2_0.this.getPersistentAttribute();
- }
-
- protected XmlElementCollection getXmlMapping() {
- return AbstractOrmElementCollectionMapping2_0.this.getXmlAttributeMapping();
- }
- }
-
-
- // ********** value column owner **********
-
- protected class ValueColumnOwner
- extends AbstractOwner
- implements OrmColumn.Owner
- {
- public XmlColumn getXmlColumn() {
- return this.getXmlMapping().getColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.getXmlMapping().setColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.getXmlMapping().setColumn(null);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getMappingName();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** map key column owner **********
-
- protected class MapKeyColumnOwner
- extends AbstractOwner
- implements OrmColumn.Owner
- {
- public XmlColumn getXmlColumn() {
- return this.getXmlMapping().getMapKeyColumn();
- }
-
- public XmlColumn buildXmlColumn() {
- XmlColumn xmlColumn = OrmFactory.eINSTANCE.createXmlColumn();
- this.getXmlMapping().setMapKeyColumn(xmlColumn);
- return xmlColumn;
- }
-
- public void removeXmlColumn() {
- this.getXmlMapping().setMapKeyColumn(null);
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return this.getMappingName() + "_KEY"; //$NON-NLS-1$
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** value association override container owner **********
-
- protected class ValueAssociationOverrideContainerOwner
- extends AbstractOwner
- implements OrmAssociationOverrideContainer2_0.Owner
- {
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping typeMapping = this.getOverridableTypeMapping();
- return (typeMapping != null) ? typeMapping.getAllOverridableAssociationNames() : EmptyIterable.<String>instance();
- }
-
- public EList<XmlAssociationOverride> getXmlOverrides() {
- return this.getXmlMapping().getAssociationOverrides();
- }
-
- public Relationship resolveOverriddenRelationship(String attributeName) {
- return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) columnOwner, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
-
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
- }
-
-
- // ********** value attribute override container owner **********
-
- protected class ValueAttributeOverrideContainerOwner
- extends AbstractOwner
- implements OrmAttributeOverrideContainer.Owner
- {
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? overriddenTypeMapping.getAllOverridableAttributeNames() : EmptyIterable.<String>instance();
- }
-
- public EList<XmlAttributeOverride> getXmlOverrides() {
- return this.getXmlMapping().getAttributeOverrides();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
-
- // ********** map key attribute override container owner **********
-
- protected class MapKeyAttributeOverrideContainerOwner
- extends AbstractOwner
- implements OrmAttributeOverrideContainer.Owner
- {
- public TypeMapping getOverridableTypeMapping() {
- return AbstractOrmElementCollectionMapping2_0.this.getResolvedMapKeyEmbeddable();
- }
-
- public Iterable<String> getAllOverridableNames() {
- TypeMapping overriddenTypeMapping = this.getOverridableTypeMapping();
- return (overriddenTypeMapping != null) ? overriddenTypeMapping.getAllOverridableAttributeNames() : EmptyIterable.<String>instance();
- }
-
- public EList<XmlAttributeOverride> getXmlOverrides() {
- return this.getXmlMapping().getMapKeyAttributeOverrides();
- }
-
- public Column resolveOverriddenColumn(String attributeName) {
- return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
- }
-
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
- }
-
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-
- // ********** map key join column owner **********
-
- protected class MapKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected MapKeyJoinColumnOwner() {
- super();
- }
-
- public String getDefaultTableName() {
- return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable().getName();
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return AbstractOrmElementCollectionMapping2_0.this.getName() + "_KEY"; //$NON-NLS-1$
- }
-
- public String getAttributeName() {
- return AbstractOrmElementCollectionMapping2_0.this.getName();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return AbstractOrmElementCollectionMapping2_0.this.getPersistentAttribute();
- }
-
- public Entity getRelationshipTarget() {
- return AbstractOrmElementCollectionMapping2_0.this.getResolvedMapKeyEntity();
- }
-
- /**
- * If there is a specified table name it needs to be the same as
- * the default table name. The table is always the collection table.
- */
- public boolean tableNameIsInvalid(String tableName) {
- return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable().getDbTable();
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return AbstractOrmElementCollectionMapping2_0.this.getResolvedMapKeyEntity().getPrimaryDbTable();
- }
-
- public int getJoinColumnsSize() {
- return AbstractOrmElementCollectionMapping2_0.this.getMapKeyJoinColumnsSize();
- }
-
- public TextRange getValidationTextRange() {
- return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyJoinColumnValidator(
- this.getPersistentAttribute(),
- (ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
- new CollectionTableTableDescriptionProvider());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java
deleted file mode 100644
index 976ba93809..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0;
-
-/**
- * <code>orm.xml</code> cacheable
- */
-public class GenericOrmCacheable2_0
- extends AbstractOrmXmlContextNode
- implements OrmCacheable2_0
-{
- protected Boolean specifiedCacheable;
- protected boolean defaultCacheable;
-
-
- public GenericOrmCacheable2_0(OrmCacheableHolder2_0 parent) {
- super(parent);
- this.specifiedCacheable = this.getXmlCacheable().getCacheable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedCacheable_(this.getXmlCacheable().getCacheable());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultCacheable(this.buildDefaultCacheable());
- }
-
-
- // ********** cacheable **********
-
- public boolean isCacheable() {
- return (this.specifiedCacheable != null) ? this.specifiedCacheable.booleanValue() : this.defaultCacheable;
- }
-
- public Boolean getSpecifiedCacheable() {
- return this.specifiedCacheable;
- }
-
- public void setSpecifiedCacheable(Boolean cacheable) {
- this.setSpecifiedCacheable_(cacheable);
- this.getXmlCacheable().setCacheable(cacheable);
- }
-
- protected void setSpecifiedCacheable_(Boolean cacheable) {
- Boolean old = this.specifiedCacheable;
- this.specifiedCacheable = cacheable;
- this.firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, old, cacheable);
- }
-
- public boolean isDefaultCacheable() {
- return this.defaultCacheable;
- }
-
- protected void setDefaultCacheable(boolean cacheable) {
- boolean old = this.defaultCacheable;
- this.defaultCacheable = cacheable;
- this.firePropertyChanged(DEFAULT_CACHEABLE_PROPERTY, old, cacheable);
- }
-
- protected boolean buildDefaultCacheable() {
- return this.getCacheableHolder().calculateDefaultCacheable();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmCacheableHolder2_0 getParent() {
- return (OrmCacheableHolder2_0) super.getParent();
- }
-
- protected OrmCacheableHolder2_0 getCacheableHolder() {
- return this.getParent();
- }
-
- protected XmlCacheable_2_0 getXmlCacheable() {
- return this.getCacheableHolder().getXmlCacheable();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlCacheable().getCacheableTextRange();
- return (textRange != null) ? textRange : this.getCacheableHolder().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
deleted file mode 100644
index cb2c10dd87..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.CollectionTableTableDescriptionProvider;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmReferenceTable;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-
-/**
- * <code>orm.xml</code> collection table
- */
-public class GenericOrmCollectionTable2_0
- extends GenericOrmReferenceTable<XmlCollectionTable>
- implements OrmCollectionTable2_0
-{
- public GenericOrmCollectionTable2_0(OrmElementCollectionMapping2_0 parent, Owner owner) {
- super(parent, owner);
- }
-
- @Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
- return new JoinColumnOwner();
- }
-
-
- // ********** XML table **********
-
- @Override
- protected XmlCollectionTable getXmlTable() {
- return this.getXmlAttributeMapping().getCollectionTable();
- }
-
- @Override
- protected XmlCollectionTable buildXmlTable() {
- XmlCollectionTable xmlCollectionTable = OrmFactory.eINSTANCE.createXmlCollectionTable();
- this.getXmlAttributeMapping().setCollectionTable(xmlCollectionTable);
- return xmlCollectionTable;
- }
-
- @Override
- protected void removeXmlTable() {
- this.getXmlAttributeMapping().setCollectionTable(null);
- }
-
- protected XmlElementCollection getXmlAttributeMapping() {
- return this.getElementCollectionMapping().getXmlAttributeMapping();
- }
-
-
- // ********** misc **********
-
- public PersistentAttribute getPersistentAttribute() {
- return this.getElementCollectionMapping().getPersistentAttribute();
- }
-
- @Override
- public OrmElementCollectionMapping2_0 getParent() {
- return (OrmElementCollectionMapping2_0) super.getParent();
- }
-
- protected OrmElementCollectionMapping2_0 getElementCollectionMapping() {
- return this.getParent();
- }
-
- @Override
- protected String buildDefaultName() {
- return MappingTools.buildCollectionTableDefaultName(this.getElementCollectionMapping());
- }
-
- public void initializeFrom(CollectionTable2_0 oldCollectionTable) {
- super.initializeFrom(oldCollectionTable);
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.getElementCollectionMapping().validatesAgainstDatabase();
- }
-
-
- // ********** join column owner **********
-
- /**
- * owner for "back-pointer" join columns;
- * these point at the source/owning entity
- */
- protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
- {
- protected JoinColumnOwner() {
- super();
- }
-
- protected TypeMapping getTypeMapping() {
- return this.getElementCollectionMapping().getTypeMapping();
- }
-
- public org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName) {
- return Tools.valuesAreEqual(GenericOrmCollectionTable2_0.this.getName(), tableName) ?
- GenericOrmCollectionTable2_0.this.getDbTable() :
- null;
- }
-
- public String getDefaultColumnName(ReadOnlyNamedColumn column) {
- return MappingTools.buildJoinColumnDefaultName((ReadOnlyJoinColumn) column, this);
- }
-
- /**
- * by default, the join column is, obviously, in the collection table;
- * not sure whether it can be anywhere else...
- */
- public String getDefaultTableName() {
- return GenericOrmCollectionTable2_0.this.getName();
- }
-
- public TextRange getValidationTextRange() {
- return GenericOrmCollectionTable2_0.this.getValidationTextRange();
- }
-
- public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
- return this.getTypeMapping().getPrimaryDbTable();
- }
-
- /**
- * the default table name is always valid and a specified table name
- * is prohibited (which will be handled elsewhere)
- */
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-
- public Iterable<String> getCandidateTableNames() {
- return EmptyIterable.instance();
- }
-
- public Entity getRelationshipTarget() {
- return this.getElementCollectionMapping().getEntity();
- }
-
- public String getAttributeName() {
- //TODO
- return null; //I *think* this is correct
-// //return GenericJavaCollectionTable2_0.this.getParent().getName();
-// Entity targetEntity = GenericOrmCollectionTable2_0.this.getRelationshipMapping().getResolvedTargetEntity();
-// if (targetEntity == null) {
-// return null;
-// }
-// for (PersistentAttribute each : CollectionTools.iterable(targetEntity.getPersistentType().allAttributes())) {
-// if (each.getMapping().isOwnedBy(getRelationshipMapping())) {
-// return each.getName();
-// }
-// }
-// return null;
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return GenericOrmCollectionTable2_0.this.getPersistentAttribute();
- }
-
- public int getJoinColumnsSize() {
- return GenericOrmCollectionTable2_0.this.getJoinColumnsSize();
- }
-
- protected OrmElementCollectionMapping2_0 getElementCollectionMapping() {
- return GenericOrmCollectionTable2_0.this.getElementCollectionMapping();
- }
-
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java
deleted file mode 100644
index 70d8b5f36c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmDerivedIdentity2_0
- extends AbstractOrmXmlContextNode
- implements OrmDerivedIdentity2_0
-{
- protected DerivedIdentityStrategy2_0 strategy;
-
- protected final OrmIdDerivedIdentityStrategy2_0 idStrategy;
-
- protected final OrmMapsIdDerivedIdentityStrategy2_0 mapsIdStrategy;
-
-
- public GenericOrmDerivedIdentity2_0(OrmSingleRelationshipMapping2_0 parent) {
- super(parent);
- this.idStrategy = this.buildIdStrategy();
- this.mapsIdStrategy = this.buildMapsIdStrategy();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.idStrategy.synchronizeWithResourceModel();
- this.mapsIdStrategy.synchronizeWithResourceModel();
- }
-
- @Override
- public void update() {
- super.update();
- this.idStrategy.update();
- this.mapsIdStrategy.update();
- this.updateStrategy();
- }
-
-
- // ********** predominant strategy **********
-
- public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
- return this.strategy;
- }
-
- protected void setStrategy(DerivedIdentityStrategy2_0 strategy) {
- DerivedIdentityStrategy2_0 old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(PREDOMINANT_DERIVED_IDENTITY_STRATEGY_PROPERTY, old, strategy);
- }
-
- protected void updateStrategy() {
- this.setStrategy(this.buildStrategy());
- }
-
- protected DerivedIdentityStrategy2_0 buildStrategy() {
- if (this.mapsIdStrategy.isSpecified()) {
- return this.mapsIdStrategy;
- }
- if (this.idStrategy.isSpecified()) {
- return this.idStrategy;
- }
- return null;
- }
-
-
- // ********** null strategy **********
-
- public boolean usesNullDerivedIdentityStrategy() {
- return this.strategy == null;
- }
-
- public void setNullDerivedIdentityStrategy() {
- this.mapsIdStrategy.removeStrategy();
- this.idStrategy.removeStrategy();
- this.updateStrategy();
- }
-
-
- // ********** ID strategy **********
-
- public OrmIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
- return this.idStrategy;
- }
-
- public void setIdDerivedIdentityStrategy() {
- this.idStrategy.addStrategy();
- this.mapsIdStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean usesIdDerivedIdentityStrategy() {
- return this.strategy == this.idStrategy;
- }
-
- protected OrmIdDerivedIdentityStrategy2_0 buildIdStrategy() {
- return new GenericOrmIdDerivedIdentityStrategy2_0(this);
- }
-
-
- // ********** maps ID strategy **********
-
- public OrmMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
- return this.mapsIdStrategy;
- }
-
- public void setMapsIdDerivedIdentityStrategy() {
- this.mapsIdStrategy.addStrategy();
- this.idStrategy.removeStrategy();
- this.updateStrategy();
- }
-
- public boolean usesMapsIdDerivedIdentityStrategy() {
- return this.strategy == this.mapsIdStrategy;
- }
-
- protected OrmMapsIdDerivedIdentityStrategy2_0 buildMapsIdStrategy() {
- return new GenericOrmMapsIdDerivedIdentityStrategy2_0(this);
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmSingleRelationshipMapping2_0 getParent() {
- return (OrmSingleRelationshipMapping2_0) super.getParent();
- }
-
- public OrmSingleRelationshipMapping2_0 getMapping() {
- return this.getParent();
- }
-
- public void initializeFrom(OrmDerivedIdentity2_0 oldDerivedIdentity) {
- this.idStrategy.initializeFrom(oldDerivedIdentity.getIdDerivedIdentityStrategy());
- this.mapsIdStrategy.initializeFrom(oldDerivedIdentity.getMapsIdDerivedIdentityStrategy());
- this.updateStrategy();
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- if (this.strategy != null) {
- ((XmlContextNode) this.strategy).validate(messages, reporter);
- }
- }
-
- public TextRange getValidationTextRange() {
- return this.getMapping().getValidationTextRange();
- }
-
- // ************** completion proposals **********
-
- @Override
- public Iterable<String> getXmlCompletionProposals(int pos) {
- Iterable<String> result = super.getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- if (this.strategy != null) {
- result = ((XmlContextNode) this.strategy).getXmlCompletionProposals(pos);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java
deleted file mode 100644
index 105c822071..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-
-public class GenericOrmElementCollectionMapping2_0
- extends AbstractOrmElementCollectionMapping2_0<XmlElementCollection>
-{
- public GenericOrmElementCollectionMapping2_0(OrmPersistentAttribute parent, XmlElementCollection resourceMapping) {
- super(parent, resourceMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java
deleted file mode 100644
index 7d5525de4d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEmbeddable;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaEmbeddable2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> embeddable type mapping
- */
-public class GenericOrmEmbeddable2_0
- extends AbstractOrmEmbeddable<XmlEmbeddable>
-{
- public GenericOrmEmbeddable2_0(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
- super(parent, resourceMapping);
- }
-
- @Override
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return ArrayTools.contains(GenericJavaEmbeddable2_0.ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index c4515a0e2a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmIdDerivedIdentityStrategy2_0
- extends AbstractOrmXmlContextNode
- implements OrmIdDerivedIdentityStrategy2_0
-{
- protected boolean value;
-
-
- public GenericOrmIdDerivedIdentityStrategy2_0(OrmDerivedIdentity2_0 parent) {
- super(parent);
- this.value = this.buildValue();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** value **********
-
- public boolean getValue() {
- return this.value;
- }
-
- public void setValue(boolean value) {
- this.setValue_(value);
- this.getXmlMapping().setId(value ? Boolean.TRUE : null);
- }
-
- protected void setValue_(boolean value) {
- boolean old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- protected boolean buildValue() {
- Boolean xmlValue = this.getXmlMapping().getId();
- return (xmlValue != null) && xmlValue.booleanValue();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmDerivedIdentity2_0 getParent() {
- return (OrmDerivedIdentity2_0) super.getParent();
- }
-
- protected OrmDerivedIdentity2_0 getDerivedIdentity() {
- return this.getParent();
- }
-
- protected OrmSingleRelationshipMapping2_0 getMapping() {
- return this.getDerivedIdentity().getMapping();
- }
-
- protected XmlSingleRelationshipMapping_2_0 getXmlMapping() {
- return this.getMapping().getXmlAttributeMapping();
- }
-
- public boolean isSpecified() {
- return this.value;
- }
-
- public void addStrategy() {
- this.setValue(true);
- }
-
- public void removeStrategy() {
- this.setValue(false);
- }
-
- public void initializeFrom(OrmIdDerivedIdentityStrategy2_0 oldStrategy) {
- this.setValue(oldStrategy.getValue());
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- // no validation rules
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlMapping().getIdTextRange();
- return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 6432e46e11..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.NotNullFilter;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmMapsIdDerivedIdentityStrategy2_0
- extends AbstractOrmXmlContextNode
- implements OrmMapsIdDerivedIdentityStrategy2_0
-{
- protected String specifiedIdAttributeName;
- // no default
-
-
- public GenericOrmMapsIdDerivedIdentityStrategy2_0(OrmDerivedIdentity2_0 parent) {
- super(parent);
- this.specifiedIdAttributeName = this.getXmlMapping().getMapsId();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedIdAttributeName_(this.getXmlMapping().getMapsId());
- }
-
-
- // ********** ID attribute name **********
-
- public String getIdAttributeName() {
- // there is no default
- return this.specifiedIdAttributeName;
- }
-
- public String getSpecifiedIdAttributeName() {
- return this.specifiedIdAttributeName;
- }
-
- public void setSpecifiedIdAttributeName(String idAttributeName) {
- this.setSpecifiedIdAttributeName_(idAttributeName);
- this.getXmlMapping().setMapsId(idAttributeName);
- }
-
- protected void setSpecifiedIdAttributeName_(String idAttributeName) {
- String old = this.specifiedIdAttributeName;
- this.specifiedIdAttributeName = idAttributeName;
- this.firePropertyChanged(SPECIFIED_ID_ATTRIBUTE_NAME_PROPERTY, old, idAttributeName);
- }
-
- public String getDefaultIdAttributeName() {
- // there is no way to have a default in xml
- return null;
- }
-
- public boolean defaultIdAttributeNameIsPossible() {
- return false;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmDerivedIdentity2_0 getParent() {
- return (OrmDerivedIdentity2_0) super.getParent();
- }
-
- protected OrmDerivedIdentity2_0 getDerivedIdentity() {
- return this.getParent();
- }
-
- public OrmSingleRelationshipMapping2_0 getMapping() {
- return this.getDerivedIdentity().getMapping();
- }
-
- protected OrmPersistentAttribute getPersistentAttribute() {
- return this.getMapping().getPersistentAttribute();
- }
-
- protected XmlSingleRelationshipMapping_2_0 getXmlMapping() {
- return this.getMapping().getXmlAttributeMapping();
- }
-
- protected Iterable<AttributeMapping> getAllAttributeMappings() {
- return CollectionTools.collection(this.getPersistentAttribute().getOwningTypeMapping().getAllAttributeMappings());
- }
-
- public Iterable<String> getSortedCandidateIdAttributeNames() {
- return CollectionTools.sort(this.getNonNullCandidateIdAttributeNames());
- }
-
- protected Iterable<String> getNonNullCandidateIdAttributeNames() {
- return new FilteringIterable<String>(this.getCandidateIdAttributeNames(), NotNullFilter.<String>instance());
- }
-
- protected Iterable<String> getCandidateIdAttributeNames() {
- return new TransformationIterable<AttributeMapping, String>(this.getCandidateIdAttributeMappings()) {
- @Override
- protected String transform(AttributeMapping mapping) {
- return mapping.getName();
- }
- };
- }
-
- protected Iterable<AttributeMapping> getCandidateIdAttributeMappings() {
- return this.buildCandidateIdAttributeMappings(this.getAllAttributeMappings());
- }
-
- protected Iterable<AttributeMapping> buildCandidateIdAttributeMappings(Iterable<AttributeMapping> attributeMappings) {
- return new CompositeIterable<AttributeMapping>(this.getCandidateIdAttributeMappingLists(attributeMappings));
- }
-
- protected Iterable<Iterable<AttributeMapping>> getCandidateIdAttributeMappingLists(Iterable<AttributeMapping> attributeMappings) {
- return new TransformationIterable<AttributeMapping, Iterable<AttributeMapping>>(attributeMappings) {
- @Override
- protected Iterable<AttributeMapping> transform(AttributeMapping attributeMapping) {
- return Tools.valuesAreEqual(attributeMapping.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) ?
- this.getEmbeddedIdMappingChoiceIterable((EmbeddedIdMapping) attributeMapping) :
- new SingleElementIterable<AttributeMapping>(attributeMapping);
- }
-
- /**
- * Convert the specified mapping into a collection of its "mappings".
- * Typically, this collection will include just the mapping itself;
- * but, if the mapping is an embedded ID, this collection will include
- * the mapping itself plus all the mappings of its target embeddable.
- *
- * NB: Recursion is unnecessary.
- */
- protected Iterable<AttributeMapping> getEmbeddedIdMappingChoiceIterable(EmbeddedIdMapping mapping) {
- Embeddable embeddable = mapping.getTargetEmbeddable();
- if (embeddable == null) {
- return new SingleElementIterable<AttributeMapping>(mapping);
- }
- return new CompositeIterable<AttributeMapping>(
- mapping,
- CollectionTools.collection(embeddable.getAllAttributeMappings())
- );
- }
- };
- }
-
-
- public AttributeMapping getDerivedIdAttributeMapping() {
- String idAttributeName = this.getIdAttributeName();
- if (idAttributeName != null) {
- for (AttributeMapping mapping : this.getCandidateIdAttributeMappings()) {
- if (idAttributeName.equals(mapping.getName())) {
- return mapping;
- }
- }
- }
- return null;
- }
-
- public boolean isSpecified() {
- return this.getXmlMapping().getMapsId() != null;
- }
-
- public void addStrategy() {
- this.getXmlMapping().setMapsId(""); //$NON-NLS-1$
- }
-
- public void removeStrategy() {
- this.getXmlMapping().setMapsId(null);
- }
-
- public void initializeFrom(OrmMapsIdDerivedIdentityStrategy2_0 oldStrategy) {
- this.setSpecifiedIdAttributeName(oldStrategy.getSpecifiedIdAttributeName());
- }
-
-
- // ********** ID mappings **********
-
- protected Iterable<AttributeMapping> getIdAttributeMappings() {
- return new FilteringIterable<AttributeMapping>(this.getAllAttributeMappings()) {
- @Override
- protected boolean accept(AttributeMapping mapping) {
- return GenericOrmMapsIdDerivedIdentityStrategy2_0.this.mappingIsIdMapping(mapping);
- }
- };
- }
-
- protected boolean mappingIsIdMapping(AttributeMapping mapping) {
- return CollectionTools.contains(this.getIdMappingKeys(), mapping.getKey());
- }
-
- protected Iterable<String> getIdMappingKeys() {
- return ID_MAPPING_KEYS;
- }
-
- protected static final String[] ID_MAPPING_KEYS_ARRAY = new String[] {
- MappingKeys.ID_ATTRIBUTE_MAPPING_KEY,
- MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY
- };
-
- protected static final Iterable<String> ID_MAPPING_KEYS = new ArrayIterable<String>(ID_MAPPING_KEYS_ARRAY);
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- this.validateMapsId(messages);
- }
-
- protected void validateMapsId(List<IMessage> messages) {
- if (this.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy()) {
- this.validateMapsId_(messages);
- }
- }
-
- protected void validateMapsId_(List<IMessage> messages) {
- // test whether id attribute name can be resolved
- AttributeMapping attributeMapping = this.getDerivedIdAttributeMapping();
- if (attributeMapping == null) {
- // there is no defaulting, so only use the 'resolved' error, even if the name is an empty string
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_RESOLVED, new String[] {this.getIdAttributeName()}));
- } else {
- // test whether attribute mapping is allowable
- if ( ! CollectionTools.contains(this.getValidAttributeMappingChoices(), attributeMapping)) {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_INVALID, new String[] {this.getIdAttributeName()}));
- }
- }
- }
-
- protected Iterable<AttributeMapping> getValidAttributeMappingChoices() {
- return this.buildCandidateIdAttributeMappings(this.getIdAttributeMappings());
- }
-
- protected IMessage buildMessage(String msgID, String[] parms) {
- String attributeDescription = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, this.getPersistentAttribute().getName());
- parms = ArrayTools.add(parms, 0, attributeDescription);
- return DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- msgID,
- parms,
- this,
- this.getValidationTextRange()
- );
- }
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlMapping().getMapsIdTextRange();
- return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java
deleted file mode 100644
index 54f78368bc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa2.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmQuery;
-import org.eclipse.jpt.jpa.core.jpa2.context.LockModeType2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.NamedQuery2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaNamedQuery2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmNamedQuery2_0;
-import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-import org.eclipse.persistence.jpa.jpql.ExpressionTools;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> named query
- */
-public class GenericOrmNamedQuery2_0
- extends AbstractOrmQuery<XmlNamedQuery>
- implements OrmNamedQuery2_0
-{
- private LockModeType2_0 specifiedLockMode;
- private LockModeType2_0 defaultLockMode;
-
-
- public GenericOrmNamedQuery2_0(XmlContextNode parent, XmlNamedQuery xmlNamedQuery) {
- super(parent, xmlNamedQuery);
- this.specifiedLockMode = this.buildSpecifiedLockMode();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedLockMode_(this.buildSpecifiedLockMode());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultLockMode(this.buildDefaultLockMode());
- }
-
-
- // ********** lock mode **********
-
- public LockModeType2_0 getLockMode() {
- return (this.specifiedLockMode != null) ? this.specifiedLockMode : this.defaultLockMode;
- }
-
- public LockModeType2_0 getSpecifiedLockMode() {
- return this.specifiedLockMode;
- }
-
- public void setSpecifiedLockMode(LockModeType2_0 lockMode) {
- this.setSpecifiedLockMode_(lockMode);
- this.xmlQuery.setLockMode(LockModeType2_0.toOrmResourceModel(lockMode));
- }
-
- public void setSpecifiedLockMode_(LockModeType2_0 lockMode) {
- LockModeType2_0 old = this.specifiedLockMode;
- this.specifiedLockMode = lockMode;
- this.firePropertyChanged(SPECIFIED_LOCK_MODE_PROPERTY, old, lockMode);
- }
-
- protected LockModeType2_0 buildSpecifiedLockMode() {
- return LockModeType2_0.fromOrmResourceModel(this.xmlQuery.getLockMode());
- }
-
- public LockModeType2_0 getDefaultLockMode() {
- return this.defaultLockMode;
- }
-
- protected void setDefaultLockMode(LockModeType2_0 lockMode) {
- LockModeType2_0 old = this.defaultLockMode;
- this.defaultLockMode = lockMode;
- this.firePropertyChanged(DEFAULT_LOCK_MODE_PROPERTY, old, lockMode);
- }
-
- protected LockModeType2_0 buildDefaultLockMode() {
- return LockModeType2_0.NONE;
- }
-
- // ********** metadata conversion **********
-
- public void convertFrom(JavaNamedQuery javaQuery) {
- super.convertFrom(javaQuery);
- this.setSpecifiedLockMode(((JavaNamedQuery2_0)javaQuery).getSpecifiedLockMode());
- }
-
- // ********** validation **********
-
- @Override
- protected void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
-
- // Convert the literal escape characters into actual escape characters
- String jpqlQuery = ExpressionTools.unescape(this.query, new int[1]);
-
- queryHelper.validate(this, jpqlQuery, this.getQueryTextRange(), 0, messages);
- }
-
- @Override
- public boolean isEquivalentTo(JpaNamedContextNode node) {
- return super.isEquivalentTo(node)
- && this.isEquivalentTo((NamedQuery) node);
- }
-
- protected boolean isEquivalentTo(NamedQuery namedQuery) {
- return this.specifiedLockMode == ((NamedQuery2_0) namedQuery).getSpecifiedLockMode();
- }
-
- // ********** misc **********
-
- public Class<NamedQuery> getType() {
- return NamedQuery.class;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java
deleted file mode 100644
index 48922a3903..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderable2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn;
-
-/**
- * <code>orm.xml</code> order column
- */
-public class GenericOrmOrderColumn2_0
- extends AbstractOrmNamedColumn<XmlOrderColumn, OrmOrderColumn2_0.Owner>
- implements OrmOrderColumn2_0
-{
- // TODO defaults from java for all of these settings
- protected Boolean specifiedNullable;
-
- protected Boolean specifiedInsertable;
-
- protected Boolean specifiedUpdatable;
-
-
- public GenericOrmOrderColumn2_0(OrmOrderable2_0 parent, OrmOrderColumn2_0.Owner owner) {
- super(parent, owner);
- this.specifiedNullable = this.buildSpecifiedNullable();
- this.specifiedInsertable = this.buildSpecifiedInsertable();
- this.specifiedUpdatable = this.buildSpecifiedUpdatable();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedNullable_(this.buildSpecifiedNullable());
- this.setSpecifiedInsertable_(this.buildSpecifiedInsertable());
- this.setSpecifiedUpdatable_(this.buildSpecifiedUpdatable());
- }
-
-
- // ********** XML column **********
-
- @Override
- public XmlOrderColumn getXmlColumn() {
- return this.owner.getXmlColumn();
- }
-
- @Override
- protected XmlOrderColumn buildXmlColumn() {
- return this.owner.buildXmlColumn();
- }
-
- @Override
- protected void removeXmlColumn() {
- this.owner.removeXmlColumn();
- }
-
-
- // ********** nullable **********
-
- public boolean isNullable() {
- return (this.specifiedNullable != null) ? this.specifiedNullable.booleanValue() : this.isDefaultNullable();
- }
-
- public Boolean getSpecifiedNullable() {
- return this.specifiedNullable;
- }
-
- public void setSpecifiedNullable(Boolean nullable) {
- if (this.valuesAreDifferent(this.specifiedNullable, nullable)) {
- XmlOrderColumn xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedNullable_(nullable);
- xmlColumn.setNullable(nullable);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedNullable_(Boolean nullable) {
- Boolean old = this.specifiedNullable;
- this.specifiedNullable = nullable;
- this.firePropertyChanged(SPECIFIED_NULLABLE_PROPERTY, old, nullable);
- }
-
- protected Boolean buildSpecifiedNullable() {
- XmlOrderColumn xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getNullable();
- }
-
- public boolean isDefaultNullable() {
- return DEFAULT_NULLABLE;
- }
-
-
- // ********** insertable **********
-
- public boolean isInsertable() {
- return (this.specifiedInsertable != null) ? this.specifiedInsertable.booleanValue() : this.isDefaultInsertable();
- }
-
- public Boolean getSpecifiedInsertable() {
- return this.specifiedInsertable;
- }
-
- public void setSpecifiedInsertable(Boolean insertable) {
- if (this.valuesAreDifferent(this.specifiedInsertable, insertable)) {
- XmlOrderColumn xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedInsertable_(insertable);
- xmlColumn.setInsertable(insertable);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedInsertable_(Boolean insertable) {
- Boolean old = this.specifiedInsertable;
- this.specifiedInsertable = insertable;
- this.firePropertyChanged(SPECIFIED_INSERTABLE_PROPERTY, old, insertable);
- }
-
- protected Boolean buildSpecifiedInsertable() {
- XmlOrderColumn xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getInsertable();
- }
-
- public boolean isDefaultInsertable() {
- return DEFAULT_INSERTABLE;
- }
-
-
- // ********** updatable **********
-
- public boolean isUpdatable() {
- return (this.specifiedUpdatable != null) ? this.specifiedUpdatable.booleanValue() : this.isDefaultUpdatable();
- }
-
- public Boolean getSpecifiedUpdatable() {
- return this.specifiedUpdatable;
- }
-
- public void setSpecifiedUpdatable(Boolean updatable) {
- if (this.valuesAreDifferent(this.specifiedUpdatable, updatable)) {
- XmlOrderColumn xmlColumn = this.getXmlColumnForUpdate();
- this.setSpecifiedUpdatable_(updatable);
- xmlColumn.setUpdatable(updatable);
- this.removeXmlColumnIfUnset();
- }
- }
-
- protected void setSpecifiedUpdatable_(Boolean updatable) {
- Boolean old = this.specifiedUpdatable;
- this.specifiedUpdatable = updatable;
- this.firePropertyChanged(SPECIFIED_UPDATABLE_PROPERTY, old, updatable);
- }
-
- protected Boolean buildSpecifiedUpdatable() {
- XmlOrderColumn xmlColumn = this.getXmlColumn();
- return (xmlColumn == null) ? null : xmlColumn.getUpdatable();
- }
-
- public boolean isDefaultUpdatable() {
- return DEFAULT_UPDATABLE;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmOrderable2_0 getParent() {
- return (OrmOrderable2_0) super.getParent();
- }
-
- protected OrmOrderable2_0 getOrderable() {
- return this.getParent();
- }
-
- protected OrmAttributeMapping getAttributeMapping() {
- return this.getOrderable().getParent();
- }
-
- protected PersistentAttribute getPersistentAttribute() {
- return this.getAttributeMapping().getPersistentAttribute();
- }
-
- @Override
- public String getTable() {
- return this.getParent().getDefaultTableName();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java
deleted file mode 100644
index e338f9655e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
-
-/**
- * <code>orm.xml</code> orphan removal
- */
-public class GenericOrmOrphanRemoval2_0
- extends AbstractOrmXmlContextNode
- implements OrmOrphanRemovable2_0
-{
- protected Boolean specifiedOrphanRemoval;
- protected boolean defaultOrphanRemoval;
-
-
- public GenericOrmOrphanRemoval2_0(OrmOrphanRemovalHolder2_0 parent) {
- super(parent);
- this.specifiedOrphanRemoval = this.buildSpecifiedOrphanRemoval();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedOrphanRemoval_(this.buildSpecifiedOrphanRemoval());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultOrphanRemoval(this.buildDefaultOrphanRemoval());
- }
-
-
- // ********** orphan removal **********
-
- public boolean isOrphanRemoval() {
- return (this.specifiedOrphanRemoval != null) ? this.specifiedOrphanRemoval.booleanValue() : this.defaultOrphanRemoval;
- }
-
- public Boolean getSpecifiedOrphanRemoval() {
- return this.specifiedOrphanRemoval;
- }
-
- public void setSpecifiedOrphanRemoval(Boolean orphanRemoval) {
- this.setSpecifiedOrphanRemoval_(orphanRemoval);
- this.getXmlOrphanRemovable().setOrphanRemoval(orphanRemoval);
- }
-
- protected void setSpecifiedOrphanRemoval_(Boolean orphanRemoval) {
- Boolean old = this.specifiedOrphanRemoval;
- this.specifiedOrphanRemoval = orphanRemoval;
- this.firePropertyChanged(SPECIFIED_ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
- }
-
- protected Boolean buildSpecifiedOrphanRemoval() {
- return this.getXmlOrphanRemovable().getOrphanRemoval();
- }
-
- public boolean isDefaultOrphanRemoval() {
- return this.defaultOrphanRemoval;
- }
-
- protected void setDefaultOrphanRemoval(boolean orphanRemoval) {
- boolean old = this.defaultOrphanRemoval;
- this.defaultOrphanRemoval = orphanRemoval;
- this.firePropertyChanged(DEFAULT_ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
- }
-
- protected boolean buildDefaultOrphanRemoval() {
- return DEFAULT_ORPHAN_REMOVAL;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmOrphanRemovalHolder2_0 getParent() {
- return (OrmOrphanRemovalHolder2_0) super.getParent();
- }
-
- protected OrmAttributeMapping getMapping() {
- return (OrmAttributeMapping) this.getParent();
- }
-
- protected XmlAttributeMapping getXmlMapping() {
- return this.getMapping().getXmlAttributeMapping();
- }
-
- protected XmlOrphanRemovable_2_0 getXmlOrphanRemovable() {
- return (XmlOrphanRemovable_2_0) this.getXmlMapping();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- TextRange textRange = this.getXmlOrphanRemovable().getValidationTextRange();
- return (textRange != null) ? textRange : this.getMapping().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java
deleted file mode 100644
index ce3c95d40b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOverrideRelationship2_0;
-
-public class GenericOrmOverrideJoinTableRelationshipStrategy2_0
- extends AbstractOrmJoinTableRelationshipStrategy
-{
- public GenericOrmOverrideJoinTableRelationshipStrategy2_0(OrmOverrideRelationship2_0 parent) {
- super(parent);
- }
-
-
- @Override
- public OrmOverrideRelationship2_0 getRelationship() {
- return (OrmOverrideRelationship2_0) super.getRelationship();
- }
-
- public boolean isOverridable() {
- return false;
- }
-
-
- // ********** validation **********
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationship().getTypeMapping().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java
deleted file mode 100644
index 2d2e832033..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.jpa2.context.SequenceGenerator2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSequenceGenerator2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSequenceGenerator2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> sequence generator
- */
-public class GenericOrmSequenceGenerator2_0
- extends AbstractOrmSequenceGenerator
- implements OrmSequenceGenerator2_0
-{
- protected String specifiedCatalog;
- protected String defaultCatalog;
-
- protected String specifiedSchema;
- protected String defaultSchema;
-
-
- public GenericOrmSequenceGenerator2_0(XmlContextNode parent, XmlSequenceGenerator xmlSequenceGenerator) {
- super(parent, xmlSequenceGenerator);
- this.specifiedCatalog = xmlSequenceGenerator.getCatalog();
- this.specifiedSchema = xmlSequenceGenerator.getSchema();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.setSpecifiedCatalog_(this.xmlGenerator.getCatalog());
- this.setSpecifiedSchema_(this.xmlGenerator.getSchema());
- }
-
- @Override
- public void update() {
- super.update();
- this.setDefaultCatalog(this.buildDefaultCatalog());
- this.setDefaultSchema(this.buildDefaultSchema());
- }
-
-
- // ********** catalog **********
-
- @Override
- public String getCatalog() {
- return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
- }
-
- public String getSpecifiedCatalog() {
- return this.specifiedCatalog;
- }
-
- public void setSpecifiedCatalog(String catalog) {
- this.setSpecifiedCatalog_(catalog);
- this.xmlGenerator.setCatalog(catalog);
- }
-
- protected void setSpecifiedCatalog_(String catalog) {
- String old = this.specifiedCatalog;
- this.specifiedCatalog = catalog;
- this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
- }
-
- public String getDefaultCatalog() {
- return this.defaultCatalog;
- }
-
- protected void setDefaultCatalog(String catalog) {
- String old = this.defaultCatalog;
- this.defaultCatalog = catalog;
- this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
- }
-
- protected String buildDefaultCatalog() {
- return this.getContextDefaultCatalog();
- }
-
-
- // ********** schema **********
-
- @Override
- public String getSchema() {
- return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
- }
-
- public String getSpecifiedSchema() {
- return this.specifiedSchema;
- }
-
- public void setSpecifiedSchema(String schema) {
- this.setSpecifiedSchema_(schema);
- this.xmlGenerator.setSchema(schema);
- }
-
- protected void setSpecifiedSchema_(String schema) {
- String old = this.specifiedSchema;
- this.specifiedSchema = schema;
- this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
- }
-
- public String getDefaultSchema() {
- return this.defaultSchema;
- }
-
- protected void setDefaultSchema(String schema) {
- String old = this.defaultSchema;
- this.defaultSchema = schema;
- this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
- }
-
- protected String buildDefaultSchema() {
- return this.getContextDefaultSchema();
- }
-
- // ********** validation **********
-
- @Override
- protected boolean isEquivalentTo(SequenceGenerator generator) {
- return super.isEquivalentTo(generator) &&
- Tools.valuesAreEqual(this.specifiedSchema, ((SequenceGenerator2_0) generator).getSpecifiedSchema()) &&
- Tools.valuesAreEqual(this.specifiedCatalog, ((SequenceGenerator2_0) generator).getSpecifiedCatalog());
- }
-
- // ********** metadata conversion **********
-
- @Override
- public void convertFrom(JavaSequenceGenerator javaGenerator) {
- super.convertFrom(javaGenerator);
- this.setSpecifiedCatalog(((JavaSequenceGenerator2_0) javaGenerator).getSpecifiedCatalog());
- this.setSpecifiedSchema(((JavaSequenceGenerator2_0) javaGenerator).getSpecifiedSchema());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java
deleted file mode 100644
index 79133360e8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.jpa2.context.orm;
-
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmVirtualOverrideRelationship2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-public class GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0
- extends AbstractOrmXmlContextNode
- implements OrmVirtualJoinTableRelationshipStrategy, ReadOnlyTable.Owner
-{
- protected OrmVirtualJoinTable joinTable;
-
-
- public GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0(OrmVirtualOverrideRelationship2_0 parent) {
- super(parent);
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void update() {
- super.update();
- this.updateJoinTable();
- }
-
-
- // ********** join table **********
-
- public OrmVirtualJoinTable getJoinTable() {
- return this.joinTable;
- }
-
- protected void setJoinTable(OrmVirtualJoinTable joinTable) {
- OrmVirtualJoinTable old = this.joinTable;
- this.joinTable = joinTable;
- this.firePropertyChanged(JOIN_TABLE_PROPERTY, old, joinTable);
- }
-
- protected void updateJoinTable() {
- ReadOnlyJoinTable overriddenJoinTable = this.getOverriddenJoinTable();
- if (overriddenJoinTable == null) {
- if (this.joinTable != null) {
- this.setJoinTable(null);
- }
- } else {
- if ((this.joinTable != null) && (this.joinTable.getOverriddenTable() == overriddenJoinTable)) {
- this.joinTable.update();
- } else {
- this.setJoinTable(this.buildJoinTable(overriddenJoinTable));
- }
- }
- }
-
- protected ReadOnlyJoinTable getOverriddenJoinTable() {
- ReadOnlyJoinTableRelationshipStrategy overriddenStrategy = this.getOverriddenStrategy();
- return (overriddenStrategy == null) ? null : overriddenStrategy.getJoinTable();
- }
-
- protected OrmVirtualJoinTable buildJoinTable(ReadOnlyJoinTable overriddenJoinTable) {
- return this.getContextNodeFactory().buildOrmVirtualJoinTable(this, this, overriddenJoinTable);
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmVirtualOverrideRelationship2_0 getParent() {
- return (OrmVirtualOverrideRelationship2_0) super.getParent();
- }
-
- public OrmVirtualOverrideRelationship2_0 getRelationship() {
- return this.getParent();
- }
-
- protected ReadOnlyJoinTableRelationshipStrategy getOverriddenStrategy() {
- ReadOnlyJoinTableRelationship relationship = this.getOverriddenJoinTableRelationship();
- return (relationship == null) ? null : relationship.getJoinTableStrategy();
- }
-
- protected ReadOnlyJoinTableRelationship getOverriddenJoinTableRelationship() {
- ReadOnlyRelationship relationship = this.resolveOverriddenRelationship();
- return (relationship instanceof ReadOnlyJoinTableRelationship) ? (ReadOnlyJoinTableRelationship) relationship : null;
- }
-
- protected ReadOnlyRelationship resolveOverriddenRelationship() {
- return this.getRelationship().resolveOverriddenRelationship();
- }
-
- public String getTableName() {
- return this.joinTable.getName();
- }
-
- public String getJoinTableDefaultName() {
- return MappingTools.buildJoinTableDefaultName(this.getRelationship());
- }
-
-
- // ********** validation **********
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter) {
- super.validate(messages, reporter);
- if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter);
- }
- }
-
- public boolean validatesAgainstDatabase() {
- return this.getRelationship().getTypeMapping().validatesAgainstDatabase();
- }
-
- public TextRange getValidationTextRange() {
- return this.getRelationship().getValidationTextRange();
- }
-
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
- }
-
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
- }
-
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java
deleted file mode 100644
index f4e06e1ed5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedQuery;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOrderable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmOrderable;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmEmbeddedMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator;
-
-public class GenericOrmXml2_0ContextNodeFactory
- extends AbstractOrmXmlContextNodeFactory
- implements OrmXml2_0ContextNodeFactory
-{
- @Override
- public OrmOrderable buildOrmOrderable(OrmAttributeMapping parent) {
- throw new UnsupportedOperationException("use #buildOrmOrderable(OrmAttributeMapping parent, Orderable2_0.Owner owner)"); //$NON-NLS-1$
- }
-
- @Override
- public OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
- return new GenericOrmEmbeddable2_0(parent, resourceMapping);
- }
-
- @Override
- public OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator) {
- return new GenericOrmSequenceGenerator2_0(parent, resourceSequenceGenerator);
- }
-
- public OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(OrmEmbeddedMapping2_0 parent, OrmAssociationOverrideContainer2_0.Owner owner) {
- return new GenericOrmAssociationOverrideContainer(parent, owner);
- }
-
- public OrmDerivedIdentity2_0 buildOrmDerivedIdentity(OrmSingleRelationshipMapping2_0 parent) {
- return new GenericOrmDerivedIdentity2_0(parent);
- }
-
- public OrmElementCollectionMapping2_0 buildOrmElementCollectionMapping2_0(
- OrmPersistentAttribute parent, XmlElementCollection resourceMapping) {
-
- return new GenericOrmElementCollectionMapping2_0(parent, resourceMapping);
- }
-
- public OrmCacheable2_0 buildOrmCacheable(OrmCacheableHolder2_0 parent) {
- return new GenericOrmCacheable2_0(parent);
- }
-
- public OrmOrphanRemovable2_0 buildOrmOrphanRemoval(OrmOrphanRemovalHolder2_0 parent) {
- return new GenericOrmOrphanRemoval2_0(parent);
- }
-
- @Override
- public OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
- return new GenericOrmNamedQuery2_0(parent, resourceNamedQuery);
- }
-
- public OrmCollectionTable2_0 buildOrmCollectionTable(OrmElementCollectionMapping2_0 parent, Table.Owner owner) {
- return new GenericOrmCollectionTable2_0(parent, owner);
- }
-
- public OrmOrderable2_0 buildOrmOrderable(OrmAttributeMapping parent, Orderable2_0.Owner owner) {
- return new GenericOrmOrderable(parent, owner);
- }
-
- public OrmOrderColumn2_0 buildOrmOrderColumn(OrmOrderable2_0 parent, OrmOrderColumn2_0.Owner owner) {
- return new GenericOrmOrderColumn2_0(parent, owner);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java
deleted file mode 100644
index 9bc31297fc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import java.util.ArrayList;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.orm.NullOrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmBasicMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmEmbeddedIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmEmbeddedMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmIdMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmManyToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmManyToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOneToManyMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOneToOneMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmTransientMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmVersionMappingDefinition;
-import org.eclipse.jpt.jpa.core.internal.jpa2.Generic2_0JpaPlatformProvider;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-
-public class GenericOrmXml2_0Definition
- extends AbstractOrmXmlDefinition
-{
- // singleton
- private static final OrmXmlDefinition INSTANCE = new GenericOrmXml2_0Definition();
-
- /**
- * Return the singleton
- */
- public static OrmXmlDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private GenericOrmXml2_0Definition() {
- super();
- }
-
- public JptResourceType getResourceType() {
- return JptJpaCorePlugin.ORM_XML_2_0_RESOURCE_TYPE;
- }
-
- public EFactory getResourceNodeFactory() {
- return OrmFactory.eINSTANCE;
- }
-
- @Override
- protected OrmXmlContextNodeFactory buildContextNodeFactory() {
- return new GenericOrmXml2_0ContextNodeFactory();
- }
-
- @Override
- protected void addAttributeMappingDefinitionsTo(ArrayList<OrmAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- /**
- * Order should not matter here; but we'll use the same order as for Java.
- * @see Generic2_0JpaPlatformProvider
- */
- protected static final OrmAttributeMappingDefinition[] ATTRIBUTE_MAPPING_DEFINITIONS = new OrmAttributeMappingDefinition[] {
- OrmTransientMappingDefinition.instance(),
- OrmElementCollectionMapping2_0Definition.instance(),
- OrmIdMappingDefinition.instance(),
- OrmVersionMappingDefinition.instance(),
- OrmBasicMappingDefinition.instance(),
- OrmEmbeddedMappingDefinition.instance(),
- OrmEmbeddedIdMappingDefinition.instance(),
- OrmManyToManyMappingDefinition.instance(),
- OrmManyToOneMappingDefinition.instance(),
- OrmOneToManyMappingDefinition.instance(),
- OrmOneToOneMappingDefinition.instance(),
- NullOrmAttributeMappingDefinition.instance()
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java
deleted file mode 100644
index 1a8eef92ed..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheableHolder2_0;
-
-/**
- * null <code>orm.xml</code> cacheable
- */
-public class NullOrmCacheable2_0
- extends AbstractOrmXmlContextNode
- implements OrmCacheable2_0
-{
- public NullOrmCacheable2_0(OrmCacheableHolder2_0 parent) {
- super(parent);
- }
-
-
- // ********** cacheable **********
-
- public boolean isCacheable() {
- return false;
- }
-
- public Boolean getSpecifiedCacheable() {
- return null;
- }
-
- public void setSpecifiedCacheable(Boolean cacheable) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultCacheable() {
- return false;
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmCacheableHolder2_0 getParent() {
- return (OrmCacheableHolder2_0) super.getParent();
- }
-
-
- // ********** validation **********
-
- public TextRange getValidationTextRange() {
- return this.getParent().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java
deleted file mode 100644
index 62e50aa57d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.AbstractXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMapsIdDerivedIdentityStrategy2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
-
-public class NullOrmDerivedIdentity2_0
- extends AbstractXmlContextNode
- implements OrmDerivedIdentity2_0
-{
- public NullOrmDerivedIdentity2_0(OrmSingleRelationshipMapping2_0 parent) {
- super(parent);
- }
-
-
-
- // ********** predominant derived identity strategy **********
-
- public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
- return null;
- }
-
-
- // ********** null derived identity strategy **********
-
- public boolean usesNullDerivedIdentityStrategy() {
- return true;
- }
-
- public void setNullDerivedIdentityStrategy() {
- // NOP
- }
-
-
- // ********** ID derived identity strategy **********
-
- public OrmIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
- return null;
- }
-
- public boolean usesIdDerivedIdentityStrategy() {
- return false;
- }
-
- public void setIdDerivedIdentityStrategy() {
- // NOP
- }
-
-
- // ********** maps ID derived identity strategy **********
-
- public OrmMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
- return null;
- }
-
- public boolean usesMapsIdDerivedIdentityStrategy() {
- return false;
- }
-
- public void setMapsIdDerivedIdentityStrategy() {
- // NOP
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmSingleRelationshipMapping2_0 getParent() {
- return (OrmSingleRelationshipMapping2_0) super.getParent();
- }
-
- public OrmSingleRelationshipMapping2_0 getMapping() {
- return this.getParent();
- }
-
- public void initializeFrom(OrmDerivedIdentity2_0 oldDerivedIdentity) {
- // NOP
- }
-
- public TextRange getValidationTextRange() {
- return this.getMapping().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java
deleted file mode 100644
index 104cef2cc6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
-
-/**
- * Null <code>orm.xml</code> orphan removal
- */
-public class NullOrmOrphanRemoval2_0
- extends AbstractOrmXmlContextNode
- implements OrmOrphanRemovable2_0
-{
- public NullOrmOrphanRemoval2_0(OrmOrphanRemovalHolder2_0 parent) {
- super(parent);
- }
-
-
- // ********** orphan removal **********
-
- public boolean isDefaultOrphanRemoval() {
- return false;
- }
-
- public boolean isOrphanRemoval() {
- return false;
- }
-
- public Boolean getSpecifiedOrphanRemoval() {
- return null;
- }
-
- public void setSpecifiedOrphanRemoval(Boolean newSpecifiedOrphanRemoval) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** misc **********
-
- @Override
- public OrmOrphanRemovalHolder2_0 getParent() {
- return (OrmOrphanRemovalHolder2_0) super.getParent();
- }
-
- public TextRange getValidationTextRange() {
- return this.getParent().getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java
deleted file mode 100644
index 44e92594b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.jpa2.context.orm;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMappingDefinition;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-import org.eclipse.jpt.jpa.core.resource.xml.EmfTools;
-
-public class OrmElementCollectionMapping2_0Definition
- implements OrmAttributeMappingDefinition
-{
- // singleton
- private static final OrmAttributeMappingDefinition INSTANCE =
- new OrmElementCollectionMapping2_0Definition();
-
-
- /**
- * Return the singleton
- */
- public static OrmAttributeMappingDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private OrmElementCollectionMapping2_0Definition() {
- super();
- }
-
-
- public String getKey() {
- return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public XmlAttributeMapping buildResourceMapping(EFactory factory) {
- return EmfTools.create(
- factory,
- OrmPackage.eINSTANCE.getXmlElementCollection(),
- XmlElementCollection.class);
- }
-
- public OrmAttributeMapping buildContextMapping(
- OrmPersistentAttribute parent,
- XmlAttributeMapping xmlMapping,
- OrmXmlContextNodeFactory factory) {
- return ((OrmXml2_0ContextNodeFactory) factory).buildOrmElementCollectionMapping2_0(parent, (XmlElementCollection) xmlMapping);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java
deleted file mode 100644
index eb31b52553..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
-
-public class OrmElementCollectionTemporalConverterValidator extends AbstractTemporalConverterValidator
-{
-
- public OrmElementCollectionTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
- }
-
- @Override
- protected OrmElementCollectionMapping2_0 getAttributeMapping() {
- return (OrmElementCollectionMapping2_0) super.getAttributeMapping();
- }
-
- @Override
- protected String getTypeName() {
- return this.getAttributeMapping().getFullyQualifiedTargetClass();
- }
-
- @Override
- protected String getInvalidTemporalMappingType() {
- return JpaValidationMessages.PERSISTENT_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE;
- }
-
- @Override
- protected String getVirtualAttributeInvalidTemporalMappingType() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java
deleted file mode 100644
index 1e37f03c99..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionMapping2_0;
-
-public class OrmMapKeyTemporalConverterValidator extends AbstractTemporalConverterValidator
-{
-
- public OrmMapKeyTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
- }
-
- @Override
- protected OrmCollectionMapping2_0 getAttributeMapping() {
- return (OrmCollectionMapping2_0) super.getAttributeMapping();
- }
-
- @Override
- protected String getTypeName() {
- return this.getAttributeMapping().getFullyQualifiedMapKeyClass();
- }
-
- @Override
- protected String getInvalidTemporalMappingType() {
- return JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE;
- }
-
- @Override
- protected String getVirtualAttributeInvalidTemporalMappingType() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java
deleted file mode 100644
index 15a5e743bb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-
-public class OrmTemporalConverterValidator extends AbstractTemporalConverterValidator
-{
-
- public OrmTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
- }
-
- @Override
- protected String getTypeName() {
- return this.getPersistentAttribute().getTypeName();
- }
-
- @Override
- protected String getInvalidTemporalMappingType() {
- return JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE;
- }
-
- @Override
- protected String getVirtualAttributeInvalidTemporalMappingType() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java
deleted file mode 100644
index cc6131ac51..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.jpa2.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.connection.GenericConnection2_0;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.options.GenericOptions2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.connection.JpaConnection2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.JpaOptions2_0;
-
-
-public class Generic2_0PersistenceXmlContextNodeFactory extends AbstractPersistenceXmlContextNodeFactory
-{
-
- public JpaConnection2_0 buildConnection(PersistenceUnit parent) {
- return new GenericConnection2_0(parent);
- }
-
- public JpaOptions2_0 buildOptions(PersistenceUnit parent) {
- return new GenericOptions2_0(parent);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java
deleted file mode 100644
index c2ea049fd9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.internal.jpa2.context.persistence;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Factory;
-
-public class Generic2_0PersistenceXmlDefinition
- extends AbstractPersistenceXmlDefinition
-{
- // singleton
- private static final PersistenceXmlDefinition INSTANCE = new Generic2_0PersistenceXmlDefinition();
-
- /**
- * Return the singleton
- */
- public static PersistenceXmlDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private Generic2_0PersistenceXmlDefinition() {
- super();
- }
-
- public JptResourceType getResourceType() {
- return JptJpaCorePlugin.PERSISTENCE_XML_2_0_RESOURCE_TYPE;
- }
-
- public EFactory getResourceNodeFactory() {
- return PersistenceV2_0Factory.eINSTANCE;
- }
-
- @Override
- protected PersistenceXmlContextNodeFactory buildContextNodeFactory() {
- return new Generic2_0PersistenceXmlContextNodeFactory();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java
deleted file mode 100644
index f8129b5932..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 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.jpa.core.internal.jpa2.context.persistence.connection;
-
-import java.util.Map;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.connection.JpaConnection2_0;
-
-/**
- * GenericConnection2_0
- */
-public class GenericConnection2_0 extends AbstractPersistenceUnitProperties
- implements JpaConnection2_0
-{
- // ********** GenericConnection properties **********
- private String driver;
- private String url;
- private String user;
- private String password;
-
-
- // ********** constructors **********
- public GenericConnection2_0(PersistenceUnit parent) {
- super(parent);
- }
-
- // ********** initialization **********
- /**
- * Initializes properties with values from the persistence unit.
- */
- @Override
- protected void initializeProperties() {
- this.driver =
- this.getStringValue(PERSISTENCE_JDBC_DRIVER);
- this.url =
- this.getStringValue(PERSISTENCE_JDBC_URL);
- this.user =
- this.getStringValue(PERSISTENCE_JDBC_USER);
- this.password =
- this.getStringValue(PERSISTENCE_JDBC_PASSWORD);
- }
-
- // ********** behavior **********
-
- public void propertyValueChanged(String propertyName, String newValue) {
- if (propertyName.equals(PERSISTENCE_JDBC_DRIVER)) {
- this.driverChanged(newValue);
- }
- else if (propertyName.equals(PERSISTENCE_JDBC_URL)) {
- this.urlChanged(newValue);
- }
- else if (propertyName.equals(PERSISTENCE_JDBC_USER)) {
- this.userChanged(newValue);
- }
- else if (propertyName.equals(PERSISTENCE_JDBC_PASSWORD)) {
- this.passwordChanged(newValue);
- }
- }
-
- public void propertyRemoved(String propertyName) {
- if (propertyName.equals(PERSISTENCE_JDBC_DRIVER)) {
- this.driverChanged(null);
- }
- else if (propertyName.equals(PERSISTENCE_JDBC_URL)) {
- this.urlChanged(null);
- }
- else if (propertyName.equals(PERSISTENCE_JDBC_USER)) {
- this.userChanged(null);
- }
- else if (propertyName.equals(PERSISTENCE_JDBC_PASSWORD)) {
- this.passwordChanged(null);
- }
- }
-
- /**
- * Adds property names key/value pairs, where:
- * key = PU property key
- * value = property id
- */
- @Override
- protected void addPropertyNames(Map<String, String> propertyNames) {
- propertyNames.put(
- PERSISTENCE_JDBC_DRIVER,
- DRIVER_PROPERTY);
- propertyNames.put(
- PERSISTENCE_JDBC_URL,
- URL_PROPERTY);
- propertyNames.put(
- PERSISTENCE_JDBC_USER,
- USER_PROPERTY);
- propertyNames.put(
- PERSISTENCE_JDBC_PASSWORD,
- PASSWORD_PROPERTY);
- }
-
- // ********** Driver **********
- public String getDriver() {
- return this.driver;
- }
-
- public void setDriver(String newDriver) {
- String old = this.driver;
- this.driver = newDriver;
- this.putProperty(DRIVER_PROPERTY, newDriver);
- this.firePropertyChanged(DRIVER_PROPERTY, old, newDriver);
- }
-
- private void driverChanged(String newValue) {
- String old = this.driver;
- this.driver = newValue;
- this.firePropertyChanged(DRIVER_PROPERTY, old, newValue);
- }
-
- public String getDefaultDriver() {
- return DEFAULT_JDBC_DRIVER;
- }
-
- // ********** URL **********
- public String getUrl() {
- return this.url;
- }
-
- public void setUrl(String newUrl) {
- String old = this.url;
- this.url = newUrl;
- this.putProperty(URL_PROPERTY, newUrl);
- this.firePropertyChanged(URL_PROPERTY, old, newUrl);
- }
-
- private void urlChanged(String newValue) {
- String old = this.url;
- this.url = newValue;
- this.firePropertyChanged(URL_PROPERTY, old, newValue);
- }
-
- public String getDefaultUrl() {
- return DEFAULT_JDBC_URL;
- }
-
- // ********** User **********
- public String getUser() {
- return this.user;
- }
-
- public void setUser(String newUser) {
- String old = this.user;
- this.user = newUser;
- this.putProperty(USER_PROPERTY, newUser);
- this.firePropertyChanged(USER_PROPERTY, old, newUser);
- }
-
- private void userChanged(String newValue) {
- String old = this.user;
- this.user = newValue;
- this.firePropertyChanged(USER_PROPERTY, old, newValue);
- }
-
- public String getDefaultUser() {
- return DEFAULT_JDBC_USER;
- }
-
- // ********** Password **********
- public String getPassword() {
- return this.password;
- }
-
- public void setPassword(String newPassword) {
- String old = this.password;
- this.password = newPassword;
- this.putProperty(PASSWORD_PROPERTY, newPassword);
- this.firePropertyChanged(PASSWORD_PROPERTY, old, newPassword);
- }
-
- private void passwordChanged(String newValue) {
- String old = this.password;
- this.password = newValue;
- this.firePropertyChanged(PASSWORD_PROPERTY, old, newValue);
- }
-
- public String getDefaultPassword() {
- return DEFAULT_JDBC_PASSWORD;
- }
-
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java
deleted file mode 100644
index 0131c28cb9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 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.jpa.core.internal.jpa2.context.persistence.connection;
-
-import java.util.Map;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.connection.JpaConnection2_0;
-
-/**
- * GenericConnection2_0
- */
-public class NullConnection2_0 extends AbstractPersistenceUnitProperties
- implements JpaConnection2_0
-{
-
-
- // ********** constructors **********
- public NullConnection2_0(PersistenceUnit parent) {
- super(parent);
- }
-
- // ********** initialization **********
- /**
- * Initializes properties with values from the persistence unit.
- */
- @Override
- protected void initializeProperties() {
- //do nothing
- }
-
- // ********** behavior **********
-
- public void propertyValueChanged(String propertyName, String newValue) {
- //do nothing
- }
-
- public void propertyRemoved(String propertyName) {
- //do nothing
- }
-
- /**
- * Adds property names key/value pairs, where:
- * key = PU property key
- * value = property id
- */
- @Override
- protected void addPropertyNames(Map<String, String> propertyNames) {
- //do nothing
- }
-
- // ********** Driver **********
- public String getDriver() {
- return null;
- }
-
- public void setDriver(String newDriver) {
- throw new UnsupportedOperationException();
- }
-
- public String getDefaultDriver() {
- return DEFAULT_JDBC_DRIVER;
- }
-
- // ********** URL **********
- public String getUrl() {
- return null;
- }
-
- public void setUrl(String newUrl) {
- throw new UnsupportedOperationException();
- }
-
- public String getDefaultUrl() {
- return DEFAULT_JDBC_URL;
- }
-
- // ********** User **********
- public String getUser() {
- return null;
- }
-
- public void setUser(String newUser) {
- throw new UnsupportedOperationException();
- }
-
- public String getDefaultUser() {
- return DEFAULT_JDBC_USER;
- }
-
- // ********** Password **********
- public String getPassword() {
- return null;
- }
-
- public void setPassword(String newPassword) {
- throw new UnsupportedOperationException();
- }
-
- public String getDefaultPassword() {
- return DEFAULT_JDBC_PASSWORD;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java
deleted file mode 100644
index 48cf290337..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa2.context.persistence.options;
-
-import java.util.List;
-import java.util.Map;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.JpaOptions2_0;
-
-/**
- * JPA 2.0 options
- */
-public class GenericOptions2_0 extends AbstractPersistenceUnitProperties
- implements JpaOptions2_0
-{
- // ********** GenericConnection properties **********
- private Integer lockTimeout;
- private Integer queryTimeout;
- private List<String> validationGroupPrePersists;
- private List<String> validationGroupPreUpdates;
- private List<String> validationGroupPreRemoves;
-
- // ********** constructors **********
- public GenericOptions2_0(PersistenceUnit parent) {
- super(parent);
- }
-
- // ********** initialization **********
- /**
- * Initializes properties with values from the persistence unit.
- */
- @Override
- protected void initializeProperties() {
- this.lockTimeout =
- this.getIntegerValue(PERSISTENCE_LOCK_TIMEOUT);
- this.queryTimeout =
- this.getIntegerValue(PERSISTENCE_QUERY_TIMEOUT);
-
- // ValidationMode is initialized with the persistence unit element
- this.validationGroupPrePersists = this.getCompositeValue(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST);
- this.validationGroupPreUpdates = this.getCompositeValue(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE);
- this.validationGroupPreRemoves = this.getCompositeValue(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE);
- }
-
- // ********** behavior **********
-
- public void propertyValueChanged(String propertyName, String newValue) {
- if (propertyName.equals(PERSISTENCE_LOCK_TIMEOUT)) {
- this.lockTimeoutChanged(newValue);
- }
- else if (propertyName.equals(PERSISTENCE_QUERY_TIMEOUT)) {
- this.queryTimeoutChanged(newValue);
- }
- else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST)) {
- this.validationGroupPrePersistsChanged();
- }
- else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE)) {
- this.validationGroupPreUpdatesChanged();
- }
- else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE)) {
- this.validationGroupPreRemovesChanged();
- }
- }
-
- public void propertyRemoved(String propertyName) {
- if (propertyName.equals(PERSISTENCE_LOCK_TIMEOUT)) {
- this.lockTimeoutChanged(null);
- }
- else if (propertyName.equals(PERSISTENCE_QUERY_TIMEOUT)) {
- this.queryTimeoutChanged(null);
- }
- else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST)) {
- this.validationGroupPrePersistsChanged();
- }
- else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE)) {
- this.validationGroupPreUpdatesChanged();
- }
- else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE)) {
- this.validationGroupPreRemovesChanged();
- }
- }
-
- /**
- * Adds property names key/value pairs, where:
- * key = PU property key
- * value = property id
- */
- @Override
- protected void addPropertyNames(Map<String, String> propertyNames) {
- propertyNames.put(
- PERSISTENCE_LOCK_TIMEOUT,
- LOCK_TIMEOUT_PROPERTY);
- propertyNames.put(
- PERSISTENCE_QUERY_TIMEOUT,
- QUERY_TIMEOUT_PROPERTY);
- propertyNames.put(
- PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST,
- VALIDATION_GROUP_PRE_PERSIST_PROPERTY);
- propertyNames.put(
- PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE,
- VALIDATION_GROUP_PRE_UPDATE_PROPERTY);
- propertyNames.put(
- PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE,
- VALIDATION_GROUP_PRE_REMOVE_PROPERTY);
- }
-
- @Override
- public PersistenceUnit2_0 getPersistenceUnit() {
- return (PersistenceUnit2_0) super.getPersistenceUnit();
- }
-
- // ********** LockTimeout **********
- public Integer getLockTimeout() {
- return this.lockTimeout;
- }
-
- public void setLockTimeout(Integer newLockTimeout) {
- Integer old = this.lockTimeout;
- this.lockTimeout = newLockTimeout;
- this.putProperty(LOCK_TIMEOUT_PROPERTY, newLockTimeout);
- this.firePropertyChanged(LOCK_TIMEOUT_PROPERTY, old, newLockTimeout);
- }
-
- private void lockTimeoutChanged(String stringValue) {
- Integer newValue = getIntegerValueOf(stringValue);
-
- Integer old = this.lockTimeout;
- this.lockTimeout = newValue;
- this.firePropertyChanged(LOCK_TIMEOUT_PROPERTY, old, newValue);
- }
-
- public Integer getDefaultLockTimeout() {
- return DEFAULT_LOCK_TIMEOUT;
- }
-
- // ********** QueryTimeout **********
- public Integer getQueryTimeout() {
- return this.queryTimeout;
- }
-
- public void setQueryTimeout(Integer newQueryTimeout) {
- Integer old = this.queryTimeout;
- this.queryTimeout = newQueryTimeout;
- this.putProperty(QUERY_TIMEOUT_PROPERTY, newQueryTimeout);
- this.firePropertyChanged(QUERY_TIMEOUT_PROPERTY, old, newQueryTimeout);
- }
-
- private void queryTimeoutChanged(String stringValue) {
- Integer newValue = getIntegerValueOf(stringValue);
-
- Integer old = this.queryTimeout;
- this.queryTimeout = newValue;
- this.firePropertyChanged(QUERY_TIMEOUT_PROPERTY, old, newValue);
- }
-
- public Integer getDefaultQueryTimeout() {
- return DEFAULT_QUERY_TIMEOUT;
- }
-
- // ********** ValidationGroupPrePersists **********
- public ListIterable<String> getValidationGroupPrePersists(){
- return new LiveCloneListIterable<String>(this.validationGroupPrePersists);
- }
-
- public int getValidationGroupPrePersistsSize(){
- return this.validationGroupPrePersists.size();
- }
-
- public boolean validationGroupPrePersistExists(String validationGroupPrePersistClassName) {
- for (String validationGroupPrePersist : this.validationGroupPrePersists) {
- if(validationGroupPrePersist.equals(validationGroupPrePersistClassName)) {
- return true;
- }
- }
- return false;
- }
-
- public String addValidationGroupPrePersist(String newPrePersistClassName){
-
- if( ! this.validationGroupPrePersistExists(newPrePersistClassName)) {
- this.validationGroupPrePersists.add(newPrePersistClassName);
- this.putPropertyCompositeValue(VALIDATION_GROUP_PRE_PERSIST_PROPERTY, newPrePersistClassName);
- this.fireListChanged(VALIDATION_GROUP_PRE_PERSIST_LIST, this.validationGroupPrePersists);
- return newPrePersistClassName;
- }
- return null;
- }
-
- public void removeValidationGroupPrePersist(String className){
-
- if(this.removeValidationGroupPrePersist_(className) != null) {
- this.removePropertyCompositeValue(VALIDATION_GROUP_PRE_PERSIST_PROPERTY, className);
- this.fireListChanged(VALIDATION_GROUP_PRE_PERSIST_LIST, this.validationGroupPrePersists);
- }
- }
-
- private String removeValidationGroupPrePersist_(String className){
-
- for ( String validationGroupPrePersist : this.getValidationGroupPrePersists()) {
- if(validationGroupPrePersist.equals(className)) {
- this.validationGroupPrePersists.remove(validationGroupPrePersist);
- return validationGroupPrePersist;
- }
- }
- return null;
- }
-
- private void validationGroupPrePersistsChanged() {
- this.validationGroupPrePersists = this.getCompositeValue(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST);
- this.fireListChanged(VALIDATION_GROUP_PRE_PERSIST_LIST, this.validationGroupPrePersists);
- }
-
- // ********** ValidationGroupPreUpdates **********
-
- public ListIterable<String> getValidationGroupPreUpdates(){
- return new LiveCloneListIterable<String>(this.validationGroupPreUpdates);
- }
-
- public int getValidationGroupPreUpdatesSize(){
- return this.validationGroupPreUpdates.size();
- }
-
- public boolean validationGroupPreUpdateExists(String validationGroupPreUpdateClassName) {
-
- for (String validationGroupPreUpdate : this.validationGroupPreUpdates) {
- if(validationGroupPreUpdate.equals(validationGroupPreUpdateClassName)) {
- return true;
- }
- }
- return false;
- }
-
- public String addValidationGroupPreUpdate(String newPreUpdateClassName){
-
- if( ! this.validationGroupPreUpdateExists(newPreUpdateClassName)) {
- this.validationGroupPreUpdates.add(newPreUpdateClassName);
- this.putPropertyCompositeValue(VALIDATION_GROUP_PRE_UPDATE_PROPERTY, newPreUpdateClassName);
- this.fireListChanged(VALIDATION_GROUP_PRE_UPDATE_LIST, this.validationGroupPreUpdates);
- return newPreUpdateClassName;
- }
- return null;
- }
-
- public void removeValidationGroupPreUpdate(String className){
-
- if(this.removeValidationGroupPreUpdate_(className) != null) {
- this.removePropertyCompositeValue(VALIDATION_GROUP_PRE_UPDATE_PROPERTY, className);
- this.fireListChanged(VALIDATION_GROUP_PRE_UPDATE_LIST, this.validationGroupPreUpdates);
- }
- }
-
- private String removeValidationGroupPreUpdate_(String className){
-
- for(String validationGroupPreUpdate : this.getValidationGroupPreUpdates()) {
- if(validationGroupPreUpdate.equals(className)) {
- this.validationGroupPreUpdates.remove(validationGroupPreUpdate);
- return validationGroupPreUpdate;
- }
- }
- return null;
- }
-
- private void validationGroupPreUpdatesChanged() {
- this.validationGroupPreUpdates = this.getCompositeValue(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE);
- this.fireListChanged(VALIDATION_GROUP_PRE_UPDATE_LIST, this.validationGroupPreUpdates);
- }
-
- // ********** ValidationGroupPreRemoves **********
-
- public ListIterable<String> getValidationGroupPreRemoves(){
- return new LiveCloneListIterable<String>(this.validationGroupPreRemoves);
- }
-
- public int getValidationGroupPreRemovesSize(){
- return this.validationGroupPreRemoves.size();
- }
-
- public boolean validationGroupPreRemoveExists(String validationGroupPreRemoveClassName) {
-
- for (String validationGroupPreRemove : this.validationGroupPreRemoves) {
- if(validationGroupPreRemove.equals(validationGroupPreRemoveClassName)) {
- return true;
- }
- }
- return false;
- }
-
- public String addValidationGroupPreRemove(String newPreRemoveClassName){
-
- if( ! this.validationGroupPreRemoveExists(newPreRemoveClassName)) {
- this.validationGroupPreRemoves.add(newPreRemoveClassName);
- this.putPropertyCompositeValue(VALIDATION_GROUP_PRE_REMOVE_PROPERTY, newPreRemoveClassName);
- this.fireListChanged(VALIDATION_GROUP_PRE_REMOVE_LIST, this.validationGroupPreRemoves);
- return newPreRemoveClassName;
- }
- return null;
- }
-
- public void removeValidationGroupPreRemove(String className){
-
- if(this.removeValidationGroupPreRemove_(className) != null) {
- this.removePropertyCompositeValue(VALIDATION_GROUP_PRE_REMOVE_PROPERTY, className);
- this.fireListChanged(VALIDATION_GROUP_PRE_REMOVE_LIST, this.validationGroupPreRemoves);
- }
- }
-
- private String removeValidationGroupPreRemove_(String className){
-
- for(String validationGroupPreRemove : this.getValidationGroupPreRemoves()) {
- if(validationGroupPreRemove.equals(className)) {
- this.validationGroupPreRemoves.remove(validationGroupPreRemove);
- return validationGroupPreRemove;
- }
- }
- return null;
- }
-
- private void validationGroupPreRemovesChanged() {
- this.validationGroupPreRemoves = this.getCompositeValue(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE);
- this.fireListChanged(VALIDATION_GROUP_PRE_REMOVE_LIST, this.validationGroupPreRemoves);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/NullOptions2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/NullOptions2_0.java
deleted file mode 100644
index 4ef13a055e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/persistence/options/NullOptions2_0.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa2.context.persistence.options;
-
-import java.util.Map;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.JpaOptions2_0;
-
-/**
- * JPA 2.0 options
- */
-public class NullOptions2_0 extends AbstractPersistenceUnitProperties
- implements JpaOptions2_0
-{
-
-
- // ********** constructors **********
- public NullOptions2_0(PersistenceUnit parent) {
- super(parent);
- }
-
- // ********** initialization **********
- /**
- * Initializes properties with values from the persistence unit.
- */
- @Override
- protected void initializeProperties() {
- //do nothing
- }
-
- // ********** behavior **********
-
- public void propertyValueChanged(String propertyName, String newValue) {
- //do nothing
- }
-
- public void propertyRemoved(String propertyName) {
- //do nothing
- }
-
- /**
- * Adds property names key/value pairs, where:
- * key = PU property key
- * value = property id
- */
- @Override
- protected void addPropertyNames(Map<String, String> propertyNames) {
- //do nothing
- }
-
- // ********** LockTimeout **********
- public Integer getLockTimeout() {
- return null;
- }
-
- public void setLockTimeout(Integer newLockTimeout) {
- throw new UnsupportedOperationException();
- }
-
- public Integer getDefaultLockTimeout() {
- return DEFAULT_LOCK_TIMEOUT;
- }
-
- // ********** QueryTimeout **********
- public Integer getQueryTimeout() {
- return null;
- }
-
- public void setQueryTimeout(Integer newQueryTimeout) {
- throw new UnsupportedOperationException();
- }
-
- public Integer getDefaultQueryTimeout() {
- return DEFAULT_QUERY_TIMEOUT;
- }
-
-
- // ********** ValidationGroupPrePersists **********
- public ListIterable<String> getValidationGroupPrePersists() {
- return EmptyListIterable.instance();
- }
-
- public int getValidationGroupPrePersistsSize() {
- return 0;
- }
-
- public boolean validationGroupPrePersistExists(String validationGroupPrePersistClassName) {
- return false;
- }
-
- public String addValidationGroupPrePersist(String newValidationGroupPrePersistClassName) {
- throw new UnsupportedOperationException();
- }
-
- public void removeValidationGroupPrePersist(String validationGroupPrePersistClassName) {
- throw new UnsupportedOperationException();
- }
-
- // ********** ValidationGroupPreUpdates **********
- public ListIterable<String> getValidationGroupPreUpdates() {
- return EmptyListIterable.instance();
- }
-
- public int getValidationGroupPreUpdatesSize() {
- return 0;
- }
-
- public boolean validationGroupPreUpdateExists(String validationGroupPreUpdateClassName) {
- return false;
- }
-
- public String addValidationGroupPreUpdate(String newValidationGroupPreUpdateClassName) {
- throw new UnsupportedOperationException();
- }
-
- public void removeValidationGroupPreUpdate(String validationGroupPreUpdateClassName) {
- throw new UnsupportedOperationException();
- }
-
- // ********** ValidationGroupPreRemoves **********
- public ListIterable<String> getValidationGroupPreRemoves() {
- return EmptyListIterable.instance();
- }
-
- public int getValidationGroupPreRemovesSize() {
- return 0;
- }
-
- public boolean validationGroupPreRemoveExists(String validationGroupPreRemoveClassName) {
- return false;
- }
-
- public String addValidationGroupPreRemove(String newValidationGroupPreRemoveClassName) {
- throw new UnsupportedOperationException();
- }
-
- public void removeValidationGroupPreRemove(String validationGroupPreRemoveClassName) {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
deleted file mode 100644
index 86549e3f5c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryAccess2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceAccess2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-
-/**
- * javax.persistence.Access
- */
-public final class Access2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new Access2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private Access2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceAccess2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullAccess2_0Annotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryAccess2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return Access2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
deleted file mode 100644
index c6af80ab76..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryAssociationOverride2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceAssociationOverride2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.AssociationOverride
- */
-public final class AssociationOverride2_0AnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new AssociationOverride2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private AssociationOverride2_0AnnotationDefinition() {
- super();
- }
-
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceAssociationOverride2_0Annotation.buildSourceAssociationOverrideAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryAssociationOverride2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.ASSOCIATION_OVERRIDE;
- }
-
- public String getContainerAnnotationName() {
- return JPA.ASSOCIATION_OVERRIDES;
- }
-
- public String getElementName() {
- return JPA.ASSOCIATION_OVERRIDES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
deleted file mode 100644
index b46f96c619..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryCacheable2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceCacheable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Cacheable2_0Annotation;
-
-/**
- * javax.persistence.Cacheable
- */
-public final class Cacheable2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new Cacheable2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private Cacheable2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceCacheable2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryCacheable2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return Cacheable2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
deleted file mode 100644
index d898e2e2bd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryCollectionTable2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceCollectionTable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-
-/**
- * javax.persistence.CollectionTable
- */
-public final class CollectionTable2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new CollectionTable2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private CollectionTable2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceCollectionTable2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullCollectionTable2_0Annotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryCollectionTable2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return CollectionTable2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
deleted file mode 100644
index 1606cb9293..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryElementCollection2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceElementCollection2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ElementCollection2_0Annotation;
-
-/**
- * javax.persistence.ElementCollection
- */
-public final class ElementCollection2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new ElementCollection2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private ElementCollection2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceElementCollection2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryElementCollection2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ElementCollection2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
deleted file mode 100644
index 347b781d01..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryGeneratedAnnotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceGeneratedAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.GeneratedAnnotation;
-
-/**
- * javax.annotation.Generated
- */
-public final class GeneratedAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final GeneratedAnnotationDefinition INSTANCE = new GeneratedAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static GeneratedAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private GeneratedAnnotationDefinition() {
- super();
- }
-
- public GeneratedAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceGeneratedAnnotation(parent, annotatedElement);
- }
-
- public GeneratedAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public GeneratedAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryGeneratedAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return GeneratedAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
deleted file mode 100644
index 2b6168c2ec..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryMapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceMapKeyClass2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-
-/**
- * javax.persistence.MapKeyClass
- */
-public final class MapKeyClass2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapKeyClass2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyClass2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMapKeyClass2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMapKeyClass2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyClass2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
deleted file mode 100644
index 9cb89d9c70..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryMapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceMapKeyColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-
-/**
- * javax.persistence.MapKeyColumn
- */
-public final class MapKeyColumn2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapKeyColumn2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyColumn2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMapKeyColumn2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullMapKeyColumnAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMapKeyColumn2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyColumn2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
deleted file mode 100644
index f529e3baa5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryMapKeyEnumerated2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceMapKeyEnumerated2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-
-/**
- * javax.persistence.MapKeyTemporal
- */
-public final class MapKeyEnumerated2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapKeyEnumerated2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyEnumerated2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMapKeyEnumerated2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullMapKeyEnumerated2_0Annotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMapKeyEnumerated2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
deleted file mode 100644
index 94d71a1a50..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryMapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceMapKeyJoinColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * javax.persistence.MapKeyJoinColumn
- */
-public final class MapKeyJoinColumn2_0AnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new MapKeyJoinColumn2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyJoinColumn2_0AnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceMapKeyJoinColumn2_0Annotation.buildSourceMapKeyJoinColumnAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryMapKeyJoinColumn2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN;
- }
-
- public String getContainerAnnotationName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMNS;
- }
-
- public String getElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMNS__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
deleted file mode 100644
index 34b7b7c09b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * javax.persistence.MapKeyJoinColumns
- */
-public final class MapKeyJoinColumns2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapKeyJoinColumns2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyJoinColumns2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMNS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
deleted file mode 100644
index 7275995d17..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 201 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryMapKeyTemporal2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceMapKeyTemporal2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-
-/**
- * javax.persistence.MapKeyTemporal
- */
-public final class MapKeyTemporal2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapKeyTemporal2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyTemporal2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMapKeyTemporal2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullMapKeyTemporal2_0Annotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMapKeyTemporal2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
deleted file mode 100644
index 2f4c550557..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryMapsId2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceMapsId2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-
-/**
- * javax.persistence.MapsId
- */
-public class MapsId2_0AnnotationDefinition implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapsId2_0AnnotationDefinition();
-
-
- /**
- * Return the singleton
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private MapsId2_0AnnotationDefinition() {
- super();
- }
-
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMapsId2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullMapsId2_0Annotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMapsId2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapsId2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
deleted file mode 100644
index 1890065719..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryNamedQuery2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceNamedQuery2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.NamedQuery
- */
-public class NamedQuery2_0AnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new NamedQuery2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private NamedQuery2_0AnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceNamedQuery2_0Annotation.buildSourceNamedQueryAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryNamedQuery2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.NAMED_QUERY;
- }
-
- public String getContainerAnnotationName() {
- return JPA.NAMED_QUERIES;
- }
-
- public String getElementName() {
- return JPA.NAMED_QUERIES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java
deleted file mode 100644
index 3531d4a478..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.AccessType;
-
-/**
- * <code>javax.persistence.Access</code>
- */
-public final class NullAccess2_0Annotation
- extends NullAnnotation<Access2_0Annotation>
- implements Access2_0Annotation
-{
-
- protected NullAccess2_0Annotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** value
- public AccessType getValue() {
- return null;
- }
-
- public void setValue(AccessType value) {
- if (value != null) {
- this.addAnnotation().setValue(value);
- }
- }
-
- public TextRange getValueTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java
deleted file mode 100644
index 2393ed2dd2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.AssociationOverride2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * <code>javax.persistence.JoinTable</code> found in a
- * <code>javax.persistence.AssociationOverride</code> annotation
- */
-public final class NullAssociationOverrideJoinTableAnnotation
- extends NullJoinTableAnnotation
-{
- public NullAssociationOverrideJoinTableAnnotation(AssociationOverride2_0Annotation parent) {
- super(parent);
- }
-
- private AssociationOverride2_0Annotation getAssociationOverride2_0Annotation() {
- return (AssociationOverride2_0Annotation) this.parent;
- }
-
- @Override
- protected JoinTableAnnotation addAnnotation() {
- return this.getAssociationOverride2_0Annotation().addJoinTable();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java
deleted file mode 100644
index 8d92f4a687..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-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.resource.java.NullBaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.CollectionTable</code>
- */
-public final class NullCollectionTable2_0Annotation
- extends NullBaseTableAnnotation<CollectionTable2_0Annotation>
- implements CollectionTable2_0Annotation
-{
- public NullCollectionTable2_0Annotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** join columns
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return EmptyListIterable.instance();
- }
-
- public int getJoinColumnsSize() {
- return 0;
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return null;
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- // the CollectionTable annotation is missing, add both it and a join column at the same time
- return this.addAnnotation().addJoinColumn(index);
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java
deleted file mode 100644
index a0a65f8706..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullCompleteColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyColumn</code>
- */
-public final class NullMapKeyColumnAnnotation
- extends NullCompleteColumnAnnotation<MapKeyColumn2_0Annotation>
- implements MapKeyColumn2_0Annotation
-{
- public NullMapKeyColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java
deleted file mode 100644
index 2966135224..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullBaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyEnumerated</code>
- */
-public final class NullMapKeyEnumerated2_0Annotation
- extends NullBaseEnumeratedAnnotation<MapKeyEnumerated2_0Annotation>
- implements MapKeyEnumerated2_0Annotation
-{
- protected NullMapKeyEnumerated2_0Annotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyJoinColumnAnnotation.java
deleted file mode 100644
index ae0bfdfb0d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyJoinColumnAnnotation.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullBaseColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyJoinColumn</code>
- */
-public final class NullMapKeyJoinColumnAnnotation
- extends NullBaseColumnAnnotation<MapKeyJoinColumn2_0Annotation>
- implements MapKeyJoinColumn2_0Annotation
-{
- public NullMapKeyJoinColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** referenced column name
- public String getReferencedColumnName() {
- return null;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- throw new UnsupportedOperationException();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return null;
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java
deleted file mode 100644
index 2ee372f702..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullBaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyTemporal</code>
- */
-public final class NullMapKeyTemporal2_0Annotation
- extends NullBaseTemporalAnnotation<MapKeyTemporal2_0Annotation>
- implements MapKeyTemporal2_0Annotation
-{
- protected NullMapKeyTemporal2_0Annotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java
deleted file mode 100644
index 471c3ab752..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-
-/**
- * <code>javax.persistence.MapsId</code>
- */
-public final class NullMapsId2_0Annotation
- extends NullAnnotation<MapsId2_0Annotation>
- implements MapsId2_0Annotation
-{
- protected NullMapsId2_0Annotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** value
- public String getValue() {
- return null;
- }
-
- public void setValue(String newValue) {
- if (newValue != null) {
- this.addAnnotation().setValue(newValue);
- }
- }
-
- public TextRange getValueTextRange() {
- return null;
- }
-
- public boolean valueTouches(int pos) {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java
deleted file mode 100644
index 3ccac42369..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullNamedColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.OrderColumn</code>
- */
-public final class NullOrderColumn2_0Annotation
- extends NullNamedColumnAnnotation<OrderColumn2_0Annotation>
- implements OrderColumn2_0Annotation
-{
- public NullOrderColumn2_0Annotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** updatable
- public Boolean getUpdatable() {
- return null;
- }
-
- public void setUpdatable(Boolean updatable) {
- if (updatable != null) {
- this.addAnnotation().setUpdatable(updatable);
- }
- }
-
- public TextRange getUpdatableTextRange() {
- return null;
- }
-
- // ***** insertable
- public Boolean getInsertable() {
- return null;
- }
-
- public void setInsertable(Boolean insertable) {
- if (insertable != null) {
- this.addAnnotation().setInsertable(insertable);
- }
- }
-
- public TextRange getInsertableTextRange() {
- return null;
- }
-
- // ***** nullable
- public Boolean getNullable() {
- return null;
- }
-
- public void setNullable(Boolean nullable) {
- if (nullable != null) {
- this.addAnnotation().setNullable(nullable);
- }
- }
-
- public TextRange getNullableTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
deleted file mode 100644
index d43bcb3c79..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryOrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceOrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-
-/**
- * javax.persistence.OrderColumn
- */
-public final class OrderColumn2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new OrderColumn2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private OrderColumn2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceOrderColumn2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullOrderColumn2_0Annotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryOrderColumn2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return OrderColumn2_0Annotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
deleted file mode 100644
index 780423fae5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinarySequenceGenerator2_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceSequenceGenerator2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * javax.persistence.SequenceGenerator
- */
-public final class SequenceGenerator2_0AnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new SequenceGenerator2_0AnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private SequenceGenerator2_0AnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceSequenceGenerator2_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinarySequenceGenerator2_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return SequenceGeneratorAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
deleted file mode 100644
index 78cd576c44..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary.BinaryStaticMetamodelAnnotation;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source.SourceStaticMetamodelAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.StaticMetamodelAnnotation;
-
-/**
- * javax.persistence.metamodel.StaticMetamodel
- */
-public final class StaticMetamodelAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final StaticMetamodelAnnotationDefinition INSTANCE = new StaticMetamodelAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static StaticMetamodelAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private StaticMetamodelAnnotationDefinition() {
- super();
- }
-
- public StaticMetamodelAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceStaticMetamodelAnnotation(parent, annotatedElement);
- }
-
- public StaticMetamodelAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public StaticMetamodelAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryStaticMetamodelAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return StaticMetamodelAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java
deleted file mode 100644
index b5bc5f643a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.AccessType;
-
-/**
- * <code>javax.persistence.Access</code>
- */
-public final class BinaryAccess2_0Annotation
- extends BinaryAnnotation
- implements Access2_0Annotation
-{
- private AccessType value;
-
-
- public BinaryAccess2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** AccessAnnotation implementation **********
-
- // ***** value
- public AccessType getValue() {
- return this.value;
- }
-
- public void setValue(AccessType value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(AccessType value) {
- AccessType old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private AccessType buildValue() {
- return AccessType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA2_0.ACCESS));
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java
deleted file mode 100644
index ea89f2b714..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryAssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.AssociationOverride2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * BinarySequenceGenerator2_0Annotation
- */
-public final class BinaryAssociationOverride2_0Annotation
- extends BinaryAssociationOverrideAnnotation
- implements AssociationOverride2_0Annotation
-{
- private JoinTableAnnotation joinTable;
- private final JoinTableAnnotation nullJoinTable;
-
- public BinaryAssociationOverride2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.joinTable = this.buildJoinTable();
- this.nullJoinTable = this.buildNullJoinTable();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJoinTable();
- }
-
-
- // ********** AssociationOverride2_0Annotation implementation **********
-
- // ***** joinTable
- public JoinTableAnnotation getJoinTable() {
- return this.joinTable;
- }
-
- public JoinTableAnnotation getNonNullJoinTable() {
- return (this.joinTable != null) ? this.joinTable : this.nullJoinTable;
- }
-
- public JoinTableAnnotation addJoinTable() {
- throw new UnsupportedOperationException();
- }
-
- public void removeJoinTable() {
- throw new UnsupportedOperationException();
- }
-
- private JoinTableAnnotation buildJoinTable() {
- IAnnotation jdtJoinTable = this.getJdtJoinTable();
- return (jdtJoinTable == null) ? null : this.buildJoinTable(jdtJoinTable);
- }
-
- private JoinTableAnnotation buildNullJoinTable() {
- return new NullJoinTableAnnotation(this);
- }
-
- private JoinTableAnnotation buildJoinTable(IAnnotation jdtJoinTable) {
- return new BinaryJoinTableAnnotation(this, jdtJoinTable);
- }
-
- private IAnnotation getJdtJoinTable() {
- return (IAnnotation) this.getJdtMemberValue(JPA2_0.ASSOCIATION_OVERRIDE__JOIN_TABLE);
- }
-
- // TODO
- private void updateJoinTable() {
- throw new UnsupportedOperationException();
-// IAnnotation jdtJoinTable = this.getJdtJoinTable();
-// if (jdtJoinTable == null) {
-// this.setJoinTable(null);
-// } else {
-// if (this.column == null) {
-// this.setJoinTable(this.buildJoinTable(jdtJoinTable));
-// } else {
-// this.column.update(jdtJoinTable);
-// }
-// }
- }
-
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java
deleted file mode 100644
index 668705eb82..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Cacheable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * <code>javax.persistence.Cacheable</code>
- */
-public final class BinaryCacheable2_0Annotation
- extends BinaryAnnotation
- implements Cacheable2_0Annotation
-{
- private Boolean value;
-
-
- public BinaryCacheable2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** Cacheable2_0Annotation implementation **********
-
- // ***** value
- public Boolean getValue() {
- return this.value;
- }
-
- public void setValue(Boolean value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(Boolean value) {
- Boolean old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private Boolean buildValue() {
- return (Boolean) this.getJdtMemberValue(JPA2_0.CACHEABLE__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java
deleted file mode 100644
index 00024b61cb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryBaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * javax.persistence.CollectionTable
- */
-public final class BinaryCollectionTable2_0Annotation
- extends BinaryBaseTableAnnotation
- implements CollectionTable2_0Annotation
-{
- private final Vector<JoinColumnAnnotation> joinColumns;
-
-
- public BinaryCollectionTable2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.joinColumns = this.buildJoinColumns();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJoinColumns();
- }
-
-
- // ********** BinaryBaseTableAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA2_0.COLLECTION_TABLE__NAME;
- }
-
- @Override
- protected String getSchemaElementName() {
- return JPA2_0.COLLECTION_TABLE__SCHEMA;
- }
-
- @Override
- protected String getCatalogElementName() {
- return JPA2_0.COLLECTION_TABLE__CATALOG;
- }
-
- @Override
- protected String getUniqueConstraintElementName() {
- return JPA2_0.COLLECTION_TABLE__UNIQUE_CONSTRAINTS;
- }
-
-
- // ********** CollectionTable2_0Annotation implementation **********
-
- // ***** join columns
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return new LiveCloneListIterable<JoinColumnAnnotation>(this.joinColumns);
- }
-
- public int getJoinColumnsSize() {
- return this.joinColumns.size();
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return this.joinColumns.get(index);
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<JoinColumnAnnotation> buildJoinColumns() {
- Object[] jdtJoinColumns = this.getJdtMemberValues(JPA2_0.COLLECTION_TABLE__JOIN_COLUMNS);
- Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
- for (Object jdtJoinColumn : jdtJoinColumns) {
- result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
- }
- return result;
- }
-
- // TODO
- private void updateJoinColumns() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java
deleted file mode 100644
index 4339e40b0c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ElementCollection2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-
-/**
- * <code>javax.persistence.ElementCollection</code>
- */
-public class BinaryElementCollection2_0Annotation
- extends BinaryAnnotation
- implements ElementCollection2_0Annotation
-{
- private String targetClass;
- private FetchType fetch;
-
-
- public BinaryElementCollection2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.targetClass = this.buildTargetClass();
- this.fetch = this.buildFetch();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setTargetClass_(this.buildTargetClass());
- this.setFetch_(this.buildFetch());
- }
-
-
- // ********** ElementCollection2_0Annotation implementation **********
-
- // ***** target entity
- public String getTargetClass() {
- return this.targetClass;
- }
-
- public void setTargetClass(String targetClass) {
- throw new UnsupportedOperationException();
- }
-
- private void setTargetClass_(String targetClass) {
- String old = this.targetClass;
- this.targetClass = targetClass;
- this.firePropertyChanged(TARGET_CLASS_PROPERTY, old, targetClass);
- }
-
- private String buildTargetClass() {
- return (String) this.getJdtMemberValue(JPA2_0.ELEMENT_COLLECTION__TARGET_CLASS);
- }
-
- public TextRange getTargetClassTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** fully-qualified target entity class name
- public String getFullyQualifiedTargetClassName() {
- return this.targetClass;
- }
-
- // ***** fetch
- public FetchType getFetch() {
- return this.fetch;
- }
-
- public void setFetch(FetchType fetch) {
- throw new UnsupportedOperationException();
- }
-
- private void setFetch_(FetchType fetch) {
- FetchType old = this.fetch;
- this.fetch = fetch;
- this.firePropertyChanged(FETCH_PROPERTY, old, fetch);
- }
-
- private FetchType buildFetch() {
- return FetchType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA2_0.ELEMENT_COLLECTION__FETCH));
- }
-
- public TextRange getFetchTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java
deleted file mode 100644
index a8427a3af8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.GeneratedAnnotation;
-
-/**
- * javax.annotation.Generated
- */
-public final class BinaryGeneratedAnnotation
- extends BinaryAnnotation
- implements GeneratedAnnotation
-{
- private final Vector<String> values;
- private String date;
- private String comments;
-
-
- public BinaryGeneratedAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.values = this.buildValues();
- this.date = this.buildDate();
- this.comments = this.buildComments();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updateValues();
- this.setDate_(this.buildDate());
- this.setComments_(this.buildComments());
- }
-
- // TODO
- private void updateValues() {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** GeneratedAnnotation implementation **********
-
- // ***** values
- public ListIterable<String> getValues() {
- return new LiveCloneListIterable<String>(this.values);
- }
-
- public int getValuesSize() {
- return this.values.size();
- }
-
- public String getValue(int index) {
- return this.values.get(index);
- }
-
- private Vector<String> buildValues() {
- Object[] jdtValues = this.getJdtMemberValues(VALUE_ELEMENT_NAME);
- Vector<String> result = new Vector<String>(jdtValues.length);
- for (Object value : jdtValues) {
- result.add((String) value);
- }
- return result;
- }
-
- public void addValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- public void addValue(int index, String value) {
- throw new UnsupportedOperationException();
- }
-
- public void moveValue(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- public void removeValue(int index) {
- throw new UnsupportedOperationException();
- }
-
- // ***** date
- public String getDate() {
- return this.date;
- }
-
- public void setDate(String date) {
- throw new UnsupportedOperationException();
- }
-
- private void setDate_(String date) {
- String old = this.date;
- this.date = date;
- this.firePropertyChanged(DATE_PROPERTY, old, date);
- }
-
- private String buildDate() {
- return (String) this.getJdtMemberValue(DATE_ELEMENT_NAME);
- }
-
- // ***** comments
- public String getComments() {
- return this.comments;
- }
-
- public void setComments(String comments) {
- throw new UnsupportedOperationException();
- }
-
- private void setComments_(String comments) {
- String old = this.comments;
- this.comments = comments;
- this.firePropertyChanged(COMMENTS_PROPERTY, old, comments);
- }
-
- private String buildComments() {
- return (String) this.getJdtMemberValue(COMMENTS_ELEMENT_NAME);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java
deleted file mode 100644
index 56c8d4b590..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyClass</code>
- */
-public final class BinaryMapKeyClass2_0Annotation
- extends BinaryAnnotation
- implements MapKeyClass2_0Annotation
-{
- private String value;
-
-
- public BinaryMapKeyClass2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** MapKeyClass2_0Annotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA2_0.MAP_KEY_CLASS__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** fully-qualified class name
- /**
- * binary is already fully-qualified
- */
- public String getFullyQualifiedClassName() {
- return this.value;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java
deleted file mode 100644
index f4bfcb44c3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryCompleteColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyColumn</code>
- */
-public final class BinaryMapKeyColumn2_0Annotation
- extends BinaryCompleteColumnAnnotation
- implements MapKeyColumn2_0Annotation
-{
-
- public BinaryMapKeyColumn2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** BinaryNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA2_0.MAP_KEY_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA2_0.MAP_KEY_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** BinaryBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA2_0.MAP_KEY_COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__UPDATABLE;
- }
-
-
- // ********** BinaryCompleteColumnAnnotation implementation **********
-
- @Override
- protected String getLengthElementName() {
- return JPA2_0.MAP_KEY_COLUMN__LENGTH;
- }
-
- @Override
- protected String getPrecisionElementName() {
- return JPA2_0.MAP_KEY_COLUMN__PRECISION;
- }
-
- @Override
- protected String getScaleElementName() {
- return JPA2_0.MAP_KEY_COLUMN__SCALE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java
deleted file mode 100644
index 23b8d8af38..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryBaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyEnumerated</code>
- */
-public final class BinaryMapKeyEnumerated2_0Annotation
- extends BinaryBaseEnumeratedAnnotation
- implements MapKeyEnumerated2_0Annotation
-{
- public BinaryMapKeyEnumerated2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA2_0.MAP_KEY_ENUMERATED__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java
deleted file mode 100644
index 45573c6763..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryBaseJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyJoinColumn</code>
- */
-public final class BinaryMapKeyJoinColumn2_0Annotation
- extends BinaryBaseJoinColumnAnnotation
- implements MapKeyJoinColumn2_0Annotation
-{
-
- public BinaryMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** BinaryNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** BinaryBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__UPDATABLE;
- }
-
-
- // ********** BinaryBaseJoinColumnAnnotation implementation **********
-
- @Override
- protected String getReferencedColumnNameElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java
deleted file mode 100644
index 38b93134bc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryBaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyTemporal</code>
- */
-public final class BinaryMapKeyTemporal2_0Annotation
- extends BinaryBaseTemporalAnnotation
- implements MapKeyTemporal2_0Annotation
-{
- public BinaryMapKeyTemporal2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA2_0.MAP_KEY_TEMPORAL__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java
deleted file mode 100644
index f17fb8bc2b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-
-/**
- * <code>javax.persistence.MapsId</code>
- */
-public class BinaryMapsId2_0Annotation
- extends BinaryAnnotation
- implements MapsId2_0Annotation
-{
- private String value;
-
-
- public BinaryMapsId2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** MapsId2_0Annotation implementation **********
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String newValue) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String newValue) {
- String oldValue = this.value;
- this.value = newValue;
- this.firePropertyChanged(VALUE_PROPERTY, oldValue, newValue);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA2_0.MAPS_ID__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean valueTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java
deleted file mode 100644
index 6411cc13a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryNamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.NamedQuery2_0Annotation;
-
-/**
- * BinaryNamedQuery2_0Annotation
- */
-public final class BinaryNamedQuery2_0Annotation
- extends BinaryNamedQueryAnnotation
- implements NamedQuery2_0Annotation
-{
- private LockModeType_2_0 lockMode;
-
- public BinaryNamedQuery2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.lockMode = this.buildLockMode();
- }
-
- @Override
- public void update() {
- super.update();
- this.setLockMode_(this.buildLockMode());
- }
-
- // ********** NamedQuery2_0Annotation implementation **********
-
- public LockModeType_2_0 getLockMode() {
- return this.lockMode;
- }
-
- public void setLockMode(LockModeType_2_0 lockMode) {
- throw new UnsupportedOperationException();
- }
-
- private void setLockMode_(LockModeType_2_0 lockMode) {
- LockModeType_2_0 old = this.lockMode;
- this.lockMode = lockMode;
- this.firePropertyChanged(LOCK_MODE_PROPERTY, old, lockMode);
- }
-
- public TextRange getLockModeTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean lockModeTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- private LockModeType_2_0 buildLockMode() {
- return LockModeType_2_0.fromJavaAnnotationValue(this.getJdtMemberValue(JPA2_0.NAMED_QUERY__LOCK_MODE));
- }
-
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java
deleted file mode 100644
index 6219e5f4e8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryNamedColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.OrderColumn</code>
- */
-public class BinaryOrderColumn2_0Annotation
- extends BinaryNamedColumnAnnotation
- implements OrderColumn2_0Annotation
-{
- private Boolean nullable;
- private Boolean insertable;
- private Boolean updatable;
-
-
- public BinaryOrderColumn2_0Annotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.nullable = this.buildNullable();
- this.insertable = this.buildInsertable();
- this.updatable = this.buildUpdatable();
- }
-
- @Override
- public void update() {
- super.update();
- this.setNullable_(this.buildNullable());
- this.setInsertable_(this.buildInsertable());
- this.setUpdatable_(this.buildUpdatable());
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- //************* BinaryNamedColumnAnnotation implementation *************
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.COLUMN__COLUMN_DEFINITION;
- }
-
- @Override
- protected String getNameElementName() {
- return JPA.COLUMN__NAME;
- }
-
- //************* OrderColumn2_0Annotation implementation *************
-
- // ***** nullable
- public Boolean getNullable() {
- return this.nullable;
- }
-
- public void setNullable(Boolean nullable) {
- throw new UnsupportedOperationException();
- }
-
- private void setNullable_(Boolean nullable) {
- Boolean old = this.nullable;
- this.nullable = nullable;
- this.firePropertyChanged(NULLABLE_PROPERTY, old, nullable);
- }
-
- private Boolean buildNullable() {
- return (Boolean) this.getJdtMemberValue(getNullableElementName());
- }
-
- String getNullableElementName() {
- return JPA.COLUMN__NULLABLE;
- }
-
- public TextRange getNullableTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** insertable
- public Boolean getInsertable() {
- return this.insertable;
- }
-
- public void setInsertable(Boolean insertable) {
- throw new UnsupportedOperationException();
- }
-
- private void setInsertable_(Boolean insertable) {
- Boolean old = this.insertable;
- this.insertable = insertable;
- this.firePropertyChanged(INSERTABLE_PROPERTY, old, insertable);
- }
-
- private Boolean buildInsertable() {
- return (Boolean) this.getJdtMemberValue(this.getInsertableElementName());
- }
-
- String getInsertableElementName() {
- return JPA.COLUMN__INSERTABLE;
- }
-
- public TextRange getInsertableTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** updatable
- public Boolean getUpdatable() {
- return this.updatable;
- }
-
- public void setUpdatable(Boolean updatable) {
- throw new UnsupportedOperationException();
- }
-
- private void setUpdatable_(Boolean updatable) {
- Boolean old = this.updatable;
- this.updatable = updatable;
- this.firePropertyChanged(UPDATABLE_PROPERTY, old, updatable);
- }
-
- private Boolean buildUpdatable() {
- return (Boolean) this.getJdtMemberValue(this.getUpdatableElementName());
- }
-
- String getUpdatableElementName() {
- return JPA.COLUMN__UPDATABLE;
- }
-
- public TextRange getUpdatableTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java
deleted file mode 100644
index 35d8533f5e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinarySequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
-
-/**
- * JPA 2.0
- * <code>javax.persistence.SequenceGenerator</code>
- */
-public final class BinarySequenceGenerator2_0Annotation
- extends BinarySequenceGeneratorAnnotation
- implements SequenceGenerator2_0Annotation
-{
- private String catalog;
- private String schema;
-
-
- public BinarySequenceGenerator2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.catalog = this.buildCatalog();
- this.schema = this.buildSchema();
- }
-
- @Override
- public void update() {
- super.update();
- this.setCatalog_(this.buildCatalog());
- this.setSchema_(this.buildSchema());
- }
-
- // ********** SequenceGenerator2_0Annotation implementation **********
-
- // ********** catalog **********
-
- public String getCatalog() {
- return this.catalog;
- }
-
- public void setCatalog(String catalog) {
- throw new UnsupportedOperationException();
- }
-
- private void setCatalog_(String catalog) {
- String old = this.catalog;
- this.catalog = catalog;
- this.firePropertyChanged(CATALOG_PROPERTY, old, catalog);
- }
-
- private String buildCatalog() {
- return (String) this.getJdtMemberValue(JPA2_0.SEQUENCE_GENERATOR__CATALOG);
- }
-
- public TextRange getCatalogTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean catalogTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ********** schema **********
-
- public String getSchema() {
- return this.schema;
- }
-
- public void setSchema(String schema) {
- throw new UnsupportedOperationException();
- }
-
- private void setSchema_(String schema) {
- String old = this.schema;
- this.schema = schema;
- this.firePropertyChanged(SCHEMA_PROPERTY, old, schema);
- }
-
- private String buildSchema() {
- return (String) this.getJdtMemberValue(JPA2_0.SEQUENCE_GENERATOR__SCHEMA);
- }
-
- public TextRange getSchemaTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean schemaTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java
deleted file mode 100644
index 417f94a781..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.StaticMetamodelAnnotation;
-
-/**
- * javax.persistence.metamodel.StaticMetamodel
- */
-public final class BinaryStaticMetamodelAnnotation
- extends BinaryAnnotation
- implements StaticMetamodelAnnotation
-{
- private String value;
-
-
- public BinaryStaticMetamodelAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** StaticMetamodelAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA2_0.STATIC_METAMODEL__VALUE);
- }
-
- // ***** fully-qualified class name
- /**
- * binary is already fully-qualified
- */
- public String getFullyQualifiedClassName() {
- return this.value;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
deleted file mode 100644
index c54df977b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.AccessType;
-
-/**
- * <code>javax.persistence.Access</code>
- */
-public final class SourceAccess2_0Annotation
- extends SourceAnnotation
- implements Access2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private AccessType value;
- private TextRange valueTextRange;
-
-
- public SourceAccess2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** AccessAnnotation implementation **********
-
- // ***** value
- public AccessType getValue() {
- return this.value;
- }
-
- public void setValue(AccessType value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(AccessType.toJavaAnnotationValue(value));
- }
- }
-
- private void syncValue(AccessType astValue) {
- AccessType old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private AccessType buildValue(CompilationUnit astRoot) {
- return AccessType.fromJavaAnnotationValue(this.valueAdapter.getValue(astRoot));
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ACCESS__VALUE);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
deleted file mode 100644
index cf1e98cdcf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.NullAssociationOverrideJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceAssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.AssociationOverride2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * <code>javax.persistence.AssociationOverride</code>
- */
-public final class SourceAssociationOverride2_0Annotation
- extends SourceAssociationOverrideAnnotation
- implements AssociationOverride2_0Annotation
-{
- private ElementAnnotationAdapter joinTableAdapter;
- private JoinTableAnnotation joinTable;
- private final JoinTableAnnotation nullJoinTable;
-
-
- public static SourceAssociationOverride2_0Annotation buildSourceAssociationOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element) {
-
- return new SourceAssociationOverride2_0Annotation(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public static SourceAssociationOverride2_0Annotation buildSourceAssociationOverrideAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildAssociationOverrideDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildAssociationOverrideAnnotationAdapter(annotatedElement, idaa);
- return new SourceAssociationOverride2_0Annotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
- public static SourceAssociationOverride2_0Annotation buildNestedSourceAssociationOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourceAssociationOverride2_0Annotation(parent, element, idaa);
- }
-
- private SourceAssociationOverride2_0Annotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- DeclarationAnnotationAdapter daa) {
-
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- private SourceAssociationOverride2_0Annotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- private SourceAssociationOverride2_0Annotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.joinTableAdapter = this.buildJoinTableAdapter();
- this.nullJoinTable = this.buildNullJoinTable();
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- if (this.joinTableAdapter.getAnnotation(astRoot) != null) {
- this.joinTable = buildJoinTableAnnotation(this, this.annotatedElement, this.daa);
- this.joinTable.initialize(astRoot);
- }
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncJoinTable(astRoot);
- }
-
-
- //************ AssociationOverride2_0Annotation implementation ****************
-
- // ***** joinTable
- public JoinTableAnnotation getJoinTable() {
- return this.joinTable;
- }
-
- public JoinTableAnnotation getNonNullJoinTable() {
- return (this.joinTable != null) ? this.joinTable : this.nullJoinTable;
- }
-
- public JoinTableAnnotation addJoinTable() {
- if (this.joinTable != null) {
- throw new IllegalStateException("'joinTable' element already exists: " + this.joinTable); //$NON-NLS-1$
- }
- this.joinTable = buildJoinTableAnnotation(this, this.annotatedElement, this.daa);
- this.joinTable.newAnnotation();
- return this.joinTable;
- }
-
- public void removeJoinTable() {
- if (this.joinTable == null) {
- throw new IllegalStateException("'joinTable' element does not exist"); //$NON-NLS-1$
- }
- JoinTableAnnotation old = this.joinTable;
- this.joinTable = null;
- old.removeAnnotation();
- }
-
- private void syncJoinTable(CompilationUnit astRoot) {
- if (this.joinTableAdapter.getAnnotation(astRoot) == null) {
- this.syncJoinTable_(null);
- } else {
- if (this.joinTable == null) {
- JoinTableAnnotation table = buildJoinTableAnnotation(this, this.annotatedElement, this.daa);
- table.initialize(astRoot);
- this.syncJoinTable_(table);
- } else {
- this.joinTable.synchronizeWith(astRoot);
- }
- }
- }
-
- private void syncJoinTable_(JoinTableAnnotation astJoinTable) {
- JoinTableAnnotation old = this.joinTable;
- this.joinTable = astJoinTable;
- this.firePropertyChanged(JOIN_TABLE_PROPERTY, old, astJoinTable);
- }
-
- private ElementAnnotationAdapter buildJoinTableAdapter() {
- return new ElementAnnotationAdapter(this.annotatedElement, buildJoinTableAnnotationAdapter(this.daa));
- }
-
- private JoinTableAnnotation buildNullJoinTable() {
- return new NullAssociationOverrideJoinTableAnnotation(this);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.joinTable == null);
- }
-
-
- // ********** static methods **********
-
- static JoinTableAnnotation buildJoinTableAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter associationOverrideAnnotationAdapter) {
- return new SourceJoinTableAnnotation(parent, element, buildJoinTableAnnotationAdapter(associationOverrideAnnotationAdapter));
- }
-
- static DeclarationAnnotationAdapter buildJoinTableAnnotationAdapter(DeclarationAnnotationAdapter associationOverrideAnnotationAdapter) {
- return new NestedDeclarationAnnotationAdapter(associationOverrideAnnotationAdapter, JPA2_0.ASSOCIATION_OVERRIDE__JOIN_TABLE, JPA.JOIN_TABLE);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
deleted file mode 100644
index 7054af1674..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.BooleanExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.Cacheable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * <code>javax.persistence.Cacheable</code>
- */
-public final class SourceCacheable2_0Annotation
- extends SourceAnnotation
- implements Cacheable2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<Boolean> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<Boolean> valueAdapter;
- private Boolean value;
- private TextRange valueTextRange;
-
-
- public SourceCacheable2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** Cacheable2_0Annotation implementation **********
-
- // ***** value
- public Boolean getValue() {
- return this.value;
- }
-
- public void setValue(Boolean value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(Boolean astValue) {
- Boolean old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private Boolean buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildValueAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<Boolean>(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.CACHEABLE__VALUE, BooleanExpressionConverter.instance());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
deleted file mode 100644
index 9081f98922..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceBaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.CollectionTable</code>
- */
-public final class SourceCollectionTable2_0Annotation
- extends SourceBaseTableAnnotation
- implements CollectionTable2_0Annotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(CollectionTable2_0Annotation.ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.COLLECTION_TABLE__NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.COLLECTION_TABLE__SCHEMA);
-
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.COLLECTION_TABLE__CATALOG);
-
-
- private final JoinColumnsAnnotationContainer joinColumnsContainer = new JoinColumnsAnnotationContainer();
-
-
- public SourceCollectionTable2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.joinColumnsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.joinColumnsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
-
- // ********** SourceBaseTableAnnotation implementation **********
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return NAME_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildSchemaDeclarationAdapter() {
- return SCHEMA_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildCatalogDeclarationAdapter() {
- return CATALOG_ADAPTER;
- }
-
- @Override
- protected String getUniqueConstraintsElementName() {
- return JPA2_0.COLLECTION_TABLE__UNIQUE_CONSTRAINTS;
- }
-
- // ********** CollectionTable2_0Annotation implementation **********
-
- // **************** join columns *************************************************
-
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return this.joinColumnsContainer.getNestedAnnotations();
- }
-
- public int getJoinColumnsSize() {
- return this.joinColumnsContainer.getNestedAnnotationsSize();
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return this.joinColumnsContainer.getNestedAnnotation(index);
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- return this.joinColumnsContainer.addNestedAnnotation(index);
- }
-
- /* CU private */ JoinColumnAnnotation buildJoinColumn(int index) {
- return SourceJoinColumnAnnotation.buildNestedSourceJoinColumnAnnotation(
- this, this.annotatedElement, buildJoinColumnIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildJoinColumnIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, JPA2_0.COLLECTION_TABLE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- this.joinColumnsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeJoinColumn(int index) {
- this.joinColumnsContainer.removeNestedAnnotation(index);
- }
-
- /**
- * adapt the AnnotationContainer interface to the collection table's join columns
- */
- class JoinColumnsAnnotationContainer
- extends AnnotationContainer<JoinColumnAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return JOIN_COLUMNS_LIST;
- }
- @Override
- protected String getElementName() {
- return JPA2_0.COLLECTION_TABLE__JOIN_COLUMNS;
- }
- @Override
- protected String getNestedAnnotationName() {
- return JPA.JOIN_COLUMN;
- }
- @Override
- protected JoinColumnAnnotation buildNestedAnnotation(int index) {
- return SourceCollectionTable2_0Annotation.this.buildJoinColumn(index);
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- this.joinColumnsContainer.isEmpty();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
deleted file mode 100644
index f1eddc7db5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.ExpressionConverter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ElementCollection2_0Annotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-
-/**
- * <code>javax.persistence.ElementCollection</code>
- */
-public final class SourceElementCollection2_0Annotation
- extends SourceAnnotation
- implements ElementCollection2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_CLASS_ADAPTER = buildTargetClassAdapter();
- private final AnnotationElementAdapter<String> targetClassAdapter;
- private String targetClass;
- private TextRange targetClassTextRange;
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdClassAnnotation#fullyQualifiedClassName
- */
- private String fullyQualifiedTargetClassName;
- // we need a flag since the f-q name can be null
- private boolean fqTargetClassNameStale = true;
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
- private final AnnotationElementAdapter<String> fetchAdapter;
- private FetchType fetch;
- private TextRange fetchTextRange;
-
-
- public SourceElementCollection2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.targetClassAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, TARGET_CLASS_ADAPTER);
- this.fetchAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, FETCH_ADAPTER);
- }
-
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.targetClass = this.buildTargetClass(astRoot);
- this.targetClassTextRange = this.buildTargetClassTextRange(astRoot);
-
- this.fetch = this.buildFetch(astRoot);
- this.fetchTextRange = this.buildFetchTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncTargetClass(this.buildTargetClass(astRoot));
- this.targetClassTextRange = this.buildTargetClassTextRange(astRoot);
-
- this.syncFetch(this.buildFetch(astRoot));
- this.fetchTextRange = this.buildFetchTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.targetClass == null) &&
- (this.fetch == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.targetClass);
- }
-
-
- // ********** ElementCollection2_0Annotation implementation **********
-
- // ***** target class
- public String getTargetClass() {
- return this.targetClass;
- }
-
- public void setTargetClass(String targetClass) {
- if (this.attributeValueHasChanged(this.targetClass, targetClass)) {
- this.targetClass = targetClass;
- this.fqTargetClassNameStale = true;
- this.targetClassAdapter.setValue(targetClass);
- }
- }
-
- private void syncTargetClass(String astTargetClass) {
- if (this.attributeValueHasChanged(this.targetClass, astTargetClass)) {
- this.syncTargetClass_(astTargetClass);
- }
- }
-
- private void syncTargetClass_(String astTargetClass) {
- String old = this.targetClass;
- this.targetClass = astTargetClass;
- this.fqTargetClassNameStale = true;
- this.firePropertyChanged(TARGET_CLASS_PROPERTY, old, astTargetClass);
- }
-
- private String buildTargetClass(CompilationUnit astRoot) {
- return this.targetClassAdapter.getValue(astRoot);
- }
-
- public TextRange getTargetClassTextRange() {
- return this.targetClassTextRange;
- }
-
- private TextRange buildTargetClassTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(TARGET_CLASS_ADAPTER, astRoot);
- }
-
- // ***** fully-qualified target entity class name
- public String getFullyQualifiedTargetClassName() {
- if (this.fqTargetClassNameStale) {
- this.fullyQualifiedTargetClassName = this.buildFullyQualifiedTargetClassName();
- this.fqTargetClassNameStale = false;
- }
- return this.fullyQualifiedTargetClassName;
- }
-
- private String buildFullyQualifiedTargetClassName() {
- return (this.targetClass == null) ? null : this.buildFullyQualifiedTargetClassName_();
- }
-
- private String buildFullyQualifiedTargetClassName_() {
- return ASTTools.resolveFullyQualifiedName(this.targetClassAdapter.getExpression(this.buildASTRoot()));
- }
-
- // ***** fetch
- public FetchType getFetch() {
- return this.fetch;
- }
-
- public void setFetch(FetchType fetch) {
- if (this.attributeValueHasChanged(this.fetch, fetch)) {
- this.fetch = fetch;
- this.fetchAdapter.setValue(FetchType.toJavaAnnotationValue(fetch));
- }
- }
-
- private void syncFetch(FetchType astFetch) {
- FetchType old = this.fetch;
- this.fetch = astFetch;
- this.firePropertyChanged(FETCH_PROPERTY, old, astFetch);
- }
-
- private FetchType buildFetch(CompilationUnit astRoot) {
- return FetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot));
- }
-
- public TextRange getFetchTextRange() {
- return this.fetchTextRange;
- }
-
- private TextRange buildFetchTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(FETCH_ADAPTER, astRoot);
- }
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ELEMENT_COLLECTION__FETCH);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildTargetClassAdapter() {
- return buildTargetClassAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ELEMENT_COLLECTION__TARGET_CLASS);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildTargetClassAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- // TODO what about QualifiedType?
- return buildAnnotationElementAdapter(annotationAdapter, elementName, SimpleTypeStringExpressionConverter.instance());
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String> converter) {
- return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, converter);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
deleted file mode 100644
index af81759ef7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.source;
-
-import java.util.Arrays;
-import java.util.Vector;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotationStringArrayExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.ExpressionConverter;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.GeneratedAnnotation;
-
-/**
- * javax.annotation.Generated
- */
-public final class SourceGeneratedAnnotation
- extends SourceAnnotation
- implements GeneratedAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String[]> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String[]> valueAdapter;
- private final Vector<String> values = new Vector<String>();
-
- private static final DeclarationAnnotationElementAdapter<String> DATE_ADAPTER = buildAdapter(DATE_ELEMENT_NAME);
- private final AnnotationElementAdapter<String> dateAdapter;
- private String date;
-
- private static final DeclarationAnnotationElementAdapter<String> COMMENTS_ADAPTER = buildAdapter(COMMENTS_ELEMENT_NAME);
- private final AnnotationElementAdapter<String> commentsAdapter;
- private String comments;
-
-
- public SourceGeneratedAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = this.buildAnnotationElementAdapter(VALUE_ADAPTER);
- this.dateAdapter = this.buildAdapter(DATE_ADAPTER);
- this.commentsAdapter = this.buildAdapter(COMMENTS_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- private AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
- return new AnnotatedElementAnnotationElementAdapter<String[]>(this.annotatedElement, daea);
- }
-
- private AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.initializeValues(astRoot);
- this.date = this.buildDate(astRoot);
- this.comments = this.buildComments(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValues(astRoot);
- this.syncDate(this.buildDate(astRoot));
- this.syncComments(this.buildComments(astRoot));
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- this.values.isEmpty() &&
- (this.date == null) &&
- (this.comments == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.values);
- }
-
-
- // ********** GeneratedAnnotation implementation **********
-
- // ***** values
- public ListIterable<String> getValues() {
- return new LiveCloneListIterable<String>(this.values);
- }
-
- public int getValuesSize() {
- return this.values.size();
- }
-
- public String getValue(int index) {
- return this.values.get(index);
- }
-
- public void addValue(String value) {
- this.addValue(this.values.size(), value);
- }
-
- public void addValue(int index, String value) {
- this.values.add(index, value);
- this.writeValues();
- }
-
- public void moveValue(int targetIndex, int sourceIndex) {
- CollectionTools.move(this.values, targetIndex, sourceIndex);
- this.writeValues();
- }
-
- public void removeValue(String value) {
- this.values.remove(value);
- this.writeValues();
- }
-
- public void removeValue(int index) {
- this.values.remove(index);
- this.writeValues();
- }
-
- private void writeValues() {
- this.valueAdapter.setValue(this.values.toArray(new String[this.values.size()]));
- }
-
- private void initializeValues(CompilationUnit astRoot) {
- String[] astValues = this.valueAdapter.getValue(astRoot);
- for (int i = 0; i < astValues.length; i++) {
- this.values.add(astValues[i]);
- }
- }
-
- private void syncValues(CompilationUnit astRoot) {
- String[] astValues = this.valueAdapter.getValue(astRoot);
- this.synchronizeList(Arrays.asList(astValues), this.values, VALUES_LIST);
- }
-
- // ***** date
- public String getDate() {
- return this.date;
- }
-
- public void setDate(String date) {
- if (this.attributeValueHasChanged(this.date, date)) {
- this.date = date;
- this.dateAdapter.setValue(date);
- }
- }
-
- protected void syncDate(String astDate) {
- String old = this.date;
- this.date = astDate;
- this.firePropertyChanged(DATE_PROPERTY, old, astDate);
- }
-
- private String buildDate(CompilationUnit astRoot) {
- return this.dateAdapter.getValue(astRoot);
- }
-
- // ***** comments
- public String getComments() {
- return this.comments;
- }
-
- public void setComments(String comments) {
- if (this.attributeValueHasChanged(this.comments, comments)) {
- this.comments = comments;
- this.commentsAdapter.setValue(comments);
- }
- }
-
- protected void syncComments(String astComments) {
- String old = this.comments;
- this.comments = astComments;
- this.firePropertyChanged(COMMENTS_PROPERTY, old, astComments);
- }
-
- private String buildComments(CompilationUnit astRoot) {
- return this.commentsAdapter.getValue(astRoot);
- }
-
-
- // ********** static methods **********
-
- protected static DeclarationAnnotationElementAdapter<String[]> buildValueAdapter() {
- return buildArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, VALUE_ELEMENT_NAME);
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return buildArrayAnnotationElementAdapter(annotationAdapter, elementName, AnnotationStringArrayExpressionConverter.forStrings());
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String[]> converter) {
- return new ConversionDeclarationAnnotationElementAdapter<String[]>(annotationAdapter, elementName, converter);
- }
-
- protected static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
- return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
- static DeclarationAnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(annotationAdapter, elementName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
deleted file mode 100644
index 5ef410f7e1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyClass</code>
- */
-public final class SourceMapKeyClass2_0Annotation
- extends SourceAnnotation
- implements MapKeyClass2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private String value;
- private TextRange valueTextRange;
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdClassAnnotation#fullyQualifiedClassName
- */
- private String fullyQualifiedClassName;
- // we need a flag since the f-q name can be null
- private boolean fqClassNameStale = true;
-
-
- public SourceMapKeyClass2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** MapKeyClass2_0Annotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.fqClassNameStale = true;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- if (this.attributeValueHasChanged(this.value, astValue)) {
- this.syncValue_(astValue);
- }
- }
-
- private void syncValue_(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.fqClassNameStale = true;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
- // ***** fully-qualified class name
- public String getFullyQualifiedClassName() {
- if (this.fqClassNameStale) {
- this.fullyQualifiedClassName = this.buildFullyQualifiedClassName();
- this.fqClassNameStale = false;
- }
- return this.fullyQualifiedClassName;
- }
-
- private String buildFullyQualifiedClassName() {
- return (this.value == null) ? null : this.buildFullyQualifiedClassName_();
- }
-
- private String buildFullyQualifiedClassName_() {
- return ASTTools.resolveFullyQualifiedName(this.valueAdapter.getExpression(this.buildASTRoot()));
- }
-
-
- // ********** static methods **********
-
- protected static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String>(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.MAP_KEY_CLASS__VALUE, SimpleTypeStringExpressionConverter.instance());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java
deleted file mode 100644
index be914944d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceCompleteColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyColumn</code>
- */
-public final class SourceMapKeyColumn2_0Annotation
- extends SourceCompleteColumnAnnotation
- implements MapKeyColumn2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
-
-
- public SourceMapKeyColumn2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return MapKeyColumn2_0Annotation.ANNOTATION_NAME;
- }
-
-
- // ********** SourceNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA2_0.MAP_KEY_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA2_0.MAP_KEY_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** SourceBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA2_0.MAP_KEY_COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA2_0.MAP_KEY_COLUMN__UPDATABLE;
- }
-
- // ********** SourceCompleteColumnAnnotation implementation **********
-
- @Override
- protected String getLengthElementName() {
- return JPA2_0.MAP_KEY_COLUMN__LENGTH;
- }
-
- @Override
- protected String getPrecisionElementName() {
- return JPA2_0.MAP_KEY_COLUMN__PRECISION;
- }
-
- @Override
- protected String getScaleElementName() {
- return JPA2_0.MAP_KEY_COLUMN__SCALE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java
deleted file mode 100644
index 63d7b8390b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceBaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyEnumerated</code>
- */
-public final class SourceMapKeyEnumerated2_0Annotation
- extends SourceBaseEnumeratedAnnotation
- implements MapKeyEnumerated2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
-
- public SourceMapKeyEnumerated2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA2_0.MAP_KEY_ENUMERATED__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyJoinColumn2_0Annotation.java
deleted file mode 100644
index 576ad56f5f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyJoinColumn2_0Annotation.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceBaseJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyJoinColumn</code>
- */
-public final class SourceMapKeyJoinColumn2_0Annotation
- extends SourceBaseJoinColumnAnnotation
- implements MapKeyJoinColumn2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA2_0.MAP_KEY_JOIN_COLUMNS);
-
-
- public static SourceMapKeyJoinColumn2_0Annotation buildSourceMapKeyJoinColumnAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element) {
-
- return new SourceMapKeyJoinColumn2_0Annotation(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public static SourceMapKeyJoinColumn2_0Annotation buildSourceMapKeyJoinColumnAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildMapKeyJoinColumnDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildMapKeyJoinColumnAnnotationAdapter(annotatedElement, idaa);
- return new SourceMapKeyJoinColumn2_0Annotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
- public static SourceMapKeyJoinColumn2_0Annotation buildNestedSourceMapKeyJoinColumnAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourceMapKeyJoinColumn2_0Annotation(parent, element, idaa);
- }
-
- private SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- private SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- private SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ********** SourceNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** SourceBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__UPDATABLE;
- }
-
-
- // ********** SourceBaseJoinColumnAnnotation implementation **********
-
- @Override
- protected String getReferencedColumnNameElementName() {
- return JPA2_0.MAP_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- }
-
- // ********** static methods **********
-
- private static IndexedAnnotationAdapter buildMapKeyJoinColumnAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- private static IndexedDeclarationAnnotationAdapter buildMapKeyJoinColumnDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java
deleted file mode 100644
index 890a11e965..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceBaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-
-/**
- * <code>javax.persistence.MapKeyTemporal</code>
- */
-public final class SourceMapKeyTemporal2_0Annotation
- extends SourceBaseTemporalAnnotation
- implements MapKeyTemporal2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
-
-
- public SourceMapKeyTemporal2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA2_0.MAP_KEY_TEMPORAL__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
deleted file mode 100644
index 04a3acefec..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation;
-
-/**
- * <code>javax.persistence.MapsId</code>
- */
-public final class SourceMapsId2_0Annotation
- extends SourceAnnotation
- implements MapsId2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private String value;
- private TextRange valueTextRange;
-
-
- public SourceMapsId2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** MapsId2_0Annotation implementation **********
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
- public boolean valueTouches(int pos) {
- return this.textRangeTouches(this.valueTextRange, pos);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(
- DECLARATION_ANNOTATION_ADAPTER, JPA2_0.MAPS_ID__VALUE);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
deleted file mode 100644
index 3769aca792..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceNamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.NamedQuery2_0Annotation;
-
-/**
- * <code>javax.persistence.NamedQuery</code>
- */
-public final class SourceNamedQuery2_0Annotation
- extends SourceNamedQueryAnnotation
- implements NamedQuery2_0Annotation
-{
- private DeclarationAnnotationElementAdapter<String> lockModeDeclarationAdapter;
- private AnnotationElementAdapter<String> lockModeAdapter;
- private LockModeType_2_0 lockMode;
- private TextRange lockModeTextRange;
-
- public static SourceNamedQuery2_0Annotation buildSourceNamedQueryAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildNamedQueryDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildNamedQueryAnnotationAdapter(annotatedElement, idaa);
- return new SourceNamedQuery2_0Annotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
- private SourceNamedQuery2_0Annotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- IndexedDeclarationAnnotationAdapter daa,
- IndexedAnnotationAdapter annotationAdapter) {
- super(parent, annotatedElement, daa, annotationAdapter);
- this.lockModeDeclarationAdapter = this.buildLockModeDeclarationAdapter();
- this.lockModeAdapter = this.buildLockModeAdapter();
- }
-
- private String getLockModeElementName() {
- return JPA2_0.NAMED_QUERY__LOCK_MODE;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.lockMode = this.buildLockMode(astRoot);
- this.lockModeTextRange = this.buildLockModeTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncLockMode(this.buildLockMode(astRoot));
- this.lockModeTextRange = this.buildLockModeTextRange(astRoot);
- }
-
-
- // ********** NamedQuery2_0Annotation implementation **********
-
- public LockModeType_2_0 getLockMode() {
- return this.lockMode;
- }
-
- public void setLockMode(LockModeType_2_0 lockMode) {
- if (this.attributeValueHasChanged(this.lockMode, lockMode)) {
- this.lockMode = lockMode;
- this.lockModeAdapter.setValue(LockModeType_2_0.toJavaAnnotationValue(lockMode));
- }
- }
-
- private void syncLockMode(LockModeType_2_0 astLockMode) {
- LockModeType_2_0 old = this.lockMode;
- this.lockMode = astLockMode;
- this.firePropertyChanged(LOCK_MODE_PROPERTY, old, astLockMode);
- }
-
- private LockModeType_2_0 buildLockMode(CompilationUnit astRoot) {
- return LockModeType_2_0.fromJavaAnnotationValue(this.lockModeAdapter.getValue(astRoot));
- }
-
- public TextRange getLockModeTextRange() {
- return this.lockModeTextRange;
- }
-
- private TextRange buildLockModeTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.lockModeDeclarationAdapter, astRoot);
- }
-
- public boolean lockModeTouches(int pos) {
- return this.textRangeTouches(this.lockModeTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildLockModeDeclarationAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(this.daa, this.getLockModeElementName());
- }
-
- private AnnotationElementAdapter<String> buildLockModeAdapter() {
- return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, this.lockModeDeclarationAdapter);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.lockMode == null);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java
deleted file mode 100644
index 517fc239b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceNamedColumnAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-
-/**
- * <code>javax.persistence.OrderColumn</code>
- */
-public final class SourceOrderColumn2_0Annotation
- extends SourceNamedColumnAnnotation
- implements OrderColumn2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private DeclarationAnnotationElementAdapter<Boolean> nullableDeclarationAdapter;
- private AnnotationElementAdapter<Boolean> nullableAdapter;
- private Boolean nullable;
- private TextRange nullableTextRange;
-
- private DeclarationAnnotationElementAdapter<Boolean> insertableDeclarationAdapter;
- private AnnotationElementAdapter<Boolean> insertableAdapter;
- private Boolean insertable;
- private TextRange insertableTextRange;
-
- private DeclarationAnnotationElementAdapter<Boolean> updatableDeclarationAdapter;
- private AnnotationElementAdapter<Boolean> updatableAdapter;
- private Boolean updatable;
- private TextRange updatableTextRange;
-
-
- public SourceOrderColumn2_0Annotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.nullableDeclarationAdapter = this.buildNullableDeclarationAdapter();
- this.nullableAdapter = this.buildNullableAdapter();
- this.insertableDeclarationAdapter = this.buildInsertableDeclarationAdapter();
- this.insertableAdapter = this.buildInsertableAdapter();
- this.updatableDeclarationAdapter = this.buildUpdatableDeclarationAdapter();
- this.updatableAdapter = this.buildUpdatableAdapter();
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
-
- this.nullable = this.buildNullable(astRoot);
- this.nullableTextRange = this.buildNullableTextRange(astRoot);
-
- this.insertable = this.buildInsertable(astRoot);
- this.insertableTextRange = this.buildInsertableTextRange(astRoot);
-
- this.updatable = this.buildUpdatable(astRoot);
- this.updatableTextRange = this.buildUpdatableTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
-
- this.syncNullable(this.buildNullable(astRoot));
- this.nullableTextRange = this.buildNullableTextRange(astRoot);
-
- this.syncInsertable(this.buildInsertable(astRoot));
- this.insertableTextRange = this.buildInsertableTextRange(astRoot);
-
- this.syncUpdatable(this.buildUpdatable(astRoot));
- this.updatableTextRange = this.buildUpdatableTextRange(astRoot);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- protected String getNameElementName() {
- return JPA2_0.ORDER_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA2_0.ORDER_COLUMN__COLUMN_DEFINITION;
- }
-
-
- //************* OrderColumn2_0Annotation implementation *************
-
- // ***** nullable
- public Boolean getNullable() {
- return this.nullable;
- }
-
- public void setNullable(Boolean nullable) {
- if (this.attributeValueHasChanged(this.nullable, nullable)) {
- this.nullable = nullable;
- this.nullableAdapter.setValue(nullable);
- }
- }
-
- private void syncNullable(Boolean astNullable) {
- Boolean old = this.nullable;
- this.nullable = astNullable;
- this.firePropertyChanged(NULLABLE_PROPERTY, old, astNullable);
- }
-
- private Boolean buildNullable(CompilationUnit astRoot) {
- return this.nullableAdapter.getValue(astRoot);
- }
-
- public TextRange getNullableTextRange() {
- return this.nullableTextRange;
- }
-
- private TextRange buildNullableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nullableDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildNullableDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getNullableElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildNullableAdapter() {
- return this.buildBooleanElementAdapter(this.nullableDeclarationAdapter);
- }
-
- String getNullableElementName() {
- return JPA2_0.ORDER_COLUMN__NULLABLE;
- }
-
- // ***** insertable
- public Boolean getInsertable() {
- return this.insertable;
- }
-
- public void setInsertable(Boolean insertable) {
- if (this.attributeValueHasChanged(this.insertable, insertable)) {
- this.insertable = insertable;
- this.insertableAdapter.setValue(insertable);
- }
- }
-
- private void syncInsertable(Boolean astInsertable) {
- Boolean old = this.insertable;
- this.insertable = astInsertable;
- this.firePropertyChanged(INSERTABLE_PROPERTY, old, astInsertable);
- }
-
- private Boolean buildInsertable(CompilationUnit astRoot) {
- return this.insertableAdapter.getValue(astRoot);
- }
-
- public TextRange getInsertableTextRange() {
- return this.insertableTextRange;
- }
-
- private TextRange buildInsertableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.insertableDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildInsertableDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getInsertableElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildInsertableAdapter() {
- return this.buildBooleanElementAdapter(this.insertableDeclarationAdapter);
- }
-
- String getInsertableElementName() {
- return JPA2_0.ORDER_COLUMN__INSERTABLE;
- }
-
- // ***** updatable
- public Boolean getUpdatable() {
- return this.updatable;
- }
-
- public void setUpdatable(Boolean updatable) {
- if (this.attributeValueHasChanged(this.updatable, updatable)) {
- this.updatable = updatable;
- this.updatableAdapter.setValue(updatable);
- }
- }
-
- private void syncUpdatable(Boolean astUpdatable) {
- Boolean old = this.updatable;
- this.updatable = astUpdatable;
- this.firePropertyChanged(UPDATABLE_PROPERTY, old, astUpdatable);
- }
-
- private Boolean buildUpdatable(CompilationUnit astRoot) {
- return this.updatableAdapter.getValue(astRoot);
- }
-
- public TextRange getUpdatableTextRange() {
- return this.updatableTextRange;
- }
-
- private TextRange buildUpdatableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.updatableDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildUpdatableDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getUpdatableElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildUpdatableAdapter() {
- return this.buildBooleanElementAdapter(this.updatableDeclarationAdapter);
- }
-
- String getUpdatableElementName() {
- return JPA2_0.ORDER_COLUMN__UPDATABLE;
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.nullable == null) &&
- (this.insertable == null) &&
- (this.updatable == null);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java
deleted file mode 100644
index 0b2f2f035b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceSequenceGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
-
-/**
- * JPA 2.0
- * <code>javax.persistence.SequenceGenerator</code>
- */
-public final class SourceSequenceGenerator2_0Annotation
- extends SourceSequenceGeneratorAnnotation
- implements SequenceGenerator2_0Annotation
-{
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = buildAdapter(JPA2_0.SEQUENCE_GENERATOR__CATALOG);
- private final AnnotationElementAdapter<String> catalogAdapter;
- private String catalog;
- private TextRange catalogTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = buildAdapter(JPA2_0.SEQUENCE_GENERATOR__SCHEMA);
- private final AnnotationElementAdapter<String> schemaAdapter;
- private String schema;
- private TextRange schemaTextRange;
-
-
- // ********** constructor **********
- public SourceSequenceGenerator2_0Annotation(JavaResourceNode parent, AnnotatedElement element) {
- super(parent, element);
- this.catalogAdapter = this.buildAdapter(CATALOG_ADAPTER);
- this.schemaAdapter = this.buildAdapter(SCHEMA_ADAPTER);
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.catalog = this.buildCatalog(astRoot);
- this.catalogTextRange = this.buildCatalogTextRange(astRoot);
- this.schema = this.buildSchema(astRoot);
- this.schemaTextRange = this.buildSchemaTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncCatalog(this.buildCatalog(astRoot));
- this.catalogTextRange = this.buildCatalogTextRange(astRoot);
- this.syncSchema(this.buildSchema(astRoot));
- this.schemaTextRange = this.buildSchemaTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.catalog == null) &&
- (this.schema == null);
- }
-
-
- // ********** catalog **********
- public String getCatalog() {
- return this.catalog;
- }
-
- public void setCatalog(String catalog) {
- if (this.attributeValueHasChanged(this.catalog, catalog)) {
- this.catalog = catalog;
- this.catalogAdapter.setValue(catalog);
- }
- }
-
- private void syncCatalog(String astCatalog) {
- String old = this.catalog;
- this.catalog = astCatalog;
- this.firePropertyChanged(CATALOG_PROPERTY, old, astCatalog);
- }
-
- private String buildCatalog(CompilationUnit astRoot) {
- return this.catalogAdapter.getValue(astRoot);
- }
-
- public TextRange getCatalogTextRange() {
- return this.catalogTextRange;
- }
-
- private TextRange buildCatalogTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(CATALOG_ADAPTER, astRoot);
- }
-
- public boolean catalogTouches(int pos) {
- return this.textRangeTouches(this.catalogTextRange, pos);
- }
-
- // ********** schema **********
- public String getSchema() {
- return this.schema;
- }
-
- public void setSchema(String schema) {
- if (this.attributeValueHasChanged(this.schema, schema)) {
- this.schema = schema;
- this.schemaAdapter.setValue(schema);
- }
- }
-
- private void syncSchema(String astSchema) {
- String old = this.schema;
- this.schema = astSchema;
- this.firePropertyChanged(SCHEMA_PROPERTY, old, astSchema);
- }
-
- private String buildSchema(CompilationUnit astRoot) {
- return this.schemaAdapter.getValue(astRoot);
- }
-
- public TextRange getSchemaTextRange() {
- return this.schemaTextRange;
- }
-
- private TextRange buildSchemaTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(SCHEMA_ADAPTER, astRoot);
- }
-
- public boolean schemaTouches(int pos) {
- return this.textRangeTouches(this.schemaTextRange, pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
deleted file mode 100644
index a3a0190203..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.jpa2.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.StaticMetamodelAnnotation;
-
-/**
- * javax.persistence.metamodel.StaticMetamodel
- */
-public final class SourceStaticMetamodelAnnotation
- extends SourceAnnotation
- implements StaticMetamodelAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private String value;
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdClassAnnotation#fullyQualifiedClassName
- */
- private String fullyQualifiedClassName;
- // we need a flag since the f-q name can be null
- private boolean fqClassNameStale = true;
-
-
- public SourceStaticMetamodelAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** StaticMetamodelAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.fqClassNameStale = true;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- if (this.attributeValueHasChanged(this.value, astValue)) {
- this.syncValue_(astValue);
- }
- }
-
- private void syncValue_(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.fqClassNameStale = true;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- // ***** fully-qualified class name
- public String getFullyQualifiedClassName() {
- if (this.fqClassNameStale) {
- this.fullyQualifiedClassName = this.buildFullyQualifiedClassName();
- this.fqClassNameStale = false;
- }
- return this.fullyQualifiedClassName;
- }
-
- private String buildFullyQualifiedClassName() {
- return (this.value == null) ? null : this.buildFullyQualifiedClassName_();
- }
-
- private String buildFullyQualifiedClassName_() {
- return ASTTools.resolveFullyQualifiedName(this.valueAdapter.getExpression(this.buildASTRoot()));
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String>(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.STATIC_METAMODEL__VALUE, SimpleTypeStringExpressionConverter.instance());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaLibraryProviderInstallOperationConfigAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaLibraryProviderInstallOperationConfigAdapterFactory.java
deleted file mode 100644
index 8d8a1b22da..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaLibraryProviderInstallOperationConfigAdapterFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal.libprov;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jpt.jpa.core.libprov.JpaLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-/**
- * Factory to build Dali adapters for an {@link JpaLibraryProviderInstallOperationConfig}:<ul>
- * <li>{@link JpaPlatformDescription}
- * </ul>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- */
-public class JpaLibraryProviderInstallOperationConfigAdapterFactory
- implements IAdapterFactory
-{
- private static final Class<?>[] ADAPTER_LIST = new Class[] {
- JpaPlatformDescription.class
- };
-
- public Class<?>[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
- if (adaptableObject instanceof JpaLibraryProviderInstallOperationConfig) {
- return this.getAdapter((JpaLibraryProviderInstallOperationConfig) adaptableObject, adapterType);
- }
- return null;
- }
-
- private Object getAdapter(JpaLibraryProviderInstallOperationConfig config, Class<?> adapterType) {
- if (adapterType == JpaPlatformDescription.class) {
- return config.getJpaPlatform();
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaOsgiBundlesLibraryProviderInstallOperationConfig.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaOsgiBundlesLibraryProviderInstallOperationConfig.java
deleted file mode 100644
index 1414a3b681..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaOsgiBundlesLibraryProviderInstallOperationConfig.java
+++ /dev/null
@@ -1,36 +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.jpa.core.internal.libprov;
-
-import org.eclipse.jpt.common.core.internal.libprov.JptOsgiBundlesLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.libprov.JpaLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-public class JpaOsgiBundlesLibraryProviderInstallOperationConfig
- extends JptOsgiBundlesLibraryProviderInstallOperationConfig
- implements JpaLibraryProviderInstallOperationConfig {
-
- private JpaPlatformDescription jpaPlatform;
-
-
- public JpaOsgiBundlesLibraryProviderInstallOperationConfig() {
- super();
- }
-
- public JpaPlatformDescription getJpaPlatform() {
- return this.jpaPlatform;
- }
-
- public void setJpaPlatform(JpaPlatformDescription jpaPlatform) {
- JpaPlatformDescription old = this.jpaPlatform;
- this.jpaPlatform = jpaPlatform;
- notifyListeners(PROP_JPA_PLATFORM, old, jpaPlatform);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaUserLibraryProviderInstallOperationConfig.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaUserLibraryProviderInstallOperationConfig.java
deleted file mode 100644
index 9f28287e06..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/JpaUserLibraryProviderInstallOperationConfig.java
+++ /dev/null
@@ -1,37 +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.jpa.core.internal.libprov;
-
-import org.eclipse.jpt.common.core.internal.libprov.JptUserLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.libprov.JpaLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-public class JpaUserLibraryProviderInstallOperationConfig
- extends JptUserLibraryProviderInstallOperationConfig
- implements JpaLibraryProviderInstallOperationConfig {
-
- private JpaPlatformDescription jpaPlatform;
-
-
- public JpaUserLibraryProviderInstallOperationConfig() {
- super();
- }
-
-
- public JpaPlatformDescription getJpaPlatform() {
- return this.jpaPlatform;
- }
-
- public void setJpaPlatform(JpaPlatformDescription jpaPlatform) {
- JpaPlatformDescription old = this.jpaPlatform;
- this.jpaPlatform = jpaPlatform;
- notifyListeners(PROP_JPA_PLATFORM, old, jpaPlatform);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderDetector.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderDetector.java
deleted file mode 100644
index 1a7c1eca30..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderDetector.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.libprov;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
-import org.eclipse.jst.common.project.facet.core.libprov.LegacyLibraryProviderDetector;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-
-public class LegacyJpaLibraryProviderDetector
- extends LegacyLibraryProviderDetector
-{
- public static final String LEGACY_JPA_LIBRARY_PROVIDER_ID
- = "jpa-legacy-library-provider"; //$NON-NLS-1$
-
-
- @Override
- public ILibraryProvider detect(
- final IProject project, final IProjectFacet facet) {
- if (facet.equals(JpaFacet.FACET)) {
- return LibraryProviderFramework.getProvider(LEGACY_JPA_LIBRARY_PROVIDER_ID);
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderUninstallOperation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderUninstallOperation.java
deleted file mode 100644
index 996c67dcfd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libprov/LegacyJpaLibraryProviderUninstallOperation.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.libprov;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperation;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
-
-public class LegacyJpaLibraryProviderUninstallOperation
- extends LibraryProviderOperation
-{
- @Override
- public void execute(
- LibraryProviderOperationConfig config, IProgressMonitor monitor)
- throws CoreException {
- // no op - nothing to uninstall
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/AbstractOsgiBundlesLibraryValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/AbstractOsgiBundlesLibraryValidator.java
deleted file mode 100644
index 71e7bf352b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/AbstractOsgiBundlesLibraryValidator.java
+++ /dev/null
@@ -1,64 +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.jpa.core.internal.libval;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jpt.common.core.libval.LibraryValidator;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.jpt.jpa.core.internal.libprov.JpaOsgiBundlesLibraryProviderInstallOperationConfig;
-import org.eclipse.jst.common.project.facet.core.libprov.osgi.BundleReference;
-import org.eclipse.osgi.service.resolver.VersionRange;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-
-public abstract class AbstractOsgiBundlesLibraryValidator
- implements LibraryValidator {
-
- protected IStatus validate(
- JpaOsgiBundlesLibraryProviderInstallOperationConfig config,
- Map<String, VersionRange[]> bundleVersionRanges) {
-
- Map<String, Bundle> bundles = new HashMap<String, Bundle>();
-
- for (BundleReference bundleRef : config.getBundleReferences()) {
- for (String bundleName : bundleVersionRanges.keySet()) {
- // if we've gotten here, the bundle references are resolvable
- if (bundleRef.getBundle().getSymbolicName().equals(bundleName)) {
- bundles.put(bundleName, bundleRef.getBundle());
- }
- }
- }
-
- for (String bundleName : bundleVersionRanges.keySet()) {
- if (bundles.get(bundleName) == null) {
- String message
- = NLS.bind(JptCoreMessages.OSGI_BUNDLES_LIBRARY_VALIDATOR__BUNDLE_NOT_FOUND, bundleName);
- return new Status(IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID, message);
- }
- }
-
- for (String bundleName : bundleVersionRanges.keySet()) {
- Bundle bundle = bundles.get(bundleName);
- for (VersionRange versionRange : bundleVersionRanges.get(bundleName)) {
- if (! versionRange.isIncluded(bundle.getVersion())) {
- String message
- = NLS.bind(JptCoreMessages.OSGI_BUNDLES_LIBRARY_VALIDATOR__IMPROPER_BUNDLE_VERSION, bundleName);
- return new Status(IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID, message);
- }
- }
- }
-
- return Status.OK_STATUS;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericEclipseLinkBundlesLibraryValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericEclipseLinkBundlesLibraryValidator.java
deleted file mode 100644
index 93e8012aab..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericEclipseLinkBundlesLibraryValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.libval;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jpt.common.core.libprov.JptLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.internal.libprov.JpaOsgiBundlesLibraryProviderInstallOperationConfig;
-import org.eclipse.osgi.service.resolver.VersionRange;
-
-public class GenericEclipseLinkBundlesLibraryValidator
- extends AbstractOsgiBundlesLibraryValidator {
-
- public IStatus validate(JptLibraryProviderInstallOperationConfig config) {
- JpaOsgiBundlesLibraryProviderInstallOperationConfig jpaConfig
- = (JpaOsgiBundlesLibraryProviderInstallOperationConfig) config;
- Map<String, VersionRange[]> bundleVersionRanges = new HashMap<String, VersionRange[]>();
- String bundleName = "javax.persistence"; //$NON-NLS-1$
- VersionRange[] versionRanges = new VersionRange[0];
- if (config.getProjectFacetVersion().equals(JpaFacet.VERSION_1_0)) {
- versionRanges = new VersionRange[] {new VersionRange("[1.0, 3.0)")}; //$NON-NLS-1$
- }
- else if (config.getProjectFacetVersion().equals(JpaFacet.VERSION_2_0)) {
- versionRanges = new VersionRange[] {new VersionRange("[2.0, 3.0)")}; //$NON-NLS-1$
- }
- bundleVersionRanges.put(bundleName, versionRanges);
- return validate(jpaConfig, bundleVersionRanges);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericJpaUserLibraryValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericJpaUserLibraryValidator.java
deleted file mode 100644
index 6c7c9de652..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/libval/GenericJpaUserLibraryValidator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.libval;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jpt.common.core.internal.libval.LibValUtil;
-import org.eclipse.jpt.common.core.libprov.JptLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.common.core.libval.LibraryValidator;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.internal.libprov.JpaUserLibraryProviderInstallOperationConfig;
-
-public class GenericJpaUserLibraryValidator
- implements LibraryValidator {
-
- public IStatus validate(JptLibraryProviderInstallOperationConfig config) {
- JpaUserLibraryProviderInstallOperationConfig jpaConfig
- = (JpaUserLibraryProviderInstallOperationConfig) config;
- Set<String> classNames = new HashSet<String>();
- classNames.add("javax.persistence.Entity"); //$NON-NLS-1$
- if (config.getProjectFacetVersion().compareTo(JpaFacet.VERSION_2_0) >= 0) {
- classNames.add("javax.persistence.ElementCollection"); //$NON-NLS-1$
- }
-
- Iterable<IPath> libraryPaths =
- new TransformationIterable<IClasspathEntry, IPath>(jpaConfig.resolve()) {
- @Override
- protected IPath transform(IClasspathEntry o) {
- return o.getPath();
- }
- };
-
- return LibValUtil.validate(libraryPaths, classNames);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java
deleted file mode 100644
index 843f652d24..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.operations;
-
-import java.util.Set;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jpt.common.core.internal.operations.AbstractJptFileCreationDataModelProvider;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public abstract class AbstractJpaFileCreationDataModelProvider
- extends AbstractJptFileCreationDataModelProvider
- implements JpaFileCreationDataModelProperties
-{
- protected AbstractJpaFileCreationDataModelProvider() {
- super();
- }
-
-
- @Override
- public Set<String> getPropertyNames() {
- Set<String> propertyNames = super.getPropertyNames();
- propertyNames.add(VERSION);
- return propertyNames;
- }
-
- @Override
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(VERSION)) {
- return getDefaultVersion();
- }
- return super.getDefaultProperty(propertyName);
- }
-
- protected abstract String getDefaultVersion();
-
-
- // **************** validation *********************************************
-
- @Override
- public IStatus validate(String propertyName) {
- IStatus status = super.validate(propertyName);
- if (! status.isOK()) {
- return status;
- }
- if (propertyName.equals(CONTAINER_PATH)
- || propertyName.equals(VERSION)) {
- status = validateVersion();
- }
- if (! status.isOK()) {
- return status;
- }
-
- return status;
- }
-
- @Override
- protected IStatus validateContainerPathAndFileName() {
- IStatus status = super.validateContainerPathAndFileName();
- if (! status.isOK()) {
- return status;
- }
- IContainer container = getContainer();
- IProject project = getProject(container);
- if (! JpaFacet.isInstalled(project)) {
- // verifies project has jpa facet
- return new Status(
- IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID,
- JptCoreMessages.VALIDATE_PROJECT_NOT_JPA);
- }
- if (! hasSupportedPlatform(project)) {
- // verifies project has platform that supports this file type
- return new Status(
- IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID,
- JptCoreMessages.VALIDATE_PROJECT_IMPROPER_PLATFORM);
- }
- ProjectResourceLocator resourceLocator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
- if ( ! resourceLocator.resourceLocationIsValid(container)) {
- return new Status(
- IStatus.WARNING, JptJpaCorePlugin.PLUGIN_ID,
- JptCoreMessages.VALIDATE_CONTAINER_QUESTIONABLE);
- }
- return Status.OK_STATUS;
- }
-
- protected IStatus validateVersion() {
- if (getProject() == null) {
- return Status.OK_STATUS;
- }
- String fileVersion = getStringProperty(VERSION);
- if (! fileVersionSupported(fileVersion)) {
- return new Status(
- IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID,
- JptCoreMessages.VALIDATE_FILE_VERSION_NOT_SUPPORTED);
- }
- try {
- String jpaFacetVersion = getJpaFacetVersion(getProject());
- if (! fileVersionSupportedForFacetVersion(fileVersion, jpaFacetVersion)) {
- return new Status(
- IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID,
- JptCoreMessages.VALIDATE_FILE_VERSION_NOT_SUPPORTED_FOR_FACET_VERSION);
- }
- }
- catch (CoreException ce) {
- // project should have been validated already, so assume that this will never get hit
- // fall through to final return
- }
- return Status.OK_STATUS;
- }
-
- protected abstract boolean fileVersionSupported(String fileVersion);
-
- protected abstract boolean fileVersionSupportedForFacetVersion(String fileVersion, String jpaFacetVersion);
-
-
- // **************** helper methods *****************************************
-
- protected JpaProject getJpaProject() {
- return getJpaProject(getProject());
- }
-
- protected JpaProject getJpaProject(IProject project) {
- return (project == null) ? null : this.getJpaProject_(project);
- }
-
- protected JpaProject getJpaProject_(IProject project) {
- try {
- return this.getJpaProjectReference(project).getValue();
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- return null;
- }
- }
-
- protected JpaProject.Reference getJpaProjectReference(IProject project) {
- return ((JpaProject.Reference) project.getAdapter(JpaProject.Reference.class));
- }
-
- protected String getJpaFacetVersion(IProject project) throws CoreException {
- IFacetedProject fproj = ProjectFacetsManager.create(project);
- return fproj.getProjectFacetVersion(JpaFacet.FACET).getVersionString();
- }
-
- protected boolean hasSupportedPlatform(IProject project) {
- JpaProject jpaProject = this.getJpaProject(project);
- return (jpaProject != null) && isSupportedPlatformId(jpaProject.getJpaPlatform().getId());
- }
-
- protected boolean isSupportedPlatformId(@SuppressWarnings("unused") String id) {
- return true;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java
deleted file mode 100644
index f2a551d710..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.operations;
-
-
-import static org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties.CONTAINER_PATH;
-import static org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties.FILE_NAME;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.resource.AbstractXmlResourceProvider;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public abstract class AbstractJpaFileCreationOperation
- extends AbstractDataModelOperation
-{
- /**
- * Will be null until container is created or verified to exist
- */
- protected IContainer container;
-
- /**
- * Will be null until file is created or verified to exist
- */
- protected IFile file;
-
-
- protected AbstractJpaFileCreationOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- SubMonitor sm = SubMonitor.convert(monitor, 5);
- // Create folder if it does not exist
- createContainer(sm.newChild(1));
- // Create file
- createFile(sm.newChild(4));
- return OK_STATUS;
- }
-
- protected IContainer getContainer() throws ExecutionException {
- IPath containerPath = (IPath) getDataModel().getProperty(CONTAINER_PATH);
- IContainer container = PlatformTools.getContainer(containerPath);
- if (container == null) {
- throw new ExecutionException("No container path specified"); //$NON-NLS-1$
- }
- return container;
- }
-
- protected IProject getProject() throws ExecutionException {
- return getContainer().getProject();
- }
-
- protected JpaProject getJpaProject() throws ExecutionException {
- IProject project = getProject();
- JpaProject jpaProject = this.getJpaProject(project);
- if (jpaProject == null) {
- throw new ExecutionException("Project does not have JPA facet"); //$NON-NLS-1$
- }
- return jpaProject;
- }
-
- protected JpaProject getJpaProject(IProject project) throws ExecutionException {
- try {
- return this.getJpaProject_(project);
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- throw new ExecutionException(null, ex);
- }
- }
-
- protected JpaProject getJpaProject_(IProject project) throws InterruptedException {
- return this.getJpaProjectReference(project).getValue();
- }
-
- protected JpaProject.Reference getJpaProjectReference(IProject project) {
- return (JpaProject.Reference) project.getAdapter(JpaProject.Reference.class);
- }
-
- /**
- * This method will create the container as specified in the data model if it does not exist.
- */
- protected void createContainer(IProgressMonitor monitor) throws ExecutionException {
- IContainer container = getContainer();
- if (! container.exists()) {
- if (container.getType() == IContainer.PROJECT) {
- throw new ExecutionException("Project does not exist");
- }
- else if (container.getType() == IContainer.FOLDER) {
- try {
- ((IFolder) container).create(true, true, null);
- }
- catch (CoreException e) {
- throw new ExecutionException("Could not create folder", e); //$NON-NLS-1$
- }
- }
- else {
- throw new ExecutionException("Container is not a project or folder"); //$NON-NLS-1$
- }
- }
- this.container = container;
- }
-
- protected void createFile(IProgressMonitor monitor) throws ExecutionException {
- String fileName = getDataModel().getStringProperty(FILE_NAME);
- IFile newFile = this.container.getFile(new Path(fileName));
- AbstractXmlResourceProvider resourceProvider = getXmlResourceProvider(newFile);
- try {
- resourceProvider.createFileAndResource(getDataModel(), monitor);
- }
- catch (CoreException e) {
- throw new ExecutionException("Could not create file", e);
- }
- this.file = newFile;
- }
-
- @Override
- public ISchedulingRule getSchedulingRule() {
- try {
- return this.getProject();
- } catch (ExecutionException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- protected abstract AbstractXmlResourceProvider getXmlResourceProvider(IFile file);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/JpaFileCreationDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/JpaFileCreationDataModelProperties.java
deleted file mode 100644
index e321504544..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/JpaFileCreationDataModelProperties.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.operations;
-
-import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
-
-public interface JpaFileCreationDataModelProperties extends JptFileCreationDataModelProperties
-{
-
- /**
- * Required, type {@link String}, identifies the version of the file to create
- */
- String VERSION = "JpaFileCreationDataModelProperties.VERSION"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProperties.java
deleted file mode 100644
index 2f7bb7ebc5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProperties.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.core.internal.operations;
-
-public interface OrmFileCreationDataModelProperties
- extends JpaFileCreationDataModelProperties
-{
- /**
- * Optional, type AccessType, specifies the default access type (or null)
- */
- String DEFAULT_ACCESS = "OrmFileCreationDataModelProperties.DEFAULT_ACCESS"; //$NON-NLS-1$
-
- /**
- * Required, type Boolean, specifies whether to add a reference to the file
- * in the persistence unit
- */
- String ADD_TO_PERSISTENCE_UNIT = "OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT"; //$NON-NLS-1$
-
- /**
- * Optional (unless ADD_TO_PERSISTENCE_UNIT property is true), type String,
- * identifies the persistence unit to which to add a reference to the file
- */
- String PERSISTENCE_UNIT = "OrmFileCreationDataModelProperties.PERSISTENCE_UNIT"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProvider.java
deleted file mode 100644
index 473d491cac..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationDataModelProvider.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.operations;
-
-import java.util.Set;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.jpt.jpa.core.resource.orm.AccessType;
-import org.eclipse.jpt.jpa.core.resource.orm.JPA;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class OrmFileCreationDataModelProvider
- extends AbstractJpaFileCreationDataModelProvider
- implements OrmFileCreationDataModelProperties
-{
- /**
- * required default constructor
- */
- public OrmFileCreationDataModelProvider() {
- super();
- }
-
-
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new OrmFileCreationOperation(getDataModel());
- }
-
- @Override
- public Set<String> getPropertyNames() {
- Set<String> propertyNames = super.getPropertyNames();
- propertyNames.add(DEFAULT_ACCESS);
- propertyNames.add(ADD_TO_PERSISTENCE_UNIT);
- propertyNames.add(PERSISTENCE_UNIT);
- return propertyNames;
- }
-
- @Override
- public boolean isPropertyEnabled(String propertyName) {
- if (propertyName.equals(PERSISTENCE_UNIT)) {
- return getBooleanProperty(ADD_TO_PERSISTENCE_UNIT);
- }
- return super.isPropertyEnabled(propertyName);
- }
-
- @Override
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(DEFAULT_ACCESS)) {
- return null;
- }
- else if (propertyName.equals(ADD_TO_PERSISTENCE_UNIT)) {
- return Boolean.FALSE;
- }
- else if (propertyName.equals(PERSISTENCE_UNIT)) {
- PersistenceUnit pUnit = getDefaultPersistenceUnit();
- if (pUnit != null) {
- return pUnit.getName();
- }
- }
- return super.getDefaultProperty(propertyName);
- }
-
- @Override
- protected String getDefaultFileName() {
- return JptJpaCorePlugin.DEFAULT_ORM_XML_RUNTIME_PATH.lastSegment();
- }
-
- @Override
- protected String getDefaultVersion() {
- if (getProject() == null) {
- return null;
- }
- JpaPlatform jpaPlatform;
- JpaProject jpaProject = getJpaProject();
- jpaPlatform = (jpaProject == null)
- ? JptJpaCorePlugin.getJpaPlatformManager().buildJpaPlatformImplementation(getProject())
- : jpaProject.getJpaPlatform();
- return jpaPlatform.getMostRecentSupportedResourceType(JptJpaCorePlugin.ORM_XML_CONTENT_TYPE).getVersion();
- }
-
- protected PersistenceUnit getDefaultPersistenceUnit() {
- JpaProject jpaProject = getJpaProject();
- if (jpaProject == null) {
- return null;
- }
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() == 0) {
- return null;
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- @Override
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean ok = super.propertySet(propertyName, propertyValue);
- if (propertyName.equals(CONTAINER_PATH)) {
- this.model.notifyPropertyChange(PERSISTENCE_UNIT, IDataModel.DEFAULT_CHG);
- this.model.notifyPropertyChange(PERSISTENCE_UNIT, IDataModel.VALID_VALUES_CHG);
- }
- else if (propertyName.equals(ADD_TO_PERSISTENCE_UNIT)) {
- this.model.notifyPropertyChange(PERSISTENCE_UNIT, IDataModel.ENABLE_CHG);
- }
- return ok;
- }
-
- @Override
- public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
- if (propertyName.equals(DEFAULT_ACCESS)) {
- DataModelPropertyDescriptor[] accessTypes = new DataModelPropertyDescriptor[3];
- accessTypes[0] = accessPropertyDescriptor(null);
- accessTypes[1] = accessPropertyDescriptor(AccessType.FIELD);
- accessTypes[2] = accessPropertyDescriptor(AccessType.PROPERTY);
- return accessTypes;
- }
- else if (propertyName.equals(PERSISTENCE_UNIT)) {
- return ArrayTools.array(
- new TransformationIterable<String, DataModelPropertyDescriptor>(new CompositeIterable<String>(null, getPersistenceUnitNames())) {
- @Override
- protected DataModelPropertyDescriptor transform(String next) {
- return persistenceUnitPropertyDescriptor(next);
- }
- },
- new DataModelPropertyDescriptor[0]);
- }
- return super.getValidPropertyDescriptors(propertyName);
- }
-
- @Override
- public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
- if (propertyName.equals(DEFAULT_ACCESS)) {
- return accessPropertyDescriptor((String) getProperty(DEFAULT_ACCESS));
- }
- if (propertyName.equals(PERSISTENCE_UNIT)) {
- return persistenceUnitPropertyDescriptor(getStringProperty(PERSISTENCE_UNIT));
- }
- return super.getPropertyDescriptor(propertyName);
- }
-
- protected DataModelPropertyDescriptor accessPropertyDescriptor(String accessType) {
- if (accessType == null) {
- return new DataModelPropertyDescriptor(null, JptCoreMessages.NONE);
- }
- return new DataModelPropertyDescriptor(accessType);
- }
-
- DataModelPropertyDescriptor persistenceUnitPropertyDescriptor(String persistenceUnitName) {
- if (StringTools.stringIsEmpty(persistenceUnitName)) {
- return new DataModelPropertyDescriptor(null, JptCoreMessages.NONE);
- }
- return new DataModelPropertyDescriptor(persistenceUnitName);
- }
-
-
- // **************** validation *********************************************
-
- @Override
- public IStatus validate(String propertyName) {
- IStatus status = super.validate(propertyName);
- if (! status.isOK()) {
- return status;
- }
-
- if (propertyName.equals(ADD_TO_PERSISTENCE_UNIT)
- || propertyName.equals(PERSISTENCE_UNIT)) {
- status = validatePersistenceUnit();
- }
- if (! status.isOK()) {
- return status;
- }
-
- return Status.OK_STATUS;
- }
-
- @Override
- protected boolean fileVersionSupported(String fileVersion) {
- return (fileVersion.equals(JPA.SCHEMA_VERSION)
- || fileVersion.equals(JPA2_0.SCHEMA_VERSION));
- }
-
- @Override
- protected boolean fileVersionSupportedForFacetVersion(String fileVersion, String jpaFacetVersion) {
- if (jpaFacetVersion.equals(JpaFacet.VERSION_1_0.getVersionString())
- && fileVersion.equals(JPA2_0.SCHEMA_VERSION)) {
- return false;
- }
- return true;
- }
-
- protected IStatus validatePersistenceUnit() {
- boolean addToPUnit = getBooleanProperty(ADD_TO_PERSISTENCE_UNIT);
- String projectName = getProject().getName();
- String pUnitName = getStringProperty(PERSISTENCE_UNIT);
- if (addToPUnit) {
- if (StringTools.stringIsEmpty(pUnitName)) {
- return new Status(
- IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID,
- NLS.bind(JptCoreMessages.VALIDATE_PERSISTENCE_UNIT_DOES_NOT_SPECIFIED, pUnitName));
- }
- if (getPersistenceUnit() == null) {
- return new Status(
- IStatus.ERROR, JptJpaCorePlugin.PLUGIN_ID,
- NLS.bind(JptCoreMessages.VALIDATE_PERSISTENCE_UNIT_NOT_IN_PROJECT, pUnitName, projectName));
- }
- }
- return Status.OK_STATUS;
- }
-
-
- // **************** helper methods *****************************************
-
- protected PersistenceUnit getPersistenceUnit() {
- String pUnitName = getStringProperty(PERSISTENCE_UNIT);
- JpaProject jpaProject =
- (StringTools.stringIsEmpty(pUnitName)) ? null : getJpaProject();
- PersistenceXml persistenceXml =
- (jpaProject == null) ? null : jpaProject.getRootContextNode().getPersistenceXml();
- Persistence persistence =
- (persistenceXml == null) ? null : persistenceXml.getPersistence();
- if (persistence != null) {
- for (PersistenceUnit next : persistence.getPersistenceUnits()) {
- if (pUnitName.equals(next.getName())) {
- return next;
- }
- }
- }
- return null;
- }
-
- protected Iterable<PersistenceUnit> getPersistenceUnits() {
- //only get the persistence units for the selected JpaProject,
- //if no jpa project is selected, then no persistence units will be listed in the combo
- JpaProject jpaProject = getJpaProject();
- PersistenceXml persistenceXml = (jpaProject == null) ? null : jpaProject.getRootContextNode().getPersistenceXml();
- Persistence persistence = (persistenceXml == null) ? null : persistenceXml.getPersistence();
- return (persistence == null) ? EmptyIterable.<PersistenceUnit>instance() : persistence.getPersistenceUnits();
- }
-
- protected Iterable<String> getPersistenceUnitNames() {
- return new TransformationIterable<PersistenceUnit, String>(getPersistenceUnits()) {
- @Override
- protected String transform(PersistenceUnit next) {
- return next.getName();
- }
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java
deleted file mode 100644
index 3244c83a38..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.operations;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.resource.orm.OrmXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.resource.AbstractXmlResourceProvider;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class OrmFileCreationOperation
- extends AbstractJpaFileCreationOperation
- implements OrmFileCreationDataModelProperties
-{
- public OrmFileCreationOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- SubMonitor sm = SubMonitor.convert(monitor, 5);
- IStatus status = super.execute(sm.newChild(4), info);
-
- if (status.isOK()) {
- addMappingFileToPersistenceXml();
- sm.worked(1);
- }
-
- return OK_STATUS;
- }
-
- protected PersistenceUnit getPersistenceUnit() throws ExecutionException {
- String pUnitName = getDataModel().getStringProperty(PERSISTENCE_UNIT);
- JpaProject jpaProject = getJpaProject();
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- throw new ExecutionException("Project does not have a persistence.xml file"); //$NON-NLS-1$
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- throw new ExecutionException("persistence.xml does not have a persistence node."); //$NON-NLS-1$
- }
- for (PersistenceUnit pUnit : persistence.getPersistenceUnits()) {
- if (pUnitName.equals(pUnit.getName())) {
- return pUnit;
- }
- }
- throw new ExecutionException("persistence.xml does not have persistence unit named \'" + pUnitName + "\'"); //$NON-NLS-1$
- }
-
- protected void addMappingFileToPersistenceXml() throws ExecutionException {
- if (this.getDataModel().getBooleanProperty(ADD_TO_PERSISTENCE_UNIT)) {
- this.addMappingFileToPersistenceXml_();
- }
- }
-
- protected void addMappingFileToPersistenceXml_() throws ExecutionException {
- PersistenceUnit pUnit = getPersistenceUnit();
-
- IPath containerPath = (IPath) getDataModel().getProperty(CONTAINER_PATH);
- String fileName = getDataModel().getStringProperty(FILE_NAME);
- IContainer container = PlatformTools.getContainer(containerPath);
- IPath filePath = container.getFullPath().append(fileName);
- IProject project = container.getProject();
- ProjectResourceLocator locator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
- IPath runtimePath = locator.getRuntimePath(filePath);
- boolean found = false;
- for (MappingFileRef ref : pUnit.getSpecifiedMappingFileRefs()) {
- if (runtimePath.equals(ref.getFileName())) {
- found = true;
- break;
- }
- }
- if ( ! found) {
- pUnit.addSpecifiedMappingFileRef(runtimePath.toString());
- }
- this.getJpaProject().getPersistenceXmlResource().save();
- }
-
- @Override
- protected AbstractXmlResourceProvider getXmlResourceProvider(IFile file) {
- return OrmXmlResourceProvider.getXmlResourceProvider(file);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProperties.java
deleted file mode 100644
index 9b74e68753..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProperties.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.operations;
-
-public interface PersistenceFileCreationDataModelProperties
- extends JpaFileCreationDataModelProperties
-{
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProvider.java
deleted file mode 100644
index 506f97545a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationDataModelProvider.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.internal.operations;
-
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.resource.persistence.JPA;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.JPA2_0;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class PersistenceFileCreationDataModelProvider
- extends AbstractJpaFileCreationDataModelProvider
- implements PersistenceFileCreationDataModelProperties
-{
- /**
- * required default constructor
- */
- public PersistenceFileCreationDataModelProvider() {
- super();
- }
-
-
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new PersistenceFileCreationOperation(getDataModel());
- }
-
- @Override
- protected String getDefaultFileName() {
- return JptJpaCorePlugin.DEFAULT_PERSISTENCE_XML_RUNTIME_PATH.lastSegment();
- }
-
- @Override
- protected String getDefaultVersion() {
- if (getProject() == null) {
- return null;
- }
- JpaPlatform jpaPlatform;
- JpaProject jpaProject = getJpaProject();
- jpaPlatform = (jpaProject == null)
- ? JptJpaCorePlugin.getJpaPlatformManager().buildJpaPlatformImplementation(getProject())
- : jpaProject.getJpaPlatform();
- return jpaPlatform.getMostRecentSupportedResourceType(JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE).getVersion();
- }
-
-
- // **************** validation *********************************************
-
- @Override
- protected boolean fileVersionSupported(String fileVersion) {
- return (fileVersion.equals(JPA.SCHEMA_VERSION)
- || fileVersion.equals(JPA2_0.SCHEMA_VERSION));
- }
-
- @Override
- protected boolean fileVersionSupportedForFacetVersion(String fileVersion, String jpaFacetVersion) {
- if (jpaFacetVersion.equals(JpaFacet.VERSION_1_0.getVersionString())
- && fileVersion.equals(JPA2_0.SCHEMA_VERSION)) {
- return false;
- }
- return true;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationOperation.java
deleted file mode 100644
index 996b0454b3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/PersistenceFileCreationOperation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.internal.operations;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jpt.jpa.core.internal.resource.persistence.PersistenceXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.resource.AbstractXmlResourceProvider;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class PersistenceFileCreationOperation
- extends AbstractJpaFileCreationOperation
- implements PersistenceFileCreationDataModelProperties
-{
- public PersistenceFileCreationOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
-
- @Override
- protected AbstractXmlResourceProvider getXmlResourceProvider(IFile file) {
- return PersistenceXmlResourceProvider.getXmlResourceProvider(file);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JavaElementAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JavaElementAdapterFactory.java
deleted file mode 100644
index 4e695c9a13..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JavaElementAdapterFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal.platform;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-/**
- * Factory to build Dali adapters for an {@link IJavaElement}:<ul>
- * <li>{@link JpaPlatformDescription}
- * </ul>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- */
-public class JavaElementAdapterFactory
- implements IAdapterFactory
-{
- private static final Class<?>[] ADAPTER_LIST = new Class[] {
- JpaPlatformDescription.class
- };
-
- public Class<?>[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
- if (adaptableObject instanceof IJavaElement) {
- return this.getAdapter((IJavaElement) adaptableObject, adapterType);
- }
- return null;
- }
-
- private Object getAdapter(IJavaElement javaElement, Class<?> adapterType) {
- if (adapterType == JpaPlatformDescription.class) {
- return javaElement.getResource().getAdapter(JpaPlatformDescription.class);
- }
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformDescriptionImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformDescriptionImpl.java
deleted file mode 100644
index c8198fa4f8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformDescriptionImpl.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.platform;
-
-import org.eclipse.jpt.common.core.internal.utility.XPointTools;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JpaPlatformFactory;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.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 = XPointTools.instantiate(
- this.pluginId, JpaPlatformManagerImpl.QUALIFIED_EXTENSION_POINT_ID,
- this.factoryClassName, JpaPlatformFactory.class);
- return factory.buildJpaPlatform(getId());
- }
-
- @Override
- public String toString() {
- return this.label;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformGroupDescriptionImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformGroupDescriptionImpl.java
deleted file mode 100644
index 2ca9afe58c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformGroupDescriptionImpl.java
+++ /dev/null
@@ -1,68 +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.jpa.core.internal.platform;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperIterableWrapper;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformGroupDescription;
-
-public class JpaPlatformGroupDescriptionImpl
- implements JpaPlatformGroupDescription {
-
- private String id;
- private String pluginId;
- private String label;
- private Map<String, JpaPlatformDescriptionImpl> platforms;
-
-
- JpaPlatformGroupDescriptionImpl() {
- this.platforms = new HashMap<String, JpaPlatformDescriptionImpl>();
- }
-
- 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;
- }
-
- void addPlatform(JpaPlatformDescriptionImpl platform) {
- this.platforms.put(platform.getId(), platform);
- }
-
- public Iterable<JpaPlatformDescription> getPlatforms() {
- return new SuperIterableWrapper<JpaPlatformDescription>(CollectionTools.collection(this.platforms.values()));
- }
-
- @Override
- public String toString() {
- return this.label;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformManagerImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformManagerImpl.java
deleted file mode 100644
index 14ade2c2f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformManagerImpl.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.platform;
-
-import static org.eclipse.jpt.common.core.internal.utility.XPointTools.*;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jpt.common.core.internal.utility.XPointTools.XPointException;
-import org.eclipse.jpt.common.utility.internal.KeyedSet;
-import org.eclipse.jpt.common.utility.internal.iterables.SuperIterableWrapper;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformGroupDescription;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformManager;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * Singleton registry for storing all the registered JPA platform configuration
- * elements and instantiating JPA platforms from them.
- */
-public class JpaPlatformManagerImpl
- implements JpaPlatformManager {
-
- static final String EXTENSION_POINT_ID = "jpaPlatforms"; //$NON-NLS-1$
- static final String QUALIFIED_EXTENSION_POINT_ID = JptJpaCorePlugin.PLUGIN_ID_ + EXTENSION_POINT_ID;
- static final String PLATFORM_GROUP_ELEMENT = "jpaPlatformGroup"; //$NON-NLS-1$
- static final String PLATFORM_ELEMENT = "jpaPlatform"; //$NON-NLS-1$
- static final String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- static final String LABEL_ATTRIBUTE = "label"; //$NON-NLS-1$
- static final String FACTORY_CLASS_ATTRIBUTE = "factoryClass"; //$NON-NLS-1$
- static final String JPA_FACET_VERSION_ATTRIBUTE = "jpaFacetVersion"; //$NON-NLS-1$
- static final String DEFAULT_ATTRIBUTE = "default"; //$NON-NLS-1$
- static final String GROUP_ELEMENT = "group"; //$NON-NLS-1$
-
-
- private static final JpaPlatformManagerImpl INSTANCE = new JpaPlatformManagerImpl();
-
-
- public static JpaPlatformManagerImpl instance() {
- return INSTANCE;
- }
-
-
- private KeyedSet<String, JpaPlatformGroupDescriptionImpl> jpaPlatformGroupDescriptions;
- private KeyedSet<String, JpaPlatformDescriptionImpl> jpaPlatformDescriptions;
-
-
- // ********** constructor/initialization **********
-
- private JpaPlatformManagerImpl() {
- super();
- this.jpaPlatformGroupDescriptions = new KeyedSet<String, JpaPlatformGroupDescriptionImpl>();
- this.jpaPlatformDescriptions = new KeyedSet<String, JpaPlatformDescriptionImpl>();
- readExtensions();
- }
-
-
- private void readExtensions() {
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- final IExtensionPoint xpoint
- = registry.getExtensionPoint(JptJpaCorePlugin.PLUGIN_ID, EXTENSION_POINT_ID);
-
- if (xpoint == null) {
- throw new IllegalStateException();
- }
-
- List<IConfigurationElement> platformGroupConfigs = new ArrayList<IConfigurationElement>();
- List<IConfigurationElement> platformConfigs = new ArrayList<IConfigurationElement>();
-
- for (IExtension extension : xpoint.getExtensions()) {
- for (IConfigurationElement element : extension.getConfigurationElements()) {
- if (element.getName().equals(PLATFORM_GROUP_ELEMENT)) {
- platformGroupConfigs.add(element);
- }
- else if (element.getName().equals(PLATFORM_ELEMENT)) {
- platformConfigs.add(element);
- }
- }
- }
-
- for (IConfigurationElement element : platformGroupConfigs) {
- readPlatformGroupExtension(element);
- }
-
- for (IConfigurationElement element : platformConfigs) {
- readPlatformExtension(element);
- }
- }
-
- private void readPlatformGroupExtension(IConfigurationElement element) {
- try {
- final JpaPlatformGroupDescriptionImpl desc = new JpaPlatformGroupDescriptionImpl();
-
- // plug-in id
- desc.setPluginId(element.getContributor().getName());
-
- // id
- desc.setId(findRequiredAttribute(element, ID_ATTRIBUTE));
-
- if (this.jpaPlatformGroupDescriptions.containsKey(desc.getId())) {
- logDuplicateExtension(QUALIFIED_EXTENSION_POINT_ID, ID_ATTRIBUTE, desc.getId());
- throw new XPointException();
- }
-
- // label
- desc.setLabel(findRequiredAttribute(element, LABEL_ATTRIBUTE));
-
- this.jpaPlatformGroupDescriptions.addItem(desc.getId(), desc);
- }
- catch (XPointException e) {
- // Ignore and continue. The problem has already been reported to the user
- // in the log.
- }
- }
-
- private void readPlatformExtension(IConfigurationElement element) {
- try {
- final JpaPlatformDescriptionImpl desc = new JpaPlatformDescriptionImpl();
-
- // plug-in id
- desc.setPluginId(element.getContributor().getName());
-
- // id
- desc.setId(findRequiredAttribute(element, ID_ATTRIBUTE));
-
- if (this.jpaPlatformDescriptions.containsKey(desc.getId())) {
- logDuplicateExtension(QUALIFIED_EXTENSION_POINT_ID, ID_ATTRIBUTE, desc.getId());
- throw new XPointException();
- }
-
- // label
- desc.setLabel(findRequiredAttribute(element, LABEL_ATTRIBUTE));
-
- // factory class
- desc.setFactoryClassName(findRequiredAttribute(element, FACTORY_CLASS_ATTRIBUTE));
-
- // JPA facet version
- String jpaFacetVersionString = element.getAttribute(JPA_FACET_VERSION_ATTRIBUTE);
- if (jpaFacetVersionString != null) {
- IProjectFacetVersion jpaFacetVersion = JpaFacet.FACET.getVersion(jpaFacetVersionString);
- if (jpaFacetVersion != null) {
- desc.setJpaFacetVersion(jpaFacetVersion);
- }
- else {
- logInvalidValue(element, JPA_FACET_VERSION_ATTRIBUTE, jpaFacetVersionString);
- throw new XPointException();
- }
- }
-
- // default
- String defaultString = element.getAttribute(DEFAULT_ATTRIBUTE);
- if (defaultString != null) {
- if (defaultString.equals("true")) {
- desc.setDefault(true);
- }
- else if (defaultString.equals("false")) {
- desc.setDefault(false);
- }
- else {
- logInvalidValue(element, DEFAULT_ATTRIBUTE, defaultString);
- throw new XPointException();
- }
- }
-
- // group
- String groupId = element.getAttribute(GROUP_ELEMENT);
- if (groupId != null) {
- JpaPlatformGroupDescriptionImpl group = this.jpaPlatformGroupDescriptions.getItem(groupId);
- if (group != null) {
- desc.setGroup(group);
- group.addPlatform(desc);
- }
- else {
- logInvalidValue(element, GROUP_ELEMENT, groupId);
- throw new XPointException();
- }
- }
-
- this.jpaPlatformDescriptions.addItem(desc.getId(), desc);
- }
- catch (XPointException e) {
- // Ignore and continue. The problem has already been reported to the user
- // in the log.
- }
- }
-
-
- // ********** public methods **********
-
- public Iterable<JpaPlatformGroupDescription> getJpaPlatformGroups() {
- return new SuperIterableWrapper<JpaPlatformGroupDescription>(this.jpaPlatformGroupDescriptions.getItemSet());
- }
-
- public JpaPlatformGroupDescription getJpaPlatformGroup(String groupId) {
- return this.jpaPlatformGroupDescriptions.getItem(groupId);
- }
-
- public Iterable<JpaPlatformDescription> getJpaPlatforms() {
- return new SuperIterableWrapper<JpaPlatformDescription>(this.jpaPlatformDescriptions.getItemSet());
- }
-
- public JpaPlatformDescription getJpaPlatform(String platformId) {
- return this.jpaPlatformDescriptions.getItem(platformId);
- }
-
- public JpaPlatformDescription getDefaultJpaPlatform(IProjectFacetVersion jpaFacetVersion) {
- for (JpaPlatformDescription platform : getJpaPlatforms()) {
- if (platform.isDefault() && platform.supportsJpaFacetVersion(jpaFacetVersion)) {
- return platform;
- }
- }
- return null;
- }
- public JpaPlatform buildJpaPlatformImplementation(IProject project) {
- String jpaPlatformId = JptJpaCorePlugin.getJpaPlatformId(project);
- JpaPlatformDescriptionImpl platformDesc = this.jpaPlatformDescriptions.getItem(jpaPlatformId);
- if (platformDesc == null) {
- throw new IllegalArgumentException("Project does not have a recognized JPA platform.");
- }
- return platformDesc.buildJpaPlatform();
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformTester.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformTester.java
deleted file mode 100644
index 8626d5f465..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/JpaPlatformTester.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.platform;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformGroupDescription;
-
-/**
- * Property tester for {@link JpaPlatformDescription}.
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>
- */
-public class JpaPlatformTester
- extends PropertyTester
-{
- public static final String JPA_PLATFORM = "jpaPlatform"; //$NON-NLS-1$
- public static final String JPA_PLATFORM_GROUP = "jpaPlatformGroup"; //$NON-NLS-1$
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof JpaPlatformDescription) {
- return this.test((JpaPlatformDescription) receiver, property, expectedValue);
- }
- return false;
- }
-
- private boolean test(JpaPlatformDescription platformDescription, String property, Object expectedValue) {
- if (property.equals(JPA_PLATFORM)) {
- JpaPlatformDescription expected = this.getJpaPlatformDescription((String) expectedValue);
- return Tools.valuesAreEqual(platformDescription, expected);
- }
- if (property.equals(JPA_PLATFORM_GROUP)) {
- JpaPlatformGroupDescription expected = this.getJpaPlatformGroupDescription((String) expectedValue);
- return Tools.valuesAreEqual(platformDescription.getGroup(), expected);
- }
- return false;
- }
-
- private JpaPlatformDescription getJpaPlatformDescription(String id) {
- return JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatform(id);
- }
-
- private JpaPlatformGroupDescription getJpaPlatformGroupDescription(String id) {
- return JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatformGroup(id);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/ResourceAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/ResourceAdapterFactory.java
deleted file mode 100644
index 5c5dda6863..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/ResourceAdapterFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.internal.platform;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-/**
- * Factory to build Dali adapters for an {@link IResource}:<ul>
- * <li>{@link JpaPlatformDescription}
- * </ul>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- */
-public class ResourceAdapterFactory
- implements IAdapterFactory
-{
- private static final Class<?>[] ADAPTER_LIST = new Class[] {
- JpaPlatformDescription.class
- };
-
- public Class<?>[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
- if (adaptableObject instanceof IResource) {
- return this.getAdapter((IResource) adaptableObject, adapterType);
- }
- return null;
- }
-
- private Object getAdapter(IResource resource, Class<?> adapterType) {
- if (adapterType == JpaPlatformDescription.class) {
- return this.getJpaPlatformDescription(resource);
- }
- return null;
- }
-
- private JpaPlatformDescription getJpaPlatformDescription(IResource resource) {
- // TODO go directly to the JpaPlatformManager
- return JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatform(JptJpaCorePlugin.getJpaPlatformId(resource.getProject()));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferenceInitializer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferenceInitializer.java
deleted file mode 100644
index c8136cf4b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferenceInitializer.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.internal.prefs;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
-/**
- * Class used to initialize default preference values.
- * See <code>org.eclipse.core.runtime.preferences</code> extension point.
- */
-public class JpaPreferenceInitializer
- extends AbstractPreferenceInitializer
-{
- @Override
- public void initializeDefaultPreferences() {
- JpaPreferencesManager.initializeDefaultPreferences();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java
deleted file mode 100644
index b53836e2dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/prefs/JpaPreferencesManager.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2012 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.core.internal.prefs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.JptCoreMessages;
-import org.eclipse.jpt.jpa.core.internal.platform.JpaPlatformManagerImpl;
-import org.eclipse.jpt.jpa.core.platform.GenericPlatform;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * JptPreferencesManager
- */
-public class JpaPreferencesManager
-{
- private final IProject project;
-
- private static volatile boolean flushPreferences = true;
-
- // ********** public constants **********
-
- /**
- * The key for storing a JPA project's platform ID in the Eclipse
- * project's preferences.
- */
- protected static final String JPA_PLATFORM_PREF_KEY = JptJpaCorePlugin.LEGACY_PLUGIN_ID_ + "platform"; //$NON-NLS-1$
-
- /**
- * The old key for storing the default JPA platform ID in the workspace preferences.
- * @deprecated As of version 2.3. Instead use {@link #DEFAULT_JPA_PLATFORM_1_0_PREF_KEY} or
- * {@link #DEFAULT_JPA_PLATFORM_2_0_PREF_KEY}
- */
- @Deprecated
- public static final String DEFAULT_JPA_PLATFORM_PREF_KEY = "defaultJpaPlatform"; //$NON-NLS-1$
-
- /**
- * The key for storing the default JPA platform ID for JPA 1.0 in the workspace preferences.
- */
- public static final String DEFAULT_JPA_PLATFORM_1_0_PREF_KEY =
- DEFAULT_JPA_PLATFORM_PREF_KEY + "_" + JpaFacet.VERSION_1_0.getVersionString(); //$NON-NLS-1$
-
- /**
- * The key for storing the default JPA platform ID for JPA 2.0 in the workspace preferences.
- */
- public static final String DEFAULT_JPA_PLATFORM_2_0_PREF_KEY =
- DEFAULT_JPA_PLATFORM_PREF_KEY + "_" + JpaFacet.VERSION_2_0.getVersionString(); //$NON-NLS-1$
-
- /**
- * The key for storing a JPA project's "discover" flag in the Eclipse
- * project's preferences.
- */
- public static final String DISCOVER_ANNOTATED_CLASSES = JptJpaCorePlugin.PLUGIN_ID_ + "discoverAnnotatedClasses"; //$NON-NLS-1$
-
- //bug 354780 - made the mistake of changing the project metadata in the 3.0 release
- protected static final String LEGACY_DISCOVER_ANNOTATED_CLASSES = JptJpaCorePlugin.LEGACY_PLUGIN_ID_ + "discoverAnnotatedClasses"; //$NON-NLS-1$
-
- /**
- * The key for storing the name of a JPA project's metamodel source folder
- * in the Eclipse project's preferences.
- */
- public static final String METAMODEL_SOURCE_FOLDER_NAME = JptJpaCorePlugin.PLUGIN_ID_ + "metamodelSourceFolderName"; //$NON-NLS-1$
-
- //bug 354780 - made the mistake of changing the project metadata in the 3.0 release
- protected static final String LEGACY_METAMODEL_SOURCE_FOLDER_NAME = JptJpaCorePlugin.LEGACY_PLUGIN_ID_ + "metamodelSourceFolderName"; //$NON-NLS-1$
-
-
- // ********** static methods **************************************************
-
- public static void clearWorkspacePreferences() throws BackingStoreException {
- getLegacyWorkspacePreferences().clear();
- }
-
- // ********** preferences **********
-
- /**
- * Return the legacy Dali (org.eclipse.jpt.core) preferences for the specified context.
- */
- private static IEclipsePreferences getLegacyPreferences(IScopeContext context) {
- return context.getNode(JptJpaCorePlugin.LEGACY_PLUGIN_ID);
- }
-
- /**
- * Return the Dali (org.eclipse.jpt.jpa.core) preferences for the specified context.
- */
- private static IEclipsePreferences getPreferences(IScopeContext context) {
- return context.getNode(JptJpaCorePlugin.PLUGIN_ID);
- }
-
- /**
- * Return the legacy Dali (org.eclipse.jpt.core) preferences for the current workspace instance.
- */
- public static IEclipsePreferences getLegacyWorkspacePreferences() {
- return getLegacyPreferences(InstanceScope.INSTANCE);
- }
-
- /**
- * Return the legacy Dali (org.eclipse.jpt.core) default preferences
- */
- public static IEclipsePreferences getLegacyDefaultPreferences() {
- return getLegacyPreferences(DefaultScope.INSTANCE);
- }
-
- /**
- * Return the Dali (org.eclipse.jpt.jpa.core) default preferences
- * @see JpaPreferenceInitializer
- */
- public static IEclipsePreferences getDefaultPreferences() {
- return getPreferences(DefaultScope.INSTANCE);
- }
-
- public static void initializeDefaultPreferences() {
- IEclipsePreferences node = getDefaultPreferences();
-
- // default JPA platforms
- JpaPlatformDescription defaultPlatform_1_0 =
- JpaPlatformManagerImpl.instance().getDefaultJpaPlatform(JpaFacet.VERSION_1_0);
- if (defaultPlatform_1_0 == null) {
- defaultPlatform_1_0 = GenericPlatform.VERSION_1_0;
- }
- node.put(DEFAULT_JPA_PLATFORM_1_0_PREF_KEY, defaultPlatform_1_0.getId());
-
- JpaPlatformDescription defaultPlatform_2_0 =
- JpaPlatformManagerImpl.instance().getDefaultJpaPlatform(JpaFacet.VERSION_2_0);
- if (defaultPlatform_2_0 == null) {
- defaultPlatform_2_0 = GenericPlatform.VERSION_2_0;
- }
- node.put(DEFAULT_JPA_PLATFORM_2_0_PREF_KEY, defaultPlatform_2_0.getId());
- }
-
- // ********** workspace preference **********
-
- protected static String getLegacyWorkspacePreference(String key, String defaultValue) {
- String value = getLegacyWorkspacePreferences().get(key, defaultValue);
- return (StringTools.stringIsEmpty(value)) ? defaultValue : value;
- }
-
- protected static String getLegacyWorkspacePreference(String key) {
- return getLegacyWorkspacePreferences().get(key, null);
- }
-
- public static void setLegacyWorkspacePreference(String key, String value) {
- IEclipsePreferences wkspPrefs = getLegacyWorkspacePreferences();
- if(value == null) {
- wkspPrefs.remove(key);
- }
- else {
- wkspPrefs.put(key, value);
- }
- flush(wkspPrefs);
- }
-
- protected static boolean getLegacyWorkspacePreference(String key, boolean defaultBooleanValue) {
- return getLegacyWorkspacePreferences().getBoolean(key, defaultBooleanValue);
- }
-
- public static void setLegacyWorkspacePreference(String key, boolean booleanValue) {
- IEclipsePreferences wkspPrefs = getLegacyWorkspacePreferences();
- wkspPrefs.putBoolean(key, booleanValue);
- flush(wkspPrefs);
- }
-
- public static void removeLegacyWorkspacePreference(String key) {
- IEclipsePreferences wkspPrefs = getLegacyWorkspacePreferences();
- wkspPrefs.remove(key);
- flush(wkspPrefs);
- }
-
- // ********** private static methods **********
-
- /**
- * This method is called (via reflection) when the test plug-in is loaded.
- * The preferences end up getting flushed after the test case has deleted
- * its project, resulting in resource exceptions in the log, e.g.
- * <pre>
- * Resource '/JpaProjectManagerTests' is not open.
- * </pre>
- * See <code>JptJpaCoreTestsPlugin.start(BundleContext)</code>
- */
- @SuppressWarnings("unused")
- private static void doNotFlushPreferences() {
- flushPreferences = false;
- }
-
- /**
- * Flush preferences in an asynchronous Job because the flush request will
- * trigger a lock on the project, which can cause us some deadlocks (e.g.
- * when deleting the metamodel source folder).
- * Note: the flush will also remove the prefs node if it is empty
- */
- private static void flush(IEclipsePreferences prefs) {
- if (flushPreferences) {
- new PreferencesFlushJob(prefs).schedule();
- }
- }
-
- private static class PreferencesFlushJob extends Job {
- private final IEclipsePreferences prefs;
- PreferencesFlushJob(IEclipsePreferences prefs) {
- super(NLS.bind(JptCoreMessages.PREFERENCES_FLUSH_JOB_NAME, prefs.absolutePath()));
- this.prefs = prefs;
- }
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- this.prefs.flush();
- }
- catch(BackingStoreException ex) {
- JptJpaCorePlugin.log(ex);
- }
- return Status.OK_STATUS;
- }
- }
-
- // ********** implementation **************************************************
-
- public JpaPreferencesManager(IProject project) {
- if(project == null) {
- throw new RuntimeException("Project is null"); //$NON-NLS-1$
- }
- this.project = project;
- }
-
- // ********** query **********
-
- protected String getLegacyPreference(String key) {
- String preferenceValue = this.getLegacyProjectPreference(key);
-
- // check workspace preferences if not a project preference
- if(preferenceValue == null) {
- preferenceValue = getLegacyWorkspacePreference(key);
- }
- return preferenceValue;
- }
-
- protected String getLegacyPreference(String key, String defaultValue) {
- String preferenceValue = this.getLegacyPreference(key);
- if(StringTools.stringIsEmpty(preferenceValue)) {
- return defaultValue;
- }
- return preferenceValue;
- }
-
- // ********** preferences **********
-
- /**
- * Return the legacy Dali (org.eclipse.jpt.core) preferences for the specified Eclipse project.
- */
- protected IEclipsePreferences getLegacyProjectPreferences() {
- return getLegacyPreferences(new ProjectScope(this.project));
- }
-
- /**
- * Clears the project of JPA-specific preferences
- */
- public void clearProjectPreferences() {
- this.clearLegacyProjectPreferences(
- JPA_PLATFORM_PREF_KEY,
- DISCOVER_ANNOTATED_CLASSES,
- METAMODEL_SOURCE_FOLDER_NAME,
- LEGACY_DISCOVER_ANNOTATED_CLASSES,
- LEGACY_METAMODEL_SOURCE_FOLDER_NAME);
- }
-
- /**
- * Clears the specified legacy Dali (org.eclipse.jpt.core) preferences
- */
- public void clearLegacyProjectPreferences(String ... preferenceKeys) {
- IEclipsePreferences projectPrefs = this.getLegacyProjectPreferences();
- for(String preferenceKey : preferenceKeys) {
- projectPrefs.remove(preferenceKey);
- }
- flush(projectPrefs);
- }
-
- // ********** project preference **********
-
- protected String getLegacyProjectPreference(String key, String defaultValue) {
- String value = this.getLegacyProjectPreferences().get(key, defaultValue);
- return (StringTools.stringIsEmpty(value)) ? defaultValue : value;
- }
-
- protected String getLegacyProjectPreference(String key) {
- return this.getLegacyProjectPreferences().get(key, null);
- }
-
- protected void setLegacyProjectPreference(String key, String value) {
- IEclipsePreferences projectPrefs = this.getLegacyProjectPreferences();
- if(value == null) {
- projectPrefs.remove(key);
- }
- else {
- projectPrefs.put(key, value);
- }
- flush(projectPrefs);
- }
-
- protected boolean getLegacyProjectPreference(String key, boolean defaultBooleanValue) {
- return this.getLegacyProjectPreferences().getBoolean(key, defaultBooleanValue);
- }
-
- protected void setLegacyProjectPreference(String key, boolean booleanValue) {
- IEclipsePreferences projectPrefs = this.getLegacyProjectPreferences();
- projectPrefs.putBoolean(key, booleanValue);
- flush(projectPrefs);
- }
-
- protected void removeLegacyProjectPreference(String key) {
- IEclipsePreferences projectPrefs = this.getLegacyProjectPreferences();
- projectPrefs.remove(key);
- flush(projectPrefs);
- }
-
- // ********** getters/setters *********
-
- /**
- * Return the JPA platform ID associated with the specified Eclipse project.
- */
- public String getJpaPlatformId() {
- return this.getLegacyProjectPreference(JPA_PLATFORM_PREF_KEY, GenericPlatform.VERSION_1_0.getId());
- }
-
- /**
- * Set the JPA platform ID associated with the specified Eclipse project.
- */
- public void setJpaPlatformId(String jpaPlatformId) {
- this.setLegacyProjectPreference(JPA_PLATFORM_PREF_KEY, jpaPlatformId);
- }
-
- /**
- * Return the JPA "discover" flag associated with the specified
- * Eclipse project.
- */
- public boolean getDiscoverAnnotatedClasses() {
- if (this.getLegacyProjectPreference(DISCOVER_ANNOTATED_CLASSES, null) != null) {
- return this.getLegacyProjectPreference(DISCOVER_ANNOTATED_CLASSES, false);
- }
- //bug 354780 - made the mistake of changing the project metadata in the 3.0 release
- return this.getLegacyProjectPreference(LEGACY_DISCOVER_ANNOTATED_CLASSES, false);
- }
-
- /**
- * Set the JPA "discover" flag associated with the specified
- * Eclipse project.
- */
- public void setDiscoverAnnotatedClasses(boolean discoverAnnotatedClasses) {
- this.setLegacyProjectPreference(DISCOVER_ANNOTATED_CLASSES, discoverAnnotatedClasses);
- }
-
- /**
- * Return the name of the metamodel source folder associated with the
- * specified Eclipse project.
- */
- public String getMetamodelSourceFolderName() {
- String metamodelSourceFolderName = this.getLegacyProjectPreference(METAMODEL_SOURCE_FOLDER_NAME, null);
- if (metamodelSourceFolderName != null) {
- return metamodelSourceFolderName;
- }
- //bug 354780 - made the mistake of changing the project metadata in the 3.0 release
- return this.getLegacyProjectPreference(LEGACY_METAMODEL_SOURCE_FOLDER_NAME, null);
- }
-
- /**
- * Set the name of the metamodel source folder associated with the
- * specified Eclipse project.
- */
- public void setMetamodelSourceFolderName(String metamodelSourceFolderName) {
- this.setLegacyProjectPreference(METAMODEL_SOURCE_FOLDER_NAME, metamodelSourceFolderName);
- //bug 354780 - made the mistake of changing the project metadata in the 3.0 release.
- //make sure legacy setting is removed when turning off metamodel gen, if we don't then
- //there will be no way to turn off meatamodel gen without sacrificing backwards compatibility
- if(metamodelSourceFolderName == null) {
- this.setLegacyProjectPreference(LEGACY_METAMODEL_SOURCE_FOLDER_NAME, null);
- }
- }
-
- // ********** protected methods **********
-
- protected IProject getProject() {
- return this.project;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaDeleteTypeParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaDeleteTypeParticipant.java
deleted file mode 100644
index 11771b2e9d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaDeleteTypeParticipant.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.DeleteParticipant;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.TextEdit;
-
-
-public abstract class AbstractJpaDeleteTypeParticipant
- extends DeleteParticipant
-{
-
- /**
- * Store all the types that are going to be deleted including nestedTypes.
- */
- protected final Set<IType> allTypes;
-
- /**
- * Store the persistence.xml DeleteEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<DeleteEdit>> persistenceXmlDeleteEdits;
-
- /**
- * Store the mapping file DeleteEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<DeleteEdit>> mappingFilePersistentTypeDeleteEdits;
-
- protected AbstractJpaDeleteTypeParticipant() {
- super();
- this.allTypes = new HashSet<IType>();
- this.persistenceXmlDeleteEdits = new HashMap<IFile, Iterable<DeleteEdit>>();
- this.mappingFilePersistentTypeDeleteEdits = new HashMap<IFile, Iterable<DeleteEdit>>();
- }
-
- /**
- * Nested types are not added to the deleteParticipant when the parent is deleted.
- * We must handle them in case they are mapped.
- */
- protected void addType(IType type) {
- this.allTypes.add(type);
- this.addNestedTypes(type);
- }
-
- private void addNestedTypes(IType type) {
- IType[] nestedTypes;
- try {
- nestedTypes = type.getTypes();
- }
- catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- return;
- }
-
- for (IType nestedType : nestedTypes) {
- this.addType(nestedType);
- }
- }
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate DeleteEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- //since the progress bar will hang if a large JPA project is being loaded,
- //we can at least set the subtask and report no progress. Only happens first time getJpaProjectManager() is called.
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 2);
- sm.subTask(this.getCheckConditionsSubTaskName());
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createDeleteEdits(sm.newChild(10), jpaProject);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile file : this.persistenceXmlDeleteEdits.keySet()) {
- deltaFactory.change(file);
- }
- sm.worked(1);
- for (IFile file : this.mappingFilePersistentTypeDeleteEdits.keySet()) {
- deltaFactory.change(file);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- /**
- * This will be appended to the main refactoring task named : 'Checking preconditions...'
- */
- protected String getCheckConditionsSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_DELETE_TYPE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlDeleteEdits.isEmpty() && this.mappingFilePersistentTypeDeleteEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlDeleteEdits.size() + this.mappingFilePersistentTypeDeleteEdits.size());
- sm.subTask(this.getCreateChangeSubTaskName());
- CompositeChange compositeChange = new CompositeChange(JpaCoreRefactoringMessages.JPA_DELETE_TYPE_REFACTORING_CHANGE_NAME);
- for (IFile persistenceXmlFile : this.persistenceXmlDeleteEdits.keySet()) {
- this.addPersistenceXmlDeleteTypeChange(persistenceXmlFile, compositeChange);
- sm.worked(1);
- }
- for (IFile mappingFile : this.mappingFilePersistentTypeDeleteEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addMappingFileDeleteTypeChange(mappingFile, compositeChange);
- sm.worked(1);
- }
- //must check for children in case all changes were made in other participant's TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- /**
- * This will be appended to the main refactoring task named : 'Creating workspace modifications...'
- */
- protected String getCreateChangeSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_DELETE_TYPE_REFACTORING_SUB_TASK_NAME;
- }
-
- protected void createDeleteEdits(IProgressMonitor monitor, JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- SubMonitor sm = SubMonitor.convert(monitor, 1 + persistenceUnit.getMappingFileRefsSize());
- Iterable<DeleteEdit> edits = this.createPersistenceXmlDeleteEdits(persistenceUnit);
- if (!CollectionTools.isEmpty(edits)) {
- this.persistenceXmlDeleteEdits.put(jpaProject.getPersistenceXmlResource().getFile(), edits);
- }
- sm.worked(1);
- for (MappingFileRef mappingFileRef : persistenceUnit.getMappingFileRefs()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- Iterable<DeleteEdit> mappingFileDeleteEdits = this.createMappingFileDeleteTypeEdits(mappingFileRef);
- if (!CollectionTools.isEmpty(mappingFileDeleteEdits)) {
- this.mappingFilePersistentTypeDeleteEdits.put((IFile) mappingFileRef.getMappingFile().getResource(), mappingFileDeleteEdits);
- }
- sm.worked(1);
- }
- }
-
- protected Iterable<DeleteEdit> createPersistenceXmlDeleteEdits(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<DeleteEdit>(
- new TransformationIterable<IType, Iterable<DeleteEdit>>(this.getTypesOnClasspath(persistenceUnit.getJpaProject())) {
- @Override
- protected Iterable<DeleteEdit> transform(IType type) {
- return persistenceUnit.createDeleteTypeEdits(type);
- }
- }
- );
- }
-
- protected Iterable<IType> getTypesOnClasspath(final JpaProject jpaProject) {
- final IJavaProject javaProject = jpaProject.getJavaProject();
- return new FilteringIterable<IType>(this.allTypes) {
- @Override
- protected boolean accept(IType type) {
- return javaProject.isOnClasspath(type);
- }
- };
- }
-
- protected void addPersistenceXmlDeleteTypeChange(IFile persistenceXmlFile, CompositeChange compositeChange) {
- Iterable<DeleteEdit> deleteTypeEdits = this.persistenceXmlDeleteEdits.get(persistenceXmlFile);
-
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_DELETE_TYPE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME, persistenceXmlFile);
- //TODO probably need to figure out TextEditGroups since these can be used to show check boxes under the file in the preview dialog
- //also used to add edits to existing changes??
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
-// textChange.addTextEditGroup(new TextEditGroup("edit persistence unit", multiTextEdit));???
- compositeChange.add(textChange);
- }
- this.addEdits(textChange, deleteTypeEdits);
- }
-
- private Iterable<DeleteEdit> createMappingFileDeleteTypeEdits(final MappingFileRef mappingFileRef) {
- return new CompositeIterable<DeleteEdit>(
- new TransformationIterable<IType, Iterable<DeleteEdit>>(this.getTypesOnClasspath(mappingFileRef.getJpaProject())) {
- @Override
- protected Iterable<DeleteEdit> transform(IType type) {
- return mappingFileRef.createDeleteTypeEdits(type);
- }
- }
- );
- }
-
- protected void addMappingFileDeleteTypeChange(IFile mappingFile, CompositeChange compositeChange) {
- Iterable<DeleteEdit> deleteTypeEdits = this.mappingFilePersistentTypeDeleteEdits.get(mappingFile);
-
- TextChange textChange = getTextChange(mappingFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_DELETE_TYPE_REFACTORING_CHANGE_MAPPING_FILE_NAME, mappingFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- this.addEdits(textChange, deleteTypeEdits);
- }
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException ex) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(ex);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaMoveJavaElementParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaMoveJavaElementParticipant.java
deleted file mode 100644
index 3360d65d13..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaMoveJavaElementParticipant.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.MoveArguments;
-import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-public abstract class AbstractJpaMoveJavaElementParticipant
- extends MoveParticipant implements ISharableParticipant {
-
- /**
- * Store the {@link IJavaElement}s to be moved and their corresponding {@link MoveArguments}
- */
- protected final Map<IJavaElement, MoveArguments> originalJavaElements;
-
- /**
- * Store the persistence.xml ReplaceEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> persistenceXmlReplaceEdits;
-
- /**
- * Store the mapping file ReplaceEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> mappingFileReplaceEdits;
-
- protected AbstractJpaMoveJavaElementParticipant() {
- super();
- this.originalJavaElements = new HashMap<IJavaElement, MoveArguments>();
- this.persistenceXmlReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- this.mappingFileReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (!getArguments().getUpdateReferences()) {
- //we do not want to do any refactoring if the user chooses not to update references
- return false;
- }
- this.addElement(element, getArguments());
- return true;
- }
-
-
- //****************ISharableParticipant implementation *****************
- /**
- * This is used when multiple mapping files are deleted.
- * RefactoringParticipant#initialize(Object) is called for the first deleted IFile.
- * RefactoringParticipant#getArguments() only applies to the first deleted IFile
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- this.originalJavaElements.put((IJavaElement) element, (MoveArguments) arguments);
- }
-
- protected MoveArguments getArguments(IJavaElement element) {
- return this.originalJavaElements.get(element);
- }
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate ReplaceEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 2);
- sm.subTask(this.getCheckConditionsSubTaskName());
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createReplaceEdits(sm.newChild(10), jpaProject);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile file : this.persistenceXmlReplaceEdits.keySet()) {
- deltaFactory.change(file);
- }
- sm.worked(1);
- for (IFile file : this.mappingFileReplaceEdits.keySet()) {
- deltaFactory.change(file);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected abstract String getCompositeChangeName();
-
- /**
- * This will be appended to the main refactoring task named : 'Checking preconditions...'
- */
- protected abstract String getCheckConditionsSubTaskName();
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlReplaceEdits.isEmpty() && this.mappingFileReplaceEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlReplaceEdits.size() + this.mappingFileReplaceEdits.size());
- sm.subTask(this.getCreateChangeSubTaskName());
- CompositeChange compositeChange = new CompositeChange(this.getCompositeChangeName());
- for (IFile persistenceXmlFile : this.persistenceXmlReplaceEdits.keySet()) {
- this.addPersistenceXmlRenameEdits(persistenceXmlFile, compositeChange);
- sm.worked(1);
- }
- for (IFile mappingFile : this.mappingFileReplaceEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addMappingFileRenameEdits(mappingFile, compositeChange);
- sm.worked(1);
- }
- //must check for children in case all changes were made in other participant's TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- /**
- * This will be appended to the main refactoring task named : 'Creating workspace modifications...'
- */
- protected abstract String getCreateChangeSubTaskName();
-
- protected void createReplaceEdits(IProgressMonitor monitor, JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- SubMonitor sm = SubMonitor.convert(monitor, 1 + persistenceUnit.getMappingFileRefsSize());
- Iterable<ReplaceEdit> classRefDeleteEdits = this.createPersistenceUnitReplaceEditsCheckClasspath(persistenceUnit);
- sm.worked(1);
- if (!CollectionTools.isEmpty(classRefDeleteEdits)) {
- this.persistenceXmlReplaceEdits.put(jpaProject.getPersistenceXmlResource().getFile(), classRefDeleteEdits);
- }
- for (MappingFileRef mappingFileRef : persistenceUnit.getMappingFileRefs()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- Iterable<ReplaceEdit> edits = this.createMappingFileReplaceEditsCheckClasspath(mappingFileRef);
- if (!CollectionTools.isEmpty(edits)) {
- IFile file = (IFile) mappingFileRef.getMappingFile().getResource();
- this.mappingFileReplaceEdits.put(file, edits);
- }
- sm.worked(1);
- }
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitReplaceEditsCheckClasspath(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<IJavaElement, Iterable<ReplaceEdit>>(this.getElementsOnClasspath(persistenceUnit.getJpaProject())) {
- @Override
- protected Iterable<ReplaceEdit> transform(IJavaElement javaElement) {
- return createPersistenceXmlReplaceEdits(persistenceUnit, javaElement, getArguments(javaElement).getDestination());
- }
- }
- );
- }
-
- protected Iterable<IJavaElement> getElementsOnClasspath(final JpaProject jpaProject) {
- final IJavaProject javaProject = jpaProject.getJavaProject();
- return new FilteringIterable<IJavaElement>(this.originalJavaElements.keySet()) {
- @Override
- protected boolean accept(IJavaElement javaElement) {
- return javaProject.isOnClasspath(javaElement);
- }
- };
- }
-
- protected abstract Iterable<ReplaceEdit> createPersistenceXmlReplaceEdits(PersistenceUnit persistenceUnit, IJavaElement javaElement, Object destination);
-
- protected void addPersistenceXmlRenameEdits(IFile persistenceXmlFile, CompositeChange compositeChange) {
- Iterable<ReplaceEdit> replacePackageEdits = this.persistenceXmlReplaceEdits.get(persistenceXmlFile);
-
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(this.getPersistenceXmlChangeName(), persistenceXmlFile);
- //TODO probably need to figure out TextEditGroups since these can be used to show check boxes under the file in the preview dialog
- //also used to add edits to existing changes??
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
-// textChange.addTextEditGroup(new TextEditGroup("edit persistence unit", multiTextEdit));???
- compositeChange.add(textChange);
- }
- this.addEdits(textChange, replacePackageEdits);
- }
-
- protected abstract String getPersistenceXmlChangeName();
-
-
- private Iterable<ReplaceEdit> createMappingFileReplaceEditsCheckClasspath(final MappingFileRef mappingFileRef) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<IJavaElement, Iterable<ReplaceEdit>>(this.getElementsOnClasspath(mappingFileRef.getJpaProject())) {
- @Override
- protected Iterable<ReplaceEdit> transform(IJavaElement javaElement) {
- return createMappingFileReplaceEdits(mappingFileRef, javaElement, getArguments(javaElement).getDestination());
- }
- }
- );
- }
-
- protected abstract Iterable<ReplaceEdit> createMappingFileReplaceEdits(MappingFileRef mappingFileRef, IJavaElement javaElement, Object destination);
-
-
- protected void addMappingFileRenameEdits(IFile mappingFile, CompositeChange compositeChange) {
- Iterable<ReplaceEdit> replacedTypeEdits = this.mappingFileReplaceEdits.get(mappingFile);
-
- TextChange textChange = getTextChange(mappingFile);
- if (textChange == null) {
- textChange = new TextFileChange(this.getMappingFileChangeName(), mappingFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- this.addEdits(textChange, replacedTypeEdits);
- }
-
- protected abstract String getMappingFileChangeName();
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException ex) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(ex);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaRenameJavaElementParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaRenameJavaElementParticipant.java
deleted file mode 100644
index 7d653279f2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/AbstractJpaRenameJavaElementParticipant.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-public abstract class AbstractJpaRenameJavaElementParticipant
- extends RenameParticipant {
-
- protected IJavaElement originalJavaElement;
-
- /**
- * Store the persistence.xml ReplaceEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> persistenceXmlReplaceEdits;
-
- /**
- * Store the mapping file ReplaceEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> mappingFileReplaceEdits;
-
- protected AbstractJpaRenameJavaElementParticipant() {
- super();
- this.persistenceXmlReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- this.mappingFileReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (!getArguments().getUpdateReferences()) {
- //we do not want to do any refactoring if the user chooses not to update references
- return false;
- }
- this.originalJavaElement = (IJavaElement) element;
- return true;
- }
-
- protected IJavaElement getOriginalJavaElement() {
- return this.originalJavaElement;
- }
-
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate ReplaceEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 2);
- sm.subTask(this.getCheckConditionsSubTaskName());
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createReplaceEdits(sm.newChild(10), jpaProject);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile file : this.persistenceXmlReplaceEdits.keySet()) {
- deltaFactory.change(file);
- }
- sm.worked(1);
- for (IFile file : this.mappingFileReplaceEdits.keySet()) {
- deltaFactory.change(file);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected abstract String getCompositeChangeName();
-
- /**
- * This will be appended to the main refactoring task named : 'Checking preconditions...'
- */
- protected abstract String getCheckConditionsSubTaskName();
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlReplaceEdits.isEmpty() && this.mappingFileReplaceEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlReplaceEdits.size() + this.mappingFileReplaceEdits.size());
- sm.subTask(this.getCreateChangeSubTaskName());
- CompositeChange compositeChange = new CompositeChange(this.getCompositeChangeName());
- for (IFile persistenceXmlFile : this.persistenceXmlReplaceEdits.keySet()) {
- this.addPersistenceXmlRenameEdits(persistenceXmlFile, compositeChange);
- sm.worked(1);
- }
- for (IFile mappingFile : this.mappingFileReplaceEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addMappingFileRenameEdits(mappingFile, compositeChange);
- sm.worked(1);
- }
- //must check for children in case all changes were made in other participant's TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- /**
- * This will be appended to the main refactoring task named : 'Creating workspace modifications...'
- */
- protected abstract String getCreateChangeSubTaskName();
-
- protected void createReplaceEdits(IProgressMonitor monitor, JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- SubMonitor sm = SubMonitor.convert(monitor, 1 + persistenceUnit.getMappingFileRefsSize());
- Iterable<ReplaceEdit> classRefDeleteEdits = this.createPersistenceXmlReplaceEditsCheckClasspath(persistenceUnit);
- sm.worked(1);
- if (!CollectionTools.isEmpty(classRefDeleteEdits)) {
- this.persistenceXmlReplaceEdits.put(jpaProject.getPersistenceXmlResource().getFile(), classRefDeleteEdits);
- }
- for (MappingFileRef mappingFileRef : persistenceUnit.getMappingFileRefs()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- Iterable<ReplaceEdit> edits = this.createMappingFileReplaceEditsCheckClasspath(mappingFileRef);
- if (!CollectionTools.isEmpty(edits)) {
- IFile file = (IFile) mappingFileRef.getMappingFile().getResource();
- this.mappingFileReplaceEdits.put(file, edits);
- }
- sm.worked(1);
- }
- }
-
- protected Iterable<ReplaceEdit> createPersistenceXmlReplaceEditsCheckClasspath(PersistenceUnit persistenceUnit) {
- //check isOnClassPath since there could be types with the same name in different projects
- if (persistenceUnit.getJpaProject().getJavaProject().isOnClasspath(this.originalJavaElement)) {
- return createPersistenceXmlReplaceEdits(persistenceUnit);
- }
- return EmptyIterable.instance();
- }
-
- protected abstract Iterable<ReplaceEdit> createPersistenceXmlReplaceEdits(PersistenceUnit persistenceUnit);
-
- protected void addPersistenceXmlRenameEdits(IFile persistenceXmlFile, CompositeChange compositeChange) {
- Iterable<ReplaceEdit> replacePackageEdits = this.persistenceXmlReplaceEdits.get(persistenceXmlFile);
-
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(this.getPersistenceXmlChangeName(), persistenceXmlFile);
- //TODO probably need to figure out TextEditGroups since these can be used to show check boxes under the file in the preview dialog
- //also used to add edits to existing changes??
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
-// textChange.addTextEditGroup(new TextEditGroup("edit persistence unit", multiTextEdit));???
- compositeChange.add(textChange);
- }
- this.addEdits(textChange, replacePackageEdits);
- }
-
- protected abstract String getPersistenceXmlChangeName();
-
- protected Iterable<ReplaceEdit> createMappingFileReplaceEditsCheckClasspath(MappingFileRef mappingFileRef) {
- //check isOnClassPath since there could be types with the same name in different projects
- if (mappingFileRef.getJpaProject().getJavaProject().isOnClasspath(this.originalJavaElement)) {
- return this.createMappingFileReplaceEdits(mappingFileRef);
- }
- return EmptyIterable.instance();
- }
-
- protected abstract Iterable<ReplaceEdit> createMappingFileReplaceEdits(MappingFileRef mappingFileRef);
-
-
- protected void addMappingFileRenameEdits(IFile mappingFile, CompositeChange compositeChange) {
- Iterable<ReplaceEdit> replacedTypeEdits = this.mappingFileReplaceEdits.get(mappingFile);
-
- TextChange textChange = getTextChange(mappingFile);
- if (textChange == null) {
- textChange = new TextFileChange(this.getMappingFileChangeName(), mappingFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- this.addEdits(textChange, replacedTypeEdits);
- }
-
- protected abstract String getMappingFileChangeName();
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException ex) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(ex);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaCoreRefactoringMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaCoreRefactoringMessages.java
deleted file mode 100644
index 5ff1a8444b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaCoreRefactoringMessages.java
+++ /dev/null
@@ -1,81 +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.jpa.core.internal.refactoring;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Localized messages used by Dali core.
- */
-public class JpaCoreRefactoringMessages {
-
- public static String JPA_DELETE_TYPE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_DELETE_PACKAGE_OR_FOLDER_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_DELETE_TYPE_REFACTORING_CHANGE_NAME;
- public static String JPA_DELETE_TYPE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- public static String JPA_DELETE_TYPE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- public static String JPA_DELETE_TYPE_REFACTORING_SUB_TASK_NAME;
-
- public static String JPA_DELETE_MAPPING_FILE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_DELETE_MAPPING_FILE_REFACTORING_SUB_TASK_NAME;
- public static String JPA_DELETE_MAPPING_FILE_REFACTORING_CHANGE_NAME;
- public static String JPA_DELETE_MAPPING_FILE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
-
- public static String JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME;
-
- public static String JPA_RENAME_TYPE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_RENAME_TYPE_REFACTORING_CHANGE_NAME;
- public static String JPA_RENAME_TYPE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- public static String JPA_RENAME_TYPE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- public static String JPA_RENAME_TYPE_REFACTORING_SUB_TASK_NAME;
-
- public static String JPA_RENAME_PACKAGE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_RENAME_PACKAGE_REFACTORING_CHANGE_NAME;
- public static String JPA_RENAME_PACKAGE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- public static String JPA_RENAME_PACKAGE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- public static String JPA_RENAME_PACKAGE_REFACTORING_SUB_TASK_NAME;
-
- public static String JPA_RENAME_FOLDER_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_RENAME_FOLDER_REFACTORING_CHANGE_NAME;
- public static String JPA_RENAME_FOLDER_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- public static String JPA_RENAME_FOLDER_REFACTORING_SUB_TASK_NAME;
-
- public static String JPA_RENAME_MAPPING_FILE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_RENAME_MAPPING_FILE_REFACTORING_SUB_TASK_NAME;
- public static String JPA_RENAME_MAPPING_FILE_REFACTORING_CHANGE_NAME;
- public static String JPA_RENAME_MAPPING_FILE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
-
- public static String JPA_MOVE_TYPE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_MOVE_TYPE_REFACTORING_CHANGE_NAME;
- public static String JPA_MOVE_TYPE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- public static String JPA_MOVE_TYPE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- public static String JPA_MOVE_TYPE_REFACTORING_SUB_TASK_NAME;
-
- public static String JPA_MOVE_MAPPING_FILE_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_MOVE_MAPPING_FILE_REFACTORING_SUB_TASK_NAME;
- public static String JPA_MOVE_MAPPING_FILE_REFACTORING_CHANGE_NAME;
- public static String JPA_MOVE_MAPPING_FILE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
-
- public static String JPA_MOVE_FOLDER_REFACTORING_PARTICIPANT_NAME;
- public static String JPA_MOVE_FOLDER_REFACTORING_CHANGE_NAME;
- public static String JPA_MOVE_FOLDER_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- public static String JPA_MOVE_FOLDER_REFACTORING_SUB_TASK_NAME;
-
- private static final String BUNDLE_NAME = "jpa_core_refactoring"; //$NON-NLS-1$
- private static final Class<?> BUNDLE_CLASS = JpaCoreRefactoringMessages.class;
- static {
- NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
- }
-
- private JpaCoreRefactoringMessages() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteMappingFileParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteMappingFileParticipant.java
deleted file mode 100644
index cebebbcca4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteMappingFileParticipant.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.DeleteArguments;
-import org.eclipse.ltk.core.refactoring.participants.DeleteParticipant;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Participant in the delete refactoring of {@link IFile}s with content type {@link JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE}.
- * If the deleted mapping file is listed in a persistence.xml file of any JpaProject
- * then a Change object is created that will delete that reference from the file.
- */
-public class JpaDeleteMappingFileParticipant
- extends DeleteParticipant
- implements ISharableParticipant
-{
-
- /**
- * Store the {@link IFile}s to be deleted with content type {@link JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE}
- * and their corresponding {@link DeleteArguments}
- */
- protected final Map<IFile, DeleteArguments> mappingFiles;
-
- /**
- * Store the persistence.xml DeleteEdits in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<DeleteEdit>> persistenceXmlMappingFileDeleteEdits;
-
- public JpaDeleteMappingFileParticipant() {
- super();
- this.mappingFiles = new HashMap<IFile, DeleteArguments>();
- this.persistenceXmlMappingFileDeleteEdits = new HashMap<IFile, Iterable<DeleteEdit>>();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_DELETE_MAPPING_FILE_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- protected boolean initialize(Object element) {
- this.addElement(element, getArguments());
- return true;
- }
-
-
- //****************ISharableParticipant implementation *****************
- /**
- * This is used when multiple mapping files are deleted.
- * RefactoringParticipant#initialize(Object) is called for the first deleted IFile.
- * RefactoringParticipant#getArguments() only applies to the first deleted IFile
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- this.mappingFiles.put((IFile) element, (DeleteArguments) arguments);
- }
-
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate DeleteEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- //since the progress bar will hang if a large JPA project is being loaded,
- //we can at least set the subtask and report no progress. Only happens first time getJpaProjectManager() is called.
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 1);
- sm.subTask(JpaCoreRefactoringMessages.JPA_DELETE_MAPPING_FILE_REFACTORING_SUB_TASK_NAME);
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createDeleteEdits(jpaProject);
- sm.worked(10);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile persistenceXmlFile : this.persistenceXmlMappingFileDeleteEdits.keySet()) {
- deltaFactory.change(persistenceXmlFile);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected void createDeleteEdits(JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- Iterable<DeleteEdit> classRefDeleteEdits = this.createSpecifiedMappingFileRefDeleteEdits(persistenceUnit);
- if (!CollectionTools.isEmpty(classRefDeleteEdits)) {
- this.persistenceXmlMappingFileDeleteEdits.put(jpaProject.getPersistenceXmlResource().getFile(), classRefDeleteEdits);
- }
- }
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlMappingFileDeleteEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlMappingFileDeleteEdits.size());
- sm.subTask(JpaCoreRefactoringMessages.JPA_DELETE_MAPPING_FILE_REFACTORING_SUB_TASK_NAME);
- CompositeChange compositeChange = new CompositeChange(JpaCoreRefactoringMessages.JPA_DELETE_MAPPING_FILE_REFACTORING_CHANGE_NAME);
- for (IFile persistenceXmlFile : this.persistenceXmlMappingFileDeleteEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addPersistenceXmlDeleteMappingFileChange(persistenceXmlFile, compositeChange);
- }
- //must check for children in case all changes were made in other participants TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- private Iterable<DeleteEdit> createSpecifiedMappingFileRefDeleteEdits(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<DeleteEdit>(
- new TransformationIterable<IFile, Iterable<DeleteEdit>>(this.mappingFiles.keySet()) {
- @Override
- protected Iterable<DeleteEdit> transform(IFile file) {
- return persistenceUnit.createDeleteMappingFileEdits(file);
- }
- }
- );
- }
-
- protected void addPersistenceXmlDeleteMappingFileChange(IFile persistenceXmlFile, CompositeChange compositeChange) {
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_DELETE_MAPPING_FILE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME, persistenceXmlFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- Iterable<DeleteEdit> mappingFileDeleteEdits = this.persistenceXmlMappingFileDeleteEdits.get(persistenceXmlFile);
- this.addEdits(textChange, mappingFileDeleteEdits);
- }
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException e) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(e);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeletePackageOrFolderParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeletePackageOrFolderParticipant.java
deleted file mode 100644
index 5e67cec115..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeletePackageOrFolderParticipant.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.refactoring;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.text.edits.DeleteEdit;
-
-public class JpaDeletePackageOrFolderParticipant
- extends AbstractJpaDeleteTypeParticipant
- implements ISharableParticipant
-{
-
- /**
- * The folders that are going to be deleted.
- * Only folders which are not also IPackageFragments or IPackageFragmentRoots are added to this collection.
- */
- protected final Collection<IFolder> folders;
-
- /**
- * The IPackageFragments that are going to be deleted.
- */
- protected final Collection<IPackageFragment> packageFragments;
-
- public JpaDeletePackageOrFolderParticipant() {
- super();
- this.folders = new ArrayList<IFolder>();
- this.packageFragments = new ArrayList<IPackageFragment>();
- }
-
- //**************** RefactoringParticipant implementation *****************
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_DELETE_PACKAGE_OR_FOLDER_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (getProcessor() instanceof RenameProcessor) {
- //Renaming a package that then ends up with no subpackages or types will call the delete folder participant.
- //We do not want to delete references in the persistence.xml and mapping files in this case, will be handled
- //with the rename participant
- return false;
- }
- this.addElement(element, getArguments());
- return true;
- }
-
- //**************** ISharableParticipant implementation *****************
- /**
- * This is used when multiple IPackageFraments/IFolders are deleted.
- * RefactoringParticipant#initialize(Object) is called for the first deleted IPackageFragment/IFolder.
- * RefactoringParticipant#getArguments() only applies to the first deleted IPackageFragment/IFolder
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- if (element instanceof IFolder) {
- IJavaElement javaElement = JavaCore.create((IFolder) element);
- if (javaElement != null) {
- if (javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT) {
- this.addPackageFragmentRoot((IPackageFragmentRoot) javaElement);
- }
- else {
- this.addPackageFragment((IPackageFragment) javaElement);
- }
- }
- else {
- this.addFolder((IFolder) element);
- }
- }
- else {
- this.addPackageFragment((IPackageFragment) element);
- }
- }
-
- protected void addFolder(IFolder folder) {
- this.folders.add(folder);
- }
-
- protected void addPackageFragmentRoot(IPackageFragmentRoot root) {
- if (JDTTools.packageFragmentRootIsSourceFolder(root)) {
- for (IJavaElement child : JDTTools.getChildren(root)) {
- this.addPackageFragment((IPackageFragment) child);
- }
- }
- }
-
- protected void addPackageFragment(IPackageFragment packageFragment) {
- this.packageFragments.add(packageFragment);
- Collection<IType> allDeletedTypes = new HashSet<IType>();
- addAffectedTypes(allDeletedTypes, packageFragment);
- for (IType deletedType : allDeletedTypes) {
- this.addType(deletedType);
- }
- }
-
- //nestedTypes are handled in AbstractJpaDeleteTypeParticipant
- static void addAffectedTypes(Collection<IType> types, IPackageFragment fragment) {
- try {
- if (fragment.containsJavaResources()) {
- ICompilationUnit[] cunits = fragment.getCompilationUnits();
- IType type = null;
- for (int i = 0; i < cunits.length; i++) {
- type = cunits[i].findPrimaryType();
- if (type == null) {
- continue;
- }
- types.add(type);
- }
- }
- }
- catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- /**
- * Add mapping file delete edits here, super.createPersistenceXmlDeleteEdits() is
- * called to add the type delete edits.
- */
- @Override
- @SuppressWarnings("unchecked")
- protected Iterable<DeleteEdit> createPersistenceXmlDeleteEdits(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<DeleteEdit>(
- super.createPersistenceXmlDeleteEdits(persistenceUnit),
- new CompositeIterable<DeleteEdit>(
- new TransformationIterable<IFile, Iterable<DeleteEdit>>(this.getMappingFilesOnClasspath(persistenceUnit.getJpaProject())) {
- @Override
- protected Iterable<DeleteEdit> transform(IFile file) {
- return persistenceUnit.createDeleteMappingFileEdits(file);
- }
- }
- )
- );
- }
-
- @SuppressWarnings("unchecked")
- protected Iterable<IFile> getMappingFilesOnClasspath(final JpaProject jpaProject) {
- final IJavaProject javaProject = jpaProject.getJavaProject();
- return new FilteringIterable<IFile>(new CompositeIterable<IFile>(
- getPossibleMappingFilesInFolders(),
- getPossibleMappingFilesInPackageFragments()))
- {
- @Override
- protected boolean accept(IFile file) {
- return javaProject.isOnClasspath(file)
- && PlatformTools.getContentType(file).isKindOf(JptJpaCorePlugin.MAPPING_FILE_CONTENT_TYPE);
- }
- };
- }
-
- protected Iterable<IFile> getPossibleMappingFilesInFolders() {
- Collection<IFile> files = new ArrayList<IFile>();
- FolderResourceProxyVisitor visitor = new FolderResourceProxyVisitor(files);
- for (IFolder folder : this.folders) {
- visitor.visitFolder(folder);
- }
- return files;
- }
-
- protected Iterable<IFile> getPossibleMappingFilesInPackageFragments() {
- return new CompositeIterable<IFile>(
- new TransformationIterable<IPackageFragment, Iterable<IFile>>(this.packageFragments) {
- @Override
- protected Iterable<IFile> transform(IPackageFragment packageFragment) {
- return getNonJavaFiles(packageFragment);
- }
- }
- );
- }
-
- protected static Iterable<IFile> getNonJavaFiles(IPackageFragment packageFragment) {
- Collection<IFile> files = new ArrayList<IFile>();
- Object[] resources = getNonJavaResources(packageFragment);
- for (Object resource : resources) {
- if (resource instanceof IFile) {
- files.add((IFile) resource);
- }
- }
- return files;
- }
-
- protected static Object[] getNonJavaResources(IPackageFragment packageFragment) {
- try {
- return packageFragment.getNonJavaResources();
- }
- catch (JavaModelException e) {
- JptJpaCorePlugin.log(e);
- return EMPTY_OBJECT_ARRAY;
- }
- }
-
- private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
-
- protected class FolderResourceProxyVisitor implements IResourceProxyVisitor {
- private Collection<IFile> files;
- protected FolderResourceProxyVisitor(Collection<IFile> files) {
- super();
- this.files = files;
- }
- protected void visitFolder(IFolder folder) {
- try {
- folder.accept(this, IResource.NONE);
- } catch (CoreException ex) {
- // shouldn't happen - we don't throw any CoreExceptions
- throw new RuntimeException(ex);
- }
- }
- public boolean visit(IResourceProxy resource) {
- switch (resource.getType()) {
- case IResource.FOLDER :
- return true; // visit children
- case IResource.FILE :
- this.files.add((IFile) resource.requestResource());
- return false; // no children
- default :
- return false; // no children
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteTypeParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteTypeParticipant.java
deleted file mode 100644
index 7801496e65..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaDeleteTypeParticipant.java
+++ /dev/null
@@ -1,47 +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.jpa.core.internal.refactoring;
-
-import org.eclipse.jdt.core.IType;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-
-public class JpaDeleteTypeParticipant
- extends AbstractJpaDeleteTypeParticipant
- implements ISharableParticipant
-{
-
- public JpaDeleteTypeParticipant() {
- super();
- }
-
- @Override
- protected boolean initialize(Object element) {
- this.addElement(element, getArguments());
- return true;
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_DELETE_TYPE_REFACTORING_PARTICIPANT_NAME;
- }
-
-
- //****************ISharableParticipant implementation *****************
-
- /**
- * This is used when multiple ITypes are deleted.
- * RefactoringParticipant#initialize(Object) is called for the first deleted IType.
- * RefactoringParticipant#getArguments() only applies to the first deleted IType
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- this.addType((IType) element);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveFolderParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveFolderParticipant.java
deleted file mode 100644
index 6ed5de1958..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveFolderParticipant.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.MoveArguments;
-import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Participant in the move refactoring of {@link IFolder}s.
- * Any mapping file references in the persistence.xml will be updated to reflect the new location.
- */
-public class JpaMoveFolderParticipant
- extends MoveParticipant
- implements ISharableParticipant
-{
-
- /**
- * Store the {@link IFolder}s to be moved and their corresponding MoveArguments
- */
- protected final Map<IFolder, MoveArguments> originalFolders;
-
- /**
- * Store the persistence.xml ReplaceEdit in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> persistenceXmlReplaceEdits;
-
- public JpaMoveFolderParticipant() {
- super();
- this.originalFolders = new HashMap<IFolder, MoveArguments>();
- this.persistenceXmlReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_FOLDER_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (!getArguments().getUpdateReferences()) {
- return false;
- }
- this.addElement(element, getArguments());
- return true;
- }
-
- //****************ISharableParticipant implementation *****************
-
- /**
- * This is used when multiple folders are moved.
- * RefactoringParticipant#initialize(Object) is called for the first moved IFolder.
- * RefactoringParticipant#getArguments() only applies to the first moved IFolder.
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- this.originalFolders.put((IFolder) element, (MoveArguments) arguments);
- }
-
- protected MoveArguments getArguments(IFolder element) {
- return this.originalFolders.get(element);
- }
-
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate ReplaceEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- //since the progress bar will hang if a large JPA project is being loaded,
- //we can at least set the subtask and report no progress. Only happens first time getJpaProjectManager() is called.
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 1);
- sm.subTask(JpaCoreRefactoringMessages.JPA_MOVE_FOLDER_REFACTORING_SUB_TASK_NAME);
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createReplaceEdits(jpaProject);
- sm.worked(10);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile persistenceXmlFile : this.persistenceXmlReplaceEdits.keySet()) {
- deltaFactory.change(persistenceXmlFile);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected void createReplaceEdits(JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- Iterable<ReplaceEdit> replaceEdits = this.createPersistenceUnitReplaceEditsCheckClasspath(persistenceUnit);
- if (!CollectionTools.isEmpty(replaceEdits)) {
- this.persistenceXmlReplaceEdits.put(jpaProject.getPersistenceXmlResource().getFile(), replaceEdits);
- }
- }
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlReplaceEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlReplaceEdits.size());
- sm.subTask(JpaCoreRefactoringMessages.JPA_MOVE_FOLDER_REFACTORING_SUB_TASK_NAME);
- CompositeChange compositeChange = new CompositeChange(JpaCoreRefactoringMessages.JPA_MOVE_FOLDER_REFACTORING_CHANGE_NAME);
- for (IFile persistenceXmlFile : this.persistenceXmlReplaceEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addPersistenceXmlRenameChange(persistenceXmlFile, compositeChange);
- }
- //must check for children in case all changes were made in other participants TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitReplaceEditsCheckClasspath(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<IFolder, Iterable<ReplaceEdit>>(this.getOriginalFoldersOnClasspath(persistenceUnit.getJpaProject())) {
- @Override
- protected Iterable<ReplaceEdit> transform(IFolder folder) {
- return createPersistenceUnitReplaceEdits(persistenceUnit, folder, (IContainer) getArguments(folder).getDestination());
- }
- }
- );
- }
-
- protected Iterable<IFolder> getOriginalFoldersOnClasspath(final JpaProject jpaProject) {
- final IJavaProject javaProject = jpaProject.getJavaProject();
- return new FilteringIterable<IFolder>(this.originalFolders.keySet()) {
- @Override
- protected boolean accept(IFolder folder) {
- return javaProject.isOnClasspath(folder);
- }
- };
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitReplaceEdits(PersistenceUnit persistenceUnit, IFolder folder, IContainer destination) {
- IProject project = destination.getProject();
- IPath fullPath = destination.getFullPath().append(folder.getName());
- ProjectResourceLocator locator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
- IPath runtimePath = locator.getRuntimePath(fullPath);
- return persistenceUnit.createMoveFolderEdits(folder, runtimePath);
- }
-
- protected void addPersistenceXmlRenameChange(IFile persistenceXmlFile, CompositeChange compositeChange) {
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_MOVE_FOLDER_REFACTORING_CHANGE_PERSISTENCE_XML_NAME, persistenceXmlFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- Iterable<ReplaceEdit> mappingFileReplaceEdits = this.persistenceXmlReplaceEdits.get(persistenceXmlFile);
- this.addEdits(textChange, mappingFileReplaceEdits);
- }
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException e) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(e);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveMappingFileParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveMappingFileParticipant.java
deleted file mode 100644
index df9441cdc6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveMappingFileParticipant.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.MoveArguments;
-import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Participant in the rename refactoring of {@link IFile}s with content type {@link JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE}.
- * If the renamed mapping file is listed in a persistence.xml file of any JpaProject
- * then a Change object is created that will rename that reference from the file.
- * If the renamed mapping file is an implied mapping file, then an actual reference to the mapping file will be specified.
- */
-public class JpaMoveMappingFileParticipant
- extends MoveParticipant
- implements ISharableParticipant
-{
-
- /**
- * Store the {@link IFile}s to be renamed with content type {@link JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE}
- * and their corresponding {@link MoveArguments}
- */
- protected final Map<IFile, MoveArguments> originalMappingFiles;
-
- /**
- * Store the persistence.xml ReplaceEdit in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> persistenceXmlMappingFileReplaceEdits;
-
- public JpaMoveMappingFileParticipant() {
- super();
- this.originalMappingFiles = new HashMap<IFile, MoveArguments>();
- this.persistenceXmlMappingFileReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_MAPPING_FILE_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (!getArguments().getUpdateReferences()) {
- return false;
- }
- this.addElement(element, getArguments());
- return true;
- }
-
- //****************ISharableParticipant implementation *****************
-
- /**
- * This is used when multiple mapping files are deleted.
- * RefactoringParticipant#initialize(Object) is called for the first deleted IFile.
- * RefactoringParticipant#getArguments() only applies to the first deleted IFile
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- this.originalMappingFiles.put((IFile) element, (MoveArguments) arguments);
- }
-
- protected MoveArguments getArguments(IFile element) {
- return this.originalMappingFiles.get(element);
- }
-
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate ReplaceEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- //since the progress bar will hang if a large JPA project is being loaded,
- //we can at least set the subtask and report no progress. Only happens first time getJpaProjectManager() is called.
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 1);
- sm.subTask(JpaCoreRefactoringMessages.JPA_MOVE_MAPPING_FILE_REFACTORING_SUB_TASK_NAME);
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createReplaceEdits(jpaProject);
- sm.worked(10);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile persistenceXmlFile : this.persistenceXmlMappingFileReplaceEdits.keySet()) {
- deltaFactory.change(persistenceXmlFile);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected void createReplaceEdits(JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- Iterable<ReplaceEdit> replaceEdits = this.createPersistenceUnitReplaceEditsCheckClasspath(persistenceUnit);
- if (!CollectionTools.isEmpty(replaceEdits)) {
- this.persistenceXmlMappingFileReplaceEdits.put(jpaProject.getPersistenceXmlResource().getFile(), replaceEdits);
- }
- }
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlMappingFileReplaceEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlMappingFileReplaceEdits.size());
- sm.subTask(JpaCoreRefactoringMessages.JPA_MOVE_MAPPING_FILE_REFACTORING_SUB_TASK_NAME);
- CompositeChange compositeChange = new CompositeChange(JpaCoreRefactoringMessages.JPA_MOVE_MAPPING_FILE_REFACTORING_CHANGE_NAME);
- for (IFile persistenceXmlFile : this.persistenceXmlMappingFileReplaceEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addPersistenceXmlRenameMappingFileChange(persistenceXmlFile, compositeChange);
- }
- //must check for children in case all changes were made in other participants TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
-
- protected Iterable<ReplaceEdit> createPersistenceUnitReplaceEditsCheckClasspath(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<IFile, Iterable<ReplaceEdit>>(this.getOriginalFoldersOnClasspath(persistenceUnit.getJpaProject())) {
- @Override
- protected Iterable<ReplaceEdit> transform(IFile mappingFile) {
- return createPersistenceUnitReplaceEdits(persistenceUnit, mappingFile, (IFolder) getArguments(mappingFile).getDestination());
- }
- }
- );
- }
-
- protected Iterable<IFile> getOriginalFoldersOnClasspath(final JpaProject jpaProject) {
- final IJavaProject javaProject = jpaProject.getJavaProject();
- return new FilteringIterable<IFile>(this.originalMappingFiles.keySet()) {
- @Override
- protected boolean accept(IFile file) {
- return javaProject.isOnClasspath(file);
- }
- };
- }
-
- protected Iterable<ReplaceEdit> createPersistenceUnitReplaceEdits(PersistenceUnit persistenceUnit, IFile mappingFile, IFolder destination) {
- IProject project = destination.getProject();
- IPath fullPath = destination.getFullPath();
- ProjectResourceLocator locator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
- IPath runtimePath = locator.getRuntimePath(fullPath);
- return persistenceUnit.createMoveMappingFileEdits(mappingFile, runtimePath);
- }
-
- protected void addPersistenceXmlRenameMappingFileChange(IFile persistenceXmlFile, CompositeChange compositeChange) {
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_MOVE_MAPPING_FILE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME, persistenceXmlFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- Iterable<ReplaceEdit> mappingFileReplaceEdits = this.persistenceXmlMappingFileReplaceEdits.get(persistenceXmlFile);
- this.addEdits(textChange, mappingFileReplaceEdits);
- }
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException e) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(e);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveTypeParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveTypeParticipant.java
deleted file mode 100644
index 969ad22c60..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaMoveTypeParticipant.java
+++ /dev/null
@@ -1,113 +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.jpa.core.internal.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.text.edits.ReplaceEdit;
-
-public class JpaMoveTypeParticipant
- extends AbstractJpaMoveJavaElementParticipant {
-
- public JpaMoveTypeParticipant() {
- super();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_TYPE_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- public void addElement(Object element, RefactoringArguments arguments) {
- super.addElement(element, arguments);
- this.addNestedTypes((IType) element, arguments);
- }
-
- protected void addNestedType(IType renamedType, RefactoringArguments arguments) {
- super.addElement(renamedType, arguments);
- this.addNestedTypes(renamedType, arguments);
- }
-
- private void addNestedTypes(IType renamedType, RefactoringArguments arguments) {
- IType[] nestedTypes;
- try {
- nestedTypes = renamedType.getTypes();
- }
- catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- return;
- }
-
- for (IType nestedType : nestedTypes) {
- this.addNestedType(nestedType, arguments);
- }
- }
-
-
- //**************** AbstractJpaRenameJavaElementParticipant implementation *****************
-
- @Override
- protected Iterable<ReplaceEdit> createPersistenceXmlReplaceEdits(PersistenceUnit persistenceUnit, IJavaElement javaElement, Object destination) {
- IType type = (IType) javaElement;
- if (((IJavaElement) destination).getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
- return persistenceUnit.createMoveTypeEdits(type, (IPackageFragment) destination);
- }
- return persistenceUnit.createRenameTypeEdits(type, getNewNameForNestedType(type, (IType) destination));
- }
-
- @Override
- protected Iterable<ReplaceEdit> createMappingFileReplaceEdits(MappingFileRef mappingFileRef, IJavaElement javaElement, Object destination) {
- IType type = (IType) javaElement;
- if (((IJavaElement) destination).getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
- return mappingFileRef.createMoveTypeEdits(type, (IPackageFragment) destination);
- }
- return mappingFileRef.createRenameTypeEdits(type, getNewNameForNestedType(type, (IType) destination));
- }
-
- protected String getNewNameForNestedType(IType nestedType, IType destination) {
- return nestedType.getTypeQualifiedName('$').replaceFirst(nestedType.getDeclaringType().getElementName(), destination.getElementName());
- }
-
- protected IPackageFragment getNewPackage() {
- return (IPackageFragment) getArguments().getDestination();
- }
-
- @Override
- protected String getCheckConditionsSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_TYPE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- protected String getCreateChangeSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_TYPE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- protected String getCompositeChangeName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_TYPE_REFACTORING_CHANGE_NAME;
- }
-
- @Override
- protected String getPersistenceXmlChangeName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_TYPE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- }
-
- @Override
- protected String getMappingFileChangeName() {
- return JpaCoreRefactoringMessages.JPA_MOVE_TYPE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameFolderParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameFolderParticipant.java
deleted file mode 100644
index f9b5e29a52..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameFolderParticipant.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Participant in the rename refactoring of {@link IFolder}s.
- * If the renamed mapping file is listed in a persistence.xml file of any JpaProject
- * then a Change object is created that will rename that reference from the file.
- * If the renamed mapping file is an implied mapping file, then an actual reference to the mapping file will be specified.
- */
-public class JpaRenameFolderParticipant
- extends RenameParticipant
-{
-
- /**
- * Store the {@link IFolder}s to be renamed
- */
-
- protected IFolder originalFolder;
-
- /**
- * Store the persistence.xml ReplaceEdit in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> persistenceXmlReplaceEdits;
-
- public JpaRenameFolderParticipant() {
- super();
- this.persistenceXmlReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_FOLDER_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (!getArguments().getUpdateReferences()) {
- return false;
- }
- this.originalFolder = (IFolder) element;
- return true;
- }
-
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate ReplaceEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- //since the progress bar will hang if a large JPA project is being loaded,
- //we can at least set the subtask and report no progress. Only happens first time getJpaProjectManager() is called.
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 1);
- sm.subTask(JpaCoreRefactoringMessages.JPA_RENAME_FOLDER_REFACTORING_SUB_TASK_NAME);
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createReplaceEdits(jpaProject);
- sm.worked(10);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile persistenceXmlFile : this.persistenceXmlReplaceEdits.keySet()) {
- deltaFactory.change(persistenceXmlFile);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected void createReplaceEdits(JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- Iterable<ReplaceEdit> replaceEdits = this.createPersistenceUnitReplaceEdits(persistenceUnit);
- if (!CollectionTools.isEmpty(replaceEdits)) {
- this.persistenceXmlReplaceEdits.put(jpaProject.getPersistenceXmlResource().getFile(), replaceEdits);
- }
- }
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlReplaceEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlReplaceEdits.size());
- sm.subTask(JpaCoreRefactoringMessages.JPA_RENAME_FOLDER_REFACTORING_SUB_TASK_NAME);
- CompositeChange compositeChange = new CompositeChange(JpaCoreRefactoringMessages.JPA_RENAME_FOLDER_REFACTORING_CHANGE_NAME);
- for (IFile persistenceXmlFile : this.persistenceXmlReplaceEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addPersistenceXmlRenameChange(persistenceXmlFile, compositeChange);
- }
- //must check for children in case all changes were made in other participants TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- private Iterable<ReplaceEdit> createPersistenceUnitReplaceEdits(final PersistenceUnit persistenceUnit) {
- if (persistenceUnit.getJpaProject().getJavaProject().isOnClasspath(this.originalFolder) || persistenceUnit.getJpaProject().getProject() == this.originalFolder.getProject()) {
- return persistenceUnit.createRenameFolderEdits(this.originalFolder, getArguments().getNewName());
- }
- return EmptyIterable.instance();
- }
-
- protected void addPersistenceXmlRenameChange(IFile persistenceXmlFile, CompositeChange compositeChange) {
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_RENAME_FOLDER_REFACTORING_CHANGE_PERSISTENCE_XML_NAME, persistenceXmlFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- Iterable<ReplaceEdit> mappingFileReplaceEdits = this.persistenceXmlReplaceEdits.get(persistenceXmlFile);
- this.addEdits(textChange, mappingFileReplaceEdits);
- }
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException e) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(e);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameMappingFileParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameMappingFileParticipant.java
deleted file mode 100644
index 6ee1373e46..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameMappingFileParticipant.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.internal.refactoring;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JpaProjectManager;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Participant in the rename refactoring of {@link IFile}s with content type {@link JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE}.
- * If the renamed mapping file is listed in a persistence.xml file of any JpaProject
- * then a Change object is created that will rename that reference from the file.
- * If the renamed mapping file is an implied mapping file, then an actual reference to the mapping file will be specified.
- */
-public class JpaRenameMappingFileParticipant
- extends RenameParticipant
-{
-
- /**
- * Store the {@link IFile}s to be renamed with content type {@link JptJpaCorePlugin#MAPPING_FILE_CONTENT_TYPE}
- */
-
- protected IFile originalMappingFile;
-
- /**
- * Store the persistence.xml ReplaceEdit in the checkConditions() call
- * to avoid duplicated effort in createChange().
- */
- protected final Map<IFile, Iterable<ReplaceEdit>> persistenceXmlMappingFileReplaceEdits;
-
- public JpaRenameMappingFileParticipant() {
- super();
- this.persistenceXmlMappingFileReplaceEdits = new HashMap<IFile, Iterable<ReplaceEdit>>();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_MAPPING_FILE_REFACTORING_PARTICIPANT_NAME;
- }
-
- @Override
- protected boolean initialize(Object element) {
- if (!getArguments().getUpdateReferences()) {
- return false;
- }
- this.originalMappingFile = (IFile) element;
- return true;
- }
-
-
- //**************** RefactoringParticipant implementation *****************
-
- /**
- * Inform the refactoring processor of any files that are going to change. In the process of determining
- * this go ahead and build up the appropriate ReplaceEdits to be used in the createChange()
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context) throws OperationCanceledException {
- //since the progress bar will hang if a large JPA project is being loaded,
- //we can at least set the subtask and report no progress. Only happens first time getJpaProjectManager() is called.
- monitor.subTask(JpaCoreRefactoringMessages.JPA_REFACORING_PARTICIPANT_LOADING_JPA_PROJECTS_SUB_TASK_NAME);
- Iterable<JpaProject> jpaProjects = this.getJpaProjects();
- int size = CollectionTools.size(jpaProjects);
- if (size == 0) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, size*10 + 1);
- sm.subTask(JpaCoreRefactoringMessages.JPA_RENAME_MAPPING_FILE_REFACTORING_SUB_TASK_NAME);
- ResourceChangeChecker checker = (ResourceChangeChecker) context.getChecker(ResourceChangeChecker.class);
- IResourceChangeDescriptionFactory deltaFactory = checker.getDeltaFactory();
-
- for (JpaProject jpaProject : jpaProjects) {
- this.createReplaceEdits(jpaProject);
- sm.worked(10);
- }
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- for (IFile persistenceXmlFile : this.persistenceXmlMappingFileReplaceEdits.keySet()) {
- deltaFactory.change(persistenceXmlFile);
- }
- sm.worked(1);
-
- return null;
- }
-
- protected Iterable<JpaProject> getJpaProjects() throws OperationCanceledException {
- try {
- return this.getJpaProjectManager().waitToGetJpaProjects();
- } catch (InterruptedException ex) {
- throw new OperationCanceledException(ex.getMessage());
- }
- }
-
- protected JpaProjectManager getJpaProjectManager() {
- return (JpaProjectManager) ResourcesPlugin.getWorkspace().getAdapter(JpaProjectManager.class);
- }
-
- protected void createReplaceEdits(JpaProject jpaProject) throws OperationCanceledException {
- PersistenceUnit persistenceUnit = getPersistenceUnit(jpaProject);
- if (persistenceUnit == null) {
- return;
- }
- Iterable<ReplaceEdit> replaceEdits = this.createMappingFileRefReplaceEdits(persistenceUnit);
- if (!CollectionTools.isEmpty(replaceEdits)) {
- this.persistenceXmlMappingFileReplaceEdits.put(jpaProject.getPersistenceXmlResource().getFile(), replaceEdits);
- }
- }
-
- @Override
- public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (this.persistenceXmlMappingFileReplaceEdits.isEmpty()) {
- return null;
- }
- SubMonitor sm = SubMonitor.convert(monitor, this.persistenceXmlMappingFileReplaceEdits.size());
- sm.subTask(JpaCoreRefactoringMessages.JPA_RENAME_MAPPING_FILE_REFACTORING_SUB_TASK_NAME);
- CompositeChange compositeChange = new CompositeChange(JpaCoreRefactoringMessages.JPA_RENAME_MAPPING_FILE_REFACTORING_CHANGE_NAME);
- for (IFile persistenceXmlFile : this.persistenceXmlMappingFileReplaceEdits.keySet()) {
- if (sm.isCanceled()) {
- throw new OperationCanceledException();
- }
- this.addPersistenceXmlRenameMappingFileChange(persistenceXmlFile, compositeChange);
- }
- //must check for children in case all changes were made in other participants TextChanges,
- //want to return null so our node does not appear in the preview tree
- return compositeChange.getChildren().length == 0 ? null : compositeChange;
- }
-
- private Iterable<ReplaceEdit> createMappingFileRefReplaceEdits(final PersistenceUnit persistenceUnit) {
- return persistenceUnit.createRenameMappingFileEdits(this.originalMappingFile, getArguments().getNewName());
- }
-
- protected void addPersistenceXmlRenameMappingFileChange(IFile persistenceXmlFile, CompositeChange compositeChange) {
- TextChange textChange = getTextChange(persistenceXmlFile);
- if (textChange == null) {
- textChange = new TextFileChange(JpaCoreRefactoringMessages.JPA_RENAME_MAPPING_FILE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME, persistenceXmlFile);
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- textChange.setEdit(multiTextEdit);
- compositeChange.add(textChange);
- }
- Iterable<ReplaceEdit> mappingFileReplaceEdits = this.persistenceXmlMappingFileReplaceEdits.get(persistenceXmlFile);
- this.addEdits(textChange, mappingFileReplaceEdits);
- }
-
- private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) {
- PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
- if (persistenceXml == null) {
- return null;
- }
- Persistence persistence = persistenceXml.getPersistence();
- if (persistence == null) {
- return null;
- }
- if (persistence.getPersistenceUnitsSize() != 1) {
- return null; // the context model currently only supports 1 persistence unit
- }
- return persistence.getPersistenceUnits().iterator().next();
- }
-
- private void addEdits(TextChange textChange, Iterable<? extends TextEdit> textEdits) {
- for (TextEdit textEdit : textEdits) {
- try {
- textChange.addEdit(textEdit);
- }
- catch (MalformedTreeException e) {
- //log exception and don't add this persistence.xml type deletion to the conflicting change object
- JptJpaCorePlugin.log(e);
- }
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenamePackageParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenamePackageParticipant.java
deleted file mode 100644
index 830c6c86be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenamePackageParticipant.java
+++ /dev/null
@@ -1,75 +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.jpa.core.internal.refactoring;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-public class JpaRenamePackageParticipant
- extends AbstractJpaRenameJavaElementParticipant {
-
-
- public JpaRenamePackageParticipant() {
- super();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_PACKAGE_REFACTORING_PARTICIPANT_NAME;
- }
-
- protected IPackageFragment getOriginalPackage() {
- return (IPackageFragment) super.getOriginalJavaElement();
- }
-
-
- //**************** AbstractJpaRenameJavaElementParticipant implementation *****************
-
- @Override
- protected Iterable<ReplaceEdit> createPersistenceXmlReplaceEdits(PersistenceUnit persistenceUnit) {
- return persistenceUnit.createRenamePackageEdits(this.getOriginalPackage(), this.getNewName());
- }
-
- @Override
- protected Iterable<ReplaceEdit> createMappingFileReplaceEdits(MappingFileRef mappingFileRef) {
- return mappingFileRef.createRenamePackageEdits(this.getOriginalPackage(), this.getNewName());
- }
-
- protected String getNewName() {
- return getArguments().getNewName();
- }
-
- @Override
- protected String getCheckConditionsSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_PACKAGE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- protected String getCreateChangeSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_PACKAGE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- protected String getCompositeChangeName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_PACKAGE_REFACTORING_CHANGE_NAME;
- }
-
- @Override
- protected String getPersistenceXmlChangeName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_PACKAGE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- }
-
- @Override
- protected String getMappingFileChangeName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_PACKAGE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameTypeParticipant.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameTypeParticipant.java
deleted file mode 100644
index c72b74c34c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/refactoring/JpaRenameTypeParticipant.java
+++ /dev/null
@@ -1,165 +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.jpa.core.internal.refactoring;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-//TODO RenameTypeArguments.updateSimilarDeclarations() - http://www.eclipse.org/jdt/ui/r3_2/RenameType.html
-public class JpaRenameTypeParticipant
- extends AbstractJpaRenameJavaElementParticipant {
-
- protected final Collection<IType> nestedTypes;
-
- public JpaRenameTypeParticipant() {
- super();
- this.nestedTypes = new ArrayList<IType>();
- }
-
- @Override
- public String getName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_TYPE_REFACTORING_PARTICIPANT_NAME;
- }
-
- protected IType getOriginalType() {
- return (IType) super.getOriginalJavaElement();
- }
-
- @Override
- protected boolean initialize(Object element) {
- boolean initialize = super.initialize(element);
- if (initialize) {
- this.addNestedTypes(this.getOriginalType());
- return true;
- }
- return false;
- }
-
- protected void addNestedType(IType renamedType) {
- this.nestedTypes.add(renamedType);
- this.addNestedTypes(renamedType);
- }
-
- private void addNestedTypes(IType renamedType) {
- IType[] nestedTypes;
- try {
- nestedTypes = renamedType.getTypes();
- }
- catch (JavaModelException ex) {
- JptJpaCorePlugin.log(ex);
- return;
- }
-
- for (IType nestedType : nestedTypes) {
- this.addNestedType(nestedType);
- }
- }
-
-
- //**************** AbstractJpaRenameJavaElementParticipant implementation *****************
-
- @SuppressWarnings("unchecked")
- @Override
- protected Iterable<ReplaceEdit> createPersistenceXmlReplaceEdits(PersistenceUnit persistenceUnit) {
- return new CompositeIterable<ReplaceEdit>(
- this.createPersistenceXmlReplaceOriginalTypeEdits(persistenceUnit),
- this.createPersistenceXmlReplaceNestedTypeEdits(persistenceUnit));
- }
-
- private Iterable<ReplaceEdit> createPersistenceXmlReplaceOriginalTypeEdits(PersistenceUnit persistenceUnit) {
- return persistenceUnit.createRenameTypeEdits(this.getOriginalType(), this.getNewName());
- }
-
- private Iterable<ReplaceEdit> createPersistenceXmlReplaceNestedTypeEdits(final PersistenceUnit persistenceUnit) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<IType, Iterable<ReplaceEdit>>(this.nestedTypes) {
- @Override
- protected Iterable<ReplaceEdit> transform(IType nestedType) {
- String newName = getNewNameForNestedType(nestedType);
- return persistenceUnit.createRenameTypeEdits(nestedType, newName);
- }
- }
- );
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected Iterable<ReplaceEdit> createMappingFileReplaceEdits(MappingFileRef mappingFileRef) {
- return new CompositeIterable<ReplaceEdit>(
- this.createMappingFileReplaceOriginalTypeEdits(mappingFileRef),
- this.createMappingFileReplaceNestedTypeEdits(mappingFileRef));
- }
-
- private Iterable<ReplaceEdit> createMappingFileReplaceOriginalTypeEdits(MappingFileRef mappingFileRef) {
- return mappingFileRef.createRenameTypeEdits(this.getOriginalType(), this.getNewName());
- }
-
- private Iterable<ReplaceEdit> createMappingFileReplaceNestedTypeEdits(final MappingFileRef mappingFileRef) {
- return new CompositeIterable<ReplaceEdit>(
- new TransformationIterable<IType, Iterable<ReplaceEdit>>(this.nestedTypes) {
- @Override
- protected Iterable<ReplaceEdit> transform(IType nestedType) {
- String newName = getNewNameForNestedType(nestedType);
- return mappingFileRef.createRenameTypeEdits(nestedType, newName);
- }
- }
- );
- }
-
- protected String getNewName() {
- String newName = getArguments().getNewName();
- try {
- if (this.getOriginalType().isMember()) {
- newName = this.getOriginalType().getTypeQualifiedName().substring(0, this.getOriginalType().getTypeQualifiedName().lastIndexOf('$')) + '$' + newName;
- }
- }
- catch (JavaModelException e) {
- JptJpaCorePlugin.log(e);
- }
- return newName;
- }
-
- protected String getNewNameForNestedType(IType nestedType) {
- return nestedType.getTypeQualifiedName('$').replaceFirst(this.getOriginalType().getElementName(), getArguments().getNewName());
- }
-
- @Override
- protected String getCheckConditionsSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_TYPE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- protected String getCreateChangeSubTaskName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_TYPE_REFACTORING_SUB_TASK_NAME;
- }
-
- @Override
- protected String getCompositeChangeName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_TYPE_REFACTORING_CHANGE_NAME;
- }
-
- @Override
- protected String getPersistenceXmlChangeName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_TYPE_REFACTORING_CHANGE_PERSISTENCE_XML_NAME;
- }
-
- @Override
- protected String getMappingFileChangeName() {
- return JpaCoreRefactoringMessages.JPA_RENAME_TYPE_REFACTORING_CHANGE_MAPPING_FILE_NAME;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/contenttypes/IndeterminateContentDescriber.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/contenttypes/IndeterminateContentDescriber.java
deleted file mode 100644
index 7f5320de28..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/contenttypes/IndeterminateContentDescriber.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.internal.resource.contenttypes;
-
-import java.io.InputStream;
-import java.io.Reader;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.ITextContentDescriber;
-
-/**
- * This class simply returns INDETERMINATE for any contents it receives.
- *
- * It is used currently for org.eclipse.jpt.jpa.core.content.baseJpaContent in order
- * to make that content type act as an "abstract" content type.
- *
- * This is in its own package so that it can be excluded from bundle activation in the plugin.xml.
- * Content describers must be self-contained and not trigger auto-activation.
- */
-public class IndeterminateContentDescriber implements ITextContentDescriber
-{
- public int describe(InputStream contents, IContentDescription description) {
- return INDETERMINATE;
- }
-
- public int describe(Reader contents, IContentDescription description) {
- return INDETERMINATE;
- }
-
- public QualifiedName[] getSupportedOptions() {
- return new QualifiedName[0];
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
deleted file mode 100644
index a1e61a1caa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa1.resource.java.binary.BinaryAssociationOverride1_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa1.resource.java.source.SourceAssociationOverride1_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.AssociationOverride
- */
-public final class AssociationOverrideAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new AssociationOverrideAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private AssociationOverrideAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceAssociationOverride1_0Annotation.buildSourceAssociationOverrideAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryAssociationOverride1_0Annotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.ASSOCIATION_OVERRIDE;
- }
-
- public String getContainerAnnotationName() {
- return JPA.ASSOCIATION_OVERRIDES;
- }
-
- public String getElementName() {
- return JPA.ASSOCIATION_OVERRIDES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
deleted file mode 100644
index e93bec5a59..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.AssociationOverrides
- */
-public final class AssociationOverridesAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new AssociationOverridesAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private AssociationOverridesAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.ASSOCIATION_OVERRIDES;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
deleted file mode 100644
index a675fbecce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryAttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceAttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.AttributeOverride
- */
-public final class AttributeOverrideAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new AttributeOverrideAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private AttributeOverrideAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceAttributeOverrideAnnotation.buildSourceAttributeOverrideAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryAttributeOverrideAnnotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.ATTRIBUTE_OVERRIDE;
- }
-
- public String getContainerAnnotationName() {
- return JPA.ATTRIBUTE_OVERRIDES;
- }
-
- public String getElementName() {
- return JPA.ATTRIBUTE_OVERRIDES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
deleted file mode 100644
index c21211186b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.AttributeOverrides
- */
-public final class AttributeOverridesAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new AttributeOverridesAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private AttributeOverridesAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.ATTRIBUTE_OVERRIDES;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/BasicAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/BasicAnnotationDefinition.java
deleted file mode 100644
index d5c9f819af..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/BasicAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryBasicAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceBasicAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
-
-/**
- * javax.persistence.Basic
- */
-public final class BasicAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new BasicAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private BasicAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceBasicAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryBasicAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return BasicAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ColumnAnnotationDefinition.java
deleted file mode 100644
index be971f01c6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ColumnAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-
-/**
- * javax.persistence.Column
- */
-public final class ColumnAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new ColumnAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private ColumnAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceColumnAnnotation(parent, annotatedElement, SourceColumnAnnotation.MAPPING_DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullColumnAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryColumnAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ColumnAnnotation.ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
deleted file mode 100644
index 8869b15e8c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryDiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceDiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-
-/**
- * javax.persistence.DiscriminatorColumn
- */
-public final class DiscriminatorColumnAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new DiscriminatorColumnAnnotationDefinition();
-
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private DiscriminatorColumnAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceDiscriminatorColumnAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullDiscriminatorColumnAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryDiscriminatorColumnAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return DiscriminatorColumnAnnotation.ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
deleted file mode 100644
index 4fe3535e79..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryDiscriminatorValueAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceDiscriminatorValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorValueAnnotation;
-
-/**
- * javax.persistence.DiscriminatorValue
- */
-public final class DiscriminatorValueAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new DiscriminatorValueAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private DiscriminatorValueAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceDiscriminatorValueAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullDiscriminatorValueAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryDiscriminatorValueAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return DiscriminatorValueAnnotation.ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddableAnnotationDefinition.java
deleted file mode 100644
index b11237dddc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddableAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryEmbeddableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceEmbeddableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * javax.persistence.Embeddable
- */
-public final class EmbeddableAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new EmbeddableAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private EmbeddableAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceEmbeddableAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryEmbeddableAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return EmbeddableAnnotation.ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedAnnotationDefinition.java
deleted file mode 100644
index dc28ee26da..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryEmbeddedAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceEmbeddedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
-
-/**
- * javax.persistence.Embedded
- */
-public final class EmbeddedAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new EmbeddedAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private EmbeddedAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceEmbeddedAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryEmbeddedAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return EmbeddedAnnotation.ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
deleted file mode 100644
index 840fdefbed..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryEmbeddedIdAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceEmbeddedIdAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
-
-/**
- * javax.persistence.EmbeddedId
- */
-public final class EmbeddedIdAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new EmbeddedIdAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private EmbeddedIdAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceEmbeddedIdAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryEmbeddedIdAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return EmbeddedIdAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EntityAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EntityAnnotationDefinition.java
deleted file mode 100644
index 23dbdb233a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EntityAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryEntityAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceEntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-
-/**
- * javax.persistence.Entity
- */
-public final class EntityAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new EntityAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private EntityAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceEntityAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryEntityAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return EntityAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EnumeratedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EnumeratedAnnotationDefinition.java
deleted file mode 100644
index b338ee24e9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/EnumeratedAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-
-/**
- * javax.persistence.Enumerated
- */
-public final class EnumeratedAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new EnumeratedAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private EnumeratedAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceEnumeratedAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullEnumeratedAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryEnumeratedAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return EnumeratedAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/GeneratedValueAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
deleted file mode 100644
index 5c0a3d01c5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryGeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceGeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-
-/**
- * javax.persistence.GeneratedValue
- */
-public final class GeneratedValueAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new GeneratedValueAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private GeneratedValueAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceGeneratedValueAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryGeneratedValueAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return GeneratedValueAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdAnnotationDefinition.java
deleted file mode 100644
index c446b333a3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryIdAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-
-/**
- * javax.persistence.Id
- */
-public final class IdAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new IdAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private IdAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceIdAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryIdAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return IdAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdClassAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdClassAnnotationDefinition.java
deleted file mode 100644
index 05b066cd93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/IdClassAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryIdClassAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdClassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
-
-/**
- * javax.persistence.IdClass
- */
-public final class IdClassAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new IdClassAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private IdClassAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceIdClassAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryIdClassAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return IdClassAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/InheritanceAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/InheritanceAnnotationDefinition.java
deleted file mode 100644
index 8b39be25b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/InheritanceAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryInheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceInheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceAnnotation;
-
-/**
- * javax.persistence.Inheritance
- */
-public final class InheritanceAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new InheritanceAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private InheritanceAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceInheritanceAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullInheritanceAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryInheritanceAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return InheritanceAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnAnnotationDefinition.java
deleted file mode 100644
index ee175d09dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.JoinColumn
- */
-public final class JoinColumnAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new JoinColumnAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private JoinColumnAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceJoinColumnAnnotation.buildSourceJoinColumnAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryJoinColumnAnnotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.JOIN_COLUMN;
- }
-
- public String getContainerAnnotationName() {
- return JPA.JOIN_COLUMNS;
- }
-
- public String getElementName() {
- return JPA.JOIN_COLUMNS__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnsAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
deleted file mode 100644
index ffe0e7c815..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.JoinColumns
- */
-public final class JoinColumnsAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new JoinColumnsAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private JoinColumnsAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.JOIN_COLUMNS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinTableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinTableAnnotationDefinition.java
deleted file mode 100644
index 3f3894be12..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/JoinTableAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceJoinTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * javax.persistence.JoinTable
- */
-public final class JoinTableAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new JoinTableAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private JoinTableAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceJoinTableAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullJoinTableAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryJoinTableAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return JoinTableAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/LobAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/LobAnnotationDefinition.java
deleted file mode 100644
index 941bf6e2a8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/LobAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryLobAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceLobAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-
-/**
- * javax.persistence.Lob
- */
-public final class LobAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new LobAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private LobAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceLobAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryLobAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return LobAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToManyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToManyAnnotationDefinition.java
deleted file mode 100644
index e96d01e153..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToManyAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryManyToManyAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceManyToManyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation;
-
-/**
- * javax.persistence.ManyToMany
- */
-public final class ManyToManyAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new ManyToManyAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private ManyToManyAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceManyToManyAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryManyToManyAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ManyToManyAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToOneAnnotationDefinition.java
deleted file mode 100644
index e2c9537623..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/ManyToOneAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryManyToOneAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceManyToOneAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation;
-
-/**
- * javax.persistence.ManyToOne
- */
-public final class ManyToOneAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new ManyToOneAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private ManyToOneAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceManyToOneAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryManyToOneAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ManyToOneAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MapKeyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MapKeyAnnotationDefinition.java
deleted file mode 100644
index caa04880dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MapKeyAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryMapKeyAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceMapKeyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-
-/**
- * javax.persistence.MapKey
- */
-public final class MapKeyAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MapKeyAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MapKeyAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMapKeyAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMapKeyAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MapKeyAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
deleted file mode 100644
index bc83790cf6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryMappedSuperclassAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceMappedSuperclassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-
-/**
- * javax.persistence.MappedSuperclass
- */
-public final class MappedSuperclassAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new MappedSuperclassAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private MappedSuperclassAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceMappedSuperclassAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryMappedSuperclassAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return MappedSuperclassAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
deleted file mode 100644
index 43ad8a23d2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.NamedNativeQueries
- */
-public final class NamedNativeQueriesAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new NamedNativeQueriesAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private NamedNativeQueriesAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.NAMED_NATIVE_QUERIES;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
deleted file mode 100644
index 804b262156..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryNamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceNamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.NamedNativeQuery
- */
-public final class NamedNativeQueryAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new NamedNativeQueryAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private NamedNativeQueryAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceNamedNativeQueryAnnotation.buildSourceNamedNativeQueryAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryNamedNativeQueryAnnotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.NAMED_NATIVE_QUERY;
- }
-
- public String getContainerAnnotationName() {
- return JPA.NAMED_NATIVE_QUERIES;
- }
-
- public String getElementName() {
- return JPA.NAMED_NATIVE_QUERIES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueriesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
deleted file mode 100644
index 855f933404..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.NamedQueries
- */
-public final class NamedQueriesAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new NamedQueriesAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private NamedQueriesAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.NAMED_QUERIES;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueryAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueryAnnotationDefinition.java
deleted file mode 100644
index 397442f380..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NamedQueryAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa1.resource.java.binary.BinaryNamedQuery1_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa1.resource.java.source.SourceNamedQuery1_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.NamedQuery
- */
-public final class NamedQueryAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new NamedQueryAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private NamedQueryAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceNamedQuery1_0Annotation.buildSourceNamedQueryAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryNamedQuery1_0Annotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.NAMED_QUERY;
- }
-
- public String getContainerAnnotationName() {
- return JPA.NAMED_QUERIES;
- }
-
- public String getElementName() {
- return JPA.NAMED_QUERIES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java
deleted file mode 100644
index 8271825126..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.internal.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-
-/**
- * <code>javax.persistence.Column</code>
- */
-public final class NullAttributeOverrideColumnAnnotation
- extends NullColumnAnnotation
-{
- public NullAttributeOverrideColumnAnnotation(AttributeOverrideAnnotation parent) {
- super(parent);
- }
-
- private AttributeOverrideAnnotation getAttributeOverrideAnnotation() {
- return (AttributeOverrideAnnotation) this.parent;
- }
-
- @Override
- protected ColumnAnnotation addAnnotation() {
- return this.getAttributeOverrideAnnotation().addColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseColumnAnnotation.java
deleted file mode 100644
index 8e8c64f428..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseColumnAnnotation.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- */
-public abstract class NullBaseColumnAnnotation<A extends BaseColumnAnnotation>
- extends NullNamedColumnAnnotation<A>
- implements BaseColumnAnnotation
-{
- protected NullBaseColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- // ***** table
- public String getTable() {
- return null;
- }
-
- public void setTable(String table) {
- if (table != null) {
- this.addAnnotation().setTable(table);
- }
- }
-
- public TextRange getTableTextRange() {
- return null;
- }
-
- public boolean tableTouches(int pos) {
- return false;
- }
-
- // ***** unique
- public Boolean getUnique() {
- return null;
- }
-
- public void setUnique(Boolean unique) {
- if (unique != null) {
- this.addAnnotation().setUnique(unique);
- }
- }
-
- public TextRange getUniqueTextRange() {
- return null;
- }
-
- // ***** updatable
- public Boolean getUpdatable() {
- return null;
- }
-
- public void setUpdatable(Boolean updatable) {
- if (updatable != null) {
- this.addAnnotation().setUpdatable(updatable);
- }
- }
-
- public TextRange getUpdatableTextRange() {
- return null;
- }
-
- // ***** insertable
- public Boolean getInsertable() {
- return null;
- }
-
- public void setInsertable(Boolean insertable) {
- if (insertable != null) {
- this.addAnnotation().setInsertable(insertable);
- }
- }
-
- public TextRange getInsertableTextRange() {
- return null;
- }
-
- // ***** nullable
- public Boolean getNullable() {
- return null;
- }
-
- public void setNullable(Boolean nullable) {
- if (nullable != null) {
- this.addAnnotation().setNullable(nullable);
- }
- }
-
- public TextRange getNullableTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseDiscriminatorColumnAnnotation.java
deleted file mode 100644
index 4d6a7bc596..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseDiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType;
-
-/**
- * <code>javax.persistence.DiscriminatorColumn</code>
- */
-public abstract class NullBaseDiscriminatorColumnAnnotation<A extends DiscriminatorColumnAnnotation>
- extends NullNamedColumnAnnotation<A>
- implements DiscriminatorColumnAnnotation
-{
-
- public NullBaseDiscriminatorColumnAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- // ***** discriminator type
- public DiscriminatorType getDiscriminatorType() {
- return null;
- }
-
- public void setDiscriminatorType(DiscriminatorType discriminatorType) {
- if (discriminatorType != null) {
- this.addAnnotation().setDiscriminatorType(discriminatorType);
- }
- }
-
- // ***** length
- public Integer getLength() {
- return null;
- }
-
- public void setLength(Integer length) {
- if (length != null) {
- this.addAnnotation().setLength(length);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseEnumeratedAnnotation.java
deleted file mode 100644
index 4aeba59fff..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseEnumeratedAnnotation.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EnumType;
-
-/**
- * <code>javax.persistence.Enumerated</code>
- */
-public abstract class NullBaseEnumeratedAnnotation<A extends BaseEnumeratedAnnotation>
- extends NullAnnotation<A>
- implements BaseEnumeratedAnnotation
-{
- protected NullBaseEnumeratedAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- // ***** value
- public EnumType getValue() {
- return null;
- }
-
- public void setValue(EnumType value) {
- if (value != null) {
- this.addAnnotation().setValue(value);
- }
- }
-
- public TextRange getValueTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTableAnnotation.java
deleted file mode 100644
index bb058f59cb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTableAnnotation.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-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.resource.java.BaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <ul>
- * <li><code>javax.persistence.Table</code>
- * <li><code>javax.persistence.JoinTable</code>
- * <li><code>javax.persistence.CollectionTable</code>
- * <ul>
- */
-public abstract class NullBaseTableAnnotation<A extends BaseTableAnnotation>
- extends NullAnnotation<A>
- implements BaseTableAnnotation
-{
- protected NullBaseTableAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public boolean isSpecified() {
- return false;
- }
-
- // ***** name
- public String getName() {
- return null;
- }
-
- public void setName(String name) {
- if (name != null) {
- this.addAnnotation().setName(name);
- }
- }
-
- public TextRange getNameTextRange() {
- return null;
- }
-
- public boolean nameTouches(int pos) {
- return false;
- }
-
- // ***** schema
- public String getSchema() {
- return null;
- }
-
- public void setSchema(String schema) {
- if (schema != null) {
- this.addAnnotation().setSchema(schema);
- }
- }
-
- public TextRange getSchemaTextRange() {
- return null;
- }
-
- public boolean schemaTouches(int pos) {
- return false;
- }
-
- // ***** catalog
- public String getCatalog() {
- return null;
- }
-
- public void setCatalog(String catalog) {
- if (catalog != null) {
- this.addAnnotation().setCatalog(catalog);
- }
- }
-
- public TextRange getCatalogTextRange() {
- return null;
- }
-
- public boolean catalogTouches(int pos) {
- return false;
- }
-
- // ***** unique constraints
- public ListIterable<UniqueConstraintAnnotation> getUniqueConstraints() {
- return EmptyListIterable.instance();
- }
-
- public int getUniqueConstraintsSize() {
- return 0;
- }
-
- public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
- throw new UnsupportedOperationException();
- }
-
- public UniqueConstraintAnnotation addUniqueConstraint(int index) {
- return this.addAnnotation().addUniqueConstraint(index);
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeUniqueConstraint(int index) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTemporalAnnotation.java
deleted file mode 100644
index e672fddd8b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullBaseTemporalAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Temporal
- * <li>javax.persistence.MapKeyTemporal
- * </ul></code>
- */
-public abstract class NullBaseTemporalAnnotation<A extends BaseTemporalAnnotation>
- extends NullAnnotation<A>
- implements BaseTemporalAnnotation
-{
- protected NullBaseTemporalAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- // ***** value
- public TemporalType getValue() {
- return null;
- }
-
- public void setValue(TemporalType value) {
- if (value != null) {
- this.addAnnotation().setValue(value);
- }
- }
-
- public TextRange getValueTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullColumnAnnotation.java
deleted file mode 100644
index 462316fcb7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullColumnAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-
-/**
- * <code>javax.persistence.Column</code>
- */
-public class NullColumnAnnotation
- extends NullCompleteColumnAnnotation<ColumnAnnotation>
- implements ColumnAnnotation
-{
- public NullColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullCompleteColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullCompleteColumnAnnotation.java
deleted file mode 100644
index 851436dd69..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullCompleteColumnAnnotation.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.MapKeyColumn
- * </ul></code>
- */
-public abstract class NullCompleteColumnAnnotation<A extends CompleteColumnAnnotation>
- extends NullBaseColumnAnnotation<A>
- implements CompleteColumnAnnotation
-{
- public NullCompleteColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- // ***** length
- public Integer getLength() {
- return null;
- }
-
- public void setLength(Integer length) {
- if (length != null) {
- this.addAnnotation().setLength(length);
- }
- }
-
- public TextRange getLengthTextRange() {
- return null;
- }
-
- // ***** scale
- public Integer getScale() {
- return null;
- }
-
- public void setScale(Integer scale) {
- if (scale != null) {
- this.addAnnotation().setScale(scale);
- }
- }
-
- public TextRange getScaleTextRange() {
- return null;
- }
-
- // ***** precision
- public Integer getPrecision() {
- return null;
- }
-
- public void setPrecision(Integer precision) {
- if (precision != null) {
- this.addAnnotation().setPrecision(precision);
- }
- }
-
- public TextRange getPrecisionTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java
deleted file mode 100644
index 700c78596a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-
-/**
- * <code>javax.persistence.DiscriminatorColumn</code>
- */
-public final class NullDiscriminatorColumnAnnotation
- extends NullBaseDiscriminatorColumnAnnotation<DiscriminatorColumnAnnotation>
-{
-
- public NullDiscriminatorColumnAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorValueAnnotation.java
deleted file mode 100644
index 4e236e9d5b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullDiscriminatorValueAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorValueAnnotation;
-
-/**
- * <code>javax.persistence.DiscriminatorValue</code>
- */
-public final class NullDiscriminatorValueAnnotation
- extends NullAnnotation<DiscriminatorValueAnnotation>
- implements DiscriminatorValueAnnotation
-{
- protected NullDiscriminatorValueAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** value
- public String getValue() {
- return null;
- }
-
- public void setValue(String value) {
- if (value != null) {
- this.addAnnotation().setValue(value);
- }
- }
-
- public TextRange getValueTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullEnumeratedAnnotation.java
deleted file mode 100644
index 58fdd40f94..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullEnumeratedAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-
-/**
- * <code>javax.persistence.Enumerated</code>
- */
-public final class NullEnumeratedAnnotation
- extends NullBaseEnumeratedAnnotation<EnumeratedAnnotation>
- implements EnumeratedAnnotation
-{
- protected NullEnumeratedAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullInheritanceAnnotation.java
deleted file mode 100644
index 5d8de7e193..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullInheritanceAnnotation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceType;
-
-/**
- * <code>javax.persistence.Inheritance</code>
- */
-public final class NullInheritanceAnnotation
- extends NullAnnotation<InheritanceAnnotation>
- implements InheritanceAnnotation
-{
- protected NullInheritanceAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** strategy
- public InheritanceType getStrategy() {
- return null;
- }
-
- public void setStrategy(InheritanceType strategy) {
- if (strategy != null) {
- this.addAnnotation().setStrategy(strategy);
- }
- }
-
- public TextRange getStrategyTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinColumnAnnotation.java
deleted file mode 100644
index 7b981dfb1c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinColumnAnnotation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.JoinColumn</code>
- */
-public final class NullJoinColumnAnnotation
- extends NullBaseColumnAnnotation<JoinColumnAnnotation>
- implements JoinColumnAnnotation
-{
- public NullJoinColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** referenced column name
- public String getReferencedColumnName() {
- return null;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- throw new UnsupportedOperationException();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return null;
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinTableAnnotation.java
deleted file mode 100644
index e1f72c0d31..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullJoinTableAnnotation.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * <code>javax.persistence.JoinTable</code>
- */
-public class NullJoinTableAnnotation
- extends NullBaseTableAnnotation<JoinTableAnnotation>
- implements JoinTableAnnotation
-{
- public NullJoinTableAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** join columns
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return EmptyListIterable.instance();
- }
-
- public int getJoinColumnsSize() {
- return 0;
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return null;
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- // the JoinTable annotation is missing, add both it and a join column at the same time
- return this.addAnnotation().addJoinColumn(index);
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- // ***** inverse join columns
- public ListIterable<JoinColumnAnnotation> getInverseJoinColumns() {
- return EmptyListIterable.instance();
- }
-
- public int getInverseJoinColumnsSize() {
- return 0;
- }
-
- public JoinColumnAnnotation inverseJoinColumnAt(int index) {
- return null;
- }
-
- public JoinColumnAnnotation addInverseJoinColumn(int index) {
- // the JoinTable annotation is missing, add both it and a join column at the same time
- return this.addAnnotation().addInverseJoinColumn(index);
- }
-
- public void moveInverseJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeInverseJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullNamedColumnAnnotation.java
deleted file mode 100644
index 8632a4ff23..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullNamedColumnAnnotation.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.DiscriminatorColumn
- * <li>javax.persistence.PrimaryKeyJoinColumn
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * <li>javax.persistence.OrderColumn
- * </ul></code>
- */
-public abstract class NullNamedColumnAnnotation<A extends NamedColumnAnnotation>
- extends NullAnnotation<A>
- implements NamedColumnAnnotation
-{
- protected NullNamedColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public boolean isSpecified() {
- return false;
- }
-
- // ***** name
- public String getName() {
- return null;
- }
-
- public void setName(String name) {
- if (name != null) {
- this.addAnnotation().setName(name);
- }
- }
-
- public TextRange getNameTextRange() {
- return null;
- }
-
- public boolean nameTouches(int pos) {
- return false;
- }
-
- // ***** column definition
- public String getColumnDefinition() {
- return null;
- }
-
- public void setColumnDefinition(String columnDefinition) {
- if (columnDefinition != null) {
- this.addAnnotation().setColumnDefinition(columnDefinition);
- }
- }
-
- public TextRange getColumnDefinitionTextRange() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java
deleted file mode 100644
index 50592d3408..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.PrimaryKeyJoinColumn</code>
- */
-public final class NullPrimaryKeyJoinColumnAnnotation
- extends NullNamedColumnAnnotation<PrimaryKeyJoinColumnAnnotation>
- implements PrimaryKeyJoinColumnAnnotation
-{
- public NullPrimaryKeyJoinColumnAnnotation(JavaResourceNode parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ***** referenced column name
- public String getReferencedColumnName() {
- return null;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- throw new UnsupportedOperationException();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return null;
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTableAnnotation.java
deleted file mode 100644
index 04dc531bac..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTableAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.TableAnnotation;
-
-/**
- * <code>javax.persistence.Table</code>
- */
-public final class NullTableAnnotation
- extends NullBaseTableAnnotation<TableAnnotation>
- implements TableAnnotation
-{
- protected NullTableAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTemporalAnnotation.java
deleted file mode 100644
index bb4ba33d7b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/NullTemporalAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-/**
- * <code>javax.persistence.Temporal</code>
- */
-public final class NullTemporalAnnotation
- extends NullBaseTemporalAnnotation<TemporalAnnotation>
- implements TemporalAnnotation
-{
- protected NullTemporalAnnotation(JavaResourceAnnotatedElement parent) {
- super(parent);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToManyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToManyAnnotationDefinition.java
deleted file mode 100644
index 7f4fe98296..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToManyAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryOneToManyAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceOneToManyAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
-
-/**
- * javax.persistence.OneToMany
- */
-public final class OneToManyAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new OneToManyAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private OneToManyAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceOneToManyAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryOneToManyAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return OneToManyAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToOneAnnotationDefinition.java
deleted file mode 100644
index 89c2afb754..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OneToOneAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryOneToOneAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceOneToOneAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation;
-
-/**
- * javax.persistence.OneToOne
- */
-public final class OneToOneAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new OneToOneAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private OneToOneAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceOneToOneAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryOneToOneAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return OneToOneAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OrderByAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OrderByAnnotationDefinition.java
deleted file mode 100644
index a25b378539..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/OrderByAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryOrderByAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceOrderByAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-
-/**
- * javax.persistence.OrderBy
- */
-public final class OrderByAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new OrderByAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private OrderByAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceOrderByAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryOrderByAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return OrderByAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
deleted file mode 100644
index d2731c2bd9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryPrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourcePrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.PrimaryKeyJoinColumn
- */
-public final class PrimaryKeyJoinColumnAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new PrimaryKeyJoinColumnAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private PrimaryKeyJoinColumnAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourcePrimaryKeyJoinColumnAnnotation.buildSourcePrimaryKeyJoinColumnAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinaryPrimaryKeyJoinColumnAnnotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN;
- }
-
- public String getContainerAnnotationName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMNS;
- }
-
- public String getElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMNS__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
deleted file mode 100644
index 8a48d9324e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.PrimaryKeyJoinColumns
- */
-public final class PrimaryKeyJoinColumnsAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new PrimaryKeyJoinColumnsAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private PrimaryKeyJoinColumnsAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMNS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
deleted file mode 100644
index 0109ff4539..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinarySecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceSecondaryTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.SecondaryTable
- */
-public final class SecondaryTableAnnotationDefinition
- implements NestableAnnotationDefinition
-{
- // singleton
- private static final NestableAnnotationDefinition INSTANCE = new SecondaryTableAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static NestableAnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private SecondaryTableAnnotationDefinition() {
- super();
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index) {
- return SourceSecondaryTableAnnotation.buildSourceSecondaryTableAnnotation(parent, annotatedElement, index);
- }
-
- public NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index) {
- return new BinarySecondaryTableAnnotation(parent, jdtAnnotation);
- }
-
- public String getNestableAnnotationName() {
- return JPA.SECONDARY_TABLE;
- }
-
- public String getContainerAnnotationName() {
- return JPA.SECONDARY_TABLES;
- }
-
- public String getElementName() {
- return JPA.SECONDARY_TABLES__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
deleted file mode 100644
index 64e14a199f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryNamedAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNamedAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.SecondaryTables
- */
-public final class SecondaryTablesAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new SecondaryTablesAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private SecondaryTablesAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceNamedAnnotation(parent, annotatedElement, getAnnotationName());
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryNamedAnnotation(parent, jdtAnnotation, getAnnotationName());
- }
-
- public String getAnnotationName() {
- return JPA.SECONDARY_TABLES;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
deleted file mode 100644
index 3784a290f2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.jpa1.resource.java.binary.BinarySequenceGenerator1_0Annotation;
-import org.eclipse.jpt.jpa.core.internal.jpa1.resource.java.source.SourceSequenceGenerator1_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * javax.persistence.SequenceGenerator
- */
-public final class SequenceGeneratorAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new SequenceGeneratorAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- protected SequenceGeneratorAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceSequenceGenerator1_0Annotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinarySequenceGenerator1_0Annotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return SequenceGeneratorAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableAnnotationDefinition.java
deleted file mode 100644
index d189d64a3b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryTableAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableAnnotation;
-
-/**
- * javax.persistence.Table
- */
-public final class TableAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new TableAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private TableAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceTableAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullTableAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryTableAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return TableAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableGeneratorAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
deleted file mode 100644
index 8cbe2da7f8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryTableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceTableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-
-/**
- * javax.persistence.TableGenerator
- */
-public final class TableGeneratorAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new TableGeneratorAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private TableGeneratorAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceTableGeneratorAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryTableGeneratorAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return TableGeneratorAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TemporalAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TemporalAnnotationDefinition.java
deleted file mode 100644
index a69962e8f7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TemporalAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-/**
- * javax.persistence.Temporal
- */
-public final class TemporalAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new TemporalAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private TemporalAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceTemporalAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- return new NullTemporalAnnotation(parent);
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryTemporalAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return TemporalAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TransientAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TransientAnnotationDefinition.java
deleted file mode 100644
index 930a13f526..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/TransientAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryTransientAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceTransientAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
-
-/**
- * javax.persistence.Transient
- */
-public final class TransientAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new TransientAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private TransientAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceTransientAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryTransientAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return TransientAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/VersionAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/VersionAnnotationDefinition.java
deleted file mode 100644
index 3406e69c29..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/VersionAnnotationDefinition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.jpa.core.internal.resource.java.binary.BinaryVersionAnnotation;
-import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceVersionAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
-
-/**
- * javax.persistence.Version
- */
-public final class VersionAnnotationDefinition
- implements AnnotationDefinition
-{
- // singleton
- private static final AnnotationDefinition INSTANCE = new VersionAnnotationDefinition();
-
- /**
- * Return the singleton.
- */
- public static AnnotationDefinition instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private VersionAnnotationDefinition() {
- super();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceVersionAnnotation(parent, annotatedElement);
- }
-
- public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
- throw new UnsupportedOperationException();
- }
-
- public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- return new BinaryVersionAnnotation(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return VersionAnnotation.ANNOTATION_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java
deleted file mode 100644
index e148d63290..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * javax.persistence.AssociationOverride
- */
-public abstract class BinaryAssociationOverrideAnnotation
- extends BinaryOverrideAnnotation
- implements AssociationOverrideAnnotation
-{
- private final Vector<JoinColumnAnnotation> joinColumns;
-
-
- protected BinaryAssociationOverrideAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.joinColumns = this.buildJoinColumns();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJoinColumns();
- }
-
-
- // ********** BinaryOverrideAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.ASSOCIATION_OVERRIDE__NAME;
- }
-
-
- // ********** AssociationOverrideAnnotation implementation **********
-
- // ***** join columns
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return new LiveCloneListIterable<JoinColumnAnnotation>(this.joinColumns);
- }
-
- public int getJoinColumnsSize() {
- return this.joinColumns.size();
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return this.joinColumns.get(index);
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<JoinColumnAnnotation> buildJoinColumns() {
- Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS);
- Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
- for (Object jdtJoinColumn : jdtJoinColumns) {
- result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
- }
- return result;
- }
-
- // TODO
- private void updateJoinColumns() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java
deleted file mode 100644
index d5c6a4f44d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullAttributeOverrideColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.AttributeOverride
- */
-public final class BinaryAttributeOverrideAnnotation
- extends BinaryOverrideAnnotation
- implements AttributeOverrideAnnotation
-{
- private ColumnAnnotation column;
- private final ColumnAnnotation nullColumn;
-
-
- public BinaryAttributeOverrideAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.column = this.buildColumn();
- this.nullColumn = this.buildNullColumn();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updateColumn();
- }
-
-
- //************ BinaryOverrideAnnotation implementation ****************
-
- @Override
- protected String getNameElementName() {
- return JPA.ATTRIBUTE_OVERRIDE__NAME;
- }
-
-
- //************ AttributeOverride implementation ****************
-
- // ***** column
- public ColumnAnnotation getColumn() {
- return this.column;
- }
-
- public ColumnAnnotation getNonNullColumn() {
- return (this.column != null) ? this.column : this.nullColumn;
- }
-
- public ColumnAnnotation addColumn() {
- throw new UnsupportedOperationException();
- }
-
- public void removeColumn() {
- throw new UnsupportedOperationException();
- }
-
- private ColumnAnnotation buildColumn() {
- IAnnotation jdtColumn = this.getJdtColumn();
- return (jdtColumn == null) ? null : this.buildColumn(jdtColumn);
- }
-
- private ColumnAnnotation buildNullColumn() {
- return new NullAttributeOverrideColumnAnnotation(this);
- }
-
- private ColumnAnnotation buildColumn(IAnnotation jdtColumn) {
- return new BinaryColumnAnnotation(this, jdtColumn);
- }
-
- private IAnnotation getJdtColumn() {
- return (IAnnotation) this.getJdtMemberValue(JPA.ATTRIBUTE_OVERRIDE__COLUMN);
- }
-
- private void setColumn(ColumnAnnotation column) {
- ColumnAnnotation old = this.column;
- this.column = column;
- this.firePropertyChanged(COLUMN_PROPERTY, old, column);
- }
-
- // TODO
- private void updateColumn() {
- throw new UnsupportedOperationException();
-// IAnnotation jdtColumn = this.getJdtColumn();
-// if (jdtColumn == null) {
-// this.setColumn(null);
-// } else {
-// if (this.column == null) {
-// this.setColumn(this.buildColumn(jdtColumn));
-// } else {
-// this.column.update(jdtColumn);
-// }
-// }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java
deleted file mode 100644
index e842af6efe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- */
-public abstract class BinaryBaseColumnAnnotation
- extends BinaryNamedColumnAnnotation
- implements BaseColumnAnnotation
-{
- private String table;
- private Boolean unique;
- private Boolean nullable;
- private Boolean insertable;
- private Boolean updatable;
-
-
- protected BinaryBaseColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.table = this.buildTable();
- this.unique = this.buildUnique();
- this.nullable = this.buildNullable();
- this.insertable = this.buildInsertable();
- this.updatable = this.buildUpdatable();
- }
-
- @Override
- public void update() {
- super.update();
- this.setTable_(this.buildTable());
- this.setUnique_(this.buildUnique());
- this.setNullable_(this.buildNullable());
- this.setInsertable_(this.buildInsertable());
- this.setUpdatable_(this.buildUpdatable());
- }
-
-
- //************* BaseColumnAnnotation implementation *************
-
- // ***** table
- public String getTable() {
- return this.table;
- }
-
- public void setTable(String table) {
- throw new UnsupportedOperationException();
- }
-
- private void setTable_(String table) {
- String old = this.table;
- this.table = table;
- this.firePropertyChanged(TABLE_PROPERTY, old, table);
- }
-
- private String buildTable() {
- return (String) this.getJdtMemberValue(this.getTableElementName());
- }
-
- protected abstract String getTableElementName();
-
- public TextRange getTableTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean tableTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** unique
- public Boolean getUnique() {
- return this.unique;
- }
-
- public void setUnique(Boolean unique) {
- throw new UnsupportedOperationException();
- }
-
- private void setUnique_(Boolean unique) {
- Boolean old = this.unique;
- this.unique = unique;
- this.firePropertyChanged(UNIQUE_PROPERTY, old, unique);
- }
-
- private Boolean buildUnique() {
- return (Boolean) this.getJdtMemberValue(this.getUniqueElementName());
- }
-
- protected abstract String getUniqueElementName();
-
- public TextRange getUniqueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** nullable
- public Boolean getNullable() {
- return this.nullable;
- }
-
- public void setNullable(Boolean nullable) {
- throw new UnsupportedOperationException();
- }
-
- private void setNullable_(Boolean nullable) {
- Boolean old = this.nullable;
- this.nullable = nullable;
- this.firePropertyChanged(NULLABLE_PROPERTY, old, nullable);
- }
-
- private Boolean buildNullable() {
- return (Boolean) this.getJdtMemberValue(this.getNullableElementName());
- }
-
- protected abstract String getNullableElementName();
-
- public TextRange getNullableTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** insertable
- public Boolean getInsertable() {
- return this.insertable;
- }
-
- public void setInsertable(Boolean insertable) {
- throw new UnsupportedOperationException();
- }
-
- private void setInsertable_(Boolean insertable) {
- Boolean old = this.insertable;
- this.insertable = insertable;
- this.firePropertyChanged(INSERTABLE_PROPERTY, old, insertable);
- }
-
- private Boolean buildInsertable() {
- return (Boolean) this.getJdtMemberValue(this.getInsertableElementName());
- }
-
- protected abstract String getInsertableElementName();
-
- public TextRange getInsertableTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** updatable
- public Boolean getUpdatable() {
- return this.updatable;
- }
-
- public void setUpdatable(Boolean updatable) {
- throw new UnsupportedOperationException();
- }
-
- private void setUpdatable_(Boolean updatable) {
- Boolean old = this.updatable;
- this.updatable = updatable;
- this.firePropertyChanged(UPDATABLE_PROPERTY, old, updatable);
- }
-
- private Boolean buildUpdatable() {
- return (Boolean) this.getJdtMemberValue(this.getUpdatableElementName());
- }
-
- protected abstract String getUpdatableElementName();
-
- public TextRange getUpdatableTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseDiscriminatorColumnAnnotation.java
deleted file mode 100644
index 5ad8acee12..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseDiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType;
-
-public abstract class BinaryBaseDiscriminatorColumnAnnotation
- extends BinaryNamedColumnAnnotation
- implements DiscriminatorColumnAnnotation
-{
- private DiscriminatorType discriminatorType;
- private Integer length;
-
-
- protected BinaryBaseDiscriminatorColumnAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.discriminatorType = this.buildDiscriminatorType();
- this.length = this.buildLength();
- }
-
- @Override
- public void update() {
- super.update();
- this.setDiscriminatorType_(this.buildDiscriminatorType());
- this.setLength_(this.buildLength());
- }
-
-
- // ********** DiscriminatorColumnAnnotation implementation **********
-
- // ***** discriminator type
- public DiscriminatorType getDiscriminatorType() {
- return null;
- }
-
- public void setDiscriminatorType(DiscriminatorType discriminatorType) {
- throw new UnsupportedOperationException();
- }
-
- private void setDiscriminatorType_(DiscriminatorType discriminatorType) {
- DiscriminatorType old = this.discriminatorType;
- this.discriminatorType = discriminatorType;
- this.firePropertyChanged(DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
- }
-
- private DiscriminatorType buildDiscriminatorType() {
- return DiscriminatorType.fromJavaAnnotationValue(this.getJdtMemberValue(this.getDiscriminatorTypeElementName()));
- }
-
- protected abstract String getDiscriminatorTypeElementName();
-
- // ***** length
- public Integer getLength() {
- return null;
- }
-
- public void setLength(Integer length) {
- throw new UnsupportedOperationException();
- }
-
- private void setLength_(Integer length) {
- Integer old = this.length;
- this.length = length;
- this.firePropertyChanged(LENGTH_PROPERTY, old, length);
- }
-
- private Integer buildLength() {
- return (Integer) this.getJdtMemberValue(this.getLengthElementName());
- }
-
- protected abstract String getLengthElementName();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java
deleted file mode 100644
index 123e99a458..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EnumType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Enumerated
- * <li>javax.persistence.MapKeyEnumerated
- * </ul></code>
- */
-public abstract class BinaryBaseEnumeratedAnnotation
- extends BinaryAnnotation
- implements BaseEnumeratedAnnotation
-{
- private EnumType value;
-
-
- protected BinaryBaseEnumeratedAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** BaseEnumeratedAnnotation implementation **********
-
- // ***** value
- public EnumType getValue() {
- return this.value;
- }
-
- public void setValue(EnumType value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(EnumType value) {
- EnumType old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private EnumType buildValue() {
- return EnumType.fromJavaAnnotationValue(this.getJdtMemberValue(this.getValueElementName()));
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- protected abstract String getValueElementName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java
deleted file mode 100644
index d1a410e03a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code><ul>
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- */
-public abstract class BinaryBaseJoinColumnAnnotation
- extends BinaryBaseColumnAnnotation
- implements BaseJoinColumnAnnotation
-{
- private String referencedColumnName;
-
-
- public BinaryBaseJoinColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.referencedColumnName = this.buildReferencedColumnName();
- }
-
- @Override
- public void update() {
- super.update();
- this.setReferencedColumnName_(this.buildReferencedColumnName());
- }
-
- protected abstract String getReferencedColumnNameElementName();
-
-
- //************ BaseJoinColumnAnnotation implementation ***************
-
- // referenced column name
- public String getReferencedColumnName() {
- return this.referencedColumnName;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- throw new UnsupportedOperationException();
- }
-
- private void setReferencedColumnName_(String referencedColumnName) {
- String old = this.referencedColumnName;
- this.referencedColumnName = referencedColumnName;
- this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, referencedColumnName);
- }
-
- private String buildReferencedColumnName() {
- return (String) this.getJdtMemberValue(JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java
deleted file mode 100644
index e6a2509ced..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Table
- * <li>javax.persistence.JoinTable
- * <li>javax.persistence.SecondaryTable
- * <li>javax.persistence.CollectionTable
- * </ul></code>
- */
-public abstract class BinaryBaseTableAnnotation
- extends BinaryAnnotation
- implements BaseTableAnnotation
-{
- String name;
- String schema;
- String catalog;
- final Vector<UniqueConstraintAnnotation> uniqueConstraints;
-
-
- protected BinaryBaseTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- this.schema = this.buildSchema();
- this.catalog = this.buildCatalog();
- this.uniqueConstraints = this.buildUniqueConstraints();
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- this.setSchema_(this.buildSchema());
- this.setCatalog_(this.buildCatalog());
- this.updateUniqueConstraints();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** BaseTableAnnotation implementation **********
-
- public boolean isSpecified() {
- return true;
- }
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(this.getNameElementName());
- }
-
- protected abstract String getNameElementName();
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean nameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** schema
- public String getSchema() {
- return this.schema;
- }
-
- public void setSchema(String schema) {
- throw new UnsupportedOperationException();
- }
-
- private void setSchema_(String schema) {
- String old = this.schema;
- this.schema = schema;
- this.firePropertyChanged(SCHEMA_PROPERTY, old, schema);
- }
-
- private String buildSchema() {
- return (String) this.getJdtMemberValue(this.getSchemaElementName());
- }
-
- protected abstract String getSchemaElementName();
-
- public TextRange getSchemaTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean schemaTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** catalog
- public String getCatalog() {
- return this.catalog;
- }
-
- public void setCatalog(String catalog) {
- throw new UnsupportedOperationException();
- }
-
- private void setCatalog_(String catalog) {
- String old = this.catalog;
- this.catalog = catalog;
- this.firePropertyChanged(CATALOG_PROPERTY, old, catalog);
- }
-
- private String buildCatalog() {
- return (String) this.getJdtMemberValue(this.getCatalogElementName());
- }
-
- protected abstract String getCatalogElementName();
-
- public TextRange getCatalogTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean catalogTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** unique constraints
-
- public ListIterable<UniqueConstraintAnnotation> getUniqueConstraints() {
- return new LiveCloneListIterable<UniqueConstraintAnnotation>(this.uniqueConstraints);
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraints.size();
- }
-
- public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
- return this.uniqueConstraints.get(index);
- }
-
- public UniqueConstraintAnnotation addUniqueConstraint(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeUniqueConstraint(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<UniqueConstraintAnnotation> buildUniqueConstraints() {
- Object[] jdtUniqueConstraints = this.getJdtMemberValues(this.getUniqueConstraintElementName());
- Vector<UniqueConstraintAnnotation> result = new Vector<UniqueConstraintAnnotation>(jdtUniqueConstraints.length);
- for (Object jdtUniqueConstraint : jdtUniqueConstraints) {
- result.add(new BinaryUniqueConstraintAnnotation(this, (IAnnotation) jdtUniqueConstraint));
- }
- return result;
- }
-
- protected abstract String getUniqueConstraintElementName();
-
- // TODO
- private void updateUniqueConstraints() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java
deleted file mode 100644
index 4688603b93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Temporal
- * <li>javax.persistence.MapKeyTemporal
- * </ul></code>
- */
-public abstract class BinaryBaseTemporalAnnotation
- extends BinaryAnnotation
- implements BaseTemporalAnnotation
-{
- private TemporalType value;
-
-
- protected BinaryBaseTemporalAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** BaseTemporalAnnotation implementation **********
-
- // ***** value
- public TemporalType getValue() {
- return this.value;
- }
-
- public void setValue(TemporalType value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(TemporalType value) {
- TemporalType old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private TemporalType buildValue() {
- return TemporalType.fromJavaAnnotationValue(this.getJdtMemberValue(getValueElementName()));
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- protected abstract String getValueElementName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBasicAnnotation.java
deleted file mode 100644
index 8c81be7ab6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryBasicAnnotation.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Basic</code>
- */
-public final class BinaryBasicAnnotation
- extends BinaryAnnotation
- implements BasicAnnotation
-{
- private Boolean optional;
- private FetchType fetch;
-
-
- public BinaryBasicAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.optional = this.buildOptional();
- this.fetch = this.buildFetch();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setOptional_(this.buildOptional());
- this.setFetch_(this.buildFetch());
- }
-
-
- //*************** Basic implementation ****************
-
- // ***** optional
- public Boolean getOptional() {
- return this.optional;
- }
-
- public void setOptional(Boolean optional) {
- throw new UnsupportedOperationException();
- }
-
- private void setOptional_(Boolean optional) {
- Boolean old = this.optional;
- this.optional = optional;
- this.firePropertyChanged(OPTIONAL_PROPERTY, old, optional);
- }
-
- private Boolean buildOptional() {
- return (Boolean) this.getJdtMemberValue(JPA.BASIC__OPTIONAL);
- }
-
- public TextRange getOptionalTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** fetch
- public FetchType getFetch() {
- return this.fetch;
- }
-
- public void setFetch(FetchType fetch) {
- throw new UnsupportedOperationException();
- }
-
- private void setFetch_(FetchType fetch) {
- FetchType old = this.fetch;
- this.fetch = fetch;
- this.firePropertyChanged(FETCH_PROPERTY, old, fetch);
- }
-
- private FetchType buildFetch() {
- return FetchType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.BASIC__FETCH));
- }
-
- public TextRange getFetchTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryColumnAnnotation.java
deleted file mode 100644
index b0de500915..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryColumnAnnotation.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Column</code>
- */
-public final class BinaryColumnAnnotation
- extends BinaryCompleteColumnAnnotation
- implements ColumnAnnotation
-{
-
- public BinaryColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** BinaryNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** BinaryBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA.COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA.COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA.COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA.COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA.COLUMN__UPDATABLE;
- }
-
-
- // ********** BinaryCompleteColumnAnnotation implementation **********
-
- @Override
- protected String getLengthElementName() {
- return JPA.COLUMN__LENGTH;
- }
-
- @Override
- protected String getPrecisionElementName() {
- return JPA.COLUMN__PRECISION;
- }
-
- @Override
- protected String getScaleElementName() {
- return JPA.COLUMN__SCALE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java
deleted file mode 100644
index d3eec60bdd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.MapKeyColumn
- * </ul></code>
- */
-public abstract class BinaryCompleteColumnAnnotation
- extends BinaryBaseColumnAnnotation
- implements CompleteColumnAnnotation
-{
- protected Integer length;
- protected Integer precision;
- protected Integer scale;
-
-
- protected BinaryCompleteColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.length = this.buildLength();
- this.precision = this.buildPrecision();
- this.scale = this.buildScale();
- }
-
- @Override
- public void update() {
- super.update();
- this.setLength_(this.buildLength());
- this.setPrecision_(this.buildPrecision());
- this.setScale_(this.buildScale());
- }
-
-
- // ********** ColumnAnnotation implementation **********
-
- // ***** length
- public Integer getLength() {
- return this.length;
- }
-
- public void setLength(Integer length) {
- throw new UnsupportedOperationException();
- }
-
- private void setLength_(Integer length) {
- Integer old = this.length;
- this.length = length;
- this.firePropertyChanged(LENGTH_PROPERTY, old, length);
- }
-
- private Integer buildLength() {
- return (Integer) this.getJdtMemberValue(this.getLengthElementName());
- }
-
- public TextRange getLengthTextRange() {
- throw new UnsupportedOperationException();
- }
-
- protected abstract String getLengthElementName();
-
- // ***** precision
- public Integer getPrecision() {
- return this.precision;
- }
-
- public void setPrecision(Integer precision) {
- throw new UnsupportedOperationException();
- }
-
- private void setPrecision_(Integer precision) {
- Integer old = this.precision;
- this.precision = precision;
- this.firePropertyChanged(PRECISION_PROPERTY, old, precision);
- }
-
- private Integer buildPrecision() {
- return (Integer) this.getJdtMemberValue(this.getPrecisionElementName());
- }
-
- public TextRange getPrecisionTextRange() {
- throw new UnsupportedOperationException();
- }
-
- protected abstract String getPrecisionElementName();
-
- // ***** scale
- public Integer getScale() {
- return this.scale;
- }
-
- public void setScale(Integer scale) {
- throw new UnsupportedOperationException();
- }
-
- private void setScale_(Integer scale) {
- Integer old = this.scale;
- this.scale = scale;
- this.firePropertyChanged(SCALE_PROPERTY, old, scale);
- }
-
- private Integer buildScale() {
- return (Integer) this.getJdtMemberValue(this.getScaleElementName());
- }
-
- public TextRange getScaleTextRange() {
- throw new UnsupportedOperationException();
- }
-
- protected abstract String getScaleElementName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java
deleted file mode 100644
index 6ffea3f24e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * javax.persistence.DiscriminatorColumn
- */
-public final class BinaryDiscriminatorColumnAnnotation
- extends BinaryBaseDiscriminatorColumnAnnotation
-{
-
-
- public BinaryDiscriminatorColumnAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ********** BinaryBaseDiscriminatorColumnAnnotation implementation **********
-
- @Override
- protected String getDiscriminatorTypeElementName() {
- return JPA.DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- }
-
- @Override
- protected String getLengthElementName() {
- return JPA.DISCRIMINATOR_COLUMN__LENGTH;
- }
-
- // ********** BinaryNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.DISCRIMINATOR_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java
deleted file mode 100644
index f982112333..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.DiscriminatorValue</code>
- */
-public final class BinaryDiscriminatorValueAnnotation
- extends BinaryAnnotation
- implements DiscriminatorValueAnnotation
-{
- private String value;
-
-
- public BinaryDiscriminatorValueAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** DiscriminatorValueAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA.DISCRIMINATOR_VALUE__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java
deleted file mode 100644
index 8b7f468f68..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * javax.persistence.Embeddable
- */
-public final class BinaryEmbeddableAnnotation
- extends BinaryAnnotation
- implements EmbeddableAnnotation
-{
-
- public BinaryEmbeddableAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java
deleted file mode 100644
index 26fee36772..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
-
-/**
- * javax.persistence.Embedded
- */
-public final class BinaryEmbeddedAnnotation
- extends BinaryAnnotation
- implements EmbeddedAnnotation
-{
-
- public BinaryEmbeddedAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java
deleted file mode 100644
index e37c65f6d8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
-
-/**
- * javax.persistence.EmbeddedId
- */
-public final class BinaryEmbeddedIdAnnotation
- extends BinaryAnnotation
- implements EmbeddedIdAnnotation
-{
-
- public BinaryEmbeddedIdAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEntityAnnotation.java
deleted file mode 100644
index e459fc4ddb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEntityAnnotation.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Entity</code>
- */
-public final class BinaryEntityAnnotation
- extends BinaryAnnotation
- implements EntityAnnotation
-{
- private String name;
-
-
- public BinaryEntityAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** EntityAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(JPA.ENTITY__NAME);
- }
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java
deleted file mode 100644
index 92aeda37be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Enumerated</code>
- */
-public final class BinaryEnumeratedAnnotation
- extends BinaryBaseEnumeratedAnnotation
- implements EnumeratedAnnotation
-{
- public BinaryEnumeratedAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA.ENUMERATED__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java
deleted file mode 100644
index e2c5550c72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GenerationType;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.GeneratedValue</code>
- */
-public final class BinaryGeneratedValueAnnotation
- extends BinaryAnnotation
- implements GeneratedValueAnnotation
-{
- private GenerationType strategy;
- private String generator;
-
-
- public BinaryGeneratedValueAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.strategy = this.buildStrategy();
- this.generator = this.buildGenerator();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setStrategy_(this.buildStrategy());
- this.setGenerator_(this.buildGenerator());
- }
-
-
- // ********** GeneratedValueAnnotation implementation **********
-
- // ***** strategy
- public GenerationType getStrategy() {
- return this.strategy;
- }
-
- public void setStrategy(GenerationType strategy) {
- throw new UnsupportedOperationException();
- }
-
- private void setStrategy_(GenerationType strategy) {
- GenerationType old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- private GenerationType buildStrategy() {
- return GenerationType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.GENERATED_VALUE__STRATEGY));
- }
-
- public TextRange getStrategyTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** generator
- public String getGenerator() {
- return this.generator;
- }
-
- public void setGenerator(String generator) {
- throw new UnsupportedOperationException();
- }
-
- private void setGenerator_(String generator) {
- String old = this.generator;
- this.generator = generator;
- this.firePropertyChanged(GENERATOR_PROPERTY, old, generator);
- }
-
- private String buildGenerator() {
- return (String) this.getJdtMemberValue(JPA.GENERATED_VALUE__GENERATOR);
- }
-
- public TextRange getGeneratorTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean generatorTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java
deleted file mode 100644
index e12c6353df..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
-
-/**
- * <ul>
- * <li>javax.persistence.SequenceGenerator
- * <li>javax.persistence.TableGenerator
- * </ul>
- */
-abstract class BinaryGeneratorAnnotation
- extends BinaryAnnotation
- implements GeneratorAnnotation
-{
- String name;
- Integer initialValue;
- Integer allocationSize;
-
-
- BinaryGeneratorAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- this.initialValue = this.buildInitialValue();
- this.allocationSize = this.buildAllocationSize();
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- this.setInitialValue_(this.buildInitialValue());
- this.setAllocationSize_(this.buildAllocationSize());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** GeneratorAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(this.getNameElementName());
- }
-
- abstract String getNameElementName();
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** initial value
- public Integer getInitialValue() {
- return this.initialValue;
- }
-
- public void setInitialValue(Integer initialValue) {
- throw new UnsupportedOperationException();
- }
-
- private void setInitialValue_(Integer initialValue) {
- Integer old = this.initialValue;
- this.initialValue = initialValue;
- this.firePropertyChanged(INITIAL_VALUE_PROPERTY, old, initialValue);
- }
-
- private Integer buildInitialValue() {
- return (Integer) this.getJdtMemberValue(this.getInitialValueElementName());
- }
-
- abstract String getInitialValueElementName();
-
- public TextRange getInitialValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** name
- public Integer getAllocationSize() {
- return this.allocationSize;
- }
-
- public void setAllocationSize(Integer allocationSize) {
- throw new UnsupportedOperationException();
- }
-
- private void setAllocationSize_(Integer allocationSize) {
- Integer old = this.allocationSize;
- this.allocationSize = allocationSize;
- this.firePropertyChanged(NAME_PROPERTY, old, allocationSize);
- }
-
- private Integer buildAllocationSize() {
- return (Integer) this.getJdtMemberValue(this.getAllocationSizeElementName());
- }
-
- abstract String getAllocationSizeElementName();
-
- public TextRange getAllocationSizeTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdAnnotation.java
deleted file mode 100644
index 61294a3af4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-
-/**
- * javax.persistence.Id
- */
-public final class BinaryIdAnnotation
- extends BinaryAnnotation
- implements IdAnnotation
-{
-
- public BinaryIdAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdClassAnnotation.java
deleted file mode 100644
index 7759fdc0b1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryIdClassAnnotation.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.IdClass</code>
- */
-public final class BinaryIdClassAnnotation
- extends BinaryAnnotation
- implements IdClassAnnotation
-{
- private String value;
-
-
- public BinaryIdClassAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
-
- // ********** IdClassAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA.ID_CLASS__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** fully-qualified class name
- /**
- * binary is already fully-qualified
- */
- public String getFullyQualifiedClassName() {
- return this.value;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java
deleted file mode 100644
index 4c0c029e0f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceType;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Inheritance</code>
- */
-public final class BinaryInheritanceAnnotation
- extends BinaryAnnotation
- implements InheritanceAnnotation
-{
- private InheritanceType strategy;
-
-
- public BinaryInheritanceAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.strategy = this.buildStrategy();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setStrategy_(this.buildStrategy());
- }
-
-
- // ********** InheritanceAnnotation implementation **********
-
- // ***** strategy
- public InheritanceType getStrategy() {
- return this.strategy;
- }
-
- public void setStrategy(InheritanceType strategy) {
- throw new UnsupportedOperationException();
- }
-
- private void setStrategy_(InheritanceType strategy) {
- InheritanceType old = this.strategy;
- this.strategy = strategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
- }
-
- private InheritanceType buildStrategy() {
- return InheritanceType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.INHERITANCE__STRATEGY));
- }
-
- public TextRange getStrategyTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java
deleted file mode 100644
index 562a323328..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.JoinColumn</code>
- */
-public final class BinaryJoinColumnAnnotation
- extends BinaryBaseJoinColumnAnnotation
- implements JoinColumnAnnotation
-{
- public BinaryJoinColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** BinaryNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** BinaryBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA.JOIN_COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA.JOIN_COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA.JOIN_COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA.JOIN_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA.JOIN_COLUMN__UPDATABLE;
- }
-
-
- // ********** BinaryBaseJoinColumnAnnotation implementation **********
-
- @Override
- protected String getReferencedColumnNameElementName() {
- return JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java
deleted file mode 100644
index 1ce1051898..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * javax.persistence.JoinTable
- */
-public final class BinaryJoinTableAnnotation
- extends BinaryBaseTableAnnotation
- implements JoinTableAnnotation
-{
- private final Vector<JoinColumnAnnotation> joinColumns;
- private final Vector<JoinColumnAnnotation> inverseJoinColumns;
-
-
- public BinaryJoinTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.joinColumns = this.buildJoinColumns();
- this.inverseJoinColumns = this.buildInverseJoinColumns();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updateJoinColumns();
- this.updateInverseJoinColumns();
- }
-
-
- // ********** BinaryBaseTableAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.JOIN_TABLE__NAME;
- }
-
- @Override
- protected String getSchemaElementName() {
- return JPA.JOIN_TABLE__SCHEMA;
- }
-
- @Override
- protected String getCatalogElementName() {
- return JPA.JOIN_TABLE__CATALOG;
- }
-
- @Override
- protected String getUniqueConstraintElementName() {
- return JPA.JOIN_TABLE__UNIQUE_CONSTRAINTS;
- }
-
-
- // ********** JoinTableAnnotation implementation **********
-
- // ***** join columns
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return new LiveCloneListIterable<JoinColumnAnnotation>(this.joinColumns);
- }
-
- public int getJoinColumnsSize() {
- return this.joinColumns.size();
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return this.joinColumns.get(index);
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<JoinColumnAnnotation> buildJoinColumns() {
- Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.JOIN_TABLE__JOIN_COLUMNS);
- Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
- for (Object jdtJoinColumn : jdtJoinColumns) {
- result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
- }
- return result;
- }
-
- // TODO
- private void updateJoinColumns() {
- throw new UnsupportedOperationException();
- }
-
-
- // ***** inverse join columns
- public ListIterable<JoinColumnAnnotation> getInverseJoinColumns() {
- return new LiveCloneListIterable<JoinColumnAnnotation>(this.inverseJoinColumns);
- }
-
- public int getInverseJoinColumnsSize() {
- return this.inverseJoinColumns.size();
- }
-
- public JoinColumnAnnotation inverseJoinColumnAt(int index) {
- return this.inverseJoinColumns.get(index);
- }
-
- public JoinColumnAnnotation addInverseJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveInverseJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeInverseJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<JoinColumnAnnotation> buildInverseJoinColumns() {
- Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS);
- Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
- for (Object jdtJoinColumn : jdtJoinColumns) {
- result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
- }
- return result;
- }
-
- // TODO
- private void updateInverseJoinColumns() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryLobAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryLobAnnotation.java
deleted file mode 100644
index 1a76ccda72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryLobAnnotation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-
-/**
- * javax.persistence.Lob
- */
-public final class BinaryLobAnnotation
- extends BinaryAnnotation
- implements LobAnnotation
-{
- public BinaryLobAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java
deleted file mode 100644
index 189bc99b73..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ManyToMany2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.ManyToMany</code>
- */
-public final class BinaryManyToManyAnnotation
- extends BinaryRelationshipMappingAnnotation
- implements ManyToMany2_0Annotation
-{
- private String mappedBy;
-
-
- public BinaryManyToManyAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.mappedBy = this.buildMappedBy();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setMappedBy_(this.buildMappedBy());
- }
-
-
- // ********** BinaryRelationshipMappingAnnotation implementation **********
-
- @Override
- String getTargetEntityElementName() {
- return JPA.MANY_TO_MANY__TARGET_ENTITY;
- }
-
- @Override
- String getFetchElementName() {
- return JPA.MANY_TO_MANY__FETCH;
- }
-
- @Override
- String getCascadeElementName() {
- return JPA.MANY_TO_MANY__CASCADE;
- }
-
-
- //**************** OwnableRelationshipMappingAnnotation implementation **************
-
- // ***** mapped by
- public String getMappedBy() {
- return this.mappedBy;
- }
-
- public void setMappedBy(String mappedBy) {
- throw new UnsupportedOperationException();
- }
-
- private void setMappedBy_(String mappedBy) {
- String old = this.mappedBy;
- this.mappedBy = mappedBy;
- this.firePropertyChanged(MAPPED_BY_PROPERTY, old, mappedBy);
- }
-
- private String buildMappedBy() {
- return (String) this.getJdtMemberValue(JPA.MANY_TO_MANY__MAPPED_BY);
- }
-
- public TextRange getMappedByTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean mappedByTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java
deleted file mode 100644
index 8f33f37e5e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ManyToOne2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.ManyToOne</code>
- */
-public final class BinaryManyToOneAnnotation
- extends BinaryRelationshipMappingAnnotation
- implements ManyToOne2_0Annotation
-{
- private Boolean optional;
-
-
- public BinaryManyToOneAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.optional = this.buildOptional();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setOptional_(this.buildOptional());
- }
-
-
- // ********** BinaryRelationshipMappingAnnotation implementation **********
-
- @Override
- String getTargetEntityElementName() {
- return JPA.MANY_TO_ONE__TARGET_ENTITY;
- }
-
- @Override
- String getFetchElementName() {
- return JPA.MANY_TO_ONE__FETCH;
- }
-
- @Override
- String getCascadeElementName() {
- return JPA.MANY_TO_ONE__CASCADE;
- }
-
-
- // ********** ManyToOneMappingAnnotation implementation **********
-
- // ***** optional
- public Boolean getOptional() {
- return this.optional;
- }
-
- public void setOptional(Boolean optional) {
- throw new UnsupportedOperationException();
- }
-
- private void setOptional_(Boolean optional) {
- Boolean old = this.optional;
- this.optional = optional;
- this.firePropertyChanged(OPTIONAL_PROPERTY, old, optional);
- }
-
- private Boolean buildOptional() {
- return (Boolean) this.getJdtMemberValue(JPA.MANY_TO_ONE__OPTIONAL);
- }
-
- public TextRange getOptionalTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java
deleted file mode 100644
index 98c8ecad81..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-
-/**
- * <code>javax.persistence.MapKey</code>
- */
-public final class BinaryMapKeyAnnotation
- extends BinaryAnnotation
- implements MapKeyAnnotation
-{
- private String name;
-
-
- public BinaryMapKeyAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** MapKeyAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(JPA.MAP_KEY__NAME);
- }
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean nameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java
deleted file mode 100644
index 9f23315f7e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-
-public final class BinaryMappedSuperclassAnnotation
- extends BinaryAnnotation
- implements MappedSuperclassAnnotation
-{
- public BinaryMappedSuperclassAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java
deleted file mode 100644
index 3cafb6b4b6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.DiscriminatorColumn
- * <li>javax.persistence.PrimaryKeyJoinColumn
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * <li>javax.persistence.OrderColumn
- * </ul></code>
- */
-public abstract class BinaryNamedColumnAnnotation
- extends BinaryAnnotation
- implements NamedColumnAnnotation
-{
- private String name;
- private String columnDefinition;
-
-
- protected BinaryNamedColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- this.columnDefinition = this.buildColumnDefinition();
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- this.setColumnDefinition_(this.buildColumnDefinition());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** NamedColumn implementation **********
-
- public boolean isSpecified() {
- return true;
- }
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(this.getNameElementName());
- }
-
- protected abstract String getNameElementName();
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean nameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** column definition
- public String getColumnDefinition() {
- return null;
- }
-
- public void setColumnDefinition(String columnDefinition) {
- throw new UnsupportedOperationException();
- }
-
- private void setColumnDefinition_(String columnDefinition) {
- String old = this.columnDefinition;
- this.columnDefinition = columnDefinition;
- this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, columnDefinition);
- }
-
- private String buildColumnDefinition() {
- return (String) this.getJdtMemberValue(this.getColumnDefinitionElementName());
- }
-
- protected abstract String getColumnDefinitionElementName();
-
- public TextRange getColumnDefinitionTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java
deleted file mode 100644
index bcb3e04192..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-
-/**
- * javax.persistence.NamedNativeQuery
- */
-public final class BinaryNamedNativeQueryAnnotation
- extends BinaryQueryAnnotation
- implements NamedNativeQueryAnnotation
-{
- private String resultClass;
- private String resultSetMapping;
-
-
- public BinaryNamedNativeQueryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.resultClass = this.buildResultClass();
- this.resultSetMapping = this.buildResultSetMapping();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setResultClass_(this.buildResultClass());
- this.setResultSetMapping_(this.buildResultSetMapping());
- }
-
-
- // ********** BinaryBaseNamedQueryAnnotation implementation **********
-
- @Override
- String getNameElementName() {
- return JPA.NAMED_NATIVE_QUERY__NAME;
- }
-
- @Override
- String getQueryElementName() {
- return JPA.NAMED_NATIVE_QUERY__QUERY;
- }
-
- @Override
- String getHintsElementName() {
- return JPA.NAMED_NATIVE_QUERY__HINTS;
- }
-
-
- // ********** NamedNativeQueryAnnotation implementation **********
-
- // ***** result class
- public String getResultClass() {
- return this.resultClass;
- }
-
- public void setResultClass(String resultClass) {
- throw new UnsupportedOperationException();
- }
-
- private void setResultClass_(String resultClass) {
- String old = this.resultClass;
- this.resultClass = resultClass;
- this.firePropertyChanged(RESULT_CLASS_PROPERTY, old, resultClass);
- }
-
- private String buildResultClass() {
- return (String) this.getJdtMemberValue(JPA.NAMED_NATIVE_QUERY__RESULT_CLASS);
- }
-
- public TextRange getResultClassTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** fully-qualified result class name
- public String getFullyQualifiedResultClassName() {
- return this.resultClass;
- }
-
- // ***** result set mapping
- public String getResultSetMapping() {
- return this.resultSetMapping;
- }
-
- public void setResultSetMapping(String resultSetMapping) {
- throw new UnsupportedOperationException();
- }
-
- private void setResultSetMapping_(String resultSetMapping) {
- String old = this.resultSetMapping;
- this.resultSetMapping = resultSetMapping;
- this.firePropertyChanged(RESULT_SET_MAPPING_PROPERTY, old, resultSetMapping);
- }
-
- private String buildResultSetMapping() {
- return (String) this.getJdtMemberValue(JPA.NAMED_NATIVE_QUERY__RESULT_CLASS);
- }
-
- public TextRange getResultSetMappingTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java
deleted file mode 100644
index 878abcbded..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-
-/**
- * javax.persistence.NamedQuery
- */
-public abstract class BinaryNamedQueryAnnotation
- extends BinaryQueryAnnotation
- implements NamedQueryAnnotation
-{
- public BinaryNamedQueryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** BinaryBaseNamedQueryAnnotation implementation **********
-
- @Override
- String getNameElementName() {
- return JPA.NAMED_QUERY__NAME;
- }
-
- @Override
- String getQueryElementName() {
- return JPA.NAMED_QUERY__QUERY;
- }
-
- @Override
- String getHintsElementName() {
- return JPA.NAMED_QUERY__HINTS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java
deleted file mode 100644
index 6154aa5656..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OneToMany2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.OneToMany</code>
- */
-public final class BinaryOneToManyAnnotation
- extends BinaryRelationshipMappingAnnotation
- implements OneToMany2_0Annotation
-{
- private String mappedBy;
-
- private Boolean orphanRemoval; //added in JPA 2.0
-
- public BinaryOneToManyAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.mappedBy = this.buildMappedBy();
- this.orphanRemoval = this.buildOrphanRemoval();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setMappedBy_(this.buildMappedBy());
- this.setOrphanRemoval_(this.buildOrphanRemoval());
- }
-
-
- // ********** BinaryRelationshipMappingAnnotation implementation **********
-
- @Override
- String getTargetEntityElementName() {
- return JPA.ONE_TO_MANY__TARGET_ENTITY;
- }
-
- @Override
- String getFetchElementName() {
- return JPA.ONE_TO_MANY__FETCH;
- }
-
- @Override
- String getCascadeElementName() {
- return JPA.ONE_TO_MANY__CASCADE;
- }
-
-
- //**************** OwnableRelationshipMappingAnnotation implementation **************
-
- // ***** mapped by
- public String getMappedBy() {
- return this.mappedBy;
- }
-
- public void setMappedBy(String mappedBy) {
- throw new UnsupportedOperationException();
- }
-
- private void setMappedBy_(String mappedBy) {
- String old = this.mappedBy;
- this.mappedBy = mappedBy;
- this.firePropertyChanged(MAPPED_BY_PROPERTY, old, mappedBy);
- }
-
- private String buildMappedBy() {
- return (String) this.getJdtMemberValue(JPA.ONE_TO_MANY__MAPPED_BY);
- }
-
- public TextRange getMappedByTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean mappedByTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** OneToMany2_0Annotation implementation **********
-
- public Boolean getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- public void setOrphanRemoval(Boolean orphanRemoval) {
- throw new UnsupportedOperationException();
- }
-
- public TextRange getOrphanRemovalTextRange() {
- throw new UnsupportedOperationException();
- }
-
- private Boolean buildOrphanRemoval() {
- return (Boolean) this.getJdtMemberValue(JPA2_0.ONE_TO_MANY__ORPHAN_REMOVAL);
- }
-
- private void setOrphanRemoval_(Boolean orphanRemoval) {
- Boolean old = this.orphanRemoval;
- this.orphanRemoval = orphanRemoval;
- this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java
deleted file mode 100644
index 3021d384f8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OneToOne2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.OneToOne</code>
- */
-public class BinaryOneToOneAnnotation
- extends BinaryRelationshipMappingAnnotation
- implements OneToOne2_0Annotation
-{
- private Boolean optional;
- private String mappedBy;
- private Boolean orphanRemoval; //added in JPA 2.0
-
- public BinaryOneToOneAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.optional = this.buildOptional();
- this.mappedBy = this.buildMappedBy();
- this.orphanRemoval = this.buildOrphanRemoval();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setOptional_(this.buildOptional());
- this.setMappedBy_(this.buildMappedBy());
- this.setOrphanRemoval_(this.buildOrphanRemoval());
- }
-
-
- // ********** BinaryRelationshipMappingAnnotation implementation **********
-
- @Override
- String getTargetEntityElementName() {
- return JPA.ONE_TO_ONE__TARGET_ENTITY;
- }
-
- @Override
- String getFetchElementName() {
- return JPA.ONE_TO_ONE__FETCH;
- }
-
- @Override
- String getCascadeElementName() {
- return JPA.ONE_TO_ONE__CASCADE;
- }
-
-
- //**************** OwnableRelationshipMappingAnnotation implementation **************
-
- // ***** mapped by
- public String getMappedBy() {
- return this.mappedBy;
- }
-
- public void setMappedBy(String mappedBy) {
- throw new UnsupportedOperationException();
- }
-
- private void setMappedBy_(String mappedBy) {
- String old = this.mappedBy;
- this.mappedBy = mappedBy;
- this.firePropertyChanged(MAPPED_BY_PROPERTY, old, mappedBy);
- }
-
- private String buildMappedBy() {
- return (String) this.getJdtMemberValue(JPA.ONE_TO_ONE__MAPPED_BY);
- }
-
- public TextRange getMappedByTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean mappedByTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
-
- //**************** OneToOneAnnotation implementation **************
-
- // ***** optional
- public Boolean getOptional() {
- return this.optional;
- }
-
- public void setOptional(Boolean optional) {
- throw new UnsupportedOperationException();
- }
-
- private void setOptional_(Boolean optional) {
- Boolean old = this.optional;
- this.optional = optional;
- this.firePropertyChanged(OPTIONAL_PROPERTY, old, optional);
- }
-
- private Boolean buildOptional() {
- return (Boolean) this.getJdtMemberValue(JPA.ONE_TO_ONE__OPTIONAL);
- }
-
- public TextRange getOptionalTextRange() {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** OneToOne2_0Annotation implementation **********
-
- public Boolean getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- public void setOrphanRemoval(Boolean orphanRemoval) {
- throw new UnsupportedOperationException();
- }
-
- public TextRange getOrphanRemovalTextRange() {
- throw new UnsupportedOperationException();
- }
-
- private Boolean buildOrphanRemoval() {
- return (Boolean) this.getJdtMemberValue(JPA2_0.ONE_TO_ONE__ORPHAN_REMOVAL);
- }
-
- private void setOrphanRemoval_(Boolean orphanRemoval) {
- Boolean old = this.orphanRemoval;
- this.orphanRemoval = orphanRemoval;
- this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOrderByAnnotation.java
deleted file mode 100644
index 695fe03870..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOrderByAnnotation.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-
-/**
- * <code>javax.persistence.OrderBy</code>
- */
-public final class BinaryOrderByAnnotation
- extends BinaryAnnotation
- implements OrderByAnnotation
-{
- private String value;
-
-
- public BinaryOrderByAnnotation(JavaResourceAnnotatedElement parent, IAnnotation annotation) {
- super(parent, annotation);
- this.value = this.buildValue();
- }
-
- @Override
- public void update() {
- super.update();
- this.setValue_(this.buildValue());
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** OrderByAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA.ORDER_BY__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOverrideAnnotation.java
deleted file mode 100644
index 52b342de97..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryOverrideAnnotation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.AttributeOverride
- * <li>javax.persistence.AssociationOverride
- * </ul></code>
- */
-public abstract class BinaryOverrideAnnotation
- extends BinaryAnnotation
- implements OverrideAnnotation
-{
- private String name;
-
-
- public BinaryOverrideAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** OverrideAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(OverrideAnnotation.NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(this.getNameElementName());
- }
-
- protected abstract String getNameElementName();
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean nameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java
deleted file mode 100644
index 5dea1b3c36..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.PrimaryKeyJoinColumn</code>
- */
-public final class BinaryPrimaryKeyJoinColumnAnnotation
- extends BinaryNamedColumnAnnotation
- implements PrimaryKeyJoinColumnAnnotation
-{
- private String referencedColumnName;
-
-
- public BinaryPrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.referencedColumnName = this.buildReferencedColumnName();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setReferencedColumnName_(this.buildReferencedColumnName());
- }
-
-
- // ********** BinaryNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** PrimaryKeyJoinColumnAnnotation implementation **********
-
- // ***** referenced column name
- public String getReferencedColumnName() {
- return this.referencedColumnName;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- throw new UnsupportedOperationException();
- }
-
- private void setReferencedColumnName_(String referencedColumnName) {
- String old = this.referencedColumnName;
- this.referencedColumnName = referencedColumnName;
- this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, referencedColumnName);
- }
-
- private String buildReferencedColumnName() {
- return (String) this.getJdtMemberValue(JPA.PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryAnnotation.java
deleted file mode 100644
index 54efe0ce0d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryAnnotation.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.QueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * javax.persistence.NamedQuery
- * javax.persistence.NamedNativeQuery
- */
-abstract class BinaryQueryAnnotation
- extends BinaryAnnotation
- implements QueryAnnotation
-{
- String name;
- String query;
- final Vector<QueryHintAnnotation> hints;
-
-
- BinaryQueryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- this.query = this.buildQuery();
- this.hints = this.buildHints();
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- this.setQuery_(this.buildQuery());
- this.updateHints();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** BaseNamedQueryAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(this.getNameElementName());
- }
-
- abstract String getNameElementName();
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** query
- public String getQuery() {
- return this.query;
- }
-
- public void setQuery(String query) {
- throw new UnsupportedOperationException();
- }
-
- private void setQuery_(String query) {
- String old = this.query;
- this.query = query;
- this.firePropertyChanged(QUERY_PROPERTY, old, query);
- }
-
- private String buildQuery() {
- return (String) this.getJdtMemberValue(this.getQueryElementName());
- }
-
- abstract String getQueryElementName();
-
- public TextRange getQueryTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** hints
-
- public ListIterable<QueryHintAnnotation> getHints() {
- return new LiveCloneListIterable<QueryHintAnnotation>(this.hints);
- }
-
- public int getHintsSize() {
- return this.hints.size();
- }
-
- public QueryHintAnnotation hintAt(int index) {
- return this.hints.get(index);
- }
-
- public QueryHintAnnotation addHint(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveHint(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeHint(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<QueryHintAnnotation> buildHints() {
- Object[] jdtHints = this.getJdtMemberValues(this.getHintsElementName());
- Vector<QueryHintAnnotation> result = new Vector<QueryHintAnnotation>(jdtHints.length);
- for (Object jdtHint : jdtHints) {
- result.add(new BinaryQueryHintAnnotation(this, (IAnnotation) jdtHint));
- }
- return result;
- }
-
- abstract String getHintsElementName();
-
- // TODO
- private void updateHints() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java
deleted file mode 100644
index 704ae4ea8a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * <code>javax.persistence.QueryHint</code>
- */
-class BinaryQueryHintAnnotation
- extends BinaryAnnotation
- implements QueryHintAnnotation
-{
- private String name;
- private String value;
-
-
- BinaryQueryHintAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.name = this.buildName();
- this.value = this.buildValue();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setName_(this.buildName());
- this.setValue_(this.buildValue());
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** QueryHintAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException();
- }
-
- private void setName_(String name) {
- String old = this.name;
- this.name = name;
- this.firePropertyChanged(NAME_PROPERTY, old, name);
- }
-
- private String buildName() {
- return (String) this.getJdtMemberValue(JPA.QUERY_HINT__NAME);
- }
-
- public TextRange getNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- private void setValue_(String value) {
- String old = this.value;
- this.value = value;
- this.firePropertyChanged(VALUE_PROPERTY, old, value);
- }
-
- private String buildValue() {
- return (String) this.getJdtMemberValue(JPA.QUERY_HINT__VALUE);
- }
-
- public TextRange getValueTextRange() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java
deleted file mode 100644
index 34f9034eaf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.CascadeType;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.ManyToMany
- * <li>javax.persistence.ManyToOne
- * <li>javax.persistence.OneToMany
- * <li>javax.persistence.OneToOne
- * </ul></code>
- */
-abstract class BinaryRelationshipMappingAnnotation
- extends BinaryAnnotation
- implements RelationshipMapping2_0Annotation
-{
- String targetEntity;
- FetchType fetch;
- boolean cascadeAll;
- boolean cascadeMerge;
- boolean cascadePersist;
- boolean cascadeRefresh;
- boolean cascadeRemove;
- boolean cascadeDetach; //added in JPA 2.0
-
-
- BinaryRelationshipMappingAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.targetEntity = this.buildTargetEntity();
- this.fetch = this.buildFetch();
- this.initializeCascadeTypes(this.buildCascadeTypes());
- }
-
- protected void initializeCascadeTypes(CascadeType[] cascadeTypes) {
- this.cascadeAll = ArrayTools.contains(cascadeTypes, CascadeType.ALL);
- this.cascadeMerge = ArrayTools.contains(cascadeTypes, CascadeType.MERGE);
- this.cascadePersist = ArrayTools.contains(cascadeTypes, CascadeType.PERSIST);
- this.cascadeRefresh = ArrayTools.contains(cascadeTypes, CascadeType.REFRESH);
- this.cascadeRemove = ArrayTools.contains(cascadeTypes, CascadeType.REMOVE);
- this.cascadeDetach = ArrayTools.contains(cascadeTypes, CascadeType.DETACH);
- }
-
- @Override
- public void update() {
- super.update();
- this.setTargetEntity_(this.buildTargetEntity());
- this.setFetch_(this.buildFetch());
- this.updateCascadeTypes(this.buildCascadeTypes());
- }
-
- protected void updateCascadeTypes(CascadeType[] cascadeTypes) {
- this.setCascadeAll_(ArrayTools.contains(cascadeTypes, CascadeType.ALL));
- this.setCascadeMerge_(ArrayTools.contains(cascadeTypes, CascadeType.MERGE));
- this.setCascadePersist_(ArrayTools.contains(cascadeTypes, CascadeType.PERSIST));
- this.setCascadeRefresh_(ArrayTools.contains(cascadeTypes, CascadeType.REFRESH));
- this.setCascadeRemove_(ArrayTools.contains(cascadeTypes, CascadeType.REMOVE));
- this.setCascadeDetach_(ArrayTools.contains(cascadeTypes, CascadeType.DETACH));
- }
-
- // ********** RelationshipMappingAnnotation implementation **********
-
- // ***** target entity
- public String getTargetEntity() {
- return this.targetEntity;
- }
-
- public void setTargetEntity(String targetEntity) {
- throw new UnsupportedOperationException();
- }
-
- private void setTargetEntity_(String targetEntity) {
- String old = this.targetEntity;
- this.targetEntity = targetEntity;
- this.firePropertyChanged(TARGET_ENTITY_PROPERTY, old, targetEntity);
- }
-
- private String buildTargetEntity() {
- return (String) this.getJdtMemberValue(this.getTargetEntityElementName());
- }
-
- abstract String getTargetEntityElementName();
-
- public TextRange getTargetEntityTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** fully-qualified target entity class name
- public String getFullyQualifiedTargetEntityClassName() {
- return this.targetEntity;
- }
-
- // ***** fetch
- public FetchType getFetch() {
- return this.fetch;
- }
-
- public void setFetch(FetchType fetch) {
- throw new UnsupportedOperationException();
- }
-
- private void setFetch_(FetchType fetch) {
- FetchType old = this.fetch;
- this.fetch = fetch;
- this.firePropertyChanged(FETCH_PROPERTY, old, fetch);
- }
-
- private FetchType buildFetch() {
- return FetchType.fromJavaAnnotationValue(this.getJdtMemberValue(this.getFetchElementName()));
- }
-
- abstract String getFetchElementName();
-
- public TextRange getFetchTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** cascade
- private CascadeType[] buildCascadeTypes() {
- return CascadeType.fromJavaAnnotationValues(this.getJdtMemberValues(this.getCascadeElementName()));
- }
-
- abstract String getCascadeElementName();
-
- public TextRange getCascadeTextRange() {
- throw new UnsupportedOperationException();
- }
-
- // ***** cascade all
- public boolean isCascadeAll() {
- return this.cascadeAll;
- }
-
- public void setCascadeAll(boolean cascadeAll) {
- throw new UnsupportedOperationException();
- }
-
- private void setCascadeAll_(boolean cascadeAll) {
- boolean old = this.cascadeAll;
- this.cascadeAll = cascadeAll;
- this.firePropertyChanged(CASCADE_ALL_PROPERTY, old, cascadeAll);
- }
-
- // ***** cascade merge
- public boolean isCascadeMerge() {
- return this.cascadeMerge;
- }
-
- public void setCascadeMerge(boolean cascadeMerge) {
- throw new UnsupportedOperationException();
- }
-
- private void setCascadeMerge_(boolean cascadeMerge) {
- boolean old = this.cascadeMerge;
- this.cascadeMerge = cascadeMerge;
- this.firePropertyChanged(CASCADE_MERGE_PROPERTY, old, cascadeMerge);
- }
-
- // ***** cascade persist
- public boolean isCascadePersist() {
- return this.cascadePersist;
- }
-
- public void setCascadePersist(boolean cascadePersist) {
- throw new UnsupportedOperationException();
- }
-
- private void setCascadePersist_(boolean cascadePersist) {
- boolean old = this.cascadePersist;
- this.cascadePersist = cascadePersist;
- this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, cascadePersist);
- }
-
- // ***** cascade refresh
- public boolean isCascadeRefresh() {
- return this.cascadeRefresh;
- }
-
- public void setCascadeRefresh(boolean cascadeRefresh) {
- throw new UnsupportedOperationException();
- }
-
- private void setCascadeRefresh_(boolean cascadeRefresh) {
- boolean old = this.cascadeRefresh;
- this.cascadeRefresh = cascadeRefresh;
- this.firePropertyChanged(CASCADE_REFRESH_PROPERTY, old, cascadeRefresh);
- }
-
- // ***** cascade remove
- public boolean isCascadeRemove() {
- return this.cascadeRemove;
- }
-
- public void setCascadeRemove(boolean cascadeRemove) {
- throw new UnsupportedOperationException();
- }
-
- private void setCascadeRemove_(boolean cascadeRemove) {
- boolean old = this.cascadeRemove;
- this.cascadeRemove = cascadeRemove;
- this.firePropertyChanged(CASCADE_REMOVE_PROPERTY, old, cascadeRemove);
- }
-
- // ***** cascade detach - JPA 2.0
- public boolean isCascadeDetach() {
- return this.cascadeDetach;
- }
-
- public void setCascadeDetach(boolean cascadeDetach) {
- throw new UnsupportedOperationException();
- }
-
- private void setCascadeDetach_(boolean cascadeDetach) {
- boolean old = this.cascadeDetach;
- this.cascadeDetach = cascadeDetach;
- this.firePropertyChanged(CASCADE_DETACH_PROPERTY, old, cascadeDetach);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java
deleted file mode 100644
index fce7c76e93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-
-/**
- * javax.persistence.SecondaryTable
- */
-public final class BinarySecondaryTableAnnotation
- extends BinaryBaseTableAnnotation
- implements SecondaryTableAnnotation
-{
- private final Vector<PrimaryKeyJoinColumnAnnotation> pkJoinColumns;
-
- public BinarySecondaryTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.pkJoinColumns = this.buildPkJoinColumns();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updatePkJoinColumns();
- }
-
-
- // ********** BinaryBaseTableAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.SECONDARY_TABLE__NAME;
- }
-
- @Override
- protected String getSchemaElementName() {
- return JPA.SECONDARY_TABLE__SCHEMA;
- }
-
- @Override
- protected String getCatalogElementName() {
- return JPA.SECONDARY_TABLE__CATALOG;
- }
-
- @Override
- protected String getUniqueConstraintElementName() {
- return JPA.SECONDARY_TABLE__UNIQUE_CONSTRAINTS;
- }
-
-
- // ************* SecondaryTableAnnotation implementation *******************
-
- // ***** pk join columns
- public ListIterable<PrimaryKeyJoinColumnAnnotation> getPkJoinColumns() {
- return new LiveCloneListIterable<PrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns);
- }
-
- public int getPkJoinColumnsSize() {
- return this.pkJoinColumns.size();
- }
-
- public PrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index) {
- return this.pkJoinColumns.get(index);
- }
-
- public PrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void movePkJoinColumn(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removePkJoinColumn(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<PrimaryKeyJoinColumnAnnotation> buildPkJoinColumns() {
- Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS);
- Vector<PrimaryKeyJoinColumnAnnotation> result = new Vector<PrimaryKeyJoinColumnAnnotation>(jdtJoinColumns.length);
- for (Object jdtJoinColumn : jdtJoinColumns) {
- result.add(new BinaryPrimaryKeyJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
- }
- return result;
- }
-
- // TODO
- private void updatePkJoinColumns() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java
deleted file mode 100644
index a40eb805b9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * <code>javax.persistence.SequenceGenerator</code>
- */
-public abstract class BinarySequenceGeneratorAnnotation
- extends BinaryGeneratorAnnotation
- implements SequenceGeneratorAnnotation
-{
- private String sequenceName;
-
-
- protected BinarySequenceGeneratorAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.sequenceName = this.buildSequenceName();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setSequenceName_(this.buildSequenceName());
- }
-
-
- // ********** BinaryGeneratorAnnotation implementation **********
-
- @Override
- String getNameElementName() {
- return JPA.SEQUENCE_GENERATOR__NAME;
- }
-
- @Override
- String getInitialValueElementName() {
- return JPA.SEQUENCE_GENERATOR__INITIAL_VALUE;
- }
-
- @Override
- String getAllocationSizeElementName() {
- return JPA.SEQUENCE_GENERATOR__ALLOCATION_SIZE;
- }
-
-
- // ********** SequenceGeneratorAnnotation implementation **********
-
- // ***** sequence name
- public String getSequenceName() {
- return this.sequenceName;
- }
-
- public void setSequenceName(String sequenceName) {
- throw new UnsupportedOperationException();
- }
-
- private void setSequenceName_(String sequenceName) {
- String old = this.sequenceName;
- this.sequenceName = sequenceName;
- this.firePropertyChanged(SEQUENCE_NAME_PROPERTY, old, sequenceName);
- }
-
- private String buildSequenceName() {
- return (String) this.getJdtMemberValue(JPA.SEQUENCE_GENERATOR__SEQUENCE_NAME);
- }
-
- public TextRange getSequenceNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean sequenceNameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableAnnotation.java
deleted file mode 100644
index ea667ebc11..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableAnnotation.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.TableAnnotation;
-
-/**
- * javax.persistence.Table
- */
-public final class BinaryTableAnnotation
- extends BinaryBaseTableAnnotation
- implements TableAnnotation
-{
- public BinaryTableAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** BinaryBaseTableAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.TABLE__NAME;
- }
-
- @Override
- protected String getSchemaElementName() {
- return JPA.TABLE__SCHEMA;
- }
-
- @Override
- protected String getCatalogElementName() {
- return JPA.TABLE__CATALOG;
- }
-
- @Override
- protected String getUniqueConstraintElementName() {
- return JPA.TABLE__UNIQUE_CONSTRAINTS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java
deleted file mode 100644
index 600a7e55be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <code>javax.persistence.TableGenerator</code>
- */
-public final class BinaryTableGeneratorAnnotation
- extends BinaryGeneratorAnnotation
- implements TableGeneratorAnnotation
-{
- private String table;
- private String schema;
- private String catalog;
- private String pkColumnName;
- private String valueColumnName;
- private String pkColumnValue;
- private final Vector<UniqueConstraintAnnotation> uniqueConstraints;
-
-
- public BinaryTableGeneratorAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.table = this.buildTable();
- this.schema = this.buildSchema();
- this.catalog = this.buildCatalog();
- this.pkColumnName = this.buildPkColumnName();
- this.valueColumnName = this.buildValueColumnName();
- this.pkColumnValue = this.buildPkColumnValue();
- this.uniqueConstraints = this.buildUniqueConstraints();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.setTable_(this.buildTable());
- this.setSchema_(this.buildSchema());
- this.setCatalog_(this.buildCatalog());
- this.setPkColumnName_(this.buildPkColumnName());
- this.setValueColumnName_(this.buildValueColumnName());
- this.setPkColumnValue_(this.buildPkColumnValue());
- this.updateUniqueConstraints();
- }
-
-
- // ********** AbstractGeneratorAnnotation implementation **********
-
- @Override
- String getNameElementName() {
- return JPA.TABLE_GENERATOR__NAME;
- }
-
- @Override
- String getInitialValueElementName() {
- return JPA.TABLE_GENERATOR__INITIAL_VALUE;
- }
-
- @Override
- String getAllocationSizeElementName() {
- return JPA.TABLE_GENERATOR__ALLOCATION_SIZE;
- }
-
-
- // ********** TableGeneratorAnnotation implementation **********
-
- // ***** table
- public String getTable() {
- return this.table;
- }
-
- public void setTable(String table) {
- throw new UnsupportedOperationException();
- }
-
- private void setTable_(String table) {
- String old = this.table;
- this.table = table;
- this.firePropertyChanged(TABLE_PROPERTY, old, table);
- }
-
- private String buildTable() {
- return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__TABLE);
- }
-
- public TextRange getTableTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean tableTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** schema
- public String getSchema() {
- return this.schema;
- }
-
- public void setSchema(String schema) {
- throw new UnsupportedOperationException();
- }
-
- private void setSchema_(String schema) {
- String old = this.schema;
- this.schema = schema;
- this.firePropertyChanged(SCHEMA_PROPERTY, old, schema);
- }
-
- private String buildSchema() {
- return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__SCHEMA);
- }
-
- public TextRange getSchemaTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean schemaTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** catalog
- public String getCatalog() {
- return this.catalog;
- }
-
- public void setCatalog(String catalog) {
- throw new UnsupportedOperationException();
- }
-
- private void setCatalog_(String catalog) {
- String old = this.catalog;
- this.catalog = catalog;
- this.firePropertyChanged(CATALOG_PROPERTY, old, catalog);
- }
-
- private String buildCatalog() {
- return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__CATALOG);
- }
-
- public TextRange getCatalogTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean catalogTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** pk column name
- public String getPkColumnName() {
- return this.pkColumnName;
- }
-
- public void setPkColumnName(String pkColumnName) {
- throw new UnsupportedOperationException();
- }
-
- private void setPkColumnName_(String pkColumnName) {
- String old = this.pkColumnName;
- this.pkColumnName = pkColumnName;
- this.firePropertyChanged(PK_COLUMN_NAME_PROPERTY, old, pkColumnName);
- }
-
- private String buildPkColumnName() {
- return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__PK_COLUMN_NAME);
- }
-
- public TextRange getPkColumnNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean pkColumnNameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** value column name
- public String getValueColumnName() {
- return this.valueColumnName;
- }
-
- public void setValueColumnName(String valueColumnName) {
- throw new UnsupportedOperationException();
- }
-
- private void setValueColumnName_(String valueColumnName) {
- String old = this.valueColumnName;
- this.valueColumnName = valueColumnName;
- this.firePropertyChanged(VALUE_COLUMN_NAME_PROPERTY, old, valueColumnName);
- }
-
- private String buildValueColumnName() {
- return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__VALUE_COLUMN_NAME);
- }
-
- public TextRange getValueColumnNameTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean valueColumnNameTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** pk column value
- public String getPkColumnValue() {
- return this.pkColumnValue;
- }
-
- public void setPkColumnValue(String pkColumnValue) {
- throw new UnsupportedOperationException();
- }
-
- private void setPkColumnValue_(String pkColumnValue) {
- String old = this.pkColumnValue;
- this.pkColumnValue = pkColumnValue;
- this.firePropertyChanged(PK_COLUMN_VALUE_PROPERTY, old, pkColumnValue);
- }
-
- private String buildPkColumnValue() {
- return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__PK_COLUMN_VALUE);
- }
-
- public TextRange getPkColumnValueTextRange() {
- throw new UnsupportedOperationException();
- }
-
- public boolean pkColumnValueTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- // ***** unique constraints
- public ListIterable<UniqueConstraintAnnotation> getUniqueConstraints() {
- return new LiveCloneListIterable<UniqueConstraintAnnotation>(this.uniqueConstraints);
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraints.size();
- }
-
- public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
- return this.uniqueConstraints.get(index);
- }
-
- public UniqueConstraintAnnotation addUniqueConstraint(int index) {
- throw new UnsupportedOperationException();
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeUniqueConstraint(int index) {
- throw new UnsupportedOperationException();
- }
-
- private Vector<UniqueConstraintAnnotation> buildUniqueConstraints() {
- Object[] jdtUniqueConstraints = this.getJdtMemberValues(JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
- Vector<UniqueConstraintAnnotation> result = new Vector<UniqueConstraintAnnotation>(jdtUniqueConstraints.length);
- for (Object jdtUniqueConstraint : jdtUniqueConstraints) {
- result.add(new BinaryUniqueConstraintAnnotation(this, (IAnnotation) jdtUniqueConstraint));
- }
- return result;
- }
-
- // TODO
- private void updateUniqueConstraints() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTemporalAnnotation.java
deleted file mode 100644
index 73b078d3db..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTemporalAnnotation.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-/**
- * <code>javax.persistence.Temporal</code>
- */
-public final class BinaryTemporalAnnotation
- extends BinaryBaseTemporalAnnotation
- implements TemporalAnnotation
-{
- public BinaryTemporalAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA.TEMPORAL__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTransientAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTransientAnnotation.java
deleted file mode 100644
index c6b06c9ed1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryTransientAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
-
-/**
- * javax.persistence.Transient
- */
-public final class BinaryTransientAnnotation
- extends BinaryAnnotation
- implements TransientAnnotation
-{
-
- public BinaryTransientAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java
deleted file mode 100644
index 1c3f9ae101..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.internal.resource.java.binary;
-
-import java.util.Vector;
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <code>javax.persistence.UniqueConstraint</code>
- */
-final class BinaryUniqueConstraintAnnotation
- extends BinaryAnnotation
- implements UniqueConstraintAnnotation
-{
- private final Vector<String> columnNames;
-
-
- BinaryUniqueConstraintAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- this.columnNames = this.buildColumnNames();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void update() {
- super.update();
- this.updateColumnNames();
- }
-
- // TODO
- private void updateColumnNames() {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** UniqueConstraintAnnotation implementation **********
-
- // ***** column names
- public ListIterable<String> getColumnNames() {
- return new LiveCloneListIterable<String>(this.columnNames);
- }
-
- public int getColumnNamesSize() {
- return this.columnNames.size();
- }
-
- public String columnNameAt(int index) {
- return this.columnNames.elementAt(index);
- }
-
- private Vector<String> buildColumnNames() {
- Object[] jdtColumnNames = this.getJdtMemberValues(JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES);
- Vector<String> result = new Vector<String>(jdtColumnNames.length);
- for (Object jdtColumnName : jdtColumnNames) {
- result.add((String) jdtColumnName);
- }
- return result;
- }
-
- public void addColumnName(String columnName) {
- throw new UnsupportedOperationException();
- }
-
- public void addColumnName(int index, String columnName) {
- throw new UnsupportedOperationException();
- }
-
- public void moveColumnName(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public boolean columnNamesTouches(int pos) {
- throw new UnsupportedOperationException();
- }
-
- public void removeColumnName(String columnName) {
- throw new UnsupportedOperationException();
- }
-
- public void removeColumnName(int index) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryVersionAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryVersionAnnotation.java
deleted file mode 100644
index df5cea5e93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/binary/BinaryVersionAnnotation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
-
-/**
- * javax.persistence.Version
- */
-public final class BinaryVersionAnnotation
- extends BinaryAnnotation
- implements VersionAnnotation
-{
-
- public BinaryVersionAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
- super(parent, jdtAnnotation);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
deleted file mode 100644
index 08d71a0121..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.AssociationOverride</code>
- */
-public abstract class SourceAssociationOverrideAnnotation
- extends SourceOverrideAnnotation
- implements AssociationOverrideAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- public static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ASSOCIATION_OVERRIDES);
-
- private final JoinColumnsAnnotationContainer joinColumnsContainer = new JoinColumnsAnnotationContainer();
-
-
-
- protected SourceAssociationOverrideAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- }
-
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.joinColumnsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.joinColumnsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
-
- // ********** SourceOverrideAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.ASSOCIATION_OVERRIDE__NAME;
- }
-
-
- // ********** AssociationOverrideAnnotation implementation **********
-
- // **************** join columns *************************************************
-
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return this.joinColumnsContainer.getNestedAnnotations();
- }
-
- public int getJoinColumnsSize() {
- return this.joinColumnsContainer.getNestedAnnotationsSize();
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return this.joinColumnsContainer.getNestedAnnotation(index);
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- return this.joinColumnsContainer.addNestedAnnotation(index);
- }
-
- private JoinColumnAnnotation buildJoinColumn(int index) {
- return SourceJoinColumnAnnotation.buildNestedSourceJoinColumnAnnotation(
- this, this.annotatedElement, this.buildJoinColumnIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildJoinColumnIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- this.joinColumnsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeJoinColumn(int index) {
- this.joinColumnsContainer.removeNestedAnnotation(index);
- }
-
- /**
- * adapt the AnnotationContainer interface to the association override's join columns
- */
- class JoinColumnsAnnotationContainer
- extends AnnotationContainer<JoinColumnAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return JOIN_COLUMNS_LIST;
- }
- @Override
- protected String getElementName() {
- return JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS;
- }
- @Override
- protected String getNestedAnnotationName() {
- return JPA.JOIN_COLUMN;
- }
- @Override
- protected JoinColumnAnnotation buildNestedAnnotation(int index) {
- return SourceAssociationOverrideAnnotation.this.buildJoinColumn(index);
- }
- }
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- this.joinColumnsContainer.isEmpty();
- }
-
- // ********** static methods **********
-
- protected static IndexedAnnotationAdapter buildAssociationOverrideAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- protected static IndexedDeclarationAnnotationAdapter buildAssociationOverrideDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
deleted file mode 100644
index 4b90c84ed5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.internal.resource.java.NullAttributeOverrideColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.AttributeOverride</code>
- */
-public final class SourceAttributeOverrideAnnotation
- extends SourceOverrideAnnotation
- implements AttributeOverrideAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ATTRIBUTE_OVERRIDES);
-
- private ElementAnnotationAdapter columnAdapter;
- private ColumnAnnotation column;
- private final ColumnAnnotation nullColumn;
-
-
- public static SourceAttributeOverrideAnnotation buildSourceAttributeOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element) {
-
- return new SourceAttributeOverrideAnnotation(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public static SourceAttributeOverrideAnnotation buildSourceAttributeOverrideAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildAttributeOverrideDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildAttributeOverrideAnnotationAdapter(annotatedElement, idaa);
- return new SourceAttributeOverrideAnnotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
- public static SourceAttributeOverrideAnnotation buildNestedSourceAttributeOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourceAttributeOverrideAnnotation(parent, element, idaa);
- }
-
- private SourceAttributeOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- DeclarationAnnotationAdapter daa) {
-
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- private SourceAttributeOverrideAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- private SourceAttributeOverrideAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.columnAdapter = this.buildColumnAdapter();
- this.nullColumn = this.buildNullColumn();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- if (this.columnAdapter.getAnnotation(astRoot) != null) {
- this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.annotatedElement, this.daa);
- this.column.initialize(astRoot);
- }
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncColumn(astRoot);
- }
-
-
- // ********** SourceOverrideAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.ATTRIBUTE_OVERRIDE__NAME;
- }
-
-
- //************ AttributeOverride implementation ****************
-
- // ***** column
- public ColumnAnnotation getColumn() {
- return this.column;
- }
-
- public ColumnAnnotation getNonNullColumn() {
- return (this.column != null) ? this.column : this.nullColumn;
- }
-
- public ColumnAnnotation addColumn() {
- if (this.column != null) {
- throw new IllegalStateException("'column' element already exists: " + this.column); //$NON-NLS-1$
- }
- this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.annotatedElement, this.daa);
- this.column.newAnnotation();
- return this.column;
- }
-
- public void removeColumn() {
- if (this.column == null) {
- throw new IllegalStateException("'column' element does not exist"); //$NON-NLS-1$
- }
- ColumnAnnotation old = this.column;
- this.column = null;
- old.removeAnnotation();
- }
-
- private void syncColumn(CompilationUnit astRoot) {
- if (this.columnAdapter.getAnnotation(astRoot) == null) {
- this.syncColumn_(null);
- } else {
- if (this.column == null) {
- ColumnAnnotation col = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.annotatedElement, this.daa);
- col.initialize(astRoot);
- this.syncColumn_(col);
- } else {
- this.column.synchronizeWith(astRoot);
- }
- }
- }
-
- private void syncColumn_(ColumnAnnotation astColumn) {
- ColumnAnnotation old = this.column;
- this.column = astColumn;
- this.firePropertyChanged(COLUMN_PROPERTY, old, astColumn);
- }
-
- private ElementAnnotationAdapter buildColumnAdapter() {
- return new ElementAnnotationAdapter(this.annotatedElement, SourceColumnAnnotation.buildAttributeOverrideAnnotationAdapter(this.daa));
- }
-
- private ColumnAnnotation buildNullColumn() {
- return new NullAttributeOverrideColumnAnnotation(this);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.column == null);
- }
-
-
- // ********** static methods **********
-
- protected static IndexedAnnotationAdapter buildAttributeOverrideAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- protected static IndexedDeclarationAnnotationAdapter buildAttributeOverrideDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
deleted file mode 100644
index 6ce73c44e5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- */
-public abstract class SourceBaseColumnAnnotation
- extends SourceNamedColumnAnnotation
- implements BaseColumnAnnotation
-{
- protected DeclarationAnnotationElementAdapter<String> tableDeclarationAdapter;
- protected AnnotationElementAdapter<String> tableAdapter;
- protected String table;
- protected TextRange tableTextRange;
-
- protected DeclarationAnnotationElementAdapter<Boolean> uniqueDeclarationAdapter;
- protected AnnotationElementAdapter<Boolean> uniqueAdapter;
- protected Boolean unique;
- protected TextRange uniqueTextRange;
-
- protected DeclarationAnnotationElementAdapter<Boolean> nullableDeclarationAdapter;
- protected AnnotationElementAdapter<Boolean> nullableAdapter;
- protected Boolean nullable;
- protected TextRange nullableTextRange;
-
- protected DeclarationAnnotationElementAdapter<Boolean> insertableDeclarationAdapter;
- protected AnnotationElementAdapter<Boolean> insertableAdapter;
- protected Boolean insertable;
- protected TextRange insertableTextRange;
-
- protected DeclarationAnnotationElementAdapter<Boolean> updatableDeclarationAdapter;
- protected AnnotationElementAdapter<Boolean> updatableAdapter;
- protected Boolean updatable;
- protected TextRange updatableTextRange;
-
-
- protected SourceBaseColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- protected SourceBaseColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.tableDeclarationAdapter = this.buildTableDeclarationAdapter();
- this.tableAdapter = this.buildTableAdapter();
- this.uniqueDeclarationAdapter = this.buildUniqueDeclarationAdapter();
- this.uniqueAdapter = this.buildUniqueAdapter();
- this.nullableDeclarationAdapter = this.buildNullableDeclarationAdapter();
- this.nullableAdapter = this.buildNullableAdapter();
- this.insertableDeclarationAdapter = this.buildInsertableDeclarationAdapter();
- this.insertableAdapter = this.buildInsertableAdapter();
- this.updatableDeclarationAdapter = this.buildUpdatableDeclarationAdapter();
- this.updatableAdapter = this.buildUpdatableAdapter();
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
-
- this.table = this.buildTable(astRoot);
- this.tableTextRange = this.buildTableTextRange(astRoot);
-
- this.unique = this.buildUnique(astRoot);
- this.uniqueTextRange = this.buildUniqueTextRange(astRoot);
-
- this.nullable = this.buildNullable(astRoot);
- this.nullableTextRange = this.buildNullableTextRange(astRoot);
-
- this.insertable = this.buildInsertable(astRoot);
- this.insertableTextRange = this.buildInsertableTextRange(astRoot);
-
- this.updatable = this.buildUpdatable(astRoot);
- this.updatableTextRange = this.buildUpdatableTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
-
- this.syncTable(this.buildTable(astRoot));
- this.tableTextRange = this.buildTableTextRange(astRoot);
-
- this.syncUnique(this.buildUnique(astRoot));
- this.uniqueTextRange = this.buildUniqueTextRange(astRoot);
-
- this.syncNullable(this.buildNullable(astRoot));
- this.nullableTextRange = this.buildNullableTextRange(astRoot);
-
- this.syncInsertable(this.buildInsertable(astRoot));
- this.insertableTextRange = this.buildInsertableTextRange(astRoot);
-
- this.syncUpdatable(this.buildUpdatable(astRoot));
- this.updatableTextRange = this.buildUpdatableTextRange(astRoot);
- }
-
-
- //************* BaseColumnAnnotation implementation *************
-
- // ***** table
- public String getTable() {
- return this.table;
- }
-
- public void setTable(String table) {
- if (this.attributeValueHasChanged(this.table, table)) {
- this.table = table;
- this.tableAdapter.setValue(table);
- }
- }
-
- private void syncTable(String astTable) {
- String old = this.table;
- this.table = astTable;
- this.firePropertyChanged(TABLE_PROPERTY, old, astTable);
- }
-
- private String buildTable(CompilationUnit astRoot) {
- return this.tableAdapter.getValue(astRoot);
- }
-
- public TextRange getTableTextRange() {
- return this.tableTextRange;
- }
-
- private TextRange buildTableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.tableDeclarationAdapter, astRoot);
- }
-
- public boolean tableTouches(int pos) {
- return this.textRangeTouches(this.tableTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildTableDeclarationAdapter() {
- return this.buildStringElementAdapter(this.getTableElementName());
- }
-
- private AnnotationElementAdapter<String> buildTableAdapter() {
- return this.buildStringElementAdapter(this.tableDeclarationAdapter);
- }
-
- protected abstract String getTableElementName();
-
- // ***** unique
- public Boolean getUnique() {
- return this.unique;
- }
-
- public void setUnique(Boolean unique) {
- if (this.attributeValueHasChanged(this.unique, unique)) {
- this.unique = unique;
- this.uniqueAdapter.setValue(unique);
- }
- }
-
- private void syncUnique(Boolean astUnique) {
- Boolean old = this.unique;
- this.unique = astUnique;
- this.firePropertyChanged(UNIQUE_PROPERTY, old, astUnique);
- }
-
- private Boolean buildUnique(CompilationUnit astRoot) {
- return this.uniqueAdapter.getValue(astRoot);
- }
-
- public TextRange getUniqueTextRange() {
- return this.uniqueTextRange;
- }
-
- private TextRange buildUniqueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.uniqueDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildUniqueDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getUniqueElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildUniqueAdapter() {
- return this.buildBooleanElementAdapter(this.uniqueDeclarationAdapter);
- }
-
- protected abstract String getUniqueElementName();
-
- // ***** nullable
- public Boolean getNullable() {
- return this.nullable;
- }
-
- public void setNullable(Boolean nullable) {
- if (this.attributeValueHasChanged(this.nullable, nullable)) {
- this.nullable = nullable;
- this.nullableAdapter.setValue(nullable);
- }
- }
-
- private void syncNullable(Boolean astNullable) {
- Boolean old = this.nullable;
- this.nullable = astNullable;
- this.firePropertyChanged(NULLABLE_PROPERTY, old, astNullable);
- }
-
- private Boolean buildNullable(CompilationUnit astRoot) {
- return this.nullableAdapter.getValue(astRoot);
- }
-
- public TextRange getNullableTextRange() {
- return this.nullableTextRange;
- }
-
- private TextRange buildNullableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nullableDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildNullableDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getNullableElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildNullableAdapter() {
- return this.buildBooleanElementAdapter(this.nullableDeclarationAdapter);
- }
-
- protected abstract String getNullableElementName();
-
- // ***** insertable
- public Boolean getInsertable() {
- return this.insertable;
- }
-
- public void setInsertable(Boolean insertable) {
- if (this.attributeValueHasChanged(this.insertable, insertable)) {
- this.insertable = insertable;
- this.insertableAdapter.setValue(insertable);
- }
- }
-
- private void syncInsertable(Boolean astInsertable) {
- Boolean old = this.insertable;
- this.insertable = astInsertable;
- this.firePropertyChanged(INSERTABLE_PROPERTY, old, astInsertable);
- }
-
- private Boolean buildInsertable(CompilationUnit astRoot) {
- return this.insertableAdapter.getValue(astRoot);
- }
-
- public TextRange getInsertableTextRange() {
- return this.insertableTextRange;
- }
-
- private TextRange buildInsertableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.insertableDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildInsertableDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getInsertableElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildInsertableAdapter() {
- return this.buildBooleanElementAdapter(this.insertableDeclarationAdapter);
- }
-
- protected abstract String getInsertableElementName();
-
- // ***** updatable
- public Boolean getUpdatable() {
- return this.updatable;
- }
-
- public void setUpdatable(Boolean updatable) {
- if (this.attributeValueHasChanged(this.updatable, updatable)) {
- this.updatable = updatable;
- this.updatableAdapter.setValue(updatable);
- }
- }
-
- private void syncUpdatable(Boolean astUpdatable) {
- Boolean old = this.updatable;
- this.updatable = astUpdatable;
- this.firePropertyChanged(UPDATABLE_PROPERTY, old, astUpdatable);
- }
-
- private Boolean buildUpdatable(CompilationUnit astRoot) {
- return this.updatableAdapter.getValue(astRoot);
- }
-
- public TextRange getUpdatableTextRange() {
- return this.updatableTextRange;
- }
-
- private TextRange buildUpdatableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.updatableDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Boolean> buildUpdatableDeclarationAdapter() {
- return this.buildBooleanElementAdapter(this.getUpdatableElementName());
- }
-
- private AnnotationElementAdapter<Boolean> buildUpdatableAdapter() {
- return this.buildBooleanElementAdapter(this.updatableDeclarationAdapter);
- }
-
- protected abstract String getUpdatableElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.table == null) &&
- (this.unique == null) &&
- (this.nullable == null) &&
- (this.insertable == null) &&
- (this.updatable == null);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseDiscriminatorColumnAnnotation.java
deleted file mode 100644
index 1ca1c80f81..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseDiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType;
-
-/**
- * <code>javax.persistence.DiscriminatorColumn</code>
- */
-public abstract class SourceBaseDiscriminatorColumnAnnotation
- extends SourceNamedColumnAnnotation
- implements DiscriminatorColumnAnnotation
-{
-
- private DeclarationAnnotationElementAdapter<String> discriminatorTypeDeclarationAdapter;
- private AnnotationElementAdapter<String> discriminatorTypeAdapter;
- private DiscriminatorType discriminatorType;
-
- private DeclarationAnnotationElementAdapter<Integer> lengthDeclarationAdapter;
- private AnnotationElementAdapter<Integer> lengthAdapter;
- private Integer length;
-
-
-
- protected SourceBaseDiscriminatorColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.discriminatorTypeDeclarationAdapter = this.buildDiscriminatorTypeDeclarationAdapter();
- this.discriminatorTypeAdapter = this.buildDiscriminatorTypeAdapter();
- this.lengthDeclarationAdapter = this.buildLengthDeclarationAdapter();
- this.lengthAdapter = this.buildLengthAdapter();
- }
-
- protected SourceBaseDiscriminatorColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- protected SourceBaseDiscriminatorColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.discriminatorType = this.buildDiscriminatorType(astRoot);
- this.length = this.buildLength(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncLength(this.buildLength(astRoot));
- this.syncDiscriminatorType(this.buildDiscriminatorType(astRoot));
- }
-
-
- // ********** DiscriminatorColumn implementation **********
-
- // ***** discriminator type
- public DiscriminatorType getDiscriminatorType() {
- return this.discriminatorType;
- }
-
- public void setDiscriminatorType(DiscriminatorType discriminatorType) {
- if (this.attributeValueHasChanged(this.discriminatorType, discriminatorType)) {
- this.discriminatorType = discriminatorType;
- this.discriminatorTypeAdapter.setValue(DiscriminatorType.toJavaAnnotationValue(discriminatorType));
- }
- }
-
- private void syncDiscriminatorType(DiscriminatorType astDiscriminatorType) {
- DiscriminatorType old = this.discriminatorType;
- this.discriminatorType = astDiscriminatorType;
- this.firePropertyChanged(DISCRIMINATOR_TYPE_PROPERTY, old, astDiscriminatorType);
- }
-
- private DiscriminatorType buildDiscriminatorType(CompilationUnit astRoot) {
- return DiscriminatorType.fromJavaAnnotationValue(this.discriminatorTypeAdapter.getValue(astRoot));
- }
-
- private DeclarationAnnotationElementAdapter<String> buildDiscriminatorTypeDeclarationAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(this.daa, this.getDiscriminatorTypeElementName());
- }
-
- private AnnotationElementAdapter<String> buildDiscriminatorTypeAdapter() {
- return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, this.discriminatorTypeDeclarationAdapter);
- }
-
- protected abstract String getDiscriminatorTypeElementName();
-
- // ***** length
- public Integer getLength() {
- return this.length;
- }
-
- public void setLength(Integer length) {
- if (this.attributeValueHasChanged(this.length, length)) {
- this.length = length;
- this.lengthAdapter.setValue(length);
- }
- }
-
- private void syncLength(Integer astLength) {
- Integer old = this.length;
- this.length = astLength;
- this.firePropertyChanged(LENGTH_PROPERTY, old, astLength);
- }
-
- private Integer buildLength(CompilationUnit astRoot) {
- return this.lengthAdapter.getValue(astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<Integer> buildLengthDeclarationAdapter() {
- return this.buildIntegerElementAdapter(this.getLengthElementName());
- }
-
- private AnnotationElementAdapter<Integer> buildLengthAdapter() {
- return this.buildIntegerElementAdapter(this.lengthDeclarationAdapter);
- }
-
- protected abstract String getLengthElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.discriminatorType == null) &&
- (this.length == null);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
deleted file mode 100644
index ba3bb2c207..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.EnumType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Enumerated
- * <li>javax.persistence.MapKeyEnumerated
- * </ul></code>
- */
-public abstract class SourceBaseEnumeratedAnnotation
- extends SourceAnnotation
- implements BaseEnumeratedAnnotation
-{
- private final DeclarationAnnotationElementAdapter<String> valueDeclarationAdapter;
- private final AnnotationElementAdapter<String> valueAdapter;
- private EnumType value;
- private TextRange valueTextRange;
-
-
- protected SourceBaseEnumeratedAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- this.valueDeclarationAdapter = new EnumDeclarationAnnotationElementAdapter(daa, getValueElementName());
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, this.valueDeclarationAdapter);
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** EnumeratedAnnotation implementation **********
-
- // ***** value
- public EnumType getValue() {
- return this.value;
- }
-
- public void setValue(EnumType value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(EnumType.toJavaAnnotationValue(value));
- }
- }
-
- private void syncValue(EnumType astValue) {
- EnumType old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private EnumType buildValue(CompilationUnit astRoot) {
- return EnumType.fromJavaAnnotationValue(this.valueAdapter.getValue(astRoot));
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.valueDeclarationAdapter, astRoot);
- }
-
- protected abstract String getValueElementName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
deleted file mode 100644
index c45af6a904..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.BaseJoinColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- */
-public abstract class SourceBaseJoinColumnAnnotation
- extends SourceBaseColumnAnnotation
- implements BaseJoinColumnAnnotation
-{
- private DeclarationAnnotationElementAdapter<String> referencedColumnNameDeclarationAdapter;
- private AnnotationElementAdapter<String> referencedColumnNameAdapter;
- private String referencedColumnName;
- private TextRange referencedColumnNameTextRange;
-
-
- protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.referencedColumnNameDeclarationAdapter = this.buildReferencedColumnNameDeclarationAdapter();
- this.referencedColumnNameAdapter = this.buildReferencedColumnNameAdapter();
- }
-
- protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.referencedColumnName = this.buildReferencedColumnName(astRoot);
- this.referencedColumnNameTextRange = this.buildReferencedColumnNameTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncReferencedColumnName(this.buildReferencedColumnName(astRoot));
- this.referencedColumnNameTextRange = this.buildReferencedColumnNameTextRange(astRoot);
- }
-
-
- //************ BaseJoinColumnAnnotation implementation ***************
-
- // referenced column name
- public String getReferencedColumnName() {
- return this.referencedColumnName;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- if (this.attributeValueHasChanged(this.referencedColumnName, referencedColumnName)) {
- this.referencedColumnName = referencedColumnName;
- this.referencedColumnNameAdapter.setValue(referencedColumnName);
- }
- }
-
- private void syncReferencedColumnName(String astReferencedColumnName) {
- String old = this.referencedColumnName;
- this.referencedColumnName = astReferencedColumnName;
- this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, astReferencedColumnName);
- }
-
- private String buildReferencedColumnName(CompilationUnit astRoot) {
- return this.referencedColumnNameAdapter.getValue(astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.referencedColumnNameTextRange;
- }
-
- private TextRange buildReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.referencedColumnNameDeclarationAdapter, astRoot);
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- return this.textRangeTouches(this.referencedColumnNameTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildReferencedColumnNameDeclarationAdapter() {
- return this.buildStringElementAdapter(this.getReferencedColumnNameElementName());
- }
-
- private AnnotationElementAdapter<String> buildReferencedColumnNameAdapter() {
- return this.buildStringElementAdapter(this.referencedColumnNameDeclarationAdapter);
- }
-
- protected abstract String getReferencedColumnNameElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.referencedColumnName == null);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTableAnnotation.java
deleted file mode 100644
index 3896255975..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTableAnnotation.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <ul>
- * <li><code>javax.persistence.Table</code>
- * <li><code>javax.persistence.JoinTable</code>
- * <li><code>javax.persistence.SecondaryTable</code>
- * <li><code>javax.persistence.CollectionTable</code>
- * </ul>
- */
-public abstract class SourceBaseTableAnnotation
- extends SourceAnnotation
- implements BaseTableAnnotation
-{
- DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
- AnnotationElementAdapter<String> nameAdapter;
- String name;
- TextRange nameTextRange;
-
- DeclarationAnnotationElementAdapter<String> schemaDeclarationAdapter;
- AnnotationElementAdapter<String> schemaAdapter;
- String schema;
- TextRange schemaTextRange;
-
- DeclarationAnnotationElementAdapter<String> catalogDeclarationAdapter;
- AnnotationElementAdapter<String> catalogAdapter;
- String catalog;
- TextRange catalogTextRange;
-
-
- final UniqueConstraintsAnnotationContainer uniqueConstraintsContainer = new UniqueConstraintsAnnotationContainer();
-
-
- protected SourceBaseTableAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- protected SourceBaseTableAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.nameDeclarationAdapter = this.buildNameDeclarationAdapter();
- this.nameAdapter = this.buildNameAdapter();
- this.schemaDeclarationAdapter = this.buildSchemaDeclarationAdapter();
- this.schemaAdapter = this.buildSchemaAdapter();
- this.catalogDeclarationAdapter = this.buildCatalogDeclarationAdapter();
- this.catalogAdapter = this.buildCatalogAdapter();
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.schema = this.buildSchema(astRoot);
- this.schemaTextRange = this.buildSchemaTextRange(astRoot);
-
- this.catalog = this.buildCatalog(astRoot);
- this.catalogTextRange = this.buildCatalogTextRange(astRoot);
-
- this.uniqueConstraintsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.syncSchema(this.buildSchema(astRoot));
- this.schemaTextRange = this.buildSchemaTextRange(astRoot);
-
- this.syncCatalog(this.buildCatalog(astRoot));
- this.catalogTextRange = this.buildCatalogTextRange(astRoot);
-
- this.uniqueConstraintsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
- /**
- * Return the uniqueConstraints element name
- */
- protected abstract String getUniqueConstraintsElementName();
-
-
- // ********** BaseTableAnnotation implementation **********
-
- public boolean isSpecified() {
- return true;
- }
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- public boolean nameTouches(int pos) {
- return this.textRangeTouches(this.nameTextRange, pos);
- }
-
- /**
- * Build a declaration element adapter for the table's 'name' element.
- */
- protected abstract DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter();
-
- private AnnotationElementAdapter<String> buildNameAdapter() {
- return this.buildAnnotationElementAdapter(this.nameDeclarationAdapter);
- }
-
- // ***** schema
- public String getSchema() {
- return this.schema;
- }
-
- public void setSchema(String schema) {
- if (this.attributeValueHasChanged(this.schema, schema)) {
- this.schema = schema;
- this.schemaAdapter.setValue(schema);
- }
- }
-
- private void syncSchema(String astSchema) {
- String old = this.schema;
- this.schema = astSchema;
- this.firePropertyChanged(SCHEMA_PROPERTY, old, astSchema);
- }
-
- private String buildSchema(CompilationUnit astRoot) {
- return this.schemaAdapter.getValue(astRoot);
- }
-
- public TextRange getSchemaTextRange() {
- return this.schemaTextRange;
- }
-
- private TextRange buildSchemaTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.schemaDeclarationAdapter, astRoot);
- }
-
- public boolean schemaTouches(int pos) {
- return this.textRangeTouches(this.schemaTextRange, pos);
- }
-
- /**
- * Build a declaration element adapter for the table's 'schema' element.
- */
- protected abstract DeclarationAnnotationElementAdapter<String> buildSchemaDeclarationAdapter();
-
- private AnnotationElementAdapter<String> buildSchemaAdapter() {
- return this.buildAnnotationElementAdapter(this.schemaDeclarationAdapter);
- }
-
- // ***** catalog
- public String getCatalog() {
- return this.catalog;
- }
-
- public void setCatalog(String catalog) {
- if (this.attributeValueHasChanged(this.catalog, catalog)) {
- this.catalog = catalog;
- this.catalogAdapter.setValue(catalog);
- }
- }
-
- private void syncCatalog(String astCatalog) {
- String old = this.catalog;
- this.catalog = astCatalog;
- this.firePropertyChanged(CATALOG_PROPERTY, old, astCatalog);
- }
-
- private String buildCatalog(CompilationUnit astRoot) {
- return this.catalogAdapter.getValue(astRoot);
- }
-
- public TextRange getCatalogTextRange() {
- return this.catalogTextRange;
- }
-
- private TextRange buildCatalogTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.catalogDeclarationAdapter, astRoot);
- }
-
- public boolean catalogTouches(int pos) {
- return this.textRangeTouches(this.catalogTextRange, pos);
- }
-
- /**
- * Build a declaration element adapter for the table's 'catalog' element
- */
- protected abstract DeclarationAnnotationElementAdapter<String> buildCatalogDeclarationAdapter();
-
- private AnnotationElementAdapter<String> buildCatalogAdapter() {
- return this.buildAnnotationElementAdapter(this.catalogDeclarationAdapter);
- }
-
- // ***** unique constraints
-
- public ListIterable<UniqueConstraintAnnotation> getUniqueConstraints() {
- return this.uniqueConstraintsContainer.getNestedAnnotations();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintsContainer.getNestedAnnotationsSize();
- }
-
- public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
- return this.uniqueConstraintsContainer.getNestedAnnotation(index);
- }
-
- public UniqueConstraintAnnotation addUniqueConstraint(int index) {
- return this.uniqueConstraintsContainer.addNestedAnnotation(index);
- }
-
- /* CU private */ UniqueConstraintAnnotation buildUniqueConstraint(int index) {
- return new SourceUniqueConstraintAnnotation(
- this, this.annotatedElement, buildUniqueConstraintIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildUniqueConstraintIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, this.getUniqueConstraintsElementName(), index, JPA.UNIQUE_CONSTRAINT);
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- this.uniqueConstraintsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeUniqueConstraint(int index) {
- this.uniqueConstraintsContainer.removeNestedAnnotation(index);
- }
-
-
- /**
- * adapt the AnnotationContainer interface to the table's unique constraints
- */
- class UniqueConstraintsAnnotationContainer
- extends AnnotationContainer<UniqueConstraintAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected String getElementName() {
- return SourceBaseTableAnnotation.this.getUniqueConstraintsElementName();
- }
- @Override
- protected String getNestedAnnotationName() {
- return UniqueConstraintAnnotation.ANNOTATION_NAME;
- }
- @Override
- protected UniqueConstraintAnnotation buildNestedAnnotation(int index) {
- return SourceBaseTableAnnotation.this.buildUniqueConstraint(index);
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null) &&
- (this.schema == null) &&
- (this.catalog == null) &&
- this.uniqueConstraintsContainer.isEmpty();
- }
-
- private AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
deleted file mode 100644
index 78928010dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Temporal
- * <li>javax.persistence.MapKeyTemporal
- * </ul></code>
- */
-public abstract class SourceBaseTemporalAnnotation
- extends SourceAnnotation
- implements BaseTemporalAnnotation
-{
- protected final DeclarationAnnotationElementAdapter<String> valueDeclarationAdapter;
- private final AnnotationElementAdapter<String> valueAdapter;
- private TemporalType value;
- private TextRange valueTextRange;
-
-
- protected SourceBaseTemporalAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- this.valueDeclarationAdapter = new EnumDeclarationAnnotationElementAdapter(daa, getValueElementName());
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, this.valueDeclarationAdapter);
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** TemporalAnnotation implementation **********
-
- // ***** value
- public TemporalType getValue() {
- return this.value;
- }
-
- public void setValue(TemporalType value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(TemporalType.toJavaAnnotationValue(value));
- }
- }
-
- private void syncValue(TemporalType astValue) {
- TemporalType old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private TemporalType buildValue(CompilationUnit astRoot) {
- return TemporalType.fromJavaAnnotationValue(this.valueAdapter.getValue(astRoot));
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.valueDeclarationAdapter, astRoot);
- }
-
- protected abstract String getValueElementName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBasicAnnotation.java
deleted file mode 100644
index 2776117e4d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceBasicAnnotation.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.BooleanExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Basic</code>
- */
-public final class SourceBasicAnnotation
- extends SourceAnnotation
- implements BasicAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<Boolean> OPTIONAL_ADAPTER = buildOptionalAdapter();
- private final AnnotationElementAdapter<Boolean> optionalAdapter;
- private Boolean optional;
- private TextRange optionalTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
- private final AnnotationElementAdapter<String> fetchAdapter;
- private FetchType fetch;
- private TextRange fetchTextRange;
-
-
- public SourceBasicAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.optionalAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(element, OPTIONAL_ADAPTER);
- this.fetchAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, FETCH_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.optional = this.buildOptional(astRoot);
- this.optionalTextRange = this.buildOptionalTextRange(astRoot);
-
- this.fetch = this.buildFetch(astRoot);
- this.fetchTextRange = this.buildFetchTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncOptional(this.buildOptional(astRoot));
- this.optionalTextRange = this.buildOptionalTextRange(astRoot);
-
- this.syncFetch(this.buildFetch(astRoot));
- this.fetchTextRange = this.buildFetchTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.optional == null) &&
- (this.fetch == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.fetch);
- }
-
-
- //*************** Basic implementation ****************
-
- // ***** optional
- public Boolean getOptional() {
- return this.optional;
- }
-
- public void setOptional(Boolean optional) {
- if (this.attributeValueHasChanged(this.optional, optional)) {
- this.optional = optional;
- this.optionalAdapter.setValue(optional);
- }
- }
-
- private void syncOptional(Boolean astOptional) {
- Boolean old = this.optional;
- this.optional = astOptional;
- this.firePropertyChanged(OPTIONAL_PROPERTY, old, astOptional);
- }
-
- private Boolean buildOptional(CompilationUnit astRoot) {
- return this.optionalAdapter.getValue(astRoot);
- }
-
- public TextRange getOptionalTextRange() {
- return this.optionalTextRange;
- }
-
- private TextRange buildOptionalTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(OPTIONAL_ADAPTER, astRoot);
- }
-
- // ***** fetch
- public FetchType getFetch() {
- return this.fetch;
- }
-
- public void setFetch(FetchType fetch) {
- if (this.attributeValueHasChanged(this.fetch, fetch)) {
- this.fetch = fetch;
- this.fetchAdapter.setValue(FetchType.toJavaAnnotationValue(fetch));
- }
- }
-
- private void syncFetch(FetchType astFetch) {
- FetchType old = this.fetch;
- this.fetch = astFetch;
- this.firePropertyChanged(FETCH_PROPERTY, old, astFetch);
- }
-
- private FetchType buildFetch(CompilationUnit astRoot) {
- return FetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot));
- }
-
- public TextRange getFetchTextRange() {
- return this.fetchTextRange;
- }
-
- private TextRange buildFetchTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(FETCH_ADAPTER, astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<Boolean>(DECLARATION_ANNOTATION_ADAPTER, JPA.BASIC__OPTIONAL, BooleanExpressionConverter.instance());
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.BASIC__FETCH);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceColumnAnnotation.java
deleted file mode 100644
index e79bd760cc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceColumnAnnotation.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.ColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Column</code>
- */
-public final class SourceColumnAnnotation
- extends SourceCompleteColumnAnnotation
- implements ColumnAnnotation
-{
- // this adapter is only used by a Column annotation associated with a mapping annotation (e.g. Basic)
- public static final DeclarationAnnotationAdapter MAPPING_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ********** SourceNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** SourceBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA.COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA.COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA.COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA.COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA.COLUMN__UPDATABLE;
- }
-
- // ********** SourceCompleteColumnAnnotation implementation **********
-
- @Override
- protected String getLengthElementName() {
- return JPA.COLUMN__LENGTH;
- }
-
- @Override
- protected String getPrecisionElementName() {
- return JPA.COLUMN__PRECISION;
- }
-
- @Override
- protected String getScaleElementName() {
- return JPA.COLUMN__SCALE;
- }
-
-
- // ********** static methods **********
-
- static ColumnAnnotation createAttributeOverrideColumn(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter attributeOverrideAnnotationAdapter) {
- return new SourceColumnAnnotation(parent, element, buildAttributeOverrideAnnotationAdapter(attributeOverrideAnnotationAdapter));
- }
-
- static DeclarationAnnotationAdapter buildAttributeOverrideAnnotationAdapter(DeclarationAnnotationAdapter attributeOverrideAnnotationAdapter) {
- return new NestedDeclarationAnnotationAdapter(attributeOverrideAnnotationAdapter, JPA.ATTRIBUTE_OVERRIDE__COLUMN, JPA.COLUMN);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java
deleted file mode 100644
index 63ca3f6836..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.MapKeyColumn
- * </ul></code>
- */
-public abstract class SourceCompleteColumnAnnotation
- extends SourceBaseColumnAnnotation
- implements CompleteColumnAnnotation
-{
- protected DeclarationAnnotationElementAdapter<Integer> lengthDeclarationAdapter;
- protected AnnotationElementAdapter<Integer> lengthAdapter;
- protected Integer length;
- protected TextRange lengthTextRange;
-
- protected DeclarationAnnotationElementAdapter<Integer> precisionDeclarationAdapter;
- protected AnnotationElementAdapter<Integer> precisionAdapter;
- protected Integer precision;
- protected TextRange precisionTextRange;
-
- protected DeclarationAnnotationElementAdapter<Integer> scaleDeclarationAdapter;
- protected AnnotationElementAdapter<Integer> scaleAdapter;
- protected Integer scale;
- protected TextRange scaleTextRange;
-
-
- protected SourceCompleteColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- this.lengthDeclarationAdapter = this.buildLengthDeclarationAdapter();
- this.lengthAdapter = this.buildLengthAdapter();
- this.precisionDeclarationAdapter = this.buildPrecisionDeclarationAdapter();
- this.precisionAdapter = this.buildPrecisionAdapter();
- this.scaleDeclarationAdapter = this.buildScaleDeclarationAdapter();
- this.scaleAdapter = this.buildScaleAdapter();
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
-
- this.length = this.buildLength(astRoot);
- this.lengthTextRange = this.buildLengthTextRange(astRoot);
-
- this.precision = this.buildPrecision(astRoot);
- this.precisionTextRange = this.buildPrecisionTextRange(astRoot);
-
- this.scale = this.buildScale(astRoot);
- this.scaleTextRange = this.buildScaleTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
-
- this.syncLength(this.buildLength(astRoot));
- this.lengthTextRange = this.buildLengthTextRange(astRoot);
-
- this.syncPrecision(this.buildPrecision(astRoot));
- this.precisionTextRange = this.buildPrecisionTextRange(astRoot);
-
- this.syncScale(this.buildScale(astRoot));
- this.scaleTextRange = this.buildScaleTextRange(astRoot);
- }
-
-
- // ********** ColumnAnnotation implementation **********
-
- // ***** length
- public Integer getLength() {
- return this.length;
- }
-
- public void setLength(Integer length) {
- if (this.attributeValueHasChanged(this.length, length)) {
- this.length = length;
- this.lengthAdapter.setValue(length);
- }
- }
-
- private void syncLength(Integer astLength) {
- Integer old = this.length;
- this.length = astLength;
- this.firePropertyChanged(LENGTH_PROPERTY, old, astLength);
- }
-
- private Integer buildLength(CompilationUnit astRoot) {
- return this.lengthAdapter.getValue(astRoot);
- }
-
- public TextRange getLengthTextRange() {
- return this.lengthTextRange;
- }
-
- protected TextRange buildLengthTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.lengthDeclarationAdapter, astRoot);
- }
-
- protected DeclarationAnnotationElementAdapter<Integer> buildLengthDeclarationAdapter() {
- return this.buildIntegerElementAdapter(this.getLengthElementName());
- }
-
- protected AnnotationElementAdapter<Integer> buildLengthAdapter() {
- return this.buildIntegerElementAdapter(this.lengthDeclarationAdapter);
- }
-
- protected abstract String getLengthElementName();
-
- // ***** precision
- public Integer getPrecision() {
- return this.precision;
- }
-
- public void setPrecision(Integer precision) {
- if (this.attributeValueHasChanged(this.precision, precision)) {
- this.precision = precision;
- this.precisionAdapter.setValue(precision);
- }
- }
-
- private void syncPrecision(Integer astPrecision) {
- Integer old = this.precision;
- this.precision = astPrecision;
- this.firePropertyChanged(PRECISION_PROPERTY, old, astPrecision);
- }
-
- private Integer buildPrecision(CompilationUnit astRoot) {
- return this.precisionAdapter.getValue(astRoot);
- }
-
- public TextRange getPrecisionTextRange() {
- return this.precisionTextRange;
- }
-
- protected TextRange buildPrecisionTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.precisionDeclarationAdapter, astRoot);
- }
-
- protected DeclarationAnnotationElementAdapter<Integer> buildPrecisionDeclarationAdapter() {
- return this.buildIntegerElementAdapter(this.getPrecisionElementName());
- }
-
- protected AnnotationElementAdapter<Integer> buildPrecisionAdapter() {
- return this.buildIntegerElementAdapter(this.precisionDeclarationAdapter);
- }
-
- protected abstract String getPrecisionElementName();
-
- // ***** scale
- public Integer getScale() {
- return this.scale;
- }
-
- public void setScale(Integer scale) {
- if (this.attributeValueHasChanged(this.scale, scale)) {
- this.scale = scale;
- this.scaleAdapter.setValue(scale);
- }
- }
-
- private void syncScale(Integer astScale) {
- Integer old = this.scale;
- this.scale = astScale;
- this.firePropertyChanged(SCALE_PROPERTY, old, astScale);
- }
-
- private Integer buildScale(CompilationUnit astRoot) {
- return this.scaleAdapter.getValue(astRoot);
- }
-
- public TextRange getScaleTextRange() {
- return this.scaleTextRange;
- }
-
- protected TextRange buildScaleTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.scaleDeclarationAdapter, astRoot);
- }
-
- protected DeclarationAnnotationElementAdapter<Integer> buildScaleDeclarationAdapter() {
- return this.buildIntegerElementAdapter(this.getScaleElementName());
- }
-
- protected AnnotationElementAdapter<Integer> buildScaleAdapter() {
- return this.buildIntegerElementAdapter(this.scaleDeclarationAdapter);
- }
-
- protected abstract String getScaleElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.length == null) &&
- (this.precision == null) &&
- (this.scale == null);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
deleted file mode 100644
index da10772710..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.DiscriminatorColumn</code>
- */
-public final class SourceDiscriminatorColumnAnnotation
- extends SourceBaseDiscriminatorColumnAnnotation
- implements DiscriminatorColumnAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceDiscriminatorColumnAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ********** SourceNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.DISCRIMINATOR_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
- }
-
- // ********** SourceBaseDiscriminatorColumnAnnotation implementation **********
-
- @Override
- protected String getDiscriminatorTypeElementName() {
- return JPA.DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- }
-
- @Override
- protected String getLengthElementName() {
- return JPA.DISCRIMINATOR_COLUMN__LENGTH;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
deleted file mode 100644
index 38a6011f13..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.DiscriminatorValue</code>
- */
-public final class SourceDiscriminatorValueAnnotation
- extends SourceAnnotation
- implements DiscriminatorValueAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private String value;
- private TextRange valueTextRange;
-
-
- public SourceDiscriminatorValueAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** DiscriminatorValueAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.DISCRIMINATOR_VALUE__VALUE);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddableAnnotation.java
deleted file mode 100644
index 901cd71017..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddableAnnotation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
-
-/**
- * javax.persistence.Embeddable
- */
-public final class SourceEmbeddableAnnotation
- extends SourceAnnotation
- implements EmbeddableAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceEmbeddableAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedAnnotation.java
deleted file mode 100644
index 5981e7fa67..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedAnnotation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
-
-/**
- * javax.persistence.Embedded
- */
-public final class SourceEmbeddedAnnotation
- extends SourceAnnotation
- implements EmbeddedAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceEmbeddedAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java
deleted file mode 100644
index 013de1fcb9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
-
-/**
- * javax.persistence.EmbeddedId
- */
-public final class SourceEmbeddedIdAnnotation
- extends SourceAnnotation
- implements EmbeddedIdAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceEmbeddedIdAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEntityAnnotation.java
deleted file mode 100644
index cd57e40899..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEntityAnnotation.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Entity</code>
- */
-public final class SourceEntityAnnotation
- extends SourceAnnotation
- implements EntityAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildNameAdapter();
- private final AnnotationElementAdapter<String> nameAdapter;
- private String name;
- private TextRange nameTextRange;
-
-
- public SourceEntityAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.nameAdapter = new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, NAME_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** EntityAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(NAME_ADAPTER, astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildNameAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ENTITY__NAME);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEnumeratedAnnotation.java
deleted file mode 100644
index ee1ea6b7b6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceEnumeratedAnnotation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Enumerated</code>
- */
-public final class SourceEnumeratedAnnotation
- extends SourceBaseEnumeratedAnnotation
- implements EnumeratedAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- public SourceEnumeratedAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA.ENUMERATED__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
deleted file mode 100644
index c98c509465..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.GenerationType;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.GeneratedValue</code>
- */
-public final class SourceGeneratedValueAnnotation
- extends SourceAnnotation
- implements GeneratedValueAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> STRATEGY_ADAPTER = buildStrategyAdapter();
- private final AnnotationElementAdapter<String> strategyAdapter;
- private GenerationType strategy;
- private TextRange strategyTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> GENERATOR_ADAPTER = buildGeneratorAdapter();
- private final AnnotationElementAdapter<String> generatorAdapter;
- private String generator;
- private TextRange generatorTextRange;
-
-
- public SourceGeneratedValueAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.strategyAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, STRATEGY_ADAPTER);
- this.generatorAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, GENERATOR_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.strategy = this.buildStrategy(astRoot);
- this.strategyTextRange = this.buildStrategyTextRange(astRoot);
-
- this.generator = this.buildGenerator(astRoot);
- this.generatorTextRange = this.buildGeneratorTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncStrategy(this.buildStrategy(astRoot));
- this.strategyTextRange = this.buildStrategyTextRange(astRoot);
-
- this.syncGenerator(this.buildGenerator(astRoot));
- this.generatorTextRange = this.buildGeneratorTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.strategy == null) &&
- (this.generator == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.strategy);
- }
-
-
- // ********** GeneratedValueAnnotation implementation **********
-
- // ***** strategy
- public GenerationType getStrategy() {
- return this.strategy;
- }
-
- public void setStrategy(GenerationType strategy) {
- if (this.attributeValueHasChanged(this.strategy, strategy)) {
- this.strategy = strategy;
- this.strategyAdapter.setValue(GenerationType.toJavaAnnotationValue(strategy));
- }
- }
-
- private void syncStrategy(GenerationType astStrategy) {
- GenerationType old = this.strategy;
- this.strategy = astStrategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, astStrategy);
- }
-
- private GenerationType buildStrategy(CompilationUnit astRoot) {
- return GenerationType.fromJavaAnnotationValue(this.strategyAdapter.getValue(astRoot));
- }
-
- public TextRange getStrategyTextRange() {
- return this.strategyTextRange;
- }
-
- private TextRange buildStrategyTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(STRATEGY_ADAPTER, astRoot);
- }
-
- // ***** generator
- public String getGenerator() {
- return this.generator;
- }
-
- public void setGenerator(String generator) {
- if (this.attributeValueHasChanged(this.generator, generator)) {
- this.generator = generator;
- this.generatorAdapter.setValue(generator);
- }
- }
-
- private void syncGenerator(String astGenerator) {
- String old = this.generator;
- this.generator = astGenerator;
- this.firePropertyChanged(GENERATOR_PROPERTY, old, astGenerator);
- }
-
- private String buildGenerator(CompilationUnit astRoot) {
- return this.generatorAdapter.getValue(astRoot);
- }
-
- public TextRange getGeneratorTextRange() {
- return this.generatorTextRange;
- }
-
- private TextRange buildGeneratorTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(GENERATOR_ADAPTER, astRoot);
- }
-
- public boolean generatorTouches(int pos) {
- return this.textRangeTouches(this.generatorTextRange, pos);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildStrategyAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.GENERATED_VALUE__STRATEGY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildGeneratorAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.GENERATED_VALUE__GENERATOR);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratorAnnotation.java
deleted file mode 100644
index dfb7165c54..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceGeneratorAnnotation.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NumberIntegerExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
-
-/**
- * <ul>
- * <li>javax.persistence.SequenceGenerator
- * <li>javax.persistence.TableGenerator
- * </ul>
- */
-abstract class SourceGeneratorAnnotation
- extends SourceAnnotation
- implements GeneratorAnnotation
-{
- final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
- final AnnotationElementAdapter<String> nameAdapter;
- String name;
- TextRange nameTextRange;
-
- final DeclarationAnnotationElementAdapter<Integer> initialValueDeclarationAdapter;
- final AnnotationElementAdapter<Integer> initialValueAdapter;
- Integer initialValue;
- TextRange initialValueTextRange;
-
- final DeclarationAnnotationElementAdapter<Integer> allocationSizeDeclarationAdapter;
- final AnnotationElementAdapter<Integer> allocationSizeAdapter;
- Integer allocationSize;
- TextRange allocationSizeTextRange;
-
-
- SourceGeneratorAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- this.nameDeclarationAdapter = this.getNameAdapter();
- this.nameAdapter = this.buildAdapter(this.nameDeclarationAdapter);
- this.initialValueDeclarationAdapter = this.getInitialValueAdapter();
- this.initialValueAdapter = this.buildIntegerAdapter(this.initialValueDeclarationAdapter);
- this.allocationSizeDeclarationAdapter = this.getAllocationSizeAdapter();
- this.allocationSizeAdapter = this.buildIntegerAdapter(this.allocationSizeDeclarationAdapter);
- }
-
- protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
- }
-
- protected AnnotationElementAdapter<Integer> buildIntegerAdapter(DeclarationAnnotationElementAdapter<Integer> daea) {
- return new AnnotatedElementAnnotationElementAdapter<Integer>(this.annotatedElement, daea);
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.initialValue = this.buildInitialValue(astRoot);
- this.initialValueTextRange = this.buildInitialValueTextRange(astRoot);
-
- this.allocationSize = this.buildAllocationSize(astRoot);
- this.allocationSizeTextRange = this.buildAllocationSizeTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.syncInitialValue(this.buildInitialValue(astRoot));
- this.initialValueTextRange = this.buildInitialValueTextRange(astRoot);
-
- this.syncAllocationSize(this.buildAllocationSize(astRoot));
- this.allocationSizeTextRange = this.buildAllocationSizeTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null) &&
- (this.initialValue == null) &&
- (this.allocationSize == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** GeneratorAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- abstract DeclarationAnnotationElementAdapter<String> getNameAdapter();
-
- // ***** initial value
- public Integer getInitialValue() {
- return this.initialValue;
- }
-
- public void setInitialValue(Integer initialValue) {
- if (this.attributeValueHasChanged(this.initialValue, initialValue)) {
- this.initialValue = initialValue;
- this.initialValueAdapter.setValue(initialValue);
- }
- }
-
- private void syncInitialValue(Integer astIinitialValue) {
- Integer old = this.initialValue;
- this.initialValue = astIinitialValue;
- this.firePropertyChanged(INITIAL_VALUE_PROPERTY, old, astIinitialValue);
- }
-
- private Integer buildInitialValue(CompilationUnit astRoot) {
- return this.initialValueAdapter.getValue(astRoot);
- }
-
- public TextRange getInitialValueTextRange() {
- return this.initialValueTextRange;
- }
-
- private TextRange buildInitialValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.initialValueDeclarationAdapter, astRoot);
- }
-
- abstract DeclarationAnnotationElementAdapter<Integer> getInitialValueAdapter();
-
- // ***** allocation size
- public Integer getAllocationSize() {
- return this.allocationSize;
- }
-
- public void setAllocationSize(Integer allocationSize) {
- if (this.attributeValueHasChanged(this.allocationSize, allocationSize)) {
- this.allocationSize = allocationSize;
- this.allocationSizeAdapter.setValue(allocationSize);
- }
- }
-
- private void syncAllocationSize(Integer astAllocationSize) {
- Integer old = this.allocationSize;
- this.allocationSize = astAllocationSize;
- this.firePropertyChanged(ALLOCATION_SIZE_PROPERTY, old, astAllocationSize);
- }
-
- private Integer buildAllocationSize(CompilationUnit astRoot) {
- return this.allocationSizeAdapter.getValue(astRoot);
- }
-
- public TextRange getAllocationSizeTextRange() {
- return this.allocationSizeTextRange;
- }
-
- private TextRange buildAllocationSizeTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.allocationSizeDeclarationAdapter, astRoot);
- }
-
- abstract DeclarationAnnotationElementAdapter<Integer> getAllocationSizeAdapter();
-
-
- // ********** static methods **********
-
- static DeclarationAnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(annotationAdapter, elementName);
- }
-
- static DeclarationAnnotationElementAdapter<Integer> buildIntegerAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<Integer>(annotationAdapter, elementName, NumberIntegerExpressionConverter.instance());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdAnnotation.java
deleted file mode 100644
index 411223e26b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
-
-/**
- * javax.persistence.Id
- */
-public final class SourceIdAnnotation
- extends SourceAnnotation
- implements IdAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceIdAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdClassAnnotation.java
deleted file mode 100644
index 3802c7c825..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceIdClassAnnotation.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.IdClass</code>
- */
-public final class SourceIdClassAnnotation
- extends SourceAnnotation
- implements IdClassAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private String value;
- private TextRange valueTextRange;
-
- /**
- * We cache this here because we use the AST bindings to calculate it.<ul>
- * <li>We do not return a calculated value because it would force a JDT
- * parse with <em>every</em> context model <em>update</em>. (This property
- * is one that is read during the context model <em>update</em>, as opposed
- * to the context model <em>sync</em>.)
- * <li>We do not calculate it during {@link #synchronizeWith(CompilationUnit)}
- * because<ul>
- * <li>when the class name ({@link #value}) is changed via API from the UI,
- * we are ignoring Java change events; so we would need to calculate it
- * during {@link #setValue(String)} which might slow down our UI a bit (with
- * the additional parse), and setting the flag is effectively equivalent
- * <li>when the class name ({@link #value}) is changed via API from a test,
- * we are handling Java change events synchronously;
- * so we would detect a change in the fully-qualified class name during
- * {@link #synchronizeWith(CompilationUnit)}, triggering an
- * unwanted context model <em>sync</em> (Any resource model changes via
- * API should <em>not</em> trigger a context model <em>sync</em>.)
- * </ul>
- * </ul>
- * Also, there is no change notification tied to this property since it
- * would be fired at the same times as the change events for {@link #value}.
- */
- // TODO any of a number of things can invalidate this: classpath change,
- // added or removed matching class
- private String fullyQualifiedClassName;
- // we need a flag since the f-q name can be null
- private boolean fqClassNameStale = true;
-
-
- public SourceIdClassAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** IdClassAnnotation implementation **********
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.fqClassNameStale = true;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- if (this.attributeValueHasChanged(this.value, astValue)) {
- this.syncValue_(astValue);
- }
- }
-
- private void syncValue_(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.fqClassNameStale = true;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
- // ***** fully-qualified class name
- public String getFullyQualifiedClassName() {
- if (this.fqClassNameStale) {
- this.fullyQualifiedClassName = this.buildFullyQualifiedClassName();
- this.fqClassNameStale = false;
- }
- return this.fullyQualifiedClassName;
- }
-
- private String buildFullyQualifiedClassName() {
- return (this.value == null) ? null : this.buildFullyQualifiedClassName_();
- }
-
- private String buildFullyQualifiedClassName_() {
- return ASTTools.resolveFullyQualifiedName(this.valueAdapter.getExpression(this.buildASTRoot()));
- }
-
-
- // ********** static methods **********
-
- protected static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String>(DECLARATION_ANNOTATION_ADAPTER, JPA.ID_CLASS__VALUE, SimpleTypeStringExpressionConverter.instance());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceInheritanceAnnotation.java
deleted file mode 100644
index f80a023136..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceInheritanceAnnotation.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.InheritanceType;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.Inheritance</code>
- */
-public final class SourceInheritanceAnnotation
- extends SourceAnnotation
- implements InheritanceAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> STRATEGY_ADAPTER = buildStrategyAdapter();
- private final AnnotationElementAdapter<String> strategyAdapter;
- private InheritanceType strategy;
- private TextRange strategyTextRange;
-
-
- public SourceInheritanceAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.strategyAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, STRATEGY_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.strategy = this.buildStrategy(astRoot);
- this.strategyTextRange = this.buildStrategyTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncStrategy(this.buildStrategy(astRoot));
- this.strategyTextRange = this.buildStrategyTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.strategy == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.strategy);
- }
-
-
- // ********** InheritanceAnnotation implementation **********
-
- // ***** strategy
- public InheritanceType getStrategy() {
- return this.strategy;
- }
-
- public void setStrategy(InheritanceType strategy) {
- if (this.attributeValueHasChanged(this.strategy, strategy)) {
- this.strategy = strategy;
- this.strategyAdapter.setValue(InheritanceType.toJavaAnnotationValue(strategy));
- }
- }
-
- private void syncStrategy(InheritanceType astStrategy) {
- InheritanceType old = this.strategy;
- this.strategy = astStrategy;
- this.firePropertyChanged(STRATEGY_PROPERTY, old, astStrategy);
- }
-
- private InheritanceType buildStrategy(CompilationUnit astRoot) {
- return InheritanceType.fromJavaAnnotationValue(this.strategyAdapter.getValue(astRoot));
- }
-
- public TextRange getStrategyTextRange() {
- return this.strategyTextRange;
- }
-
- private TextRange buildStrategyTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(STRATEGY_ADAPTER, astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildStrategyAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.INHERITANCE__STRATEGY);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
deleted file mode 100644
index 9cbe5e4144..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.JoinColumn</code>
- */
-public final class SourceJoinColumnAnnotation
- extends SourceBaseJoinColumnAnnotation
- implements JoinColumnAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.JOIN_COLUMNS);
-
-
- public static SourceJoinColumnAnnotation buildSourceJoinColumnAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element) {
-
- return new SourceJoinColumnAnnotation(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public static SourceJoinColumnAnnotation buildSourceJoinColumnAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement annotatedElement,
- int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildJoinColumnDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildJoinColumnAnnotationAdapter(annotatedElement, idaa);
- return new SourceJoinColumnAnnotation(
- parent,
- annotatedElement,
- idaa,
- iaa);
- }
-
-
- public static SourceJoinColumnAnnotation buildNestedSourceJoinColumnAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourceJoinColumnAnnotation(parent, element, idaa);
- }
-
- private SourceJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- private SourceJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- private SourceJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- }
-
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- // ********** SourceNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** SourceBaseColumnAnnotation implementation **********
-
- @Override
- protected String getTableElementName() {
- return JPA.JOIN_COLUMN__TABLE;
- }
-
- @Override
- protected String getUniqueElementName() {
- return JPA.JOIN_COLUMN__UNIQUE;
- }
-
- @Override
- protected String getNullableElementName() {
- return JPA.JOIN_COLUMN__NULLABLE;
- }
-
- @Override
- protected String getInsertableElementName() {
- return JPA.JOIN_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String getUpdatableElementName() {
- return JPA.JOIN_COLUMN__UPDATABLE;
- }
-
-
- // ********** SourceBaseJoinColumnAnnotation implementation **********
-
- @Override
- protected String getReferencedColumnNameElementName() {
- return JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- }
-
-
- // ********** static methods **********
-
- private static IndexedAnnotationAdapter buildJoinColumnAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- private static IndexedDeclarationAnnotationAdapter buildJoinColumnDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinTableAnnotation.java
deleted file mode 100644
index 98d567044c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceJoinTableAnnotation.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * <code>javax.persistence.JoinTable</code>
- */
-public final class SourceJoinTableAnnotation
- extends SourceBaseTableAnnotation
- implements JoinTableAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JoinTableAnnotation.ANNOTATION_NAME);
-
-
- private final JoinColumnsAnnotationContainer joinColumnsContainer = new JoinColumnsAnnotationContainer();
-
- private final InverseJoinColumnsAnnotationContainer inverseJoinColumnsContainer = new InverseJoinColumnsAnnotationContainer();
-
-
- public SourceJoinTableAnnotation(JavaResourceNode parent, AnnotatedElement element) {
- this(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public SourceJoinTableAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.joinColumnsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- this.inverseJoinColumnsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.joinColumnsContainer.synchronize(this.getAstAnnotation(astRoot));
- this.inverseJoinColumnsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
-
- // ********** SourceBaseTableAnnotation implementation **********
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.JOIN_TABLE__NAME);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildSchemaDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.JOIN_TABLE__SCHEMA);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildCatalogDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.JOIN_TABLE__CATALOG);
- }
-
- @Override
- protected String getUniqueConstraintsElementName() {
- return JPA.JOIN_TABLE__UNIQUE_CONSTRAINTS;
- }
-
- // ********** JoinTableAnnotation implementation **********
-
- // **************** join columns *************************************************
-
- public ListIterable<JoinColumnAnnotation> getJoinColumns() {
- return this.joinColumnsContainer.getNestedAnnotations();
- }
-
- public int getJoinColumnsSize() {
- return this.joinColumnsContainer.getNestedAnnotationsSize();
- }
-
- public JoinColumnAnnotation joinColumnAt(int index) {
- return this.joinColumnsContainer.getNestedAnnotation(index);
- }
-
- public JoinColumnAnnotation addJoinColumn(int index) {
- return this.joinColumnsContainer.addNestedAnnotation(index);
- }
-
- /* CU private */ JoinColumnAnnotation buildJoinColumn(int index) {
- return SourceJoinColumnAnnotation.buildNestedSourceJoinColumnAnnotation(
- this, this.annotatedElement, this.buildJoinColumnIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildJoinColumnIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, JPA.JOIN_TABLE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-
- public void moveJoinColumn(int targetIndex, int sourceIndex) {
- this.joinColumnsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeJoinColumn(int index) {
- this.joinColumnsContainer.removeNestedAnnotation(index);
- }
-
- /**
- * adapt the AnnotationContainer interface to the collection table's join columns
- */
- class JoinColumnsAnnotationContainer
- extends AnnotationContainer<JoinColumnAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return JOIN_COLUMNS_LIST;
- }
- @Override
- protected String getElementName() {
- return JPA.JOIN_TABLE__JOIN_COLUMNS;
- }
- @Override
- protected String getNestedAnnotationName() {
- return JPA.JOIN_COLUMN;
- }
- @Override
- protected JoinColumnAnnotation buildNestedAnnotation(int index) {
- return SourceJoinTableAnnotation.this.buildJoinColumn(index);
- }
- }
-
- // **************** inverse join columns *************************************************
-
- public ListIterable<JoinColumnAnnotation> getInverseJoinColumns() {
- return this.inverseJoinColumnsContainer.getNestedAnnotations();
- }
-
- public int getInverseJoinColumnsSize() {
- return this.inverseJoinColumnsContainer.getNestedAnnotationsSize();
- }
-
- public JoinColumnAnnotation inverseJoinColumnAt(int index) {
- return this.inverseJoinColumnsContainer.getNestedAnnotation(index);
- }
-
- public JoinColumnAnnotation addInverseJoinColumn(int index) {
- return this.inverseJoinColumnsContainer.addNestedAnnotation(index);
- }
-
- /* CU private */ JoinColumnAnnotation buildInverseJoinColumn(int index) {
- return SourceJoinColumnAnnotation.buildNestedSourceJoinColumnAnnotation(
- this, this.annotatedElement, buildInverseJoinColumnIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildInverseJoinColumnIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-
- public void moveInverseJoinColumn(int targetIndex, int sourceIndex) {
- this.inverseJoinColumnsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeInverseJoinColumn(int index) {
- this.inverseJoinColumnsContainer.removeNestedAnnotation(index);
- }
-
- /**
- * adapt the AnnotationContainer interface to the collection table's join columns
- */
- class InverseJoinColumnsAnnotationContainer
- extends AnnotationContainer<JoinColumnAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return INVERSE_JOIN_COLUMNS_LIST;
- }
- @Override
- protected String getElementName() {
- return JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS;
- }
- @Override
- protected String getNestedAnnotationName() {
- return JPA.JOIN_COLUMN;
- }
- @Override
- protected JoinColumnAnnotation buildNestedAnnotation(int index) {
- return SourceJoinTableAnnotation.this.buildInverseJoinColumn(index);
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- this.joinColumnsContainer.isEmpty() &&
- this.inverseJoinColumnsContainer.isEmpty();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceLobAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceLobAnnotation.java
deleted file mode 100644
index 16d82c2c63..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceLobAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
-
-/**
- * javax.persistence.Lob
- */
-public final class SourceLobAnnotation
- extends SourceAnnotation
- implements LobAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceLobAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToManyAnnotation.java
deleted file mode 100644
index 75e4711748..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToManyAnnotation.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ManyToMany2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.ManyToMany</code>
- */
-public final class SourceManyToManyAnnotation
- extends SourceRelationshipMappingAnnotation
- implements ManyToMany2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildMappedByAdapter();
- private final AnnotationElementAdapter<String> mappedByAdapter;
- private String mappedBy;
- private TextRange mappedByTextRange;
-
-
- public SourceManyToManyAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.mappedBy = this.buildMappedBy(astRoot);
- this.mappedByTextRange = this.buildMappedByTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncMappedBy(this.buildMappedBy(astRoot));
- this.mappedByTextRange = this.buildMappedByTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.mappedBy == null);
- }
-
-
- // ********** SourceRelationshipMappingAnnotation implementation **********
-
- @Override
- DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
-
- //**************** OwnableRelationshipMappingAnnotation implementation **************
-
- // ***** mapped by
- public String getMappedBy() {
- return this.mappedBy;
- }
-
- public void setMappedBy(String mappedBy) {
- if (this.attributeValueHasChanged(this.mappedBy, mappedBy)) {
- this.mappedBy = mappedBy;
- this.mappedByAdapter.setValue(mappedBy);
- }
- }
-
- private void syncMappedBy(String astMappedBy) {
- String old = this.mappedBy;
- this.mappedBy = astMappedBy;
- this.firePropertyChanged(MAPPED_BY_PROPERTY, old, astMappedBy);
- }
-
- private String buildMappedBy(CompilationUnit astRoot) {
- return this.mappedByAdapter.getValue(astRoot);
- }
-
- public TextRange getMappedByTextRange() {
- return this.mappedByTextRange;
- }
-
- private TextRange buildMappedByTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(MAPPED_BY_ADAPTER, astRoot);
- }
-
- public boolean mappedByTouches(int pos) {
- return this.textRangeTouches(this.mappedByTextRange, pos);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
- return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__TARGET_ENTITY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildMappedByAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__MAPPED_BY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__FETCH);
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
- return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__CASCADE);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToOneAnnotation.java
deleted file mode 100644
index ed6804fb71..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceManyToOneAnnotation.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.BooleanExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ManyToOne2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.ManyToOne</code>
- */
-public final class SourceManyToOneAnnotation
- extends SourceRelationshipMappingAnnotation
- implements ManyToOne2_0Annotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
-
- private static final DeclarationAnnotationElementAdapter<Boolean> OPTIONAL_ADAPTER = buildOptionalAdapter();
- private final AnnotationElementAdapter<Boolean> optionalAdapter;
- private Boolean optional;
- private TextRange optionalTextRange;
-
-
- public SourceManyToOneAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.optionalAdapter = this.buildBooleanAnnotationElementAdapter(OPTIONAL_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.optional = this.buildOptional(astRoot);
- this.optionalTextRange = this.buildOptionalTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncOptional(this.buildOptional(astRoot));
- this.optionalTextRange = this.buildOptionalTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.optional == null);
- }
-
-
- // ********** SourceRelationshipMappingAnnotation implementation **********
-
- @Override
- DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
-
- // ********** ManyToOneMappingAnnotation implementation **********
-
- // ***** optional
- public Boolean getOptional() {
- return this.optional;
- }
-
- public void setOptional(Boolean optional) {
- if (this.attributeValueHasChanged(this.optional, optional)) {
- this.optional = optional;
- this.optionalAdapter.setValue(optional);
- }
- }
-
- private void syncOptional(Boolean astOptional) {
- Boolean old = this.optional;
- this.optional = astOptional;
- this.firePropertyChanged(OPTIONAL_PROPERTY, old, astOptional);
- }
-
- private Boolean buildOptional(CompilationUnit astRoot) {
- return this.optionalAdapter.getValue(astRoot);
- }
-
- public TextRange getOptionalTextRange() {
- return this.optionalTextRange;
- }
-
- private TextRange buildOptionalTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(OPTIONAL_ADAPTER, astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
- return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__TARGET_ENTITY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__FETCH);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter() {
- return buildOptionalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__OPTIONAL);
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
- return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__CASCADE);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, BooleanExpressionConverter.instance());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java
deleted file mode 100644
index ea957d0f2e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.MapKeyAnnotation;
-
-/**
- * <code>javax.persistence.MapKey</code>
- */
-public final class SourceMapKeyAnnotation
- extends SourceAnnotation
- implements MapKeyAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildNameAdapter();
- private final AnnotationElementAdapter<String> nameAdapter;
- private String name;
- private TextRange nameTextRange;
-
-
- public SourceMapKeyAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.nameAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, NAME_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** MapKeyAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- public TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(NAME_ADAPTER, astRoot);
- }
-
- public boolean nameTouches(int pos) {
- return this.textRangeTouches(nameTextRange, pos);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildNameAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.MAP_KEY__NAME);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java
deleted file mode 100644
index 7c16a13fdc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
-
-/**
- * javax.persistence.MappedSuperclass
- */
-public final class SourceMappedSuperclassAnnotation
- extends SourceAnnotation
- implements MappedSuperclassAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceMappedSuperclassAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
deleted file mode 100644
index 2dd9be4828..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.DiscriminatorColumn
- * <li>javax.persistence.PrimaryKeyJoinColumn
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * <li>javax.persistence.OrderColumn
- * </ul></code>
- */
-public abstract class SourceNamedColumnAnnotation
- extends SourceAnnotation
- implements NamedColumnAnnotation
-{
- private DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
- private AnnotationElementAdapter<String> nameAdapter;
- private String name;
- private TextRange nameTextRange;
-
- private DeclarationAnnotationElementAdapter<String> columnDefinitionDeclarationAdapter;
- private AnnotationElementAdapter<String> columnDefinitionAdapter;
- private String columnDefinition;
- private TextRange columnDefinitionTextRange;
-
-
- protected SourceNamedColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- protected SourceNamedColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.nameDeclarationAdapter = this.buildNameDeclarationAdapter();
- this.nameAdapter = this.buildNameAdapter();
- this.columnDefinitionDeclarationAdapter = this.buildColumnDefinitionDeclarationAdapter();
- this.columnDefinitionAdapter = this.buildColumnDefinitionAdapter();
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.columnDefinition = this.buildColumnDefinition(astRoot);
- this.columnDefinitionTextRange = this.buildColumnDefinitionTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.syncColumnDefinition(this.buildColumnDefinition(astRoot));
- this.columnDefinitionTextRange = this.buildColumnDefinitionTextRange(astRoot);
- }
-
-
- // ********** NamedColumn implementation **********
-
- public boolean isSpecified() {
- return true;
- }
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- public boolean nameTouches(int pos) {
- return this.textRangeTouches(this.nameTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return this.buildStringElementAdapter(this.getNameElementName());
- }
-
- private AnnotationElementAdapter<String> buildNameAdapter() {
- return this.buildStringElementAdapter(this.nameDeclarationAdapter);
- }
-
- protected abstract String getNameElementName();
-
- // ***** column definition
- public String getColumnDefinition() {
- return this.columnDefinition;
- }
-
- public void setColumnDefinition(String columnDefinition) {
- if (this.attributeValueHasChanged(this.columnDefinition, columnDefinition)) {
- this.columnDefinition = columnDefinition;
- this.columnDefinitionAdapter.setValue(columnDefinition);
- }
- }
-
- private void syncColumnDefinition(String astColumnDefinition) {
- String old = this.columnDefinition;
- this.columnDefinition = astColumnDefinition;
- this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, astColumnDefinition);
- }
-
- private String buildColumnDefinition(CompilationUnit astRoot) {
- return this.columnDefinitionAdapter.getValue(astRoot);
- }
-
- public TextRange getColumnDefinitionTextRange() {
- return this.columnDefinitionTextRange;
- }
-
- private TextRange buildColumnDefinitionTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.columnDefinitionDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildColumnDefinitionDeclarationAdapter() {
- return this.buildStringElementAdapter(this.getColumnDefinitionElementName());
- }
-
- private AnnotationElementAdapter<String> buildColumnDefinitionAdapter() {
- return this.buildStringElementAdapter(this.columnDefinitionDeclarationAdapter);
- }
-
- protected abstract String getColumnDefinitionElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null) &&
- (this.columnDefinition == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
deleted file mode 100644
index 7d1aef6b1d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * <code>javax.persistence.NamedNativeQuery</code>
- */
-public final class SourceNamedNativeQueryAnnotation
- extends SourceQueryAnnotation
- implements NamedNativeQueryAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.NAMED_NATIVE_QUERIES);
-
- private DeclarationAnnotationElementAdapter<String> resultClassDeclarationAdapter;
- private AnnotationElementAdapter<String> resultClassAdapter;
- private String resultClass;
- private TextRange resultClassTextRange;
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdClassAnnotation#fullyQualifiedClassName
- */
- private String fullyQualifiedResultClassName;
- // we need a flag since the f-q name can be null
- private boolean fqResultClassNameStale = true;
-
- private DeclarationAnnotationElementAdapter<String> resultSetMappingDeclarationAdapter;
- private AnnotationElementAdapter<String> resultSetMappingAdapter;
- private String resultSetMapping;
- private TextRange resultSetMappingTextRange;
-
- public static SourceNamedNativeQueryAnnotation buildSourceNamedNativeQueryAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildNamedNativeQueryDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildNamedNativeQueryAnnotationAdapter(element, idaa);
- return new SourceNamedNativeQueryAnnotation(
- parent,
- element,
- idaa,
- iaa);
- }
-
- private SourceNamedNativeQueryAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter daa,
- IndexedAnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.resultClassDeclarationAdapter = this.buildResultClassDeclarationAdapter();
- this.resultClassAdapter = this.buildResultClassAdapter();
- this.resultSetMappingDeclarationAdapter = this.buildResultSetMappingAdapter(daa);
- this.resultSetMappingAdapter = this.buildResultSetMappingAdapter();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
-
- this.resultClass = this.buildResultClass(astRoot);
- this.resultClassTextRange = this.buildResultClassTextRange(astRoot);
-
- this.resultSetMapping = this.buildResultSetMapping(astRoot);
- this.resultSetMappingTextRange = this.buildResultSetMappingTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
-
- this.syncResultClass(this.buildResultClass(astRoot));
- this.resultClassTextRange = this.buildResultClassTextRange(astRoot);
-
- this.syncResultSetMapping(this.buildResultSetMapping(astRoot));
- this.resultSetMappingTextRange = this.buildResultSetMappingTextRange(astRoot);
- }
-
-
- // ********** AbstractBaseNamedQueryAnnotation implementation **********
-
- @Override
- String getNameElementName() {
- return JPA.NAMED_NATIVE_QUERY__NAME;
- }
-
- @Override
- String getQueryElementName() {
- return JPA.NAMED_NATIVE_QUERY__QUERY;
- }
-
- @Override
- String getHintsElementName() {
- return JPA.NAMED_NATIVE_QUERY__HINTS;
- }
-
- @Override
- QueryHintAnnotation buildHint(int index) {
- return SourceQueryHintAnnotation.buildNamedNativeQueryQueryHint(this, this.annotatedElement, this.daa, index);
- }
-
-
- // ********** NamedNativeQueryAnnotation implementation **********
-
- // ***** result class
- public String getResultClass() {
- return this.resultClass;
- }
-
- public void setResultClass(String resultClass) {
- if (this.attributeValueHasChanged(this.resultClass, resultClass)) {
- this.resultClass = resultClass;
- this.fqResultClassNameStale = true;
- this.resultClassAdapter.setValue(resultClass);
- }
- }
-
- private void syncResultClass(String astResultClass) {
- if (this.attributeValueHasChanged(this.resultClass, astResultClass)) {
- this.syncResultClass_(astResultClass);
- }
- }
-
- private void syncResultClass_(String astResultClass) {
- String old = this.resultClass;
- this.resultClass = astResultClass;
- this.fqResultClassNameStale = true;
- this.firePropertyChanged(RESULT_CLASS_PROPERTY, old, astResultClass);
- }
-
- private String buildResultClass(CompilationUnit astRoot) {
- return this.resultClassAdapter.getValue(astRoot);
- }
-
- public TextRange getResultClassTextRange() {
- return this.resultClassTextRange;
- }
-
- private TextRange buildResultClassTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.resultClassDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildResultClassDeclarationAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String>(this.daa, JPA.NAMED_NATIVE_QUERY__RESULT_CLASS, SimpleTypeStringExpressionConverter.instance());
- }
-
- private AnnotationElementAdapter<String> buildResultClassAdapter() {
- return this.buildStringElementAdapter(this.resultClassDeclarationAdapter);
- }
-
- // ***** fully-qualified result class name
- public String getFullyQualifiedResultClassName() {
- if (this.fqResultClassNameStale) {
- this.fullyQualifiedResultClassName = this.buildFullyQualifiedResultClassName();
- this.fqResultClassNameStale = false;
- }
- return this.fullyQualifiedResultClassName;
- }
-
- private String buildFullyQualifiedResultClassName() {
- return (this.resultClass == null) ? null : this.buildFullyQualifiedResultClassName_();
- }
-
- private String buildFullyQualifiedResultClassName_() {
- return ASTTools.resolveFullyQualifiedName(this.resultClassAdapter.getExpression(this.buildASTRoot()));
- }
-
- // ***** result set mapping
- public String getResultSetMapping() {
- return this.resultSetMapping;
- }
-
- public void setResultSetMapping(String resultSetMapping) {
- if (this.attributeValueHasChanged(this.resultSetMapping, resultSetMapping)) {
- this.resultSetMapping = resultSetMapping;
- this.resultSetMappingAdapter.setValue(resultSetMapping);
- }
- }
-
- private void syncResultSetMapping(String astResultSetMapping) {
- String old = this.resultSetMapping;
- this.resultSetMapping = astResultSetMapping;
- this.firePropertyChanged(RESULT_SET_MAPPING_PROPERTY, old, astResultSetMapping);
- }
-
- private String buildResultSetMapping(CompilationUnit astRoot) {
- return this.resultSetMappingAdapter.getValue(astRoot);
- }
-
- public TextRange getResultSetMappingTextRange() {
- return this.resultSetMappingTextRange;
- }
-
- private TextRange buildResultSetMappingTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.resultSetMappingDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildResultSetMappingAdapter(DeclarationAnnotationAdapter daAdapter) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daAdapter, JPA.NAMED_NATIVE_QUERY__RESULT_SET_MAPPING);
- }
-
- private AnnotationElementAdapter<String> buildResultSetMappingAdapter() {
- return this.buildStringElementAdapter(this.resultSetMappingDeclarationAdapter);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.resultClass == null) &&
- (this.resultSetMapping == null);
- }
-
- // ********** static methods **********
-
- private static IndexedAnnotationAdapter buildNamedNativeQueryAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- private static IndexedDeclarationAnnotationAdapter buildNamedNativeQueryDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
deleted file mode 100644
index 6dc5549eda..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * <code>javax.persistence.NamedQuery</code>
- */
-public abstract class SourceNamedQueryAnnotation
- extends SourceQueryAnnotation
- implements NamedQueryAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.NAMED_QUERIES);
-
-
- protected SourceNamedQueryAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- }
-
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** AbstractBaseNamedQueryAnnotation implementation **********
-
- @Override
- String getNameElementName() {
- return JPA.NAMED_QUERY__NAME;
- }
-
- @Override
- String getQueryElementName() {
- return JPA.NAMED_QUERY__QUERY;
- }
-
- @Override
- String getHintsElementName() {
- return JPA.NAMED_QUERY__HINTS;
- }
-
- @Override
- QueryHintAnnotation buildHint(int index) {
- return SourceQueryHintAnnotation.buildNamedQueryQueryHint(this, this.annotatedElement, this.daa, index);
- }
-
- protected static IndexedAnnotationAdapter buildNamedQueryAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- protected static IndexedDeclarationAnnotationAdapter buildNamedQueryDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java
deleted file mode 100644
index 593f4ffcfc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.BooleanExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OneToMany2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.OneToMany</code>
- */
-public final class SourceOneToManyAnnotation
- extends SourceRelationshipMappingAnnotation
- implements OneToMany2_0Annotation
-{
- protected static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildMappedByAdapter();
- private final AnnotationElementAdapter<String> mappedByAdapter;
- private String mappedBy;
- private TextRange mappedByTextRange;
-
- //added in JPA2.0
- private static final DeclarationAnnotationElementAdapter<Boolean> ORPHAN_REMOVAL_ADAPTER = buildOrphanRemovalAdapter();
- private final AnnotationElementAdapter<Boolean> orphanRemovalAdapter;
- private Boolean orphanRemoval;
- private TextRange orphanRemovalTextRange;
-
- public SourceOneToManyAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
- this.orphanRemovalAdapter = this.buildBooleanAnnotationElementAdapter(ORPHAN_REMOVAL_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.mappedBy = this.buildMappedBy(astRoot);
- this.mappedByTextRange = this.buildMappedByTextRange(astRoot);
-
- this.orphanRemoval = this.buildOrphanRemoval(astRoot);
- this.orphanRemovalTextRange = this.buildOrphanRemovalTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncMappedBy(this.buildMappedBy(astRoot));
- this.mappedByTextRange = this.buildMappedByTextRange(astRoot);
-
- this.syncOrphanRemoval(this.buildOrphanRemoval(astRoot));
- this.orphanRemovalTextRange = this.buildOrphanRemovalTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.mappedBy == null) &&
- (this.orphanRemoval == null);
- }
-
-
- // ********** SourceRelationshipMappingAnnotation implementation **********
-
- @Override
- DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
-
- // ********** OwnableRelationshipMappingAnnotation implementation **********
-
- public String getMappedBy() {
- return this.mappedBy;
- }
-
- public void setMappedBy(String mappedBy) {
- if (this.attributeValueHasChanged(this.mappedBy, mappedBy)) {
- this.mappedBy = mappedBy;
- this.mappedByAdapter.setValue(mappedBy);
- }
- }
-
- private void syncMappedBy(String astMappedBy) {
- String old = this.mappedBy;
- this.mappedBy = astMappedBy;
- this.firePropertyChanged(MAPPED_BY_PROPERTY, old, astMappedBy);
- }
-
- private String buildMappedBy(CompilationUnit astRoot) {
- return this.mappedByAdapter.getValue(astRoot);
- }
-
- public TextRange getMappedByTextRange() {
- return this.mappedByTextRange;
- }
-
- private TextRange buildMappedByTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(MAPPED_BY_ADAPTER, astRoot);
- }
-
- public boolean mappedByTouches(int pos) {
- return this.textRangeTouches(mappedByTextRange, pos);
- }
-
- // ********** OneToMany2_0Annotation implementation **********
-
- public Boolean getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- public void setOrphanRemoval(Boolean orphanRemoval) {
- if (this.attributeValueHasChanged(this.orphanRemoval, orphanRemoval)) {
- this.orphanRemoval = orphanRemoval;
- this.orphanRemovalAdapter.setValue(orphanRemoval);
- }
- }
-
- private void syncOrphanRemoval(Boolean astOrphanRemoval) {
- Boolean old = this.orphanRemoval;
- this.orphanRemoval = astOrphanRemoval;
- this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, astOrphanRemoval);
- }
-
- public TextRange getOrphanRemovalTextRange() {
- return this.orphanRemovalTextRange;
- }
-
- private TextRange buildOrphanRemovalTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(ORPHAN_REMOVAL_ADAPTER, astRoot);
- }
-
- private Boolean buildOrphanRemoval(CompilationUnit astRoot) {
- return this.orphanRemovalAdapter.getValue(astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
- return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__TARGET_ENTITY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildMappedByAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__MAPPED_BY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__FETCH);
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
- return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__CASCADE);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter() {
- return buildOrphanRemovalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ONE_TO_MANY__ORPHAN_REMOVAL);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, BooleanExpressionConverter.instance());
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java
deleted file mode 100644
index 60da4fc145..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.BooleanExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OneToOne2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * <code>javax.persistence.OneToOne</code>
- */
-public final class SourceOneToOneAnnotation
- extends SourceRelationshipMappingAnnotation
- implements OneToOne2_0Annotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildMappedByAdapter();
- private final AnnotationElementAdapter<String> mappedByAdapter;
- private String mappedBy;
- private TextRange mappedByTextRange;
-
- private static final DeclarationAnnotationElementAdapter<Boolean> OPTIONAL_ADAPTER = buildOptionalAdapter();
- private final AnnotationElementAdapter<Boolean> optionalAdapter;
- private Boolean optional;
- private TextRange optionalTextRange;
-
- //added in JPA 2.0
- private static final DeclarationAnnotationElementAdapter<Boolean> ORPHAN_REMOVAL_ADAPTER = buildOrphanRemovalAdapter();
- private final AnnotationElementAdapter<Boolean> orphanRemovalAdapter;
- private Boolean orphanRemoval;
- private TextRange orphanRemovalTextRange;
-
- public SourceOneToOneAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
- this.optionalAdapter = this.buildBooleanAnnotationElementAdapter(OPTIONAL_ADAPTER);
- this.orphanRemovalAdapter = this.buildBooleanAnnotationElementAdapter(ORPHAN_REMOVAL_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
-
- this.mappedBy = this.buildMappedBy(astRoot);
- this.mappedByTextRange = this.buildMappedByTextRange(astRoot);
-
- this.optional = this.buildOptional(astRoot);
- this.optionalTextRange = this.buildOptionalTextRange(astRoot);
-
- this.orphanRemoval = this.buildOrphanRemoval(astRoot);
- this.orphanRemovalTextRange = this.buildOrphanRemovalTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
-
- this.syncMappedBy(this.buildMappedBy(astRoot));
- this.mappedByTextRange = this.buildMappedByTextRange(astRoot);
-
- this.syncOptional(this.buildOptional(astRoot));
- this.optionalTextRange = this.buildOptionalTextRange(astRoot);
-
- this.syncOrphanRemoval(this.buildOrphanRemoval(astRoot));
- this.orphanRemovalTextRange = this.buildOrphanRemovalTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.mappedBy == null) &&
- (this.optional == null) &&
- (this.orphanRemoval == null);
- }
-
-
- // ********** SourceRelationshipMappingAnnotation implementation **********
-
- @Override
- DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
-
- // ********** OneToOneAnnotation implementation **********
-
- // ***** mapped by
- public String getMappedBy() {
- return this.mappedBy;
- }
-
- public void setMappedBy(String mappedBy) {
- if (this.attributeValueHasChanged(this.mappedBy, mappedBy)) {
- this.mappedBy = mappedBy;
- this.mappedByAdapter.setValue(mappedBy);
- }
- }
-
- private void syncMappedBy(String astMappedBy) {
- String old = this.mappedBy;
- this.mappedBy = astMappedBy;
- this.firePropertyChanged(MAPPED_BY_PROPERTY, old, astMappedBy);
- }
-
- private String buildMappedBy(CompilationUnit astRoot) {
- return this.mappedByAdapter.getValue(astRoot);
- }
-
- public TextRange getMappedByTextRange() {
- return this.mappedByTextRange;
- }
-
- private TextRange buildMappedByTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(MAPPED_BY_ADAPTER, astRoot);
- }
-
- public boolean mappedByTouches(int pos) {
- return this.textRangeTouches(mappedByTextRange, pos);
- }
-
- // ***** optional
- public Boolean getOptional() {
- return this.optional;
- }
-
- public void setOptional(Boolean optional) {
- if (this.attributeValueHasChanged(this.optional, optional)) {
- this.optional = optional;
- this.optionalAdapter.setValue(optional);
- }
- }
-
- private void syncOptional(Boolean astOptional) {
- Boolean old = this.optional;
- this.optional = astOptional;
- this.firePropertyChanged(OPTIONAL_PROPERTY, old, astOptional);
- }
-
- private Boolean buildOptional(CompilationUnit astRoot) {
- return this.optionalAdapter.getValue(astRoot);
- }
-
- public TextRange getOptionalTextRange() {
- return this.optionalTextRange;
- }
-
- private TextRange buildOptionalTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(OPTIONAL_ADAPTER, astRoot);
- }
-
- // ********** OneToOne2_0Annotation implementation **********
-
- public Boolean getOrphanRemoval() {
- return this.orphanRemoval;
- }
-
- public void setOrphanRemoval(Boolean orphanRemoval) {
- if (this.attributeValueHasChanged(this.orphanRemoval, orphanRemoval)) {
- this.orphanRemoval = orphanRemoval;
- this.orphanRemovalAdapter.setValue(orphanRemoval);
- }
- }
-
- private void syncOrphanRemoval(Boolean astOrphanRemoval) {
- Boolean old = this.orphanRemoval;
- this.orphanRemoval = astOrphanRemoval;
- this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, astOrphanRemoval);
- }
-
- public TextRange getOrphanRemovalTextRange() {
- return this.orphanRemovalTextRange;
- }
-
- private TextRange buildOrphanRemovalTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(ORPHAN_REMOVAL_ADAPTER, astRoot);
- }
-
- private Boolean buildOrphanRemoval(CompilationUnit astRoot) {
- return this.orphanRemovalAdapter.getValue(astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
- return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__TARGET_ENTITY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildMappedByAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__MAPPED_BY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__FETCH);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter() {
- return buildOptionalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__OPTIONAL);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, BooleanExpressionConverter.instance());
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
- return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__CASCADE);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter() {
- return buildOrphanRemovalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ONE_TO_ONE__ORPHAN_REMOVAL);
- }
-
- private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, BooleanExpressionConverter.instance());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOrderByAnnotation.java
deleted file mode 100644
index 71035b8fb9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOrderByAnnotation.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.OrderByAnnotation;
-
-/**
- * <code>javax.persistence.OrderBy</code>
- */
-public final class SourceOrderByAnnotation
- extends SourceAnnotation
- implements OrderByAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
- private final AnnotationElementAdapter<String> valueAdapter;
- private String value;
- private TextRange valueTextRange;
-
-
- public SourceOrderByAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(element, VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.value);
- }
-
-
- // ********** OrderByAnnotation implementation **********
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_ADAPTER, astRoot);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ORDER_BY__VALUE);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOverrideAnnotation.java
deleted file mode 100644
index b406108a24..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOverrideAnnotation.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
-
-/**
- * <code><ul>
- * <li>javax.persistence.AttributeOverride
- * <li>javax.persistence.AssociationOverride
- * </ul></code>
- */
-abstract class SourceOverrideAnnotation
- extends SourceAnnotation
- implements OverrideAnnotation
-{
- DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
- AnnotationElementAdapter<String> nameAdapter;
- String name;
- TextRange nameTextRange;
-
-
- SourceOverrideAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.nameDeclarationAdapter = this.buildNameDeclarationAdapter();
- this.nameAdapter = this.buildNameAdapter();
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
- }
-
-
- // ********** OverrideAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- public boolean nameTouches(int pos) {
- return this.textRangeTouches(this.nameTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return this.buildStringElementAdapter(this.getNameElementName());
- }
-
- private AnnotationElementAdapter<String> buildNameAdapter() {
- return this.buildStringElementAdapter(this.nameDeclarationAdapter);
- }
-
- protected abstract String getNameElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
deleted file mode 100644
index 1d6ab44ab7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-
-/**
- * <code>javax.persistence.PrimaryKeyJoinColumn</code>
- */
-public final class SourcePrimaryKeyJoinColumnAnnotation
- extends SourceNamedColumnAnnotation
- implements PrimaryKeyJoinColumnAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.PRIMARY_KEY_JOIN_COLUMNS);
-
- private DeclarationAnnotationElementAdapter<String> referencedColumnNameDeclarationAdapter;
- private AnnotationElementAdapter<String> referencedColumnNameAdapter;
- private String referencedColumnName;
- private TextRange referencedColumnNameTextRange;
-
-
- public static SourcePrimaryKeyJoinColumnAnnotation buildSourcePrimaryKeyJoinColumnAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element) {
-
- return new SourcePrimaryKeyJoinColumnAnnotation(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public static SourcePrimaryKeyJoinColumnAnnotation buildSourcePrimaryKeyJoinColumnAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement element,
- int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildPrimaryKeyJoinColumnDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildPrimaryKeyJoinColumnAnnotationAdapter(element, idaa);
- return new SourcePrimaryKeyJoinColumnAnnotation(
- parent,
- element,
- idaa,
- iaa);
- }
-
- public static SourcePrimaryKeyJoinColumnAnnotation buildNestedSourcePrimaryKeyJoinColumnAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourcePrimaryKeyJoinColumnAnnotation(parent, element, idaa);
- }
-
- private SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- this(parent, element, daa, new ElementAnnotationAdapter(element, daa));
- }
-
- private SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- }
-
- private SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.referencedColumnNameDeclarationAdapter = this.buildReferencedColumnNameDeclarationAdapter();
- this.referencedColumnNameAdapter = this.buildReferencedColumnNameAdapter();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.referencedColumnName = this.buildReferencedColumnName(astRoot);
- this.referencedColumnNameTextRange = this.buildReferencedColumnNameTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncReferencedColumnName(this.buildReferencedColumnName(astRoot));
- this.referencedColumnNameTextRange = this.buildReferencedColumnNameTextRange(astRoot);
- }
-
-
- // ********** JavaSourceNamedColumnAnnotation implementation **********
-
- @Override
- protected String getNameElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String getColumnDefinitionElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
-
- // ********** PrimaryKeyJoinColumn implementation **********
-
- // ***** referenced column name
- public String getReferencedColumnName() {
- return this.referencedColumnName;
- }
-
- public void setReferencedColumnName(String referencedColumnName) {
- if (this.attributeValueHasChanged(this.referencedColumnName, referencedColumnName)) {
- this.referencedColumnName = referencedColumnName;
- this.referencedColumnNameAdapter.setValue(referencedColumnName);
- }
- }
-
- private void syncReferencedColumnName(String astReferencedColumnName) {
- String old = this.referencedColumnName;
- this.referencedColumnName = astReferencedColumnName;
- this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, astReferencedColumnName);
- }
-
- private String buildReferencedColumnName(CompilationUnit astRoot) {
- return this.referencedColumnNameAdapter.getValue(astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.referencedColumnNameTextRange;
- }
-
- private TextRange buildReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.referencedColumnNameDeclarationAdapter, astRoot);
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- return this.textRangeTouches(this.referencedColumnNameTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildReferencedColumnNameDeclarationAdapter() {
- return this.buildStringElementAdapter(JPA.PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
- }
-
- private AnnotationElementAdapter<String> buildReferencedColumnNameAdapter() {
- return this.buildStringElementAdapter(this.referencedColumnNameDeclarationAdapter);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.referencedColumnName == null);
- }
-
- // ********** static methods **********
-
- private static IndexedAnnotationAdapter buildPrimaryKeyJoinColumnAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- private static IndexedDeclarationAnnotationAdapter buildPrimaryKeyJoinColumnDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryAnnotation.java
deleted file mode 100644
index 049c971b58..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryAnnotation.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.QueryAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * <ul>
- * <li><code>javax.persistence.NamedQuery</code>
- * <li><code>javax.persistence.NamedNativeQuery</code>
- * </ul>
- */
-abstract class SourceQueryAnnotation
- extends SourceAnnotation
- implements QueryAnnotation
-{
- DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
- AnnotationElementAdapter<String> nameAdapter;
- String name;
- TextRange nameTextRange;
-
- DeclarationAnnotationElementAdapter<String> queryDeclarationAdapter;
- AnnotationElementAdapter<String> queryAdapter;
- String query;
- TextRange queryTextRange;
-
- final QueryHintsAnnotationContainer hintsContainer = new QueryHintsAnnotationContainer();
-
-
- SourceQueryAnnotation(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- this.nameDeclarationAdapter = this.buildNameDeclarationAdapter();
- this.nameAdapter = this.buildNameAdapter();
- this.queryDeclarationAdapter = this.buildQueryDeclarationAdapter();
- this.queryAdapter = this.buildQueryAdapter();
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
- this.query = this.buildQuery(astRoot);
- this.queryTextRange = this.buildQueryTextRange(astRoot);
- this.hintsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
- this.syncQuery(this.buildQuery(astRoot));
- this.queryTextRange = this.buildQueryTextRange(astRoot);
- this.hintsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
-
- // ********** BaseNamedQueryAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, this.getNameElementName());
- }
-
- private AnnotationElementAdapter<String> buildNameAdapter() {
- return this.buildStringElementAdapter(this.nameDeclarationAdapter);
- }
-
- abstract String getNameElementName();
-
- // ***** query
- public String getQuery() {
- return this.query;
- }
-
- public void setQuery(String query) {
- if (this.attributeValueHasChanged(this.query, query)) {
- this.query = query;
- this.queryAdapter.setValue(query);
- }
- }
-
- private void syncQuery(String annotationQuery) {
- String old = this.query;
- this.query = annotationQuery;
- this.firePropertyChanged(QUERY_PROPERTY, old, annotationQuery);
- }
-
- private String buildQuery(CompilationUnit astRoot) {
- return this.queryAdapter.getValue(astRoot);
- }
-
- public TextRange getQueryTextRange() {
- return this.queryTextRange;
- }
-
- private TextRange buildQueryTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.queryDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildQueryDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, this.getQueryElementName());
- }
-
- private AnnotationElementAdapter<String> buildQueryAdapter() {
- return this.buildStringElementAdapter(this.queryDeclarationAdapter);
- }
-
- abstract String getQueryElementName();
-
- // ***** hints
-
- public ListIterable<QueryHintAnnotation> getHints() {
- return this.hintsContainer.getNestedAnnotations();
- }
-
- public int getHintsSize() {
- return this.hintsContainer.getNestedAnnotationsSize();
- }
-
- public QueryHintAnnotation hintAt(int index) {
- return this.hintsContainer.getNestedAnnotation(index);
- }
-
- public QueryHintAnnotation addHint(int index) {
- return this.hintsContainer.addNestedAnnotation(index);
- }
-
- public void moveHint(int targetIndex, int sourceIndex) {
- this.hintsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeHint(int index) {
- this.hintsContainer.removeNestedAnnotation(index);
- }
-
- abstract QueryHintAnnotation buildHint(int index);
-
- abstract String getHintsElementName();
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null) &&
- (this.query == null) &&
- this.hintsContainer.isEmpty();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** hint container **********
- /**
- * adapt the AnnotationContainer interface to the xml schema's xmlns
- */
- class QueryHintsAnnotationContainer
- extends AnnotationContainer<QueryHintAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return HINTS_LIST;
- }
- @Override
- protected String getElementName() {
- return SourceQueryAnnotation.this.getHintsElementName();
- }
- @Override
- protected String getNestedAnnotationName() {
- return QueryHintAnnotation.ANNOTATION_NAME;
- }
- @Override
- protected QueryHintAnnotation buildNestedAnnotation(int index) {
- return SourceQueryAnnotation.this.buildHint(index);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryHintAnnotation.java
deleted file mode 100644
index eceb109e4b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceQueryHintAnnotation.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
-
-/**
- * <code>javax.persistence.QueryHint</code>
- */
-public final class SourceQueryHintAnnotation
- extends SourceAnnotation
- implements QueryHintAnnotation
-{
- private DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
- private AnnotationElementAdapter<String> nameAdapter;
- private String name;
- private TextRange nameTextRange;
-
- private DeclarationAnnotationElementAdapter<String> valueDeclarationAdapter;
- private AnnotationElementAdapter<String> valueAdapter;
- private String value;
- private TextRange valueTextRange;
-
-
- static SourceQueryHintAnnotation buildNamedQueryQueryHint(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter namedQueryAdapter, int index) {
- return buildNestedSourceQueryHintAnnotation(parent, element, buildNamedQueryQueryHintAnnotationAdapter(namedQueryAdapter, index));
- }
-
- static SourceQueryHintAnnotation buildNamedNativeQueryQueryHint(JavaResourceNode parent, AnnotatedElement element, DeclarationAnnotationAdapter namedNativeQueryAdapter, int index) {
- return buildNestedSourceQueryHintAnnotation(parent, element, buildNamedNativeQueryQueryHintAnnotationAdapter(namedNativeQueryAdapter, index));
- }
-
- public static SourceQueryHintAnnotation buildNestedSourceQueryHintAnnotation(
- JavaResourceNode parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter idaa) {
-
- return new SourceQueryHintAnnotation(parent, element, idaa);
- }
-
- private SourceQueryHintAnnotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- super(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- this.nameDeclarationAdapter = this.buildNameDeclarationAdapter();
- this.nameAdapter = this.buildNameAdapter();
- this.valueDeclarationAdapter = this.buildValueDeclarationAdapter();
- this.valueAdapter = this.buildValueAdapter();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.name = this.buildName(astRoot);
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.value = this.buildValue(astRoot);
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncName(this.buildName(astRoot));
- this.nameTextRange = this.buildNameTextRange(astRoot);
-
- this.syncValue(this.buildValue(astRoot));
- this.valueTextRange = this.buildValueTextRange(astRoot);
- }
-
-
- // ********** QueryHintAnnotation implementation **********
-
- // ***** name
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- if (this.attributeValueHasChanged(this.name, name)) {
- this.name = name;
- this.nameAdapter.setValue(name);
- }
- }
-
- private void syncName(String astName) {
- String old = this.name;
- this.name = astName;
- this.firePropertyChanged(NAME_PROPERTY, old, astName);
- }
-
- private String buildName(CompilationUnit astRoot) {
- return this.nameAdapter.getValue(astRoot);
- }
-
- public TextRange getNameTextRange() {
- return this.nameTextRange;
- }
-
- private TextRange buildNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.QUERY_HINT__NAME);
- }
-
- private AnnotationElementAdapter<String> buildNameAdapter() {
- return this.buildStringElementAdapter(this.nameDeclarationAdapter);
- }
-
- // ***** value
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- if (this.attributeValueHasChanged(this.value, value)) {
- this.value = value;
- this.valueAdapter.setValue(value);
- }
- }
-
- private void syncValue(String astValue) {
- String old = this.value;
- this.value = astValue;
- this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
- }
-
- private String buildValue(CompilationUnit astRoot) {
- return this.valueAdapter.getValue(astRoot);
- }
-
- public TextRange getValueTextRange() {
- return this.valueTextRange;
- }
-
- private TextRange buildValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.valueDeclarationAdapter, astRoot);
- }
-
- private DeclarationAnnotationElementAdapter<String> buildValueDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.QUERY_HINT__VALUE);
- }
-
- private AnnotationElementAdapter<String> buildValueAdapter() {
- return this.buildStringElementAdapter(this.valueDeclarationAdapter);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.name == null) &&
- (this.value == null);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.name);
- }
-
-
- // ********** static methods **********
- private static IndexedDeclarationAnnotationAdapter buildNamedQueryQueryHintAnnotationAdapter(DeclarationAnnotationAdapter namedQueryAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(namedQueryAdapter, JPA.NAMED_QUERY__HINTS, index, ANNOTATION_NAME);
- }
-
- private static IndexedDeclarationAnnotationAdapter buildNamedNativeQueryQueryHintAnnotationAdapter(DeclarationAnnotationAdapter namedNativeQueryAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(namedNativeQueryAdapter, JPA.NAMED_NATIVE_QUERY__HINTS, index, ANNOTATION_NAME);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
deleted file mode 100644
index b7e157e262..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumArrayDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.ExpressionConverter;
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
-import org.eclipse.jpt.jpa.core.resource.java.CascadeType;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-
-/**
- * <code><ul>
- * <li>javax.persistence.ManyToMany
- * <li>javax.persistence.ManyToOne
- * <li>javax.persistence.OneToMany
- * <li>javax.persistence.OneToOne
- * </ul></code>
- */
-abstract class SourceRelationshipMappingAnnotation
- extends SourceAnnotation
- implements RelationshipMapping2_0Annotation
-{
- final DeclarationAnnotationElementAdapter<String> targetEntityDeclarationAdapter;
- final AnnotationElementAdapter<String> targetEntityAdapter;
- String targetEntity;
- TextRange targetEntityTextRange;
-
- /**
- * @see org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceIdClassAnnotation#fullyQualifiedClassName
- */
- private String fullyQualifiedTargetEntityClassName;
- // we need a flag since the f-q name can be null
- private boolean fqTargetEntityClassNameStale = true;
-
- final DeclarationAnnotationElementAdapter<String> fetchDeclarationAdapter;
- final AnnotationElementAdapter<String> fetchAdapter;
- FetchType fetch;
- TextRange fetchTextRange;
-
- final DeclarationAnnotationElementAdapter<String[]> cascadeDeclarationAdapter;
- final AnnotationElementAdapter<String[]> cascadeAdapter;
- CascadeType[] cascadeTypes = EMPTY_CASCADE_TYPE_ARRAY; // this should never be null
- TextRange cascadeTextRange;
- private static final CascadeType[] EMPTY_CASCADE_TYPE_ARRAY = new CascadeType[0];
-
-
- SourceRelationshipMappingAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, DeclarationAnnotationAdapter daa) {
- super(parent, element, daa);
- this.targetEntityDeclarationAdapter = this.getTargetEntityAdapter();
- this.targetEntityAdapter = this.buildAnnotationElementAdapter(this.targetEntityDeclarationAdapter);
- this.fetchDeclarationAdapter = this.getFetchAdapter();
- this.fetchAdapter = this.buildAnnotationElementAdapter(this.fetchDeclarationAdapter);
- this.cascadeDeclarationAdapter = this.getCascadeAdapter();
- this.cascadeAdapter = new AnnotatedElementAnnotationElementAdapter<String[]>(element, this.cascadeDeclarationAdapter);
- }
-
- protected AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
- }
-
- protected AnnotationElementAdapter<Boolean> buildBooleanAnnotationElementAdapter(DeclarationAnnotationElementAdapter<Boolean> daea) {
- return new AnnotatedElementAnnotationElementAdapter<Boolean>(this.annotatedElement, daea);
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.targetEntity = this.buildTargetEntity(astRoot);
- this.targetEntityTextRange = this.buildTargetEntityTextRange(astRoot);
-
- this.fetch = this.buildFetch(astRoot);
- this.fetchTextRange = this.buildFetchTextRange(astRoot);
-
- this.cascadeTypes = this.buildCascadeTypes(astRoot);
- this.cascadeTextRange = this.buildCascadeTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncFetch(this.buildFetch(astRoot));
- this.targetEntityTextRange = this.buildTargetEntityTextRange(astRoot);
-
- this.syncTargetEntity(this.buildTargetEntity(astRoot));
- this.fetchTextRange = this.buildFetchTextRange(astRoot);
-
- this.syncCascadeTypes(this.buildCascadeTypes(astRoot));
- this.cascadeTextRange = this.buildCascadeTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.targetEntity == null) &&
- (this.fetch == null) &&
- (this.cascadeTypes.length == 0);
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.targetEntity);
- }
-
-
- // ********** RelationshipMappingAnnotation implementation **********
-
- // ***** target entity
- public String getTargetEntity() {
- return this.targetEntity;
- }
-
- public void setTargetEntity(String targetEntity) {
- if (this.attributeValueHasChanged(this.targetEntity, targetEntity)) {
- this.targetEntity = targetEntity;
- this.fqTargetEntityClassNameStale = true;
- this.targetEntityAdapter.setValue(targetEntity);
- }
- }
-
- private void syncTargetEntity(String astTargetEntity) {
- if (this.attributeValueHasChanged(this.targetEntity, astTargetEntity)) {
- this.syncTargetEntity_(astTargetEntity);
- }
- }
-
- private void syncTargetEntity_(String astTargetEntity) {
- String old = this.targetEntity;
- this.targetEntity = astTargetEntity;
- this.fqTargetEntityClassNameStale = true;
- this.firePropertyChanged(TARGET_ENTITY_PROPERTY, old, astTargetEntity);
- }
-
- private String buildTargetEntity(CompilationUnit astRoot) {
- return this.targetEntityAdapter.getValue(astRoot);
- }
-
- public TextRange getTargetEntityTextRange() {
- return this.targetEntityTextRange;
- }
-
- private TextRange buildTargetEntityTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.targetEntityDeclarationAdapter, astRoot);
- }
-
- /**
- * return the Java adapter's 'targetEntity' element adapter config
- */
- abstract DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter();
-
- // ***** fully-qualified target entity class name
- public String getFullyQualifiedTargetEntityClassName() {
- if (this.fqTargetEntityClassNameStale) {
- this.fullyQualifiedTargetEntityClassName = this.buildFullyQualifiedTargetEntityClassName();
- this.fqTargetEntityClassNameStale = false;
- }
- return this.fullyQualifiedTargetEntityClassName;
- }
-
- private String buildFullyQualifiedTargetEntityClassName() {
- return (this.targetEntity == null) ? null : this.buildFullyQualifiedTargetEntityClassName_();
- }
-
- private String buildFullyQualifiedTargetEntityClassName_() {
- return ASTTools.resolveFullyQualifiedName(this.targetEntityAdapter.getExpression(this.buildASTRoot()));
- }
-
- // ***** fetch
- public FetchType getFetch() {
- return this.fetch;
- }
-
- public void setFetch(FetchType fetch) {
- if (this.attributeValueHasChanged(this.fetch, fetch)) {
- this.fetch = fetch;
- this.fetchAdapter.setValue(FetchType.toJavaAnnotationValue(fetch));
- }
- }
-
- private void syncFetch(FetchType astFetch) {
- FetchType old = this.fetch;
- this.fetch = astFetch;
- this.firePropertyChanged(FETCH_PROPERTY, old, astFetch);
- }
-
- private FetchType buildFetch(CompilationUnit astRoot) {
- return FetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot));
- }
-
- public TextRange getFetchTextRange() {
- return this.fetchTextRange;
- }
-
- private TextRange buildFetchTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.fetchDeclarationAdapter, astRoot);
- }
-
- /**
- * return the Java adapter's 'fetch' element adapter config
- */
- abstract DeclarationAnnotationElementAdapter<String> getFetchAdapter();
-
- // ***** cascade types
- /**
- * pre-condition: state of 'cascadeTypes' is to change
- */
- private void setCascadeType(CascadeType cascadeType, boolean set) {
- this.setCascadeTypes(set ?
- ArrayTools.add(this.cascadeTypes, cascadeType) :
- ArrayTools.remove(this.cascadeTypes, cascadeType)
- );
- }
-
- /**
- * pre-condition: state of 'cascadeTypes' is to change
- */
- private void setCascadeTypes(CascadeType[] cascadeTypes) {
- this.cascadeTypes = cascadeTypes;
- this.cascadeAdapter.setValue(CascadeType.toJavaAnnotationValues(cascadeTypes));
- }
-
- private void syncCascadeTypes(CascadeType[] astCascadeTypes) {
- CascadeType[] old = this.cascadeTypes;
- this.cascadeTypes = astCascadeTypes;
- this.syncCascadeAll(old);
- this.syncCascadeMerge(old);
- this.syncCascadePersist(old);
- this.syncCascadeRefresh(old);
- this.syncCascadeRemove(old);
- this.syncCascadeDetach(old);
- }
-
- private CascadeType[] buildCascadeTypes(CompilationUnit astRoot) {
- return CascadeType.fromJavaAnnotationValues(this.cascadeAdapter.getValue(astRoot));
- }
-
- private boolean cascadeTypeIsTrue(CascadeType cascadeType) {
- return ArrayTools.contains(this.cascadeTypes, cascadeType);
- }
-
- public TextRange getCascadeTextRange() {
- return this.cascadeTextRange;
- }
-
- private TextRange buildCascadeTextRange(CompilationUnit astRoot) {
- return getElementTextRange(this.cascadeDeclarationAdapter, astRoot);
- }
-
- /**
- * return the Java adapter's 'cascade' element adapter config
- */
- abstract DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter();
-
- // ***** cascade all
- public boolean isCascadeAll() {
- return this.cascadeTypeIsTrue(CascadeType.ALL);
- }
-
- public void setCascadeAll(boolean cascadeAll) {
- if (this.isCascadeAll() != cascadeAll) {
- this.setCascadeType(CascadeType.ALL, cascadeAll);
- }
- }
-
- private void syncCascadeAll(CascadeType[] oldCascadeTypes) {
- boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.ALL);
- this.firePropertyChanged(CASCADE_ALL_PROPERTY, old, this.isCascadeAll());
- }
-
- // ***** cascade persist
- public boolean isCascadePersist() {
- return this.cascadeTypeIsTrue(CascadeType.PERSIST);
- }
-
- public void setCascadePersist(boolean cascadePersist) {
- if (this.isCascadePersist() != cascadePersist) {
- this.setCascadeType(CascadeType.PERSIST, cascadePersist);
- }
- }
-
- private void syncCascadePersist(CascadeType[] oldCascadeTypes) {
- boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.PERSIST);
- this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, this.isCascadePersist());
- }
-
- // ***** cascade merge
- public boolean isCascadeMerge() {
- return this.cascadeTypeIsTrue(CascadeType.MERGE);
- }
-
- public void setCascadeMerge(boolean cascadeMerge) {
- if (this.isCascadeMerge() != cascadeMerge) {
- this.setCascadeType(CascadeType.MERGE, cascadeMerge);
- }
- }
-
- private void syncCascadeMerge(CascadeType[] oldCascadeTypes) {
- boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.MERGE);
- this.firePropertyChanged(CASCADE_MERGE_PROPERTY, old, this.isCascadeMerge());
- }
-
- // ***** cascade remove
- public boolean isCascadeRemove() {
- return this.cascadeTypeIsTrue(CascadeType.REMOVE);
- }
-
- public void setCascadeRemove(boolean cascadeRemove) {
- if (this.isCascadeRemove() != cascadeRemove) {
- this.setCascadeType(CascadeType.REMOVE, cascadeRemove);
- }
- }
-
- private void syncCascadeRemove(CascadeType[] oldCascadeTypes) {
- boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.REMOVE);
- this.firePropertyChanged(CASCADE_REMOVE_PROPERTY, old, this.isCascadeRemove());
- }
-
- // ***** cascade refresh
- public boolean isCascadeRefresh() {
- return this.cascadeTypeIsTrue(CascadeType.REFRESH);
- }
-
- public void setCascadeRefresh(boolean cascadeRefresh) {
- if (this.isCascadeRefresh() != cascadeRefresh) {
- this.setCascadeType(CascadeType.REFRESH, cascadeRefresh);
- }
- }
-
- private void syncCascadeRefresh(CascadeType[] oldCascadeTypes) {
- boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.REFRESH);
- this.firePropertyChanged(CASCADE_REFRESH_PROPERTY, old, this.isCascadeRefresh());
- }
-
- // ***** cascade detach - JPA 2.0
- public boolean isCascadeDetach() {
- return this.cascadeTypeIsTrue(CascadeType.DETACH);
- }
-
- public void setCascadeDetach(boolean cascadeDetach) {
- if (this.isCascadeDetach() != cascadeDetach) {
- this.setCascadeType(CascadeType.DETACH, cascadeDetach);
- }
- }
-
- private void syncCascadeDetach(CascadeType[] oldCascadeTypes) {
- boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.DETACH);
- this.firePropertyChanged(CASCADE_DETACH_PROPERTY, old, this.isCascadeDetach());
- }
-
- // ********** static methods **********
-
- static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- // TODO what about QualifiedType?
- return buildAnnotationElementAdapter(annotationAdapter, elementName, SimpleTypeStringExpressionConverter.instance());
- }
-
- static DeclarationAnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String> converter) {
- return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, converter);
- }
-
- static DeclarationAnnotationElementAdapter<String> buildFetchAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new EnumDeclarationAnnotationElementAdapter(annotationAdapter, elementName);
- }
-
- static DeclarationAnnotationElementAdapter<String[]> buildEnumArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new EnumArrayDeclarationAnnotationElementAdapter(annotationAdapter, elementName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
deleted file mode 100644
index 5f808f2287..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
-
-/**
- * <code>javax.persistence.SecondaryTable</code>
- */
-public final class SourceSecondaryTableAnnotation
- extends SourceBaseTableAnnotation
- implements SecondaryTableAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private static final DeclarationAnnotationAdapter CONTAINER_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.SECONDARY_TABLES);
-
- private final PkJoinColumnsAnnotationContainer pkJoinColumnsContainer = new PkJoinColumnsAnnotationContainer();
-
- public static SourceSecondaryTableAnnotation buildSourceSecondaryTableAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, int index) {
- IndexedDeclarationAnnotationAdapter idaa = buildSecondaryTableDeclarationAnnotationAdapter(index);
- IndexedAnnotationAdapter iaa = buildSecondaryTableAnnotationAdapter(element, idaa);
- return new SourceSecondaryTableAnnotation(
- parent,
- element,
- idaa,
- iaa);
- }
-
- private SourceSecondaryTableAnnotation(
- JavaResourceAnnotatedElement parent,
- AnnotatedElement element,
- IndexedDeclarationAnnotationAdapter daa,
- IndexedAnnotationAdapter annotationAdapter) {
- super(parent, element, daa, annotationAdapter);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.pkJoinColumnsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.pkJoinColumnsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
-
- // ********** SourceBaseTableAnnotation implementation **********
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.SECONDARY_TABLE__NAME);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildSchemaDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.SECONDARY_TABLE__SCHEMA);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildCatalogDeclarationAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, JPA.SECONDARY_TABLE__CATALOG);
- }
-
- @Override
- protected String getUniqueConstraintsElementName() {
- return JPA.SECONDARY_TABLE__UNIQUE_CONSTRAINTS;
- }
-
-
- // ************* SecondaryTableAnnotation implementation *******************
-
- // ***** pk join columns
-
- public ListIterable<PrimaryKeyJoinColumnAnnotation> getPkJoinColumns() {
- return this.pkJoinColumnsContainer.getNestedAnnotations();
- }
-
- public int getPkJoinColumnsSize() {
- return this.pkJoinColumnsContainer.getNestedAnnotationsSize();
- }
-
- public PrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index) {
- return this.pkJoinColumnsContainer.getNestedAnnotation(index);
- }
-
- public PrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index) {
- return this.pkJoinColumnsContainer.addNestedAnnotation(index);
- }
-
- /* CU private */ PrimaryKeyJoinColumnAnnotation buildPkJoinColumn(int index) {
- return SourcePrimaryKeyJoinColumnAnnotation.buildNestedSourcePrimaryKeyJoinColumnAnnotation(
- this, this.annotatedElement, this.buildPkJoinColumnIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildPkJoinColumnIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS, index, JPA.PRIMARY_KEY_JOIN_COLUMN);
- }
-
- public void movePkJoinColumn(int targetIndex, int sourceIndex) {
- this.pkJoinColumnsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removePkJoinColumn(int index) {
- this.pkJoinColumnsContainer.removeNestedAnnotation(index);
- }
-
- /**
- * adapt the AnnotationContainer interface to the collection table's join columns
- */
- class PkJoinColumnsAnnotationContainer
- extends AnnotationContainer<PrimaryKeyJoinColumnAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return PK_JOIN_COLUMNS_LIST;
- }
- @Override
- protected String getElementName() {
- return JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS;
- }
- @Override
- protected String getNestedAnnotationName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN;
- }
- @Override
- protected PrimaryKeyJoinColumnAnnotation buildNestedAnnotation(int index) {
- return SourceSecondaryTableAnnotation.this.buildPkJoinColumn(index);
- }
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- this.pkJoinColumnsContainer.isEmpty();
- }
-
- // ********** static methods **********
-
- private static IndexedAnnotationAdapter buildSecondaryTableAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
- return new ElementIndexedAnnotationAdapter(annotatedElement, idaa);
- }
-
- private static IndexedDeclarationAnnotationAdapter buildSecondaryTableDeclarationAnnotationAdapter(int index) {
- IndexedDeclarationAnnotationAdapter idaa =
- new CombinationIndexedDeclarationAnnotationAdapter(
- DECLARATION_ANNOTATION_ADAPTER,
- CONTAINER_DECLARATION_ANNOTATION_ADAPTER,
- index,
- ANNOTATION_NAME);
- return idaa;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java
deleted file mode 100644
index 2c5899cb03..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * <code>javax.persistence.SequenceGenerator</code>
- */
-public abstract class SourceSequenceGeneratorAnnotation
- extends SourceGeneratorAnnotation
- implements SequenceGeneratorAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildAdapter(JPA.SEQUENCE_GENERATOR__NAME);
-
- private static final DeclarationAnnotationElementAdapter<Integer> INITIAL_VALUE_ADAPTER = buildIntegerAdapter(JPA.SEQUENCE_GENERATOR__INITIAL_VALUE);
-
- private static final DeclarationAnnotationElementAdapter<Integer> ALLOCATION_SIZE_ADAPTER = buildIntegerAdapter(JPA.SEQUENCE_GENERATOR__ALLOCATION_SIZE);
-
- private static final DeclarationAnnotationElementAdapter<String> SEQUENCE_NAME_ADAPTER = buildAdapter(JPA.SEQUENCE_GENERATOR__SEQUENCE_NAME);
- private final AnnotationElementAdapter<String> sequenceNameAdapter;
- private String sequenceName;
- private TextRange sequenceNameTextRange;
-
-
- protected SourceSequenceGeneratorAnnotation(JavaResourceNode parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.sequenceNameAdapter = this.buildAdapter(SEQUENCE_NAME_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
- this.sequenceName = this.buildSequenceName(astRoot);
- this.sequenceNameTextRange = this.buildSequenceNameTextRange(astRoot);
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
- this.syncSequenceName(this.buildSequenceName(astRoot));
- this.sequenceNameTextRange = this.buildSequenceNameTextRange(astRoot);
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.sequenceName == null);
- }
-
-
- // ********** AbstractGeneratorAnnotation implementation **********
-
- @Override
- DeclarationAnnotationElementAdapter<String> getNameAdapter() {
- return NAME_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<Integer> getInitialValueAdapter() {
- return INITIAL_VALUE_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<Integer> getAllocationSizeAdapter() {
- return ALLOCATION_SIZE_ADAPTER;
- }
-
-
- // ********** SequenceGeneratorAnnotation implementation **********
-
- // ***** sequence name
- public String getSequenceName() {
- return this.sequenceName;
- }
-
- public void setSequenceName(String sequenceName) {
- if (this.attributeValueHasChanged(this.sequenceName, sequenceName)) {
- this.sequenceName = sequenceName;
- this.sequenceNameAdapter.setValue(sequenceName);
- }
- }
-
- public void syncSequenceName(String astSequenceName) {
- String old = this.sequenceName;
- this.sequenceName = astSequenceName;
- this.firePropertyChanged(SEQUENCE_NAME_PROPERTY, old, astSequenceName);
- }
-
- private String buildSequenceName(CompilationUnit astRoot) {
- return this.sequenceNameAdapter.getValue(astRoot);
- }
-
- public TextRange getSequenceNameTextRange() {
- return this.sequenceNameTextRange;
- }
-
- private TextRange buildSequenceNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(SEQUENCE_NAME_ADAPTER, astRoot);
- }
-
- public boolean sequenceNameTouches(int pos) {
- return this.textRangeTouches(this.sequenceNameTextRange, pos);
- }
-
-
- // ********** static methods **********
-
- protected static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
- return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
- protected static DeclarationAnnotationElementAdapter<Integer> buildIntegerAdapter(String elementName) {
- return buildIntegerAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableAnnotation.java
deleted file mode 100644
index 152305ae11..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableAnnotation.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.TableAnnotation;
-
-/**
- * <code>javax.persistence.Table</code>
- */
-public final class SourceTableAnnotation
- extends SourceBaseTableAnnotation
- implements TableAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__SCHEMA);
-
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__CATALOG);
-
-
- public SourceTableAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
-
- // ********** SourceBaseTableAnnotation implementation **********
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildNameDeclarationAdapter() {
- return NAME_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildSchemaDeclarationAdapter() {
- return SCHEMA_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> buildCatalogDeclarationAdapter() {
- return CATALOG_ADAPTER;
- }
-
- @Override
- protected String getUniqueConstraintsElementName() {
- return JPA.TABLE__UNIQUE_CONSTRAINTS;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
deleted file mode 100644
index 7f5b788053..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <code>javax.persistence.TableGenerator</code>
- */
-public final class SourceTableGeneratorAnnotation
- extends SourceGeneratorAnnotation
- implements TableGeneratorAnnotation
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__NAME);
-
- private static final DeclarationAnnotationElementAdapter<Integer> INITIAL_VALUE_ADAPTER = buildIntegerAdapter(JPA.TABLE_GENERATOR__INITIAL_VALUE);
-
- private static final DeclarationAnnotationElementAdapter<Integer> ALLOCATION_SIZE_ADAPTER = buildIntegerAdapter(JPA.TABLE_GENERATOR__ALLOCATION_SIZE);
-
- private static final DeclarationAnnotationElementAdapter<String> TABLE_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__TABLE);
- private final AnnotationElementAdapter<String> tableAdapter;
- private String table;
- private TextRange tableTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__SCHEMA);
- private final AnnotationElementAdapter<String> schemaAdapter;
- private String schema;
- private TextRange schemaTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__CATALOG);
- private final AnnotationElementAdapter<String> catalogAdapter;
- private String catalog;
- private TextRange catalogTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> PK_COLUMN_NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__PK_COLUMN_NAME);
- private final AnnotationElementAdapter<String> pkColumnNameAdapter;
- private String pkColumnName;
- private TextRange pkColumnNameTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_COLUMN_NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__VALUE_COLUMN_NAME);
- private final AnnotationElementAdapter<String> valueColumnNameAdapter;
- private String valueColumnName;
- private TextRange valueColumnNameTextRange;
-
- private static final DeclarationAnnotationElementAdapter<String> PK_COLUMN_VALUE_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__PK_COLUMN_VALUE);
- private final AnnotationElementAdapter<String> pkColumnValueAdapter;
- private String pkColumnValue;
- private TextRange pkColumnValueTextRange;
-
- private final UniqueConstraintsAnnotationContainer uniqueConstraintsContainer = new UniqueConstraintsAnnotationContainer();
-
-
- public SourceTableGeneratorAnnotation(JavaResourceNode parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- this.tableAdapter = this.buildAdapter(TABLE_ADAPTER);
- this.catalogAdapter = this.buildAdapter(CATALOG_ADAPTER);
- this.schemaAdapter = this.buildAdapter(SCHEMA_ADAPTER);
- this.pkColumnNameAdapter = this.buildAdapter(PK_COLUMN_NAME_ADAPTER);
- this.valueColumnNameAdapter = this.buildAdapter(VALUE_COLUMN_NAME_ADAPTER);
- this.pkColumnValueAdapter = this.buildAdapter(PK_COLUMN_VALUE_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- public void initialize(CompilationUnit astRoot) {
- super.initialize(astRoot);
-
- this.table = this.buildTable(astRoot);
- this.tableTextRange = this.buildTableTextRange(astRoot);
-
- this.schema = this.buildSchema(astRoot);
- this.schemaTextRange = this.buildSchemaTextRange(astRoot);
-
- this.catalog = this.buildCatalog(astRoot);
- this.catalogTextRange = this.buildCatalogTextRange(astRoot);
-
- this.pkColumnName = this.buildPkColumnName(astRoot);
- this.pkColumnNameTextRange = this.buildPkColumnNameTextRange(astRoot);
-
- this.valueColumnName = this.buildValueColumnName(astRoot);
- this.valueColumnNameTextRange = this.buildValueColumnNameTextRange(astRoot);
-
- this.pkColumnValue = this.buildPkColumnValue(astRoot);
- this.pkColumnValueTextRange = this.buildPkColumnValueTextRange(astRoot);
-
- this.uniqueConstraintsContainer.initializeFromContainerAnnotation(this.getAstAnnotation(astRoot));
- }
-
- @Override
- public void synchronizeWith(CompilationUnit astRoot) {
- super.synchronizeWith(astRoot);
-
- this.syncTable(this.buildTable(astRoot));
- this.tableTextRange = this.buildTableTextRange(astRoot);
-
- this.syncSchema(this.buildSchema(astRoot));
- this.schemaTextRange = this.buildSchemaTextRange(astRoot);
-
- this.syncCatalog(this.buildCatalog(astRoot));
- this.catalogTextRange = this.buildCatalogTextRange(astRoot);
-
- this.syncPkColumnName(this.buildPkColumnName(astRoot));
- this.pkColumnNameTextRange = this.buildPkColumnNameTextRange(astRoot);
-
- this.syncValueColumnName(this.buildValueColumnName(astRoot));
- this.valueColumnNameTextRange = this.buildValueColumnNameTextRange(astRoot);
-
- this.syncPkColumnValue(this.buildPkColumnValue(astRoot));
- this.pkColumnValueTextRange = this.buildPkColumnValueTextRange(astRoot);
-
- this.uniqueConstraintsContainer.synchronize(this.getAstAnnotation(astRoot));
- }
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- (this.table == null) &&
- (this.schema == null) &&
- (this.catalog == null) &&
- (this.pkColumnName == null) &&
- (this.valueColumnName == null) &&
- (this.pkColumnValue == null);
- }
-
-
- // ********** AbstractGeneratorAnnotation implementation **********
-
- @Override
- DeclarationAnnotationElementAdapter<String> getNameAdapter() {
- return NAME_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<Integer> getInitialValueAdapter() {
- return INITIAL_VALUE_ADAPTER;
- }
-
- @Override
- DeclarationAnnotationElementAdapter<Integer> getAllocationSizeAdapter() {
- return ALLOCATION_SIZE_ADAPTER;
- }
-
-
- // ********** TableGeneratorAnnotation implementation **********
-
- // ***** table
- public String getTable() {
- return this.table;
- }
-
- public void setTable(String table) {
- if (this.attributeValueHasChanged(this.table, table)) {
- this.table = table;
- this.tableAdapter.setValue(table);
- }
- }
-
- private void syncTable(String astTable) {
- String old = this.table;
- this.table = astTable;
- this.firePropertyChanged(TABLE_PROPERTY, old, astTable);
- }
-
- private String buildTable(CompilationUnit astRoot) {
- return this.tableAdapter.getValue(astRoot);
- }
-
- public TextRange getTableTextRange() {
- return this.tableTextRange;
- }
-
- private TextRange buildTableTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(TABLE_ADAPTER, astRoot);
- }
-
- public boolean tableTouches(int pos) {
- return this.textRangeTouches(this.tableTextRange, pos);
- }
-
- // ***** schema
- public String getSchema() {
- return this.schema;
- }
-
- public void setSchema(String schema) {
- if (this.attributeValueHasChanged(this.schema, schema)) {
- this.schema = schema;
- this.schemaAdapter.setValue(schema);
- }
- }
-
- private void syncSchema(String astSchema) {
- String old = this.schema;
- this.schema = astSchema;
- this.firePropertyChanged(SCHEMA_PROPERTY, old, astSchema);
- }
-
- private String buildSchema(CompilationUnit astRoot) {
- return this.schemaAdapter.getValue(astRoot);
- }
-
- public TextRange getSchemaTextRange() {
- return this.schemaTextRange;
- }
-
- private TextRange buildSchemaTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(SCHEMA_ADAPTER, astRoot);
- }
-
- public boolean schemaTouches(int pos) {
- return this.textRangeTouches(this.schemaTextRange, pos);
- }
-
- // ***** catalog
- public String getCatalog() {
- return this.catalog;
- }
-
- public void setCatalog(String catalog) {
- if (this.attributeValueHasChanged(this.catalog, catalog)) {
- this.catalog = catalog;
- this.catalogAdapter.setValue(catalog);
- }
- }
-
- private void syncCatalog(String astCatalog) {
- String old = this.catalog;
- this.catalog = astCatalog;
- this.firePropertyChanged(CATALOG_PROPERTY, old, astCatalog);
- }
-
- private String buildCatalog(CompilationUnit astRoot) {
- return this.catalogAdapter.getValue(astRoot);
- }
-
- public TextRange getCatalogTextRange() {
- return this.catalogTextRange;
- }
-
- private TextRange buildCatalogTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(CATALOG_ADAPTER, astRoot);
- }
-
- public boolean catalogTouches(int pos) {
- return this.textRangeTouches(this.catalogTextRange, pos);
- }
-
- // ***** pk column name
- public String getPkColumnName() {
- return this.pkColumnName;
- }
-
- public void setPkColumnName(String pkColumnName) {
- if (this.attributeValueHasChanged(this.pkColumnName, pkColumnName)) {
- this.pkColumnName = pkColumnName;
- this.pkColumnNameAdapter.setValue(pkColumnName);
- }
- }
-
- private void syncPkColumnName(String astPkColumnName) {
- String old = this.pkColumnName;
- this.pkColumnName = astPkColumnName;
- this.firePropertyChanged(PK_COLUMN_NAME_PROPERTY, old, astPkColumnName);
- }
-
- private String buildPkColumnName(CompilationUnit astRoot) {
- return this.pkColumnNameAdapter.getValue(astRoot);
- }
-
- public TextRange getPkColumnNameTextRange() {
- return this.pkColumnNameTextRange;
- }
-
- private TextRange buildPkColumnNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(PK_COLUMN_NAME_ADAPTER, astRoot);
- }
-
- public boolean pkColumnNameTouches(int pos) {
- return this.textRangeTouches(this.pkColumnNameTextRange, pos);
- }
-
- // ***** value column name
- public String getValueColumnName() {
- return this.valueColumnName;
- }
-
- public void setValueColumnName(String valueColumnName) {
- if (this.attributeValueHasChanged(this.valueColumnName, valueColumnName)) {
- this.valueColumnName = valueColumnName;
- this.valueColumnNameAdapter.setValue(valueColumnName);
- }
- }
-
- private void syncValueColumnName(String astValueColumnName) {
- String old = this.valueColumnName;
- this.valueColumnName = astValueColumnName;
- this.firePropertyChanged(VALUE_COLUMN_NAME_PROPERTY, old, astValueColumnName);
- }
-
- private String buildValueColumnName(CompilationUnit astRoot) {
- return this.valueColumnNameAdapter.getValue(astRoot);
- }
-
- public TextRange getValueColumnNameTextRange() {
- return this.valueColumnNameTextRange;
- }
-
- private TextRange buildValueColumnNameTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(VALUE_COLUMN_NAME_ADAPTER, astRoot);
- }
-
- public boolean valueColumnNameTouches(int pos) {
- return this.textRangeTouches(this.valueColumnNameTextRange, pos);
- }
-
- // ***** pk column value
- public String getPkColumnValue() {
- return this.pkColumnValue;
- }
-
- public void setPkColumnValue(String pkColumnValue) {
- if (this.attributeValueHasChanged(this.pkColumnValue, pkColumnValue)) {
- this.pkColumnValue = pkColumnValue;
- this.pkColumnValueAdapter.setValue(pkColumnValue);
- }
- }
-
- private void syncPkColumnValue(String astPkColumnValue) {
- String old = this.pkColumnValue;
- this.pkColumnValue = astPkColumnValue;
- this.firePropertyChanged(PK_COLUMN_VALUE_PROPERTY, old, astPkColumnValue);
- }
-
- private String buildPkColumnValue(CompilationUnit astRoot) {
- return this.pkColumnValueAdapter.getValue(astRoot);
- }
-
- public TextRange getPkColumnValueTextRange() {
- return this.pkColumnValueTextRange;
- }
-
- private TextRange buildPkColumnValueTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(PK_COLUMN_VALUE_ADAPTER, astRoot);
- }
-
- public boolean pkColumnValueTouches(int pos) {
- return this.textRangeTouches(this.pkColumnValueTextRange, pos);
- }
-
- // ***** unique constraints
-
- public ListIterable<UniqueConstraintAnnotation> getUniqueConstraints() {
- return this.uniqueConstraintsContainer.getNestedAnnotations();
- }
-
- public int getUniqueConstraintsSize() {
- return this.uniqueConstraintsContainer.getNestedAnnotationsSize();
- }
-
- public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
- return this.uniqueConstraintsContainer.getNestedAnnotation(index);
- }
-
- public UniqueConstraintAnnotation addUniqueConstraint(int index) {
- return this.uniqueConstraintsContainer.addNestedAnnotation(index);
- }
-
- /* CU private */ UniqueConstraintAnnotation buildUniqueConstraint(int index) {
- return new SourceUniqueConstraintAnnotation(
- this, this.annotatedElement, buildUniqueConstraintIndexedDeclarationAnnotationAdapter(index));
- }
-
- private IndexedDeclarationAnnotationAdapter buildUniqueConstraintIndexedDeclarationAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(
- this.daa, JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS, index, JPA.UNIQUE_CONSTRAINT);
- }
-
- public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
- this.uniqueConstraintsContainer.moveNestedAnnotation(targetIndex, sourceIndex);
- }
-
- public void removeUniqueConstraint(int index) {
- this.uniqueConstraintsContainer.removeNestedAnnotation(index);
- }
-
-
- /**
- * adapt the AnnotationContainer interface to the table's unique constraints
- */
- class UniqueConstraintsAnnotationContainer
- extends AnnotationContainer<UniqueConstraintAnnotation>
- {
- @Override
- protected String getNestedAnnotationsListName() {
- return UNIQUE_CONSTRAINTS_LIST;
- }
- @Override
- protected String getElementName() {
- return JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS;
- }
- @Override
- protected String getNestedAnnotationName() {
- return UniqueConstraintAnnotation.ANNOTATION_NAME;
- }
- @Override
- protected UniqueConstraintAnnotation buildNestedAnnotation(int index) {
- return SourceTableGeneratorAnnotation.this.buildUniqueConstraint(index);
- }
- }
-
-
-
- // ********** static methods **********
-
- private static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
- return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
- private static DeclarationAnnotationElementAdapter<Integer> buildIntegerAdapter(String elementName) {
- return buildIntegerAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTemporalAnnotation.java
deleted file mode 100644
index e4c9e1363e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTemporalAnnotation.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
-
-/**
- * <code>javax.persistence.Temporal</code>
- */
-public final class SourceTemporalAnnotation
- extends SourceBaseTemporalAnnotation
- implements TemporalAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceTemporalAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- @Override
- protected String getValueElementName() {
- return JPA.TEMPORAL__VALUE;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTransientAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTransientAnnotation.java
deleted file mode 100644
index e74b9b1373..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceTransientAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
-
-/**
- * javax.persistence.Transient
- */
-public final class SourceTransientAnnotation
- extends SourceAnnotation
- implements TransientAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceTransientAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
deleted file mode 100644
index 6f3a9f834a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.resource.java.source;
-
-import java.util.Arrays;
-import java.util.Vector;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotationStringArrayExpressionConverter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.ExpressionConverter;
-import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
-
-/**
- * <code>javax.persistence.UniqueConstraint</code>
- */
-public final class SourceUniqueConstraintAnnotation
- extends SourceAnnotation
- implements UniqueConstraintAnnotation
-{
- private DeclarationAnnotationElementAdapter<String[]> columnNamesDeclarationAdapter;
- private AnnotationElementAdapter<String[]> columnNamesAdapter;
- private final Vector<String> columnNames = new Vector<String>();
- private TextRange columnNamesTextRange;
-
-
- public SourceUniqueConstraintAnnotation(JavaResourceNode parent, AnnotatedElement element, IndexedDeclarationAnnotationAdapter idaa) {
- super(parent, element, idaa, new ElementIndexedAnnotationAdapter(element, idaa));
- this.columnNamesDeclarationAdapter = buildColumnNamesDeclarationAdapter();
- this.columnNamesAdapter = buildColumnNamesAdapter();
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- this.initializeColumnNames(astRoot);
- this.columnNamesTextRange = this.buildColumnNamesTextRange(astRoot);
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- this.syncColumnNames(astRoot);
- this.columnNamesTextRange = this.buildColumnNamesTextRange(astRoot);
- }
-
-
- // ********** UniqueConstraintAnnotation implementation **********
-
- // ***** column names
- public ListIterable<String> getColumnNames() {
- return new LiveCloneListIterable<String>(this.columnNames);
- }
-
- public int getColumnNamesSize() {
- return this.columnNames.size();
- }
-
- public String columnNameAt(int index) {
- return this.columnNames.elementAt(index);
- }
-
- public void addColumnName(String columnName) {
- this.addColumnName(this.columnNames.size(), columnName);
- }
-
- public void addColumnName(int index, String columnName) {
- this.columnNames.add(index, columnName);
- this.writeColumnNames();
- }
-
- public void moveColumnName(int targetIndex, int sourceIndex) {
- CollectionTools.move(this.columnNames, targetIndex, sourceIndex);
- this.writeColumnNames();
- }
-
- public void removeColumnName(String columnName) {
- this.columnNames.remove(columnName);
- this.writeColumnNames();
- }
-
- public void removeColumnName(int index) {
- this.columnNames.remove(index);
- this.writeColumnNames();
- }
-
- private void writeColumnNames() {
- this.columnNamesAdapter.setValue(this.columnNames.toArray(new String[this.columnNames.size()]));
- }
-
- private void initializeColumnNames(CompilationUnit astRoot) {
- String[] astColumnNames = this.columnNamesAdapter.getValue(astRoot);
- for (int i = 0; i < astColumnNames.length; i++) {
- this.columnNames.add(astColumnNames[i]);
- }
- }
-
- private void syncColumnNames(CompilationUnit astRoot) {
- String[] javaColumnNames = this.columnNamesAdapter.getValue(astRoot);
- this.synchronizeList(Arrays.asList(javaColumnNames), this.columnNames, COLUMN_NAMES_LIST);
- }
-
- private TextRange buildColumnNamesTextRange(CompilationUnit astRoot) {
- return this.getElementTextRange(this.columnNamesDeclarationAdapter, astRoot);
- }
-
- public boolean columnNamesTouches(int pos) {
- return this.textRangeTouches(this.columnNamesTextRange, pos);
- }
-
- private DeclarationAnnotationElementAdapter<String[]> buildColumnNamesDeclarationAdapter() {
- return buildArrayAnnotationElementAdapter(this.daa, JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES);
- }
-
- private AnnotationElementAdapter<String[]> buildColumnNamesAdapter() {
- return this.buildAnnotationElementAdapter(this.columnNamesDeclarationAdapter);
- }
-
- private AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
- return new AnnotatedElementAnnotationElementAdapter<String[]>(this.annotatedElement, daea);
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return buildArrayAnnotationElementAdapter(annotationAdapter, elementName, AnnotationStringArrayExpressionConverter.forStrings());
- }
-
- private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String[]> converter) {
- return new ConversionDeclarationAnnotationElementAdapter<String[]>(annotationAdapter, elementName, converter);
- }
-
-
- // ********** misc **********
-
- @Override
- public boolean isUnset() {
- return super.isUnset() &&
- this.columnNames.isEmpty();
- }
-
- @Override
- public void toString(StringBuilder sb) {
- sb.append(this.columnNames);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceVersionAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceVersionAnnotation.java
deleted file mode 100644
index 39a538dab9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceVersionAnnotation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.internal.resource.java.source;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
-import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
-import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
-
-/**
- * javax.persistence.Version
- */
-public final class SourceVersionAnnotation
- extends SourceAnnotation
- implements VersionAnnotation
-{
- private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
-
-
- public SourceVersionAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
- super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public String getAnnotationName() {
- return ANNOTATION_NAME;
- }
-
- public void initialize(CompilationUnit astRoot) {
- // nothing to initialize
- }
-
- public void synchronizeWith(CompilationUnit astRoot) {
- // nothing to update
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/orm/OrmXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/orm/OrmXmlResourceProvider.java
deleted file mode 100644
index e954ba690e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/orm/OrmXmlResourceProvider.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.internal.resource.orm;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.resource.AbstractXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class OrmXmlResourceProvider
- extends AbstractXmlResourceProvider
- implements OrmFileCreationDataModelProperties
-{
- /**
- * (Convenience method) Returns an ORM resource model provider for
- * the given file.
- */
- public static OrmXmlResourceProvider getXmlResourceProvider(IFile file) {
- return getXmlResourceProvider_(file.getProject(), file.getFullPath());
- }
-
- /**
- * (Convenience method) Returns an ORM resource model provider for
- * the given project in the specified runtime location
- */
- public static OrmXmlResourceProvider getXmlResourceProvider(IProject project, IPath runtimePath) {
- return getXmlResourceProvider_(project, runtimePath);
- }
-
- /**
- * (Convenience method) Returns an ORM resource model provider for
- * the given project in the default runtime location
- */
- public static OrmXmlResourceProvider getDefaultXmlResourceProvider(IProject project) {
- return getXmlResourceProvider(project, JptJpaCorePlugin.DEFAULT_ORM_XML_RUNTIME_PATH);
- }
-
- private static OrmXmlResourceProvider getXmlResourceProvider_(IProject project, IPath fullPath) {
- return new OrmXmlResourceProvider(project, fullPath);
- }
-
-
- public OrmXmlResourceProvider(IProject project) {
- this(project, JptJpaCorePlugin.DEFAULT_ORM_XML_RUNTIME_PATH);
- }
-
- public OrmXmlResourceProvider(IProject project, IPath filePath) {
- super(project, filePath, JptJpaCorePlugin.ORM_XML_CONTENT_TYPE);
- }
-
- @Override
- protected void populateRoot(Object config) {
- IDataModel dataModel = (IDataModel) config;
- XmlEntityMappings entityMappings = OrmFactory.eINSTANCE.createXmlEntityMappings();
- entityMappings.setVersion(dataModel.getStringProperty(VERSION));
- getResourceContents().add(entityMappings);
-
- String defaultAccess = (String) dataModel.getProperty(DEFAULT_ACCESS);
- if (defaultAccess != null) {
- XmlPersistenceUnitMetadata puMetadata = OrmFactory.eINSTANCE.createXmlPersistenceUnitMetadata();
- entityMappings.setPersistenceUnitMetadata(puMetadata);
- XmlPersistenceUnitDefaults puDefaults = OrmFactory.eINSTANCE.createXmlPersistenceUnitDefaults();
- puMetadata.setPersistenceUnitDefaults(puDefaults);
- puDefaults.setAccess(defaultAccess);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/persistence/PersistenceXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/persistence/PersistenceXmlResourceProvider.java
deleted file mode 100644
index 84ad7a641f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/persistence/PersistenceXmlResourceProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.internal.resource.persistence;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.operations.PersistenceFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.resource.AbstractXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class PersistenceXmlResourceProvider
- extends AbstractXmlResourceProvider
- implements PersistenceFileCreationDataModelProperties
-{
- /**
- * (Convenience method) Returns a persistence resource model provider for
- * the given file.
- */
- public static PersistenceXmlResourceProvider getXmlResourceProvider(IFile file) {
- return getXmlResourceProvider_(file.getProject(), file.getFullPath());
- }
-
- /**
- * (Convenience method) Returns an persistence resource model provider for
- * the given project in the specified runtime location
- */
- public static PersistenceXmlResourceProvider getXmlResourceProvider(IProject project, IPath runtimePath) {
- return getXmlResourceProvider_(project, runtimePath);
- }
-
- /**
- * (Convenience method) Returns a persistence resource model provider for
- * the given project in the default runtime location
- */
- public static PersistenceXmlResourceProvider getDefaultXmlResourceProvider(IProject project) {
- return getXmlResourceProvider(project, JptJpaCorePlugin.DEFAULT_PERSISTENCE_XML_RUNTIME_PATH);
- }
-
- private static PersistenceXmlResourceProvider getXmlResourceProvider_(IProject project, IPath fullPath) {
- return new PersistenceXmlResourceProvider(project, fullPath);
- }
-
-
- public PersistenceXmlResourceProvider(IProject project) {
- this(project, JptJpaCorePlugin.DEFAULT_PERSISTENCE_XML_RUNTIME_PATH);
- }
-
- public PersistenceXmlResourceProvider(IProject project, IPath filePath) {
- super(project, filePath, JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE);
- }
-
-
- @Override
- protected void populateRoot(Object config) {
- IDataModel dataModel = (IDataModel) config;
- XmlPersistence persistence = PersistenceFactory.eINSTANCE.createXmlPersistence();
- persistence.setVersion(dataModel.getStringProperty(VERSION));
- XmlPersistenceUnit persistenceUnit = PersistenceFactory.eINSTANCE.createXmlPersistenceUnit();
- persistenceUnit.setName(getProject().getName());
- persistence.getPersistenceUnits().add(persistenceUnit);
- getResourceContents().add(persistence);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/DefaultJpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/DefaultJpaValidationMessages.java
deleted file mode 100644
index efe34d70ba..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/DefaultJpaValidationMessages.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.core.internal.validation;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaNode;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.prefs.JpaValidationPreferencesManager;
-import org.eclipse.wst.validation.internal.core.Message;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class DefaultJpaValidationMessages {
-
- private static String[] DEFAULT_PARMS = new String[0];
- private static TextRange DEFAULT_TEXT_RANGE = TextRange.Empty.instance();
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, JpaNode targetObject) {
- return buildMessage(defaultSeverity, messageId, targetObject.getResource());
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, IResource targetObject) {
- return buildMessage(defaultSeverity, messageId, DEFAULT_PARMS, targetObject);
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, String[] parms, JpaNode targetObject) {
- return buildMessage(defaultSeverity, messageId, parms, targetObject.getResource());
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, String[] parms, IResource targetObject) {
- return buildMessage(defaultSeverity, messageId, parms, targetObject, DEFAULT_TEXT_RANGE);
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, JpaNode targetObject, TextRange textRange) {
- return buildMessage(defaultSeverity, messageId, targetObject.getResource(), textRange);
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, IResource targetObject, TextRange textRange) {
- return buildMessage(defaultSeverity, messageId, DEFAULT_PARMS, targetObject, textRange);
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, String[] parms, JpaNode targetObject, TextRange textRange) {
- return buildMessage(defaultSeverity, messageId, parms, targetObject.getResource(), textRange);
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, String[] parms, IResource targetObject, TextRange textRange) {
- return buildMessage(defaultSeverity, messageId, parms, targetObject, textRange, MESSAGE_FACTORY);
- }
-
- public static IMessage buildMessage(int defaultSeverity, String messageId, String[] parms, IResource targetObject, TextRange textRange, MessageFactory messageFactory) {
- IMessage message = messageFactory.buildMessage(defaultSeverity, messageId, parms, targetObject);
- if (textRange == null) {
- textRange = DEFAULT_TEXT_RANGE;
- // log the exception but allow the message to still be used
- JptJpaCorePlugin.log(new NullPointerException("Null text range for message ID: " + messageId)); //$NON-NLS-1$
- }
- int lineNumber = textRange.getLineNumber();
- message.setLineNo(lineNumber);
- if (lineNumber == IMessage.LINENO_UNSET) {
- message.setAttribute(IMarker.LOCATION, " "); //$NON-NLS-1$
- }
- message.setOffset(textRange.getOffset());
- message.setLength(textRange.getLength());
- return message;
- }
-
-
- private DefaultJpaValidationMessages() {
- super();
- throw new UnsupportedOperationException();
- }
-
-
- // ********** message factory **********
-
- /**
- * Allow clients to specify a message factory so the message can load the
- * appropriate resource bundle.
- */
- public interface MessageFactory {
- IMessage buildMessage(int severity, String messageId, String[] parms, IResource targetObject);
- }
-
- private static final MessageFactory MESSAGE_FACTORY = new GenericMessageFactory();
-
- /* CU private */ static class GenericMessageFactory
- implements MessageFactory
- {
- public IMessage buildMessage(int severity, String messageId, String[] parms, IResource targetObject) {
- // check for preference override
- int prefSeverity = JpaValidationPreferencesManager.getProblemSeverityPreference(targetObject, messageId);
- if (prefSeverity != JpaValidationPreferencesManager.NO_SEVERITY_PREFERENCE){
- severity = prefSeverity;
- }
- IMessage message = new Message(JpaValidationMessages.BUNDLE_NAME, severity, messageId, parms, targetObject);
- message.setMarkerId(JptJpaCorePlugin.VALIDATION_MARKER_ID);
- return message;
- }
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationDescriptionMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationDescriptionMessages.java
deleted file mode 100644
index 2b1df175a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationDescriptionMessages.java
+++ /dev/null
@@ -1,36 +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.jpa.core.internal.validation;
-
-import org.eclipse.osgi.util.NLS;
-
-public class JpaValidationDescriptionMessages {
-
- public static String DOES_NOT_MATCH_JOIN_TABLE;
- public static String DOES_NOT_MATCH_COLLECTION_TABLE;
- public static String NOT_VALID_FOR_THIS_ENTITY;
-
- public static String ATTRIBUTE_DESC;
- public static String VIRTUAL_ATTRIBUTE_DESC;
-
- public static String ON_MAPPED_SUPERCLASS;
- public static String ON_EMBEDDABLE;
-
-
- private static final String BUNDLE_NAME = "jpa_validation_description"; //$NON-NLS-1$
- private static final Class<?> BUNDLE_CLASS = JpaValidationDescriptionMessages.class;
- static {
- NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
- }
-
- private JpaValidationDescriptionMessages() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java
deleted file mode 100644
index 9bb97ed9e0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.core.internal.validation;
-
-@SuppressWarnings("nls")
-// TODO bjv rename to JptJpaValidationMessages
-public interface JpaValidationMessages {
-
- public static final String BUNDLE_NAME = "jpa_validation";
-
- //Content is organized based on the categories and entries in each categories are listed alphabetically.
- //If adding a new entry, please be sure to add it to the corresponding category at the right place.
-
- //Project
- public static final String NO_JPA_PROJECT = "NO_JPA_PROJECT";
- public static final String PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS = "PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS";
- public static final String PERSISTENCE_NO_PERSISTENCE_UNIT = "PERSISTENCE_NO_PERSISTENCE_UNIT";
- public static final String PERSISTENCE_XML_INVALID_CONTENT = "PERSISTENCE_XML_INVALID_CONTENT";
- public static final String PERSISTENCE_XML_UNSUPPORTED_CONTENT = "PERSISTENCE_XML_UNSUPPORTED_CONTENT";
- public static final String PROJECT_INACTIVE_CONNECTION = "PROJECT_INACTIVE_CONNECTION";
- public static final String PROJECT_INVALID_CONNECTION = "PROJECT_INVALID_CONNECTION";
- public static final String PROJECT_INVALID_LIBRARY_PROVIDER = "PROJECT_INVALID_LIBRARY_PROVIDER";
- public static final String PROJECT_MULTIPLE_PERSISTENCE_XML = "PROJECT_MULTIPLE_PERSISTENCE_XML";
- public static final String PROJECT_NO_CONNECTION = "PROJECT_NO_CONNECTION";
- public static final String PROJECT_NO_PERSISTENCE_XML = "PROJECT_NO_PERSISTENCE_XML";
- public static final String XML_VERSION_NOT_LATEST = "XML_VERSION_NOT_LATEST";
-
- //Persistence Unit
- public static final String MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_METADATA = "MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_METADATA";
- public static final String PERSISTENT_TYPE_DUPLICATE_CLASS = "PERSISTENT_TYPE_DUPLICATE_CLASS";
- public static final String PERSISTENCE_UNIT_DUPLICATE_CLASS = "PERSISTENCE_UNIT_DUPLICATE_CLASS";
- public static final String PERSISTENCE_UNIT_DUPLICATE_JAR_FILE = "PERSISTENCE_UNIT_DUPLICATE_JAR_FILE";
- public static final String PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE = "PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE";
- public static final String PERSISTENCE_UNIT_INVALID_CLASS = "PERSISTENCE_UNIT_INVALID_CLASS";
- public static final String PERSISTENCE_UNIT_INVALID_MAPPING_FILE = "PERSISTENCE_UNIT_INVALID_MAPPING_FILE";
- public static final String PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING = "PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING";
- public static final String PERSISTENCE_UNIT_NONEXISTENT_CLASS = "PERSISTENCE_UNIT_NONEXISTENT_CLASS";
- public static final String PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE = "PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE";
- public static final String PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE = "PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE";
- public static final String PERSISTENCE_UNIT_REDUNDANT_CLASS = "PERSISTENCE_UNIT_REDUNDANT_CLASS";
- public static final String PERSISTENCE_UNIT_UNSPECIFIED_CLASS = "PERSISTENCE_UNIT_UNSPECIFIED_CLASS";
- public static final String PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE = "PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE";
- public static final String PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE = "PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE";
- public static final String PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT = "PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT";
-
- //Type
- public static final String ENTITY_NAME_DUPLICATED = "ENTITY_NAME_DUPLICATED";
- public static final String ENTITY_NAME_MISSING = "ENTITY_NAME_MISSING";
- public static final String ENTITY_NO_PK = "ENTITY_NO_PK";
- public static final String ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED = "ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED";
- public static final String ENTITY_NON_ROOT_ID_CLASS_SPECIFIED = "ENTITY_NON_ROOT_ID_CLASS_SPECIFIED";
- public static final String PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT = "PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT";
- public static final String PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT = "PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT";
- public static final String PERSISTENT_TYPE_UNRESOLVED_CLASS = "PERSISTENT_TYPE_UNRESOLVED_CLASS";
- public static final String PERSISTENT_TYPE_UNSPECIFIED_CLASS = "PERSISTENT_TYPE_UNSPECIFIED_CLASS";
- public static final String TARGET_NOT_AN_EMBEDDABLE = "TARGET_NOT_AN_EMBEDDABLE";
- public static final String TYPE_MAPPING_CLASS_MISSING_NO_ARG_CONSTRUCTOR = "TYPE_MAPPING_CLASS_MISSING_NO_ARG_CONSTRUCTOR";
- public static final String TYPE_MAPPING_CLASS_PRIVATE_NO_ARG_CONSTRUCTOR = "TYPE_MAPPING_CLASS_PRIVATE_NO_ARG_CONSTRUCTOR";
- public static final String TYPE_MAPPING_FINAL_CLASS = "TYPE_MAPPING_FINAL_CLASS";
- public static final String TYPE_MAPPING_ID_AND_EMBEDDED_ID_BOTH_USED = "TYPE_MAPPING_ID_AND_EMBEDDED_ID_BOTH_USED";
- public static final String TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED = "TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED";
- public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST";
- public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH";
- public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH";
- public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH";
- public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY";
- public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE";
- public static final String TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD = "TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD";
- public static final String TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD = "TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD";
- public static final String TYPE_MAPPING_ID_CLASS_MISSING_NO_ARG_CONSTRUCTOR = "TYPE_MAPPING_ID_CLASS_MISSING_NO_ARG_CONSTRUCTOR";
- public static final String TYPE_MAPPING_ID_CLASS_MISSING_PUBLIC_NO_ARG_CONSTRUCTOR = "TYPE_MAPPING_ID_CLASS_MISSING_PUBLIC_NO_ARG_CONSTRUCTOR";
- public static final String TYPE_MAPPING_ID_CLASS_NAME_EMPTY = "TYPE_MAPPING_ID_CLASS_NAME_EMPTY";
- public static final String TYPE_MAPPING_ID_CLASS_NOT_EXIST = "TYPE_MAPPING_ID_CLASS_NOT_EXIST";
- public static final String TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE = "TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE";
- public static final String TYPE_MAPPING_ID_CLASS_NOT_PUBLIC = "TYPE_MAPPING_ID_CLASS_NOT_PUBLIC";
- public static final String TYPE_MAPPING_ID_CLASS_PROPERTY_METHOD_NOT_PUBLIC = "TYPE_MAPPING_ID_CLASS_PROPERTY_METHOD_NOT_PUBLIC";
- public static final String TYPE_MAPPING_ID_CLASS_REDEFINED = "TYPE_MAPPING_ID_CLASS_REDEFINED";
- public static final String TYPE_MAPPING_ID_CLASS_REQUIRED = "TYPE_MAPPING_ID_CLASS_REQUIRED";
- public static final String TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID = "TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID";
- public static final String TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE = "TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE";
- public static final String TYPE_MAPPING_MEMBER_CLASS = "TYPE_MAPPING_MEMBER_CLASS";
- public static final String TYPE_MAPPING_MULTIPLE_EMBEDDED_ID = "TYPE_MAPPING_MULTIPLE_EMBEDDED_ID";
- public static final String TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE = "TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE";
- public static final String TYPE_MAPPING_PK_REDEFINED_ID_CLASS = "TYPE_MAPPING_PK_REDEFINED_ID_CLASS";
-
- //Attribute
- public static final String MAP_KEY_CLASS_NOT_DEFINED = "MAP_KEY_CLASS_NOT_DEFINED";
- public static final String MAP_KEY_CLASS_NOT_EXIST = "MAP_KEY_CLASS_NOT_EXIST";
- public static final String MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE = "MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE";
- public static final String ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST = "ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST";
- public static final String ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING = "ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING";
- public static final String ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING = "ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING";
- public static final String ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE = "ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE";
- public static final String ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED = "ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED";
- public static final String EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC="EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC";
- public static final String EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE = "EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE";
- public static final String EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR = "EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR";
- public static final String EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE="EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE";
- public static final String EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS="EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS";
- public static final String EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED = "EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED";
- public static final String ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED = "ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED";
- public static final String MAPS_ID_VALUE_INVALID = "MAPS_ID_VALUE_INVALID";
- public static final String MAPS_ID_VALUE_NOT_RESOLVED = "MAPS_ID_VALUE_NOT_RESOLVED";
- public static final String MAPS_ID_VALUE_NOT_SPECIFIED = "MAPS_ID_VALUE_NOT_SPECIFIED";
- public static final String MAPPING_INVALID_MAPPED_BY = "MAPPING_INVALID_MAPPED_BY";
- public static final String MAPPING_MAPPED_BY_ON_BOTH_SIDES = "MAPPING_MAPPED_BY_ON_BOTH_SIDES";
- public static final String MAPPING_UNRESOLVED_MAPPED_BY = "MAPPING_UNRESOLVED_MAPPED_BY";
- public static final String ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED = "ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED";
- public static final String PERSISTENT_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE = "PERSISTENT_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE";
- public static final String PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE = "PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE";
- public static final String PERSISTENT_ATTRIBUTE_FINAL_FIELD = "PERSISTENT_ATTRIBUTE_FINAL_FIELD";
- public static final String PERSISTENT_ATTRIBUTE_FINAL_GETTER = "PERSISTENT_ATTRIBUTE_FINAL_GETTER";
- public static final String PERSISTENT_ATTRIBUTE_FINAL_SETTER = "PERSISTENT_ATTRIBUTE_FINAL_SETTER";
- public static final String PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED = "PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED";
- public static final String PERSISTENT_ATTRIBUTE_INVALID_MAPPING = "PERSISTENT_ATTRIBUTE_INVALID_MAPPING";
- public static final String PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE = "PERSISTENT_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE";
- public static final String PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE = "PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE";
- public static final String PERSISTENT_ATTRIBUTE_PUBLIC_FIELD = "PERSISTENT_ATTRIBUTE_PUBLIC_FIELD";
- public static final String PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME = "PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME";
- public static final String PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME = "PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME";
- public static final String TARGET_ENTITY_IS_NOT_AN_ENTITY = "TARGET_ENTITY_IS_NOT_AN_ENTITY";
- public static final String TARGET_ENTITY_NOT_DEFINED = "TARGET_ENTITY_NOT_DEFINED";
- public static final String TARGET_ENTITY_NOT_EXIST = "TARGET_ENTITY_NOT_EXIST";
- public static final String ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE = "ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE";
-
- //***Implied Attribute***
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED = "VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE = "VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE";
- public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST";
- public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING";
- public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING";
- public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE";
- public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED";
- public static final String VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY = "VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY";
- public static final String VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED = "VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED";
- public static final String VIRTUAL_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE = "VIRTUAL_ATTRIBUTE_INVALID_TEMPORAL_MAP_KEY_TYPE";
- public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_INVALID_VALUE_TYPE";
- public static final String VIRTUAL_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE = "VIRTUAL_ATTRIBUTE_INVALID_TEMPORAL_MAPPING_TYPE";
- public static final String VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE = "VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE";
- public static final String VIRTUAL_ATTRIBUTE_TARGET_NOT_AN_EMBEDDABLE = "VIRTUAL_ATTRIBUTE_TARGET_NOT_AN_EMBEDDABLE";
- public static final String VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR = "VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR";
- public static final String VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE = "VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE";
- public static final String VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS = "VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS";
- public static final String VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE = "VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE";
- public static final String VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC = "VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC";
- public static final String VIRTUAL_ATTRIBUTE_EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED = "VIRTUAL_ATTRIBUTE_EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED";
-
-
- //Table
- public static final String COLLECTION_TABLE_UNRESOLVED_CATALOG = "COLLECTION_TABLE_UNRESOLVED_CATALOG";
- public static final String COLLECTION_TABLE_UNRESOLVED_NAME = "COLLECTION_TABLE_UNRESOLVED_NAME";
- public static final String COLLECTION_TABLE_UNRESOLVED_SCHEMA = "COLLECTION_TABLE_UNRESOLVED_SCHEMA";
- public static final String JOIN_TABLE_UNRESOLVED_CATALOG = "JOIN_TABLE_UNRESOLVED_CATALOG";
- public static final String JOIN_TABLE_UNRESOLVED_NAME = "JOIN_TABLE_UNRESOLVED_NAME";
- public static final String JOIN_TABLE_UNRESOLVED_SCHEMA = "JOIN_TABLE_UNRESOLVED_SCHEMA";
- public static final String SECONDARY_TABLE_UNRESOLVED_CATALOG = "SECONDARY_TABLE_UNRESOLVED_CATALOG";
- public static final String SECONDARY_TABLE_UNRESOLVED_NAME = "SECONDARY_TABLE_UNRESOLVED_NAME";
- public static final String SECONDARY_TABLE_UNRESOLVED_SCHEMA = "SECONDARY_TABLE_UNRESOLVED_SCHEMA";
- public static final String TABLE_UNRESOLVED_CATALOG = "TABLE_UNRESOLVED_CATALOG";
- public static final String TABLE_UNRESOLVED_NAME = "TABLE_UNRESOLVED_NAME";
- public static final String TABLE_UNRESOLVED_SCHEMA = "TABLE_UNRESOLVED_SCHEMA";
- //***Implied Attribute***
- public static final String VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG = "VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG";
- public static final String VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA = "VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA";
-
- //Column
- public static final String COLUMN_TABLE_NOT_VALID="COLUMN_TABLE_NOT_VALID";
- public static final String COLUMN_UNRESOLVED_NAME = "COLUMN_UNRESOLVED_NAME";
- public static final String COLUMN_UNRESOLVED_TABLE = "COLUMN_UNRESOLVED_TABLE";
- public static final String INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String INVERSE_JOIN_COLUMN_TABLE_NOT_VALID = "INVERSE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String INVERSE_JOIN_COLUMN_UNRESOLVED_NAME = "INVERSE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String JOIN_COLUMN_TABLE_NOT_VALID = "JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String JOIN_COLUMN_UNRESOLVED_NAME = "JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String MAP_KEY_COLUMN_TABLE_NOT_VALID="MAP_KEY_COLUMN_TABLE_NOT_VALID";
- public static final String MAP_KEY_COLUMN_UNRESOLVED_NAME="MAP_KEY_COLUMN_UNRESOLVED_NAME";
- public static final String ORDER_COLUMN_UNRESOLVED_NAME = "ORDER_COLUMN_UNRESOLVED_NAME";
- public static final String PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String MAP_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "MAP_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String MAP_KEY_JOIN_COLUMN_TABLE_NOT_VALID = "MAP_KEY_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String MAP_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "MAP_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String MAP_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "MAP_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
-
- // virtual attribute
- public static final String VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME="VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_MAP_KEY_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_MAP_KEY_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_MAP_KEY_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_MAP_KEY_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
-
- //Overrides
- public static final String ASSOCIATION_OVERRIDE_INVALID_NAME = "ASSOCIATION_OVERRIDE_INVALID_NAME";
- public static final String ATTRIBUTE_OVERRIDE_INVALID_NAME = "ATTRIBUTE_OVERRIDE_INVALID_NAME";
- public static final String ATTRIBUTE_OVERRIDE_INVALID_TYPE = "ATTRIBUTE_OVERRIDE_INVALID_TYPE";
- public static final String ATTRIBUTE_OVERRIDE_DERIVED_AND_SPECIFIED = "ATTRIBUTE_OVERRIDE_DERIVED_AND_SPECIFIED";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_INVALID_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS = "VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS = "VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_CATALOG = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_CATALOG";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_NAME";
- public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_SCHEMA = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_TABLE_UNRESOLVED_SCHEMA";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE = "VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE";
- public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
- public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
- public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME";
-
- //Inheritance
- public static final String DISCRIMINATOR_COLUMN_UNRESOLVED_NAME = "DISCRIMINATOR_COLUMN_UNRESOLVED_NAME";
- public static final String ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED = "ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED";
- public static final String ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE = "ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE";
- public static final String ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED = "ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED";
- public static final String ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE = "ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE";
- public static final String ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED = "ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED";
- public static final String ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED = "ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED";
- public static final String ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM = "ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM";
- public static final String ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM = "ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM";
-
- //Generator
- public static final String GENERATOR_DUPLICATE_NAME = "GENERATOR_DUPLICATE_NAME";
- public static final String GENERATOR_NAME_UNDEFINED = "GENERATOR_NAME_UNDEFINED";
- public static final String ID_MAPPING_UNRESOLVED_GENERATOR_NAME = "ID_MAPPING_UNRESOLVED_GENERATOR_NAME";
-
- //Query
- public static final String JPQL_QUERY_VALIDATION = "JPQL_QUERY_VALIDATION";
- public static final String QUERY_DUPLICATE_NAME = "QUERY_DUPLICATE_NAME";
- public static final String QUERY_NAME_UNDEFINED = "QUERY_NAME_UNDEFINED";
- public static final String QUERY_STATEMENT_UNDEFINED = "QUERY_STATEMENT_UNDEFINED";
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidator.java
deleted file mode 100644
index 8906e7d6af..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidator.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.internal.validation;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.prefs.JpaValidationPreferencesManager;
-import org.eclipse.wst.validation.AbstractValidator;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IProjectValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-
-/**
- * This class is referenced in the JPA extension for the
- * WTP validator extension point.
- */
-public class JpaValidator
- extends AbstractValidator
- implements IValidator {
-
- public JpaValidator() {
- super();
- }
-
-
- // ********** IValidator implementation **********
-
- public void validate(IValidationContext context, IReporter reporter) {
- this.validate(reporter, ((IProjectValidationContext) context).getProject());
- }
-
- public void cleanup(IReporter reporter) {
- // nothing to do
- }
-
-
- // ********** AbstractValidator implementation **********
-
- @Override
- public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
- if (resource.getType() != IResource.FILE) {
- return null;
- }
- ValidationResult result = new ValidationResult();
- IReporter reporter = result.getReporter(monitor);
- IProject project = resource.getProject();
- result.setSuspendValidation(project);
- this.validate(reporter, project);
- return result;
- }
-
-
- // ********** internal **********
-
- private void clearMarkers(IProject project) {
- try {
- this.clearMarkers_(project);
- } catch (CoreException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- private void clearMarkers_(IProject project) throws CoreException {
- IMarker[] markers = project.findMarkers(JptJpaCorePlugin.VALIDATION_MARKER_ID, true, IResource.DEPTH_INFINITE);
- for (IMarker marker : markers) {
- marker.delete();
- }
- }
-
- private void validate(IReporter reporter, IProject project) {
- Iterable<IMessage> messages = this.buildValidationMessages(reporter, project);
-
- // since the validation messages are usually built asynchronously
- // and a workspace shutdown could occur in the meantime,
- // wait until we actually get the new messages before we clear out the old messages
- this.clearMarkers(project);
-
- JpaValidationPreferencesManager prefsManager = new JpaValidationPreferencesManager(project);
- for (IMessage message : messages) {
- // check preferences for IGNORE
- if (prefsManager.problemIsNotIgnored(message.getId())) {
- reporter.addMessage(this, message);
- }
- }
- }
-
- private Iterable<IMessage> buildValidationMessages(IReporter reporter, IProject project) {
- try {
- return this.buildValidationMessages_(reporter, project);
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- throw new RuntimeException(ex);
- }
- }
-
- private Iterable<IMessage> buildValidationMessages_(IReporter reporter, IProject project) throws InterruptedException {
- return this.getJpaProjectReference(project).buildValidationMessages(reporter);
- }
-
- private JpaProject.Reference getJpaProjectReference(IProject project) {
- return (JpaProject.Reference) project.getAdapter(JpaProject.Reference.class);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaFactory2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaFactory2_0.java
deleted file mode 100644
index b14f32b336..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaFactory2_0.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2;
-
-import org.eclipse.jpt.jpa.core.JpaDataSource;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0.Owner;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaDerivedIdentity2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaEmbeddedMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrderable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
-import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
-import org.eclipse.jpt.jpa.db.DatabaseIdentifierAdapter;
-
-/**
- * JPA 2.0 factory
- *<p>
- * 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.
- *
- * @see org.eclipse.jpt.jpa.core.internal.jpa2.GenericJpaFactory2_0
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaFactory2_0
- extends JpaFactory
-{
-
- // ********** Core Model **********
-
- /**
- * Return an identifier adapter that can be used to convert database
- * identifiers to names and vice versa, respecting the <code>delimited-identifiers</code>
- * in <code>persistence.xml</code>.
- */
- DatabaseIdentifierAdapter buildDatabaseIdentifierAdapter(JpaDataSource dataSource);
-
- MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType sourceType);
-
-
- // ********** Java Context Model **********
-
- //overloaded because the 2.0 JPA spec supports association overrides on an embedded mapping while the 1.0 spec did not
- JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaEmbeddedMapping2_0 parent, JavaAssociationOverrideContainer.Owner owner);
-
- JavaDerivedIdentity2_0 buildJavaDerivedIdentity(JavaSingleRelationshipMapping2_0 parent);
-
- JavaElementCollectionMapping2_0 buildJavaElementCollectionMapping2_0(JavaPersistentAttribute parent);
-
- JavaCacheable2_0 buildJavaCacheable(JavaCacheableHolder2_0 parent);
-
- JavaOrphanRemovable2_0 buildJavaOrphanRemoval(JavaOrphanRemovalHolder2_0 parent);
-
- JavaOrderColumn2_0 buildJavaOrderColumn(JavaOrderable2_0 parent, JavaReadOnlyNamedColumn.Owner owner);
-
- JavaCollectionTable2_0 buildJavaCollectionTable(JavaElementCollectionMapping2_0 parent, Table.Owner owner);
-
- JavaColumn buildJavaMapKeyColumn(JavaJpaContextNode parent, JavaColumn.Owner owner);
-
- JavaOrderable2_0 buildJavaOrderable(JavaAttributeMapping parent, Orderable2_0.Owner owner);
-
- /**
- * Use {@link #buildJavaOrderable(JavaAttributeMapping, Owner)}.
- */
- JavaOrderable buildJavaOrderable(JavaAttributeMapping parent);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaProject2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaProject2_0.java
deleted file mode 100644
index a9ad79314a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/JpaProject2_0.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.jpa.core.JpaProject;
-
-/**
- * JPA 2.0 project.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaProject2_0
- extends JpaProject, MetamodelSynchronizer
-{
-
- // ********** Canonical Metamodel **********
-
- /**
- * ID string used when metamodelSourceFolderName property is changed.
- * @see #addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener)
- */
- String METAMODEL_SOURCE_FOLDER_NAME_PROPERTY = "metamodelSourceFolderName"; //$NON-NLS-1$
-
- /**
- * Return the name of the folder that holds the generated Canonical
- * Metamodel.
- */
- String getMetamodelSourceFolderName();
-
- /**
- * Set the name of the folder that holds the generated Canonical
- * Metamodel.
- */
- void setMetamodelSourceFolderName(String metamodelSourceFolderName);
-
- /**
- * Return the package fragment root that holds the generated Canonical
- * Metamodel.
- */
- IPackageFragmentRoot getMetamodelPackageFragmentRoot();
-
- /**
- * Return a list of the names of the Java source folders. (These
- * can be used to hold the generated Canonical Metamodel.)
- */
- Iterable<String> getJavaSourceFolderNames();
-
- /**
- * Return the JPA project's generated metamodel Java resource
- * top-level types.
- * @see MetamodelSynchronizer.MetamodelTools#isGeneratedMetamodelTopLevelType(JavaResourceAbstractType, IPackageFragmentRoot)
- */
- Iterable<JavaResourceAbstractType> getGeneratedMetamodelTopLevelTypes();
-
- /**
- * Return the top-level generated metamodel Java resource persistent type
- * in the specified file. Return null if any of the following is true:<ul>
- * <li>the file is not a Java source file
- * <li>the top-level Java class is not annotated with the appropriate
- * <code>javax.annotation.Generated</code> annotation
- * <li>neither the top-level Java class nor any of its nested classes
- * is annotated with the appropriate
- * <code>javax.persistence.metamodel.StaticMetamodel</code> annotation
- * <ul>
- */
- JavaResourceAbstractType getGeneratedMetamodelTopLevelType(IFile file);
-
-
- // ********** construction config **********
-
- /**
- * The settings used to construct a JPA 2.0 project.
- */
- interface Config
- extends JpaProject.Config
- {
- /**
- * Return the name of the folder that holds the generated Canonical
- * Metamodel. Return null if the Canonical Metamodel is not to be
- * generated.
- */
- String getMetamodelSourceFolderName();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MappingKeys2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MappingKeys2_0.java
deleted file mode 100644
index 6e0cdd236c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MappingKeys2_0.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2;
-
-/**
- *
- *
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-@SuppressWarnings("nls")
-public interface MappingKeys2_0 {
-
- String ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY = "elementCollection";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MetamodelSynchronizer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MetamodelSynchronizer.java
deleted file mode 100644
index d3e6cf1f98..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/MetamodelSynchronizer.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2;
-
-import java.io.Serializable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.GeneratedAnnotation;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.StaticMetamodelAnnotation;
-
-/**
- * JPA 2.0 Canonical Metamodel synchronizer.
- * <p>
- * Notes:
- * <ul><li>
- * When a JPA project is first created (e.g. when the user adds the JPA
- * Facet to a Faceted project or when a workspace containing a JPA project is
- * opened), if it is configured to generate the
- * Canonical Metamodel (i.e. its metamodel source folder is non-
- * <code>null</code>), it will
- * first discover what metamodel classes are already present in the metamodel
- * source folder. Any class appropriately annotated with
- * <code>javax.persistence.metamodel.StaticMetamodel</code>
- * and <code>javax.annotation.Generated</code>
- * will be added to the Canonical Metamodel
- * (see {@link MetamodelTools#isGeneratedMetamodelTopLevelType(JavaResourceAbstractType, IPackageFragmentRoot)}).
- * Once the JPA project's context model is constructed, a new Canonical
- * Metamodel is generated and merged with the classes already present in the
- * metamodel source folder.
- * </li><li>
- * When a JPA project's metamodel source folder setting is cleared, the Canonical
- * Metamodel is cleared from the context model, but the generated source files are
- * left in place.
- * </li><li>
- * When a JPA project's metamodel source folder is set to a non-<code>null</code> value,
- * like when a JPA project is first created, the resulting Canonical Metamodel
- * will be merged with whatever is already present in the folder.
- * </li></ul>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MetamodelSynchronizer {
- /**
- * The value used to tag a generated type:
- * <pre>
- * &#64;javax.annotation.Generated(value="Dali", date="2009-11-23T13:56:06.171-0500")
- * </pre>
- */
- String METAMODEL_GENERATED_ANNOTATION_VALUE = "Dali"; //$NON-NLS-1$
-
- void initializeMetamodel();
-
- IStatus synchronizeMetamodel(IProgressMonitor progressMonitor);
-
- void disposeMetamodel();
-
-
- /**
- * Singleton implementation of the metamodel synchronizer interface that
- * does nothing. (Not sure we need this....)
- */
- final class Null
- implements MetamodelSynchronizer, Serializable
- {
- public static final MetamodelSynchronizer INSTANCE = new Null();
-
- public static MetamodelSynchronizer instance() {
- return INSTANCE;
- }
-
- // ensure single instance
- private Null() {
- super();
- }
-
- public void initializeMetamodel() {
- // do nothing
- }
-
- public IStatus synchronizeMetamodel(IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- public void disposeMetamodel() {
- // do nothing
- }
-
- @Override
- public String toString() {
- return StringTools.buildSingletonToString(this);
- }
-
- private static final long serialVersionUID = 1L;
- private Object readResolve() {
- // replace this object with the singleton
- return INSTANCE;
- }
- }
-
-
- final class MetamodelTools {
-
- /**
- * The type must be:<ul>
- * <li>in the specified source folder
- * <li>a top-level type
- * <li>annotated with <code>&#64;javax.annotation.Generated</code> with
- * the appropriate <code>value</code> and <code>date</code>
- * <li>either itself or one of its nested types annotated with
- * <code>&#64;javax.persistence.metamodel.StaticMetamodel</code>
- * </ul>
- */
- public static boolean isGeneratedMetamodelTopLevelType(JavaResourceAbstractType jrat, IPackageFragmentRoot sourceFolder) {
- if ( ! jrat.isIn(sourceFolder)) {
- return false;
- }
- return isGeneratedMetamodelTopLevelType(jrat);
- }
-
- /**
- * The type must be:<ul>
- * <li>a top-level type
- * <li>annotated with <code>&#64;javax.annotation.Generated</code> with
- * the appropriate <code>value</code> and <code>date</code>
- * <li>either itself or one of its nested types annotated with
- * <code>&#64;javax.persistence.metamodel.StaticMetamodel</code>
- * </ul>
- */
- public static boolean isGeneratedMetamodelTopLevelType(JavaResourceAbstractType jrat) {
- if ( ! isGenerated(jrat)) {
- return false;
- }
- // if we get here we know we have a top-level type, since only top-level
- // types are annotated @Generated; now see if anything is a metamodel
- return isMetamodel(jrat);
- }
-
- /**
- * The type must be annotated with
- * <code>&#64;javax.annotation.Generated</code> with the appropriate
- * <code>value</code> and <code>date</code>.
- */
- public static boolean isGenerated(JavaResourceAbstractType jrat) {
- GeneratedAnnotation generatedAnnotation = (GeneratedAnnotation) jrat.getAnnotation(GeneratedAnnotation.ANNOTATION_NAME);
- if (generatedAnnotation == null) {
- return false;
- }
- if (generatedAnnotation.getValuesSize() != 1) {
- return false;
- }
- if ( ! generatedAnnotation.getValue(0).equals(METAMODEL_GENERATED_ANNOTATION_VALUE)) {
- return false;
- }
- if (StringTools.stringIsEmpty(generatedAnnotation.getDate())) {
- return false;
- }
- return true;
- }
-
- public static boolean isMetamodel(JavaResourceAbstractType jrat) {
- // if we get here we know we have a top-level type, since only top-level
- // types are annotated @Generated; now see if anything is a metamodel
- for (JavaResourceAbstractType type : jrat.getAllTypes()) {
- if (type.getAnnotation(StaticMetamodelAnnotation.ANNOTATION_NAME) != null) {
- return true;
- }
- }
- return false;
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java
deleted file mode 100644
index b7050489d9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-/**
- * JPA 2.0
- * Association override container.
- * Used by entities, embedded mappings, and element collection mappings.
- * <p>
- * 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.
- */
-public interface AssociationOverrideContainer2_0
- extends AssociationOverrideContainer
-{
- JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
-
- // ********** owner **********
-
- interface Owner
- extends AssociationOverrideContainer.Owner
- {
- JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AttributeMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AttributeMapping2_0.java
deleted file mode 100644
index 6c97944a00..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AttributeMapping2_0.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-
-/**
- * JPA 2.0 attribute mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface AttributeMapping2_0
- extends AttributeMapping
-{
- /**
- * Return the Canonical Metamodel field corresponding to the mapping.
- * Return <code>null</code> if the mapping is not to be part of the
- * Canonical Metamodel.
- */
- MetamodelField getMetamodelField();
-
- /**
- * Return the name of the mapping's type as used in the Canonical Metamodel.
- */
- String getMetamodelTypeName();
-
- @SuppressWarnings("nls")
- Iterable<String> STANDARD_METAMODEL_FIELD_MODIFIERS =
- new ArrayIterable<String>(new String[] { "public", "static", "volatile" });
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cacheable2_0.java
deleted file mode 100644
index fb2bc5fc18..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cacheable2_0.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * cacheable
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Cacheable2_0
- extends JpaContextNode
-{
- boolean isCacheable();
-
- Boolean getSpecifiedCacheable();
- void setSpecifiedCacheable(Boolean cacheable);
- String SPECIFIED_CACHEABLE_PROPERTY = "specifiedCacheable"; //$NON-NLS-1$
-
- boolean isDefaultCacheable();
- String DEFAULT_CACHEABLE_PROPERTY = "defaultCacheable"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CacheableHolder2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CacheableHolder2_0.java
deleted file mode 100644
index 4dd035225f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CacheableHolder2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * cacheable holder/parent
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface CacheableHolder2_0
- extends JpaContextNode
-{
- Cacheable2_0 getCacheable();
-
- boolean calculateDefaultCacheable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cascade2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cascade2_0.java
deleted file mode 100644
index 32b0cb518a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Cascade2_0.java
+++ /dev/null
@@ -1,32 +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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.Cascade;
-
-/**
- * JPA 2.0 cascade (persist, merge, remove, refresh, detach)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Cascade2_0
- extends Cascade
-{
- boolean isDetach();
- void setDetach(boolean value);
- String DETACH_PROPERTY = "detach"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionMapping2_0.java
deleted file mode 100644
index 59cebce3f4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionMapping2_0.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.jpa2.context;
-
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.CollectionMapping;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.JoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-
-/**
- * JPA 2.0 collection mapping (e.g. 1:m, m:m, element collection)
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.3
- */
-public interface CollectionMapping2_0
- extends CollectionMapping, AttributeMapping2_0, ConvertibleKeyMapping2_0
-{
- // ********** map key class **********
-
- String getMapKeyClass();
-
- String getSpecifiedMapKeyClass();
- void setSpecifiedMapKeyClass(String value);
- String SPECIFIED_MAP_KEY_CLASS_PROPERTY = "specifiedMapKeyClass"; //$NON-NLS-1$
-
- String getDefaultMapKeyClass();
- String DEFAULT_MAP_KEY_CLASS_PROPERTY = "defaultMapKeyClass"; //$NON-NLS-1$
-
- /**
- * Return the character to be used for browsing or creating the map key
- * class {@link IType}.
- * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
- */
- char getMapKeyClassEnclosingTypeSeparator();
-
- /**
- * If the map key class is specified, this will return it fully qualified.
- * If not specified, it returns the default map key class, which is always
- * fully qualified.
- */
- String getFullyQualifiedMapKeyClass();
- String FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY = "fullyQualifiedMapKeyClass"; //$NON-NLS-1$
-
-
- // ********** map key column **********
-
- /**
- * Return the map key column for this collection mapping.
- */
- Column getMapKeyColumn();
-
- AttributeOverrideContainer getMapKeyAttributeOverrideContainer();
-
- // ********** map key join columns **********
-
- /**
- * Return the map key join columns whether specified or default.
- */
- ListIterable<? extends ReadOnlyJoinColumn> getMapKeyJoinColumns();
-
- /**
- * Return the number of map key join columns, whether specified and default.
- */
- int getMapKeyJoinColumnsSize();
-
-
- // ********** specified map key join columns **********
-
- /**
- * Change notification identifier for "specifiedMapKeyJoinColumns" list
- */
- String SPECIFIED_MAP_KEY_JOIN_COLUMNS_LIST = "specifiedMapKeyJoinColumns"; //$NON-NLS-1$
-
- /**
- * Return the specified map key join columns.
- */
- ListIterable<? extends JoinColumn> getSpecifiedMapKeyJoinColumns();
-
- /**
- * Return the number of specified join columns.
- */
- int getSpecifiedMapKeyJoinColumnsSize();
-
- /**
- * Return whether the mapping has any specified map key join columns.
- * (Equivalent to {@link #getSpecifiedMapKeyJoinColumnsSize()} != 0.)
- */
- boolean hasSpecifiedMapKeyJoinColumns();
-
- /**
- * Return the specified map key join column at the specified index.
- */
- JoinColumn getSpecifiedMapKeyJoinColumn(int index);
-
- /**
- * Add a specified map key join column to the relationship.
- */
- JoinColumn addSpecifiedMapKeyJoinColumn();
-
- /**
- * Add a specified map key join column to the relationship.
- */
- JoinColumn addSpecifiedMapKeyJoinColumn(int index);
-
- /**
- * Remove the specified map key join column.
- */
- void removeSpecifiedMapKeyJoinColumn(int index);
-
- /**
- * Remove the specified map key join column.
- */
- void removeSpecifiedMapKeyJoinColumn(JoinColumn joinColumn);
-
- /**
- * Move the specified map key join column from the source index to the target index.
- */
- void moveSpecifiedMapKeyJoinColumn(int targetIndex, int sourceIndex);
-
-
- // ********** default map key join column **********
-
- /**
- * Change notification identifier for "defaultMapKeyJoinColumn" property
- */
- String DEFAULT_MAP_KEY_JOIN_COLUMN_PROPERTY = "defaultMapKeyJoinColumn"; //$NON-NLS-1$
-
- /**
- * Return the default map key join column. If there are specified map key join
- * columns, there is no default join column. There are also
- * times that there may be no default map key join column even if there are no
- * specified map key join columns.
- */
- JoinColumn getDefaultMapKeyJoinColumn();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionTable2_0.java
deleted file mode 100644
index 62784130c5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/CollectionTable2_0.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ReferenceTable;
-
-/**
- * Used by element collection mappings.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface CollectionTable2_0
- extends ReferenceTable
-{
- ElementCollectionMapping2_0 getParent();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ConvertibleKeyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ConvertibleKeyMapping2_0.java
deleted file mode 100644
index 135aec4249..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ConvertibleKeyMapping2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.Converter;
-
-/**
- * JPA attribute mapping that has a map key converter (JPA 2.0 collection mappings)
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface ConvertibleKeyMapping2_0
- extends AttributeMapping2_0
-{
- /**
- * Return the mapping's key converter. Never <code>null</code>.
- */
- Converter getMapKeyConverter();
- String MAP_KEY_CONVERTER_PROPERTY = "mapKeyConverter"; //$NON-NLS-1$
-
- /**
- * Set the key converter type, adding the appropriate converter to the resource
- * model and removing any other converters. Clear all converters if the
- * specified type is <code>null</code>.
- */
- void setMapKeyConverter(Class<? extends Converter> converterType);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivableIdMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivableIdMapping2_0.java
deleted file mode 100644
index 071e4a85d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivableIdMapping2_0.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-/**
- * JPA 2.0 attribute mapping
- * <p>
- * 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.
- */
-public interface DerivableIdMapping2_0
- extends AttributeMapping2_0
-{
- /**
- * Return whether the ID (or embedded ID) mapping is derived from a
- * relationship; i.e. a relationship maps the ID using the
- * <code>@MapsId</code> annotation.
- * <p>
- * <strong>NB:</strong> There can be several relationships that map the ID
- * (erroneously, of course).
- */
- boolean isDerived();
-
- /**
- * Property string associated with changes to the derivable flag.
- */
- final String DERIVED_PROPERTY = "derived"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentity2_0.java
deleted file mode 100644
index b66c0c7776..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentity2_0.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * Derived identity
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface DerivedIdentity2_0
- extends JpaContextNode
-{
-// TODO bjv rename methods
- /**
- * Return the associated single relationship mapping.
- */
- SingleRelationshipMapping2_0 getMapping();
-
- // ********** predominant strategy **********
-
- /**
- * String associated with changes to the predominant derived identity
- * strategy property.
- */
- String PREDOMINANT_DERIVED_IDENTITY_STRATEGY_PROPERTY = "predominantDerivedIdentityStrategy"; //$NON-NLS-1$
-
- /**
- * Return the mapping's predominant strategy.
- */
- DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy();
-
-
- // ********** null strategy **********
-
- /**
- * Return whether the mapping has no strategy.
- */
- boolean usesNullDerivedIdentityStrategy();
-
- /**
- * Configure the mapping so it has no strategy.
- * This will remove all other strategies.
- */
- void setNullDerivedIdentityStrategy();
-
-
- // ********** ID strategy **********
-
- /**
- * Return the mapping's ID strategy.
- */
- IdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy();
-
- /**
- * Return whether the mapping uses an ID strategy.
- */
- boolean usesIdDerivedIdentityStrategy();
-
- /**
- * Configure the mapping so it has an ID strategy.
- * This will remove all other strategies.
- */
- void setIdDerivedIdentityStrategy();
-
-
- // ********** maps ID strategy **********
-
- /**
- * Return the mapping's "maps ID" strategy.
- */
- MapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy();
-
- /**
- * Return whether the mapping uses a "maps ID" strategy.
- */
- boolean usesMapsIdDerivedIdentityStrategy();
-
- /**
- * Configure the mapping so it has a "maps ID" strategy.
- * This will remove all other strategies.
- */
- void setMapsIdDerivedIdentityStrategy();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentityStrategy2_0.java
deleted file mode 100644
index 466dfea80a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/DerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * Derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface DerivedIdentityStrategy2_0
- extends JpaContextNode
-{
- /**
- * Return whether the strategy is specified on the resource model.
- */
- boolean isSpecified();
-
- /**
- * Add this strategy to the relationship reference.
- */
- void addStrategy();
-
- /**
- * Remove this strategy from the relationship reference.
- */
- void removeStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ElementCollectionMapping2_0.java
deleted file mode 100644
index d92bad4100..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.context;
-
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.Column;
-import org.eclipse.jpt.jpa.core.context.ConvertibleMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-
-/**
- * JPA 2.0 element collection mapping
- * <p>
- * 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.
- *
- * @version 3.2
- * @since 2.3
- */
-public interface ElementCollectionMapping2_0
- extends CollectionMapping2_0, ConvertibleMapping
-{
- /**
- * Return the entity that owns the mapping. This is
- * just a convenience method that calls {@link #getTypeMapping()} and returns
- * <code>null</code> if it is not an {@link Entity}.
- */
- Entity getEntity();
-
-
- // ********** target class **********
-
- String getTargetClass();
-
- String getSpecifiedTargetClass();
- void setSpecifiedTargetClass(String value);
- String SPECIFIED_TARGET_CLASS_PROPERTY = "specifiedTargetClass"; //$NON-NLS-1$
-
- String getDefaultTargetClass();
- String DEFAULT_TARGET_CLASS_PROPERTY = "defaultTargetClass"; //$NON-NLS-1$
-
- /**
- * If the target class is specified, this will return it fully qualified. If not
- * specified, it returns the default target class, which is always fully qualified
- */
- String getFullyQualifiedTargetClass();
- String FULLY_QUALIFIED_TARGET_CLASS_PROPERTY = "fullyQualifiedTargetClass"; //$NON-NLS-1$
-
- /**
- * Return the character to be used for browsing or creating the target
- * class {@link IType}.
- * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
- */
- char getTargetClassEnclosingTypeSeparator();
-
-
- // ********** collection table **********
-
- /**
- * Return the mapping's collection table.
- * This will not be null.
- */
- CollectionTable2_0 getCollectionTable();
-
-
- // ********** value column **********
-
- /**
- * Return the mapping's value column.
- */
- Column getValueColumn();
-
-
- // ********** override containers **********
-
- AttributeOverrideContainer getValueAttributeOverrideContainer();
-
- AssociationOverrideContainer getValueAssociationOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedIdMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedIdMapping2_0.java
deleted file mode 100644
index 353893ab8a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedIdMapping2_0.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
-
-/**
- * JPA 2.0 embedded ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface EmbeddedIdMapping2_0
- extends EmbeddedIdMapping, DerivableIdMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedMapping2_0.java
deleted file mode 100644
index 43d47a6e03..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/EmbeddedMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.EmbeddedMapping;
-
-/**
- * JPA 2.0 embedded mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
- public interface EmbeddedMapping2_0
- extends EmbeddedMapping, AttributeMapping2_0
-{
- AssociationOverrideContainer getAssociationOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index caf3fe784e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-/**
- * ID derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface IdDerivedIdentityStrategy2_0
- extends DerivedIdentityStrategy2_0
-{
- /**
- * String associated with changes to the value property of this object
- */
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Return whether this object uses a derived id
- */
- boolean getValue();
-
- /**
- * Set whether this object uses a derived id
- */
- void setValue(boolean value);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdMapping2_0.java
deleted file mode 100644
index 57ff8da524..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/IdMapping2_0.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.IdMapping;
-
-/**
- * JPA 2.0 ID mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface IdMapping2_0
- extends IdMapping, DerivableIdMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/JpaRootContextNode2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/JpaRootContextNode2_0.java
deleted file mode 100644
index ccd7dd2eb9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/JpaRootContextNode2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer;
-
-/**
- * Root of the Dali JPA 2.0 context model.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaRootContextNode2_0
- extends JpaRootContextNode, MetamodelSynchronizer
-{
- // nothing yet...
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/LockModeType2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/LockModeType2_0.java
deleted file mode 100644
index 65826a933f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/LockModeType2_0.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-/**
- * LockMode Type
- *
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public enum LockModeType2_0 {
-
- READ(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.READ,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.READ
- ),
- WRITE(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.WRITE,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.WRITE
- ),
- OPTIMISTIC(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.OPTIMISTIC,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.OPTIMISTIC
- ),
- OPTIMISTIC_FORCE_INCREMENT(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.OPTIMISTIC_FORCE_INCREMENT,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.OPTIMISTIC_FORCE_INCREMENT
- ),
- PESSIMISTIC_READ(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.PESSIMISTIC_READ,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.PESSIMISTIC_READ
- ),
- PESSIMISTIC_WRITE(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.PESSIMISTIC_WRITE,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.PESSIMISTIC_WRITE
- ),
- PESSIMISTIC_FORCE_INCREMENT(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.PESSIMISTIC_FORCE_INCREMENT,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.PESSIMISTIC_FORCE_INCREMENT
- ),
- NONE(
- org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0.NONE,
- org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0.NONE
- );
-
-
- private org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType;
- private org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType;
-
- LockModeType2_0(org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType, org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType) {
- if (javaLockModeType == null) {
- throw new NullPointerException();
- }
- if (ormLockModeType == null) {
- throw new NullPointerException();
- }
- this.javaLockModeType = javaLockModeType;
- this.ormLockModeType = ormLockModeType;
- }
-
- public org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0 getJavaLockModeType() {
- return this.javaLockModeType;
- }
-
- public org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 getOrmLockModeType() {
- return this.ormLockModeType;
- }
-
-
- // ********** static methods **********
-
- public static LockModeType2_0 fromJavaResourceModel(org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType) {
- return (javaLockModeType == null) ? null : fromJavaResourceModel_(javaLockModeType);
- }
-
- private static LockModeType2_0 fromJavaResourceModel_(org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType) {
- for (LockModeType2_0 lockModeType : LockModeType2_0.values()) {
- if (lockModeType.getJavaLockModeType() == javaLockModeType) {
- return lockModeType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.jpa2.resource.java.LockModeType_2_0 toJavaResourceModel(LockModeType2_0 lockModeType) {
- return (lockModeType == null) ? null : lockModeType.getJavaLockModeType();
- }
-
-
- public static LockModeType2_0 fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType) {
- return (ormLockModeType == null) ? null : fromOrmResourceModel_(ormLockModeType);
- }
-
- private static LockModeType2_0 fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType) {
- for (LockModeType2_0 lockModeType : LockModeType2_0.values()) {
- if (lockModeType.getOrmLockModeType() == ormLockModeType) {
- return lockModeType;
- }
- }
- return null;
- }
-
- public static org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 toOrmResourceModel(LockModeType2_0 lockModeType) {
- return (lockModeType == null) ? null : lockModeType.getOrmLockModeType();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToManyMapping2_0.java
deleted file mode 100644
index 51095a4b82..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToManyMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ManyToManyMapping;
-import org.eclipse.jpt.jpa.core.context.ManyToManyRelationship;
-
-/**
- * JPA 2.0 m:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ManyToManyMapping2_0
- extends ManyToManyMapping, CollectionMapping2_0
-{
- ManyToManyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneMapping2_0.java
deleted file mode 100644
index 255d89272e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ManyToOneMapping;
-import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship;
-
-/**
- * JPA 2.0 m:1 mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ManyToOneMapping2_0
- extends ManyToOneMapping, SingleRelationshipMapping2_0
-{
- ManyToOneRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneRelationship2_0.java
deleted file mode 100644
index fbe1033083..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ManyToOneRelationship2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship;
-
-/**
- * JPA 2.0 m:1 relationship (mapped by, join column, join table)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ManyToOneRelationship2_0
- extends ManyToOneRelationship, JoinTableRelationship
-{
- // add join table support to JPA 1.0 m:1
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java
deleted file mode 100644
index 60aa6f2854..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitDefaults;
-
-/**
- * JPA 2.0 Persistence unit defaults held by a mapping file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MappingFilePersistenceUnitDefaults2_0
- extends MappingFilePersistenceUnitDefaults
-{
- /**
- * Return whether all the database identifiers in the
- * persistence unit are to be considered delimited.
- */
- boolean isDelimitedIdentifiers();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitMetadata2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitMetadata2_0.java
deleted file mode 100644
index c412c367eb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingFilePersistenceUnitMetadata2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata;
-
-/**
- * JPA 2.0
- * Persistence unit metadata held by a mapping file.
- * <p>
- * 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.
- */
-public interface MappingFilePersistenceUnitMetadata2_0
- extends MappingFilePersistenceUnitMetadata
-{
- /**
- * Return a description of the mapping file's persistence unit.
- */
- String getDescription();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingRelationshipStrategy2_0.java
deleted file mode 100644
index a3e534401f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MappingRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.MappingRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
-
-/**
- * Strategy describing how two entities are joined via a
- * {@link RelationshipMapping}:<ul>
- * <li>join column
- * <li>join table
- * <li>"mapped by"
- * <li>primary key join column
- * </ul>
- * 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.
- *
- * @see RelationshipMapping
- * @see AssociationOverride
- * @see MappingRelationship
- */
-public interface MappingRelationshipStrategy2_0
- extends RelationshipStrategy
-{
- /**
- * Select from the specified override relationship which of its strategies
- * is the override strategy (<em>join column</em> or <em>join table</em>).
- * An association override can only override the same strategy as the
- * strategy used by its overridden mapping (i.e. if the overridden mapping
- * uses the <em>join column</em> strategy, the association override must
- * also use the <em>join column</em> strategy; it cannot change the strategy
- * to <em>join table</em>).
- *
- * Return <code>null</code> if the override relationship cannot be
- * determined (typically because the association override's name does not
- * match the name of an appropriate attribute mapping in the overridden
- * mapped superclass or embeddable type).
- */
- ReadOnlyRelationshipStrategy selectOverrideStrategy(ReadOnlyOverrideRelationship2_0 overrideRelationship);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 57d37ba4cc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-
-/**
- * Maps ID derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MapsIdDerivedIdentityStrategy2_0
- extends DerivedIdentityStrategy2_0
-{
- /**
- * Return the specified ID attribute name or, in its absence, the default
- * ID attribute name. This the name of the ID attribute the relationship
- * mapping also maps (e.g. a Child's parent mapping also maps part of
- * the Child's primary key, the parent ID).
- */
- String getIdAttributeName();
-
- /**
- * String associated with changes to the specified ID attribute name property.
- */
- String SPECIFIED_ID_ATTRIBUTE_NAME_PROPERTY = "specifiedIdAttributeName"; //$NON-NLS-1$
-
- /**
- * Return the specified ID attribute name.
- * Return <code>null</code> if no name is specified.
- */
- String getSpecifiedIdAttributeName();
-
- /**
- * Set the specified attribute name.
- */
- void setSpecifiedIdAttributeName(String idAttributeName);
-
- /**
- * Return whether a default value is ever used.
- * (In some cases, there can be no default.)
- */
- boolean defaultIdAttributeNameIsPossible();
-
- /**
- * String associated with changes to the default ID attribute name property.
- */
- String DEFAULT_ID_ATTRIBUTE_NAME_PROPERTY = "defaultIdAttributeName"; //$NON-NLS-1$
-
- /**
- * Return the default ID attribute name.
- */
- String getDefaultIdAttributeName();
-
- /**
- * Return a sorted list of candidate ID attribute names.
- */
- Iterable<String> getSortedCandidateIdAttributeNames();
-
- /**
- * Return attribute mapping referenced by the ID attribute name,
- * which may be a mapping on the entity
- * or a mapping within the embeddable mapping referenced by the entity's
- * embedded ID mapping.
- */
- AttributeMapping getDerivedIdAttributeMapping();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelField.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelField.java
deleted file mode 100644
index 4e68b8268e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelField.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-/**
- * JPA 2.0 Canonical Metamodel field corresponding to a persistent attribute.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MetamodelField {
-
- Iterable<String> getModifiers();
-
- String getTypeName();
-
- Iterable<String> getTypeArgumentNames();
-
- String getName();
-
- String DEFAULT_TYPE_NAME = java.lang.Object.class.getName(); // ???
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelSourceType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelSourceType.java
deleted file mode 100644
index 7cb565bc25..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/MetamodelSourceType.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jpt.common.core.utility.BodySourceWriter;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import com.ibm.icu.text.Collator;
-
-/**
- * JPA 2.0 metamodel source type.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MetamodelSourceType {
-
- /**
- * Return the source type's name.
- */
- String getName();
-
- /**
- * Return whether the source type is "managed" (i.e. persistent).
- */
- boolean isManaged();
-
- /**
- * Return the source type's super type.
- */
- PersistentType getSuperPersistentType();
-
- /**
- * Return the source type's attributes.
- */
- ListIterable<? extends ReadOnlyPersistentAttribute> getAttributes();
-
- /**
- * Return the file generated as a result of the metamodel synchronization.
- */
- IFile getMetamodelFile();
-
- /**
- * Return the source type's JPA project.
- */
- JpaProject getJpaProject();
-
- /**
- * Synchronize the source type's metamodel, using the specified member type
- * tree.
- */
- void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree);
-
- /**
- * Print the body of the source type's metamodel class on the specified
- * writer, using the specified member type tree.
- */
- void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree);
-
-
- /**
- * {@link Comparator} that can be used to compare source types.
- */
- Comparator<MetamodelSourceType> COMPARATOR =
- new Comparator<MetamodelSourceType>() {
- public int compare(MetamodelSourceType type1, MetamodelSourceType type2) {
- return Collator.getInstance().compare(type1.getName(), type2.getName());
- }
- };
-
-
- /**
- * This interface is used by the source type to synchronize the metamodel
- * as required by changes to the context model.
- */
- interface Synchronizer {
- /**
- * Return the file generated as a result of the metamodel synchronization.
- */
- IFile getFile();
-
- /**
- * Synchronize the metamodel with the current state of the source
- * type, using the specified member type tree.
- */
- void synchronize(Map<String, Collection<MetamodelSourceType>> memberTypeTree);
-
- /**
- * Print the body of the metamodel class on the specified writer,
- * using the specified member type tree.
- */
- void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/NamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/NamedQuery2_0.java
deleted file mode 100644
index 0d4be3ba44..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/NamedQuery2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-
-/**
- * JPA 2.0 named query
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface NamedQuery2_0
- extends NamedQuery
-{
- // ********** lock mode **********
-
- /**
- * Return the specified lock mode if present, otherwise return the default
- * lock mode.
- */
- LockModeType2_0 getLockMode();
- LockModeType2_0 getSpecifiedLockMode();
- void setSpecifiedLockMode(LockModeType2_0 lockMode);
- String SPECIFIED_LOCK_MODE_PROPERTY = "specifiedLockMode"; //$NON-NLS-1$
- LockModeType2_0 getDefaultLockMode();
- String DEFAULT_LOCK_MODE_PROPERTY = "defaultLockMode"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyMapping2_0.java
deleted file mode 100644
index e916dad3c0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.OneToManyMapping;
-import org.eclipse.jpt.jpa.core.context.OneToManyRelationship;
-
-/**
- * JPA 2.0 1:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OneToManyMapping2_0
- extends OneToManyMapping, CollectionMapping2_0
-{
- OneToManyRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyRelationship2_0.java
deleted file mode 100644
index a67f09cd4c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToManyRelationship2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.OneToManyRelationship;
-
-/**
- * JPA 2.0 1:m relationship (mapped by, join table, join column)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OneToManyRelationship2_0
- extends OneToManyRelationship, JoinColumnRelationship
-{
- // add join column support to JPA 1.0 1:m
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneMapping2_0.java
deleted file mode 100644
index c9a8427f0d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.OneToOneMapping;
-import org.eclipse.jpt.jpa.core.context.OneToOneRelationship;
-
-/**
- * JPA 2.0 1:1 mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OneToOneMapping2_0
- extends OneToOneMapping, SingleRelationshipMapping2_0
-{
- OneToOneRelationship getRelationship();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneRelationship2_0.java
deleted file mode 100644
index f60caa4f5e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OneToOneRelationship2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.OneToOneRelationship;
-
-/**
- * JPA 2.0 1:1 relationship (mapped by, join column, primary key join column,
- * join table)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OneToOneRelationship2_0
- extends OneToOneRelationship, JoinTableRelationship
-{
- // add join table support to JPA 1.0 1:1
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrderColumn2_0.java
deleted file mode 100644
index 19f51dde76..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrderColumn2_0.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.NamedColumn;
-
-/**
- * order column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrderColumn2_0
- extends NamedColumn
-{
- // ********** nullable **********
-
- /**
- * Return the specified nullable setting if present, otherwise return the
- * default nullable setting.
- */
- boolean isNullable();
- Boolean getSpecifiedNullable();
- void setSpecifiedNullable(Boolean newSpecifiedNullable);
- String SPECIFIED_NULLABLE_PROPERTY = "specifiedNullable"; //$NON-NLS-1$
- boolean isDefaultNullable();
- String DEFAULT_NULLABLE_PROPERTY = "defaultNullable"; //$NON-NLS-1$
- boolean DEFAULT_NULLABLE = true;
-
-
- // ********** insertable **********
-
- /**
- * Return the specified insertable setting if present, otherwise return the
- * default insertable setting.
- */
- boolean isInsertable();
- Boolean getSpecifiedInsertable();
- void setSpecifiedInsertable(Boolean newSpecifiedInsertable);
- String SPECIFIED_INSERTABLE_PROPERTY = "specifiedInsertable"; //$NON-NLS-1$
- boolean isDefaultInsertable();
- String DEFAULT_INSERTABLE_PROPERTY = "defaultInsertable"; //$NON-NLS-1$
- boolean DEFAULT_INSERTABLE = true;
-
-
- // ********** updatable **********
-
- /**
- * Return the specified updatable setting if present, otherwise return the
- * default updatable setting.
- */
- boolean isUpdatable();
- Boolean getSpecifiedUpdatable();
- void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable);
- String SPECIFIED_UPDATABLE_PROPERTY = "specifiedUpdatable"; //$NON-NLS-1$
- boolean isDefaultUpdatable();
- String DEFAULT_UPDATABLE_PROPERTY = "defaultUpdatable"; //$NON-NLS-1$
- boolean DEFAULT_UPDATABLE = true;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Orderable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Orderable2_0.java
deleted file mode 100644
index acd5de3c7e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/Orderable2_0.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.Orderable;
-import org.eclipse.jpt.jpa.db.Table;
-
-/**
- * Multi-valued (1:m, m:m) relationship and element collection mappings support
- * ordering.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Orderable2_0
- extends Orderable
-{
- boolean isOrderColumnOrdering();
- void setOrderColumnOrdering(boolean value);
- String ORDER_COLUMN_ORDERING_PROPERTY = "orderColumnOrdering"; //$NON-NLS-1$
-
- OrderColumn2_0 getOrderColumn();
-
- String getDefaultTableName();
-
-
- /**
- * interface allowing ordering in multiple places
- * (i.e. multi-value relationship and element collection mappings)
- */
- interface Owner
- {
- /**
- * Return the name of the column's table.
- */
- String getTableName();
-
- Table resolveDbTable(String tableName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovable2_0.java
deleted file mode 100644
index 599ea17e18..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovable2_0.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-
-/**
- * Oprhan removal
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrphanRemovable2_0
- extends JpaContextNode
-{
- boolean isOrphanRemoval();
-
- Boolean getSpecifiedOrphanRemoval();
- void setSpecifiedOrphanRemoval(Boolean orphanRemoval);
- String SPECIFIED_ORPHAN_REMOVAL_PROPERTY = "specifiedOrphanRemoval"; //$NON-NLS-1$
-
- boolean isDefaultOrphanRemoval();
- String DEFAULT_ORPHAN_REMOVAL_PROPERTY = "defaultOrphanRemoval"; //$NON-NLS-1$
- boolean DEFAULT_ORPHAN_REMOVAL = false;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovalHolder2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovalHolder2_0.java
deleted file mode 100644
index b4736135c0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OrphanRemovalHolder2_0.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.JpaNode;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrphanRemovalHolder2_0
- extends JpaNode
-{
- OrphanRemovable2_0 getOrphanRemoval();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OverrideRelationship2_0.java
deleted file mode 100644
index a44fbe4fb4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/OverrideRelationship2_0.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.JoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
-
-/**
- * JPA 2.0 association override relationship
- * <p>
- * 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.
- *
- * @see AssociationOverride
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OverrideRelationship2_0
- extends OverrideRelationship,
- JoinTableRelationship,
- ReadOnlyOverrideRelationship2_0
-{
- // add join table support to JPA 1.0 association override
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentAttribute2_0.java
deleted file mode 100644
index a847dd0c03..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentAttribute2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-
-/**
- * JPA 2.0
- * Context persistent <em>attribute</em> (field or property).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistentAttribute2_0
- extends PersistentAttribute, ReadOnlyPersistentAttribute2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentType2_0.java
deleted file mode 100644
index 65a6fd9f59..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/PersistentType2_0.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-
-/**
- * JPA 2.0 context persistent type.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistentType2_0
- extends PersistentType, MetamodelSourceType
-{
- /**
- * Return the name of the persistent type's "declaring type".
- * Return <code>null</code> if the persistent type is a top-level type.
- * The declaring type may or may not be a persistent type.
- */
- String getDeclaringTypeName();
- String DECLARING_TYPE_NAME_PROPERTY = "declaringTypeName"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java
deleted file mode 100644
index ca67250ac0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-/**
- * JPA 2.0
- * Read-only association override
- * <p>
- * 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.
- */
-public interface ReadOnlyAssociationOverride2_0
- extends ReadOnlyAssociationOverride
-{
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java
deleted file mode 100644
index da67243391..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.AssociationOverride;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-/**
- * JPA 2.0 association override relationship
- * <p>
- * 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.
- *
- * @see AssociationOverride
- */
-public interface ReadOnlyOverrideRelationship2_0
- extends ReadOnlyOverrideRelationship,
- ReadOnlyJoinTableRelationship
-{
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
-
- JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyPersistentAttribute2_0.java
deleted file mode 100644
index 00fc7c7b93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyPersistentAttribute2_0.java
+++ /dev/null
@@ -1,45 +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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-
-/**
- * JPA 2.0
- * Read-only context persistent <em>attribute</em> (field or property).
- * <p>
- * 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.
- */
-public interface ReadOnlyPersistentAttribute2_0
- extends ReadOnlyPersistentAttribute
-{
- /**
- * Return the name of the container type to be used in the metamodel field
- * declaration corresponding to the attribute's mapping.
- */
- String getMetamodelContainerFieldTypeName();
-
- /**
- * Return the name of the container map key type to be used in the
- * metamodel field declaration corresponding to the attribute's mapping.
- * Return <code>null</code> if the attribute's type is not
- * {@link java.util.Map}.
- */
- String getMetamodelContainerFieldMapKeyTypeName();
-
- /**
- * Return the attribute's type name for the metamodel.
- */
- String getMetamodelTypeName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SequenceGenerator2_0.java
deleted file mode 100644
index 4c390df246..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SequenceGenerator2_0.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
-
-/**
- * JPA 2.0 sequence generator
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface SequenceGenerator2_0
- extends SequenceGenerator
-{
- // ********** catalog **********
-
- /**
- * Return the specified catalog if present, otherwise return the default
- * catalog.
- */
- String getCatalog();
- String getSpecifiedCatalog();
- void setSpecifiedCatalog(String value);
- String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
- String getDefaultCatalog();
- String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
-
-
- // ********** schema **********
-
- /**
- * Return the specified schema if present, otherwise return the default
- * schema.
- */
- String getSchema();
- String getSpecifiedSchema();
- void setSpecifiedSchema(String value);
- String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
- String getDefaultSchema();
- String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SingleRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SingleRelationshipMapping2_0.java
deleted file mode 100644
index a601c7215a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/SingleRelationshipMapping2_0.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.SingleRelationshipMapping;
-
-/**
- * JPA 2.0 single relationship (m:1, 1:1) mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface SingleRelationshipMapping2_0
- extends SingleRelationshipMapping, AttributeMapping2_0
-{
- DerivedIdentity2_0 getDerivedIdentity();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/VirtualOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/VirtualOverrideRelationship2_0.java
deleted file mode 100644
index a490a8d03f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/VirtualOverrideRelationship2_0.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context;
-
-import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.VirtualOverrideRelationship;
-
-/**
- * JPA 2.0 virtual association override relationship
- * <p>
- * 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.
- */
-public interface VirtualOverrideRelationship2_0
- extends VirtualOverrideRelationship,
- VirtualJoinTableRelationship,
- ReadOnlyOverrideRelationship2_0
-{
- // add join table support to JPA 1.0 association override
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverride2_0.java
deleted file mode 100644
index 6516652a4e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverride2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyAssociationOverride2_0;
-
-/**
- * JPA 2.0
- * Java <em>specified</em> association override
- * <p>
- * 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.
- */
-public interface JavaAssociationOverride2_0
- extends JavaAssociationOverride, ReadOnlyAssociationOverride2_0
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverrideContainer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverrideContainer2_0.java
deleted file mode 100644
index 945a0d9896..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAssociationOverrideContainer2_0.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.jpa2.context.AssociationOverrideContainer2_0;
-
-/**
- * JPA 2.0
- * Java association override container
- * <p>
- * 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.
- */
-public interface JavaAssociationOverrideContainer2_0
- extends JavaAssociationOverrideContainer, JavaOverrideContainer2_0, AssociationOverrideContainer2_0
-{
- // combine interfaces
-
-
- // ********** owner **********
-
- interface Owner
- extends JavaAssociationOverrideContainer.Owner, JavaOverrideContainer2_0.Owner, AssociationOverrideContainer2_0.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAttributeOverrideContainer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAttributeOverrideContainer2_0.java
deleted file mode 100644
index 9103d549a4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaAttributeOverrideContainer2_0.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-
-/**
- * JPA 2.0
- * Java attribute override container
- * <p>
- * 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.
- */
-public interface JavaAttributeOverrideContainer2_0
- extends JavaAttributeOverrideContainer, JavaOverrideContainer2_0
-{
- // combine interfaces
-
-
- // ********** owner **********
-
- interface Owner
- extends JavaAttributeOverrideContainer.Owner, JavaOverrideContainer2_0.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheable2_0.java
deleted file mode 100644
index 5979afa47d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheable2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cacheable2_0;
-
-/**
- * Java cacheable
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaCacheable2_0
- extends Cacheable2_0, JavaJpaContextNode
-{
- // combine two interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheableHolder2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheableHolder2_0.java
deleted file mode 100644
index 4f95ea0708..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCacheableHolder2_0.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.CacheableHolder2_0;
-
-/**
- * Java cacheable holder/parent
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaCacheableHolder2_0
- extends CacheableHolder2_0, JavaJpaContextNode
-{
- JavaResourceType getJavaResourceType();
- JavaCacheable2_0 getCacheable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCascade2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCascade2_0.java
deleted file mode 100644
index 058d01a308..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCascade2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaCascade;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cascade2_0;
-
-/**
- * Java cascade (persist, merge, remove, refresh, detach)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaCascade2_0
- extends JavaCascade, Cascade2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionMapping2_0.java
deleted file mode 100644
index 2f176f777c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionMapping2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaCollectionMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionMapping2_0;
-
-/**
- * Java collection mapping (e.g. 1:m, m:m, element collection)
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.3
- */
-public interface JavaCollectionMapping2_0
- extends CollectionMapping2_0, JavaCollectionMapping, JavaConvertibleKeyMapping2_0
-{
- JavaAttributeOverrideContainer getMapKeyAttributeOverrideContainer();
-
- ListIterable<? extends JavaJoinColumn> getSpecifiedMapKeyJoinColumns();
- JavaJoinColumn getSpecifiedMapKeyJoinColumn(int index);
- JavaJoinColumn addSpecifiedMapKeyJoinColumn();
- JavaJoinColumn addSpecifiedMapKeyJoinColumn(int index);
-
- JavaJoinColumn getDefaultMapKeyJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionTable2_0.java
deleted file mode 100644
index f7690c0d31..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaCollectionTable2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaReferenceTable;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.CollectionTable2_0Annotation;
-
-/**
- * Java collection table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaCollectionTable2_0
- extends CollectionTable2_0, JavaReferenceTable
-{
- CollectionTable2_0Annotation getTableAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaConvertibleKeyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaConvertibleKeyMapping2_0.java
deleted file mode 100644
index 22d0047a30..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaConvertibleKeyMapping2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.jpa2.context.ConvertibleKeyMapping2_0;
-
-/**
- * Java attribute mapping that has a key converter, collection mappings
- * <p>
- * 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.
- */
-public interface JavaConvertibleKeyMapping2_0
- extends ConvertibleKeyMapping2_0, JavaAttributeMapping
-{
- JavaConverter getMapKeyConverter();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java
deleted file mode 100644
index 8deb0ade29..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentity2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
-/**
- * Java derived identity
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaDerivedIdentity2_0
- extends DerivedIdentity2_0, JavaJpaContextNode
-{
- JavaSingleRelationshipMapping2_0 getMapping();
-
- JavaIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy();
-
- JavaMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy();
-
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaElementCollectionMapping2_0.java
deleted file mode 100644
index 3ba07d438d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaConvertibleMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.ElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ElementCollection2_0Annotation;
-
-/**
- * Java element collection mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaElementCollectionMapping2_0
- extends ElementCollectionMapping2_0, JavaCollectionMapping2_0, JavaConvertibleMapping
-{
- ElementCollection2_0Annotation getMappingAnnotation();
-
- JavaCollectionTable2_0 getCollectionTable();
-
- JavaColumn getValueColumn();
-
- JavaAttributeOverrideContainer getValueAttributeOverrideContainer();
-
- JavaAssociationOverrideContainer getValueAssociationOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaEmbeddedMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaEmbeddedMapping2_0.java
deleted file mode 100644
index e9260e3cd6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaEmbeddedMapping2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.EmbeddedMapping2_0;
-
-/**
- * JPA 2.0 Java embedded mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaEmbeddedMapping2_0
- extends EmbeddedMapping2_0, JavaEmbeddedMapping
-{
- JavaAssociationOverrideContainer getAssociationOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 5768792f44..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.IdDerivedIdentityStrategy2_0;
-
-/**
- * Java ID derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaIdDerivedIdentityStrategy2_0
- extends JavaJpaContextNode, IdDerivedIdentityStrategy2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToManyMapping2_0.java
deleted file mode 100644
index b0b9ca3f51..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToManyMapping2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToManyMapping2_0;
-
-/**
- * JPA 2.0 Java m:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaManyToManyMapping2_0
- extends ManyToManyMapping2_0, JavaManyToManyMapping, JavaCollectionMapping2_0
-{
- // combine various mappings
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneMapping2_0.java
deleted file mode 100644
index d605e66a1f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneMapping2_0.java
+++ /dev/null
@@ -1,32 +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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToOneMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneMapping2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.ManyToOne2_0Annotation;
-
-/**
- * JPA 2.0 Java m:1 mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaManyToOneMapping2_0
- extends ManyToOneMapping2_0, JavaManyToOneMapping, JavaSingleRelationshipMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneRelationship2_0.java
deleted file mode 100644
index a4ca264c8d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaManyToOneRelationship2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaManyToOneRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneRelationship2_0;
-
-/**
- * JPA 2.0 Java m:1 relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaManyToOneRelationship2_0
- extends ManyToOneRelationship2_0,
- JavaManyToOneRelationship,
- JavaMappingJoinTableRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyEnumeratedConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyEnumeratedConverter2_0.java
deleted file mode 100644
index faa6243643..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyEnumeratedConverter2_0.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
-
-/**
- * Java map key enumerated converter
- * <p>
- * 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.
- */
-public interface JavaMapKeyEnumeratedConverter2_0
- extends JavaBaseEnumeratedConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- extends JavaConverter.AbstractAdapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseEnumeratedConverter.class;
- }
-
- @Override
- protected String getAnnotationName() {
- return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
- }
-
- public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
- return factory.buildJavaBaseEnumeratedConverter(parent, (MapKeyEnumerated2_0Annotation) converterAnnotation, this.buildOwner());
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java
deleted file mode 100644
index 2b0793d0f3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.jpa.core.JpaFactory;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaMapKeyTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
-
-/**
- * Java map key temporal converter
- * <p>
- * 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.
- */
-public interface JavaMapKeyTemporalConverter2_0
- extends JavaBaseTemporalConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- extends JavaConverter.AbstractAdapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseTemporalConverter.class;
- }
-
- @Override
- protected String getAnnotationName() {
- return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
- }
-
- public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
- return factory.buildJavaBaseTemporalConverter((JavaCollectionMapping2_0) parent, (MapKeyTemporal2_0Annotation) converterAnnotation, this.buildOwner());
- }
-
- @Override
- protected Owner buildOwner() {
- return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaMapKeyTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
- }
- };
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinColumnRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinColumnRelationshipStrategy2_0.java
deleted file mode 100644
index b65c8d46dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinColumnRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-
-/**
- * Java mapping join column relationship strategy
- * <p>
- * 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.
- */
-public interface JavaMappingJoinColumnRelationshipStrategy2_0
- extends JavaMappingRelationshipStrategy2_0, JavaJoinColumnRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinTableRelationshipStrategy2_0.java
deleted file mode 100644
index 5d8c7c7d28..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingJoinTableRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-
-/**
- * Java mapping join table relationship strategy
- * <p>
- * 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.
- */
-public interface JavaMappingJoinTableRelationshipStrategy2_0
- extends JavaMappingRelationshipStrategy2_0, JavaJoinTableRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingMappedByRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingMappedByRelationshipStrategy2_0.java
deleted file mode 100644
index 48afe663f4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingMappedByRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedByRelationshipStrategy;
-
-/**
- * Java mapping "mapped by" relationship strategy
- * <p>
- * 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.
- */
-public interface JavaMappingMappedByRelationshipStrategy2_0
- extends JavaMappingRelationshipStrategy2_0, JavaMappedByRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java
deleted file mode 100644
index 78f96e9e62..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumnRelationshipStrategy;
-
-/**
- * Java mapping primary key join column relationship strategy
- * <p>
- * 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.
- */
-public interface JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
- extends JavaMappingRelationshipStrategy2_0, JavaPrimaryKeyJoinColumnRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingRelationshipStrategy2_0.java
deleted file mode 100644
index b9963e3400..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMappingRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
-
-/**
- * Java mapping relationship strategy
- * <p>
- * 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.
- */
-public interface JavaMappingRelationshipStrategy2_0
- extends MappingRelationshipStrategy2_0, JavaRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 23293e88b4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.MapsIdDerivedIdentityStrategy2_0;
-
-/**
- * Java maps ID derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaMapsIdDerivedIdentityStrategy2_0
- extends JavaJpaContextNode, MapsIdDerivedIdentityStrategy2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaNamedQuery2_0.java
deleted file mode 100644
index ad6d339b0c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaNamedQuery2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
-import org.eclipse.jpt.jpa.core.jpa2.context.NamedQuery2_0;
-
-/**
- * JPA 2.0
- * Java named native query
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaNamedQuery2_0
- extends NamedQuery2_0, JavaNamedQuery
-{
- // combine 2 interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyMapping2_0.java
deleted file mode 100644
index 39e2316cd3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyMapping2_0;
-
-/**
- * JPA 2.0 Java 1:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOneToManyMapping2_0
- extends OneToManyMapping2_0, JavaOneToManyMapping, JavaCollectionMapping2_0
-{
- // combine various interfaces
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyRelationship2_0.java
deleted file mode 100644
index 168cfa5235..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToManyRelationship2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyRelationship2_0;
-
-/**
- * JPA 2.0 Java 1:m relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOneToManyRelationship2_0
- extends OneToManyRelationship2_0,
- JavaOneToManyRelationship,
- JavaMappingJoinColumnRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneMapping2_0.java
deleted file mode 100644
index 20746176bf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneMapping2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToOneMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0;
-
-/**
- * JPA 2.0 Java 1:1 mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOneToOneMapping2_0
- extends OneToOneMapping2_0, JavaOneToOneMapping, JavaSingleRelationshipMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneRelationship2_0.java
deleted file mode 100644
index eb44db096e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOneToOneRelationship2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaOneToOneRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneRelationship2_0;
-
-/**
- * JPA 2.0 Java 1:1 relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOneToOneRelationship2_0
- extends OneToOneRelationship2_0,
- JavaOneToOneRelationship,
- JavaMappingJoinTableRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderColumn2_0.java
deleted file mode 100644
index c257db1828..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderColumn2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaNamedColumn;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.OrderColumn2_0Annotation;
-
-/**
- * orm.xml order column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOrderColumn2_0
- extends OrderColumn2_0, JavaNamedColumn
-{
- OrderColumn2_0Annotation getColumnAnnotation();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderable2_0.java
deleted file mode 100644
index 04a1643b2b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrderable2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-
-/**
- * JPA 2.0 Java ordering
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOrderable2_0
- extends Orderable2_0, JavaOrderable
-{
- JavaResourceAttribute getResourceAttribute();
-
- JavaOrderColumn2_0 getOrderColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovable2_0.java
deleted file mode 100644
index 924a98d2ca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovable2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovable2_0;
-
-/**
- * Java orphan removal
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOrphanRemovable2_0
- extends JavaJpaContextNode, OrphanRemovable2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java
deleted file mode 100644
index 05497f76a4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovalHolder2_0;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOrphanRemovalHolder2_0
- extends OrphanRemovalHolder2_0, JavaJpaContextNode
-{
- JavaOrphanRemovable2_0 getOrphanRemoval();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideContainer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideContainer2_0.java
deleted file mode 100644
index b38d902a8f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideContainer2_0.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
-
-/**
- * JPA 2.0
- * Java attribute or association override container
- * <p>
- * 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.
- */
-public interface JavaOverrideContainer2_0
- extends JavaOverrideContainer
-{
- /**
- * Return a prefix (<em>without</em> the following <code>'.'</code>)
- * that may be prepended to the override name.
- * Return <code>null</code> if no prefix is supported.
- * <p>
- * JPA 2.0 supports the pre-defined prefixes
- * <code>"value"</code> and <code>"key"</code>.
- */
- // TODO better name?
- String getPossiblePrefix();
-
- /**
- * Return the prefix (<em>without</em> the following <code>'.'</code>)
- * to be prepended to the override name.
- */
- // TODO better name?
- String getWritePrefix();
-
-
- // ********** owner **********
-
- interface Owner
- extends JavaOverrideContainer.Owner
- {
- /**
- * @see JavaOverrideContainer2_0#getPossiblePrefix()
- */
- String getPossiblePrefix();
-
- /**
- * @see JavaOverrideContainer2_0#getWritePrefix()
- */
- String getWritePrefix();
-
- /**
- * This is necessary for JPA 2.0 because an override annotation for an
- * element collection can have a name with a prefix that indicates
- * whether the override applies to element collection's embedded key or
- * value. Return whether the specified override name, which may have a
- * prefix, is relevant to the override container.
- */
- // TODO better name?
- boolean isRelevant(String overrideName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideRelationship2_0.java
deleted file mode 100644
index 2d578376a2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaOverrideRelationship2_0.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.OverrideRelationship2_0;
-
-/**
- * JPA 2.0 Java association override relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaOverrideRelationship2_0
- extends OverrideRelationship2_0,
- JavaOverrideRelationship,
- JavaJoinTableRelationship
-{
- JavaJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentAttribute2_0.java
deleted file mode 100644
index 41cdcc8b38..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentAttribute2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.PersistentAttribute2_0;
-
-/**
- * JPA 2.0
- * Context Java persistent <em>attribute</em> (field or property).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaPersistentAttribute2_0
- extends JavaPersistentAttribute, PersistentAttribute2_0
-{
- // combine two interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentType2_0.java
deleted file mode 100644
index 0c87cab4bb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaPersistentType2_0.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.jpa2.context.PersistentType2_0;
-
-/**
- * JPA 2.0 context Java persistent type.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaPersistentType2_0
- extends JavaPersistentType, PersistentType2_0
-{
- ListIterable<JavaPersistentAttribute> getAttributes();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSequenceGenerator2_0.java
deleted file mode 100644
index bcaba68fa5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSequenceGenerator2_0.java
+++ /dev/null
@@ -1,29 +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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
-import org.eclipse.jpt.jpa.core.jpa2.context.SequenceGenerator2_0;
-
-/**
- * JPA 2.0
- * Java sequence generator
- * <p>
- * 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.
- */
-public interface JavaSequenceGenerator2_0
- extends JavaSequenceGenerator, SequenceGenerator2_0
-{
- // nothing
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java
deleted file mode 100644
index b0b6f5d878..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaSingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.SingleRelationshipMapping2_0;
-
-/**
- * JPA 2.0 Java single (m:1, 1:1) mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JavaSingleRelationshipMapping2_0
- extends SingleRelationshipMapping2_0, JavaSingleRelationshipMapping
-{
- JavaDerivedIdentity2_0 getDerivedIdentity();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualAssociationOverride2_0.java
deleted file mode 100644
index 4941d63159..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualAssociationOverride2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyAssociationOverride2_0;
-
-/**
- * JPA 2.0
- * Java <em>virtual</em> association override
- * <p>
- * 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.
- */
-public interface JavaVirtualAssociationOverride2_0
- extends JavaVirtualAssociationOverride, ReadOnlyAssociationOverride2_0
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualOverrideRelationship2_0.java
deleted file mode 100644
index 06e744eeb6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaVirtualOverrideRelationship2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.java;
-
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.VirtualOverrideRelationship2_0;
-
-/**
- * JPA 2.0 Java virtual association override relationship
- * <p>
- * 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.
- */
-public interface JavaVirtualOverrideRelationship2_0
- extends VirtualOverrideRelationship2_0,
- JavaVirtualOverrideRelationship,
- JavaVirtualJoinTableRelationship
-{
- JavaVirtualJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverride2_0.java
deleted file mode 100644
index 52f063f07f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverride2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyAssociationOverride2_0;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> <em>specified</em> association override
- * <p>
- * 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.
- */
-public interface OrmAssociationOverride2_0
- extends OrmAssociationOverride, ReadOnlyAssociationOverride2_0
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverrideContainer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverrideContainer2_0.java
deleted file mode 100644
index 8fe53d9179..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmAssociationOverrideContainer2_0.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.jpa2.context.AssociationOverrideContainer2_0;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> association override container
- * <p>
- * 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.
- */
-public interface OrmAssociationOverrideContainer2_0
- extends OrmAssociationOverrideContainer, AssociationOverrideContainer2_0
-{
- // combine interfaces
-
-
- // ********** owner **********
-
- interface Owner
- extends OrmAssociationOverrideContainer.Owner, AssociationOverrideContainer2_0.Owner
- {
- // combine interfaces
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheable2_0.java
deleted file mode 100644
index 2c70badf2c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheable2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cacheable2_0;
-
-/**
- * <code>orm.xml</code> cacheable
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmCacheable2_0
- extends Cacheable2_0, XmlContextNode
-{
- // combine two interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheableHolder2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheableHolder2_0.java
deleted file mode 100644
index b0f21ae95d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCacheableHolder2_0.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.CacheableHolder2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0;
-
-/**
- * <code>orm.xml</code> cacheable holder/parent
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmCacheableHolder2_0
- extends CacheableHolder2_0, XmlContextNode
-{
- XmlCacheable_2_0 getXmlCacheable();
- OrmCacheable2_0 getCacheable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCascade2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCascade2_0.java
deleted file mode 100644
index bfa95fc752..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCascade2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmCascade;
-import org.eclipse.jpt.jpa.core.jpa2.context.Cascade2_0;
-
-/**
- * <code>orm.xml</code> cascade (persist, merge, remove, refresh, detach)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmCascade2_0
- extends OrmCascade, Cascade2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionMapping2_0.java
deleted file mode 100644
index c2f4c06c21..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionMapping2_0.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmCollectionMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionMapping2_0;
-
-/**
- * <code>orm.xml</code> collection mapping (e.g. 1:m, m:m, element collection)
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.3
- */
-public interface OrmCollectionMapping2_0
- extends CollectionMapping2_0, OrmCollectionMapping, OrmConvertibleKeyMapping2_0
-{
- OrmAttributeOverrideContainer getMapKeyAttributeOverrideContainer();
-
- ListIterable<? extends OrmJoinColumn> getSpecifiedMapKeyJoinColumns();
- OrmJoinColumn getSpecifiedMapKeyJoinColumn(int index);
- OrmJoinColumn addSpecifiedMapKeyJoinColumn();
- OrmJoinColumn addSpecifiedMapKeyJoinColumn(int index);
-
- OrmJoinColumn getDefaultMapKeyJoinColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionTable2_0.java
deleted file mode 100644
index 834a0db803..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmCollectionTable2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmReferenceTable;
-import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
-
-/**
- * <code>orm.xml</code> collection table
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmCollectionTable2_0
- extends CollectionTable2_0, OrmReferenceTable
-{
- void initializeFrom(CollectionTable2_0 oldCollectionTable);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmConvertibleKeyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmConvertibleKeyMapping2_0.java
deleted file mode 100644
index a758fd8392..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmConvertibleKeyMapping2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.jpa2.context.ConvertibleKeyMapping2_0;
-
-/**
- * Java attribute mapping that has a key converter, collection mappings
- * <p>
- * 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.
- */
-public interface OrmConvertibleKeyMapping2_0
- extends ConvertibleKeyMapping2_0, OrmAttributeMapping
-{
- OrmConverter getMapKeyConverter();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmDerivedIdentity2_0.java
deleted file mode 100644
index eae448147e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmDerivedIdentity2_0.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentity2_0;
-
-/**
- * <code>orm.xml</code> derived identity
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmDerivedIdentity2_0
- extends DerivedIdentity2_0, XmlContextNode
-{
- OrmSingleRelationshipMapping2_0 getMapping();
-
- OrmIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy();
-
- OrmMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy();
-
- void initializeFrom(OrmDerivedIdentity2_0 oldDerivedIdentity);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java
deleted file mode 100644
index 28862fb25f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConvertibleMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.ElementCollectionMapping2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-
-/**
- * <code>orm.xml</code> element collection mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmElementCollectionMapping2_0
- extends ElementCollectionMapping2_0, OrmCollectionMapping2_0, OrmConvertibleMapping
-{
- XmlElementCollection getXmlAttributeMapping();
-
- OrmCollectionTable2_0 getCollectionTable();
-
- OrmColumn getValueColumn();
-
- OrmAttributeOverrideContainer getValueAttributeOverrideContainer();
-
- OrmAssociationOverrideContainer getValueAssociationOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java
deleted file mode 100644
index f7c79bc30b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddedMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.EmbeddedMapping2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> embedded mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmEmbeddedMapping2_0
- extends EmbeddedMapping2_0, OrmEmbeddedMapping
-{
- OrmAssociationOverrideContainer getAssociationOverrideContainer();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 0d587dfcfc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.IdDerivedIdentityStrategy2_0;
-
-/**
- * <code>orm.xml</code> ID derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmIdDerivedIdentityStrategy2_0
- extends XmlContextNode, IdDerivedIdentityStrategy2_0
-{
- void initializeFrom(OrmIdDerivedIdentityStrategy2_0 oldStrategy);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToManyMapping2_0.java
deleted file mode 100644
index 68305194a6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToManyMapping2_0.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToManyMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToManyMapping2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> m:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmManyToManyMapping2_0
- extends ManyToManyMapping2_0, OrmManyToManyMapping, OrmCollectionMapping2_0
-{
- // combine various mappings
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneMapping2_0.java
deleted file mode 100644
index 9e5da40de2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToOneMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneMapping2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> m:1 mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmManyToOneMapping2_0
- extends ManyToOneMapping2_0, OrmManyToOneMapping, OrmSingleRelationshipMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneRelationship2_0.java
deleted file mode 100644
index 4b37b6a4a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmManyToOneRelationship2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmManyToOneRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneRelationship2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> m:1 relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmManyToOneRelationship2_0
- extends ManyToOneRelationship2_0,
- OrmManyToOneRelationship,
- OrmMappingJoinTableRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java
deleted file mode 100644
index ce24f390f1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseEnumeratedConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0;
-
-/**
- * <code>orm.xml</code> map key enumerated converter
- * <p>
- * 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.
- */
-public interface OrmMapKeyEnumeratedConverter2_0
- extends OrmBaseEnumeratedConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- implements OrmConverter.Adapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseEnumeratedConverter.class;
- }
-
- public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- XmlMapKeyConvertibleMapping_2_0 xmlMapping = (XmlMapKeyConvertibleMapping_2_0) parent.getXmlAttributeMapping();
- return (xmlMapping.getMapKeyEnumerated() == null) ? null : factory.buildOrmBaseEnumeratedConverter(parent, this.buildOwner(xmlMapping));
- }
-
- protected OrmBaseEnumeratedConverter.Owner buildOwner(final XmlMapKeyConvertibleMapping_2_0 mapping) {
- return new OrmBaseEnumeratedConverter.Owner() {
- public void setXmlEnumType(EnumType enumType) {
- mapping.setMapKeyEnumerated(enumType);
- }
-
- public EnumType getXmlEnumType() {
- return mapping.getMapKeyEnumerated();
- }
-
- public TextRange getEnumTextRange() {
- return mapping.getMapKeyEnumeratedTextRange();
- }
-
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return JptValidator.Null.instance();
- }
- };
- }
-
- public boolean isActive(XmlAttributeMapping xmlMapping) {
- return ((XmlMapKeyConvertibleMapping_2_0) xmlMapping).getMapKeyEnumerated() != null;
- }
-
- public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- return factory.buildOrmBaseEnumeratedConverter(parent, this.buildOwner((XmlMapKeyConvertibleMapping_2_0) parent.getXmlAttributeMapping()));
- }
-
- public void clearXmlValue(XmlAttributeMapping xmlMapping) {
- ((XmlMapKeyConvertibleMapping_2_0) xmlMapping).setMapKeyEnumerated(null);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java
deleted file mode 100644
index b63d328a81..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.Converter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmBaseTemporalConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmMapKeyTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0;
-
-/**
- * <code>orm.xml</code> map key temporal converter
- * <p>
- * 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.
- */
-public interface OrmMapKeyTemporalConverter2_0
- extends OrmBaseTemporalConverter
-{
- // ********** adapter **********
-
- public static class Adapter
- implements OrmConverter.Adapter
- {
- private static final Adapter INSTANCE = new Adapter();
- public static Adapter instance() {
- return INSTANCE;
- }
-
- private Adapter() {
- super();
- }
-
- public Class<? extends Converter> getConverterType() {
- return BaseTemporalConverter.class;
- }
-
- public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- XmlMapKeyConvertibleMapping_2_0 xmlMapping = (XmlMapKeyConvertibleMapping_2_0) parent.getXmlAttributeMapping();
- return (xmlMapping.getMapKeyTemporal() == null) ? null : factory.buildOrmBaseTemporalConverter(parent, this.buildOwner(xmlMapping));
- }
-
- protected OrmBaseTemporalConverter.Owner buildOwner(final XmlMapKeyConvertibleMapping_2_0 mapping) {
- return new OrmBaseTemporalConverter.Owner() {
- public void setXmlTemporalType(TemporalType temporalType) {
- mapping.setMapKeyTemporal(temporalType);
- }
-
- public TemporalType getXmlTemporalType() {
- return mapping.getMapKeyTemporal();
- }
-
- public TextRange getTemporalTextRange() {
- return mapping.getMapKeyTemporalTextRange();
- }
-
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmMapKeyTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
- }
- };
- }
-
- public boolean isActive(XmlAttributeMapping xmlMapping) {
- return ((XmlMapKeyConvertibleMapping_2_0) xmlMapping).getMapKeyTemporal() != null;
- }
-
- public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) {
- return factory.buildOrmBaseTemporalConverter(parent, this.buildOwner((XmlMapKeyConvertibleMapping_2_0) parent.getXmlAttributeMapping()));
- }
-
- public void clearXmlValue(XmlAttributeMapping xmlMapping) {
- ((XmlMapKeyConvertibleMapping_2_0) xmlMapping).setMapKeyTemporal(null);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinColumnRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinColumnRelationshipStrategy2_0.java
deleted file mode 100644
index b65a3e0bef..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinColumnRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> mapping join column relationship strategy
- * <p>
- * 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.
- */
-public interface OrmMappingJoinColumnRelationshipStrategy2_0
- extends OrmMappingRelationshipStrategy2_0, OrmJoinColumnRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinTableRelationshipStrategy2_0.java
deleted file mode 100644
index 94ae8fae9c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingJoinTableRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> mapping join table relationship strategy
- * <p>
- * 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.
- */
-public interface OrmMappingJoinTableRelationshipStrategy2_0
- extends OrmMappingRelationshipStrategy2_0, OrmJoinTableRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingMappedByRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingMappedByRelationshipStrategy2_0.java
deleted file mode 100644
index 02d3e5ac1b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingMappedByRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedByRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> mapping "mapped by" relationship strategy
- * <p>
- * 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.
- */
-public interface OrmMappingMappedByRelationshipStrategy2_0
- extends OrmMappingRelationshipStrategy2_0, OrmMappedByRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java
deleted file mode 100644
index 41f61c1970..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumnRelationshipStrategy;
-
-/**
- * <code>orm.xml</code> mapping primary key join column relationship strategy
- * <p>
- * 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.
- */
-public interface OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
- extends OrmMappingRelationshipStrategy2_0, OrmPrimaryKeyJoinColumnRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingRelationshipStrategy2_0.java
deleted file mode 100644
index e6f0486254..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMappingRelationshipStrategy2_0.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
-
-/**
- * <code>orm.xml</code> mapping relationship strategy
- * <p>
- * 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.
- */
-public interface OrmMappingRelationshipStrategy2_0
- extends MappingRelationshipStrategy2_0, OrmRelationshipStrategy
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java
deleted file mode 100644
index 3668696dc0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.MapsIdDerivedIdentityStrategy2_0;
-
-/**
- * <code>orm.xml</code> maps ID derived identity strategy
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmMapsIdDerivedIdentityStrategy2_0
- extends XmlContextNode, MapsIdDerivedIdentityStrategy2_0
-{
- void initializeFrom(OrmMapsIdDerivedIdentityStrategy2_0 oldStrategy);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmNamedQuery2_0.java
deleted file mode 100644
index 7eaa568841..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmNamedQuery2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedQuery;
-import org.eclipse.jpt.jpa.core.jpa2.context.NamedQuery2_0;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> named query
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmNamedQuery2_0
- extends OrmNamedQuery, NamedQuery2_0
-{
- // combine 2 interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyMapping2_0.java
deleted file mode 100644
index 47c81ee816..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToManyMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyMapping2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> 1:m mapping
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOneToManyMapping2_0
- extends OneToManyMapping2_0, OrmOneToManyMapping, OrmCollectionMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyRelationship2_0.java
deleted file mode 100644
index 0b2ae25196..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToManyRelationship2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToManyRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyRelationship2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> 1:m relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOneToManyRelationship2_0
- extends OneToManyRelationship2_0,
- OrmOneToManyRelationship,
- OrmMappingJoinColumnRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneMapping2_0.java
deleted file mode 100644
index a78fa8a746..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToOneMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> 1:1 mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOneToOneMapping2_0
- extends OneToOneMapping2_0, OrmOneToOneMapping, OrmSingleRelationshipMapping2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneRelationship2_0.java
deleted file mode 100644
index 380b471f75..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOneToOneRelationship2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOneToOneRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneRelationship2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> 1:1 relationship
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOneToOneRelationship2_0
- extends OneToOneRelationship2_0,
- OrmOneToOneRelationship,
- OrmMappingJoinTableRelationship
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderColumn2_0.java
deleted file mode 100644
index 234210e4a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderColumn2_0.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn;
-
-/**
- * <code>orm.xml</code> order column
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOrderColumn2_0
- extends OrderColumn2_0, OrmNamedColumn
-{
- XmlOrderColumn getXmlColumn();
-
-
- // ********** owner **********
-
- /**
- * interface allowing order columns to be used in multiple places
- */
- interface Owner
- extends OrmReadOnlyNamedColumn.Owner
- {
- XmlOrderColumn getXmlColumn();
- XmlOrderColumn buildXmlColumn();
- void removeXmlColumn();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderable2_0.java
deleted file mode 100644
index 48bd529572..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrderable2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmOrderable;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> ordering
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOrderable2_0
- extends Orderable2_0, OrmOrderable
-{
- OrmOrderColumn2_0 getOrderColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovable2_0.java
deleted file mode 100644
index 4066c21dae..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovable2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovable2_0;
-
-/**
- * <code>orm.xml</code> orphan removal
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOrphanRemovable2_0
- extends XmlContextNode, OrphanRemovable2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java
deleted file mode 100644
index 2af8ca8c2c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovalHolder2_0;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmOrphanRemovalHolder2_0
- extends OrphanRemovalHolder2_0, XmlContextNode
-{
- OrmOrphanRemovable2_0 getOrphanRemoval();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOverrideRelationship2_0.java
deleted file mode 100644
index a3b2a6da83..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmOverrideRelationship2_0.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.OverrideRelationship2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> association override relationship
- * <p>
- * 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.
- *
- * @version 3.0
- * @since 2.3
- */
-public interface OrmOverrideRelationship2_0
- extends OverrideRelationship2_0,
- OrmOverrideRelationship,
- OrmJoinTableRelationship
-{
- OrmJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java
deleted file mode 100644
index 6651e7ae4d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingFilePersistenceUnitDefaults2_0;
-
-/**
- * JPA 2.0 context model corresponding to the
- * XML resource model {@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0},
- * which corresponds to the <code>persistence-unit-defaults</code> element
- * in the <code>orm.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmPersistenceUnitDefaults2_0
- extends MappingFilePersistenceUnitDefaults2_0, OrmPersistenceUnitDefaults
-{
- void setDelimitedIdentifiers(boolean value);
- String DELIMITED_IDENTIFIERS_PROPERTY = "delimitedIdentifiers"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitMetadata2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitMetadata2_0.java
deleted file mode 100644
index 60c158d4e6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistenceUnitMetadata2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitMetadata;
-import org.eclipse.jpt.jpa.core.jpa2.context.MappingFilePersistenceUnitMetadata2_0;
-
-/**
- * JPA 2.0
- * Context <code>orm.xml</code> persistence unit metadata.
- * Context model corresponding to the
- * XML resource model {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata},
- * which corresponds to the <code>persistence-unit-metadata</code> element
- * in the <code>orm.xml</code> file.
- * <p>
- * 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.
- */
-public interface OrmPersistenceUnitMetadata2_0
- extends MappingFilePersistenceUnitMetadata2_0, OrmPersistenceUnitMetadata
-{
- void setDescription(String description);
- String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentAttribute2_0.java
deleted file mode 100644
index 6610cd06a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentAttribute2_0.java
+++ /dev/null
@@ -1,33 +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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.PersistentAttribute2_0;
-
-/**
- * JPA 2.0
- * Context <code>orm.xml</code> persistent <em>attribute</em>
- * (field or property).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmPersistentAttribute2_0
- extends OrmPersistentAttribute, PersistentAttribute2_0
-{
- // combine two interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentType2_0.java
deleted file mode 100644
index 76e63a2096..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmPersistentType2_0.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.PersistentType2_0;
-
-/**
- * JPA 2.0 context <code>orm.xml</code> persistent type.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmPersistentType2_0
- extends OrmPersistentType, PersistentType2_0
-{
- ListIterable<OrmReadOnlyPersistentAttribute> getAttributes();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmReadOnlyPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmReadOnlyPersistentAttribute2_0.java
deleted file mode 100644
index fff1c9a9b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmReadOnlyPersistentAttribute2_0.java
+++ /dev/null
@@ -1,33 +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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0;
-
-/**
- * JPA 2.0
- * Read-only context <code>orm.xml</code> persistent <em>attribute</em>
- * (field or property).
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmReadOnlyPersistentAttribute2_0
- extends OrmReadOnlyPersistentAttribute, ReadOnlyPersistentAttribute2_0
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSequenceGenerator2_0.java
deleted file mode 100644
index 849a3dbf9c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSequenceGenerator2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
-import org.eclipse.jpt.jpa.core.jpa2.context.SequenceGenerator2_0;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> sequence generator
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmSequenceGenerator2_0
- extends SequenceGenerator2_0, OrmSequenceGenerator
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java
deleted file mode 100644
index 5e5c9c1e16..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmSingleRelationshipMapping;
-import org.eclipse.jpt.jpa.core.jpa2.context.SingleRelationshipMapping2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> single (1:1, m:1) mapping.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmSingleRelationshipMapping2_0
- extends SingleRelationshipMapping2_0, OrmSingleRelationshipMapping
-{
- OrmDerivedIdentity2_0 getDerivedIdentity();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualAssociationOverride2_0.java
deleted file mode 100644
index 53ae5e6f27..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualAssociationOverride2_0.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyAssociationOverride2_0;
-
-/**
- * JPA 2.0
- * <code>orm.xml</code> <em>virtual</em> association override
- * <p>
- * 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.
- */
-public interface OrmVirtualAssociationOverride2_0
- extends OrmVirtualAssociationOverride, ReadOnlyAssociationOverride2_0
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualOverrideRelationship2_0.java
deleted file mode 100644
index cbc36fb12c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmVirtualOverrideRelationship2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.jpa2.context.VirtualOverrideRelationship2_0;
-
-/**
- * JPA 2.0 <code>orm.xml</code> virtual association override relationship
- * <p>
- * 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.
- */
-public interface OrmVirtualOverrideRelationship2_0
- extends VirtualOverrideRelationship2_0,
- OrmVirtualOverrideRelationship,
- OrmVirtualJoinTableRelationship
-{
- OrmVirtualJoinTableRelationshipStrategy getJoinTableStrategy();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java
deleted file mode 100644
index 6c9da52217..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.Table;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-
-/**
- * JPA 2.0 <code>orm.xml</code> context node factory
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrmXml2_0ContextNodeFactory
- extends OrmXmlContextNodeFactory
-{
- OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(OrmEmbeddedMapping2_0 parent, OrmAssociationOverrideContainer2_0.Owner owner);
-
- OrmDerivedIdentity2_0 buildOrmDerivedIdentity(OrmSingleRelationshipMapping2_0 parent);
-
- OrmElementCollectionMapping2_0 buildOrmElementCollectionMapping2_0(OrmPersistentAttribute parent, XmlElementCollection resourceMapping);
-
- OrmCacheable2_0 buildOrmCacheable(OrmCacheableHolder2_0 parent);
-
- OrmOrphanRemovable2_0 buildOrmOrphanRemoval(OrmOrphanRemovalHolder2_0 parent);
-
- OrmOrderable2_0 buildOrmOrderable(OrmAttributeMapping parent, Orderable2_0.Owner owner);
-
- OrmOrderColumn2_0 buildOrmOrderColumn(OrmOrderable2_0 parent, OrmOrderColumn2_0.Owner owner);
-
- OrmCollectionTable2_0 buildOrmCollectionTable(OrmElementCollectionMapping2_0 parent, Table.Owner owner);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/Persistence2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/Persistence2_0.java
deleted file mode 100644
index 1a8cf4126e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/Persistence2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.Persistence;
-import org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer;
-
-/**
- * The <code>persistence</code> element in the JPA 2.0 <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Persistence2_0
- extends Persistence, MetamodelSynchronizer
-{
- // nothing yet...
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceUnit2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceUnit2_0.java
deleted file mode 100644
index 27f5e08718..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceUnit2_0.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
-import org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.SharedCacheMode;
-import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.ValidationMode;
-
-/**
- * JPA 2.0 <code>persistence-unit</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistenceUnit2_0
- extends PersistenceUnit, MetamodelSynchronizer
-{
- // ********** shared cache mode **********
-
- /**
- * Return the persistence unit's shared cache mode,
- * whether specified or defaulted.
- */
- SharedCacheMode getSharedCacheMode();
-
- /**
- * String constant associated with changes to the persistence unit's
- * specified shared cache mode
- */
- String SPECIFIED_SHARED_CACHE_MODE_PROPERTY = "specifiedSharedCacheMode"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's specified shared cache mode.
- */
- SharedCacheMode getSpecifiedSharedCacheMode();
-
- /**
- * Set the persistence unit's specified shared cache mode.
- */
- void setSpecifiedSharedCacheMode(SharedCacheMode sharedCacheMode);
-
- /**
- * String constant associated with changes to the persistence unit's
- * default shared cache mode (not typically changed).
- */
- String DEFAULT_SHARED_CACHE_MODE_PROPERTY = "defaultSharedCacheMode"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's default shared cache mode.
- */
- SharedCacheMode getDefaultSharedCacheMode();
-
- boolean calculateDefaultCacheable();
-
- // ********** validation mode **********
-
- /**
- * Return the persistence unit's validation mode,
- * whether specified or defaulted.
- */
- ValidationMode getValidationMode();
-
- /**
- * String constant associated with changes to the persistence unit's
- * specified validation mode
- */
- String SPECIFIED_VALIDATION_MODE_PROPERTY = "specifiedValidationMode"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's specified validation mode.
- */
- ValidationMode getSpecifiedValidationMode();
-
- /**
- * Set the persistence unit's specified validation mode.
- */
- void setSpecifiedValidationMode(ValidationMode validationMode);
-
- /**
- * String constant associated with changes to the persistence unit's
- * default validation mode (not typically changed).
- */
- String DEFAULT_VALIDATION_MODE_PROPERTY = "defaultValidationMode"; //$NON-NLS-1$
-
- /**
- * Return the persistence unit's default validation mode.
- */
- ValidationMode getDefaultValidationMode();
-
- ValidationMode DEFAULT_VALIDATION_MODE = ValidationMode.AUTO;
-
- // ********** properties **********
-
- PersistenceUnitProperties getConnection();
-
- PersistenceUnitProperties getOptions();
-
- // ********** ORM persistence unit defaults **********
-
- /**
- * String constant associated with changes to the persistence unit's
- * default "delimited identifiers" flag.
- */
- String DEFAULT_DELIMITED_IDENTIFIERS_PROPERTY = "defaultDelimitedIdentifiers"; //$NON-NLS-1$
-
- /**
- * Return the default "delimited identifiers" flag from the first persistence unit defaults
- * found in the persistence unit's list of mapping files.
- */
- boolean getDefaultDelimitedIdentifiers();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceXml2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceXml2_0.java
deleted file mode 100644
index c707a9d6c2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/PersistenceXml2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.context.persistence;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer;
-
-/**
- * JPA 2.0 <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface PersistenceXml2_0
- extends PersistenceXml, MetamodelSynchronizer
-{
- // nothing yet...
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/connection/JpaConnection2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/connection/JpaConnection2_0.java
deleted file mode 100644
index b003fc6cde..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/connection/JpaConnection2_0.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context.persistence.connection;
-
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaConnection2_0
- extends PersistenceUnitProperties
-{
- String getDefaultDriver();
- String getDriver();
- void setDriver(String newDriver);
- static final String DRIVER_PROPERTY = "driver"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_JDBC_DRIVER = "javax.persistence.jdbc.driver"; //$NON-NLS-1$
- static final String DEFAULT_JDBC_DRIVER = ""; //$NON-NLS-1$
-
- String getDefaultUrl();
- String getUrl();
- void setUrl(String newUrl);
- static final String URL_PROPERTY = "url"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_JDBC_URL = "javax.persistence.jdbc.url"; //$NON-NLS-1$
- static final String DEFAULT_JDBC_URL = ""; //$NON-NLS-1$
-
- String getDefaultUser();
- String getUser();
- void setUser(String newUser);
- static final String USER_PROPERTY = "user"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_JDBC_USER = "javax.persistence.jdbc.user"; //$NON-NLS-1$
- static final String DEFAULT_JDBC_USER = ""; //$NON-NLS-1$
-
- String getDefaultPassword();
- String getPassword();
- void setPassword(String newPassword);
- static final String PASSWORD_PROPERTY = "password"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_JDBC_PASSWORD = "javax.persistence.jdbc.password"; //$NON-NLS-1$
- static final String DEFAULT_JDBC_PASSWORD = ""; //$NON-NLS-1$
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/JpaOptions2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/JpaOptions2_0.java
deleted file mode 100644
index bde433ca8c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/JpaOptions2_0.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.core.jpa2.context.persistence.options;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface JpaOptions2_0
- extends PersistenceUnitProperties
-{
- Integer getDefaultLockTimeout();
- Integer getLockTimeout();
- void setLockTimeout(Integer newLockTimeout);
- static final String LOCK_TIMEOUT_PROPERTY = "lockTimeout"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_LOCK_TIMEOUT = "javax.persistence.lock.timeout"; //$NON-NLS-1$
- static final Integer DEFAULT_LOCK_TIMEOUT = Integer.valueOf(5);
-
- Integer getDefaultQueryTimeout();
- Integer getQueryTimeout();
- void setQueryTimeout(Integer newQueryTimeout);
- static final String QUERY_TIMEOUT_PROPERTY = "queryTimeout"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_QUERY_TIMEOUT = "javax.persistence.query.timeout"; //$NON-NLS-1$
- static final Integer DEFAULT_QUERY_TIMEOUT = Integer.valueOf(5);
-
- ListIterable<String> getValidationGroupPrePersists();
- int getValidationGroupPrePersistsSize();
- boolean validationGroupPrePersistExists(String validationGroupPrePersistClassName);
- String addValidationGroupPrePersist(String newValidationGroupPrePersistClassName);
- void removeValidationGroupPrePersist(String validationGroupPrePersistClassName);
- static final String VALIDATION_GROUP_PRE_PERSIST_LIST = "validationGroupPrePersists"; //$NON-NLS-1$
- static final String VALIDATION_GROUP_PRE_PERSIST_PROPERTY = "validationGroupPrePersist"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST = "javax.persistence.validation.group.pre-persist"; //$NON-NLS-1$
-
- ListIterable<String> getValidationGroupPreUpdates();
- int getValidationGroupPreUpdatesSize();
- boolean validationGroupPreUpdateExists(String validationGroupPreUpdateClassName);
- String addValidationGroupPreUpdate(String newValidationGroupPreUpdateClassName);
- void removeValidationGroupPreUpdate(String validationGroupPreUpdateClassName);
- static final String VALIDATION_GROUP_PRE_UPDATE_LIST = "validationGroupPreUpdates"; //$NON-NLS-1$
- static final String VALIDATION_GROUP_PRE_UPDATE_PROPERTY = "validationGroupPreUpdate"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE = "javax.persistence.validation.group.pre-update"; //$NON-NLS-1$
-
- ListIterable<String> getValidationGroupPreRemoves();
- int getValidationGroupPreRemovesSize();
- boolean validationGroupPreRemoveExists(String validationGroupPreRemoveClassName);
- String addValidationGroupPreRemove(String newValidationGroupPreRemoveClassName);
- void removeValidationGroupPreRemove(String validationGroupPreRemoveClassName);
- static final String VALIDATION_GROUP_PRE_REMOVE_LIST = "validationGroupPreRemoves"; //$NON-NLS-1$
- static final String VALIDATION_GROUP_PRE_REMOVE_PROPERTY = "validationGroupPreRemove"; //$NON-NLS-1$
- // Property key
- static final String PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE = "javax.persistence.validation.group.pre-remove"; //$NON-NLS-1$
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/SharedCacheMode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/SharedCacheMode.java
deleted file mode 100644
index 43874acde1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/SharedCacheMode.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context.persistence.options;
-
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0;
-
-/**
- * Context model corresponding to the XML resource model
- * {@link XmlPersistenceUnitCachingType_2_0},
- * which corresponds to the <code>shared-cache-mode</code> element in the
- * <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public enum SharedCacheMode
-{
- ALL,
- NONE,
- ENABLE_SELECTIVE,
- DISABLE_SELECTIVE,
- UNSPECIFIED;
-
-
- public static SharedCacheMode fromXmlResourceModel(XmlPersistenceUnitCachingType_2_0 sharedCacheMode) {
- if (sharedCacheMode == null) {
- return null;
- }
- switch (sharedCacheMode) {
- case ALL:
- return ALL;
- case NONE:
- return NONE;
- case ENABLE_SELECTIVE:
- return ENABLE_SELECTIVE;
- case DISABLE_SELECTIVE:
- return DISABLE_SELECTIVE;
- case UNSPECIFIED:
- return UNSPECIFIED;
- default:
- throw new IllegalArgumentException("unknown validation mode: " + sharedCacheMode); //$NON-NLS-1$
- }
- }
-
- public static XmlPersistenceUnitCachingType_2_0 toXmlResourceModel(SharedCacheMode sharedCacheMode) {
- if (sharedCacheMode == null) {
- return null;
- }
- switch (sharedCacheMode) {
- case ALL:
- return XmlPersistenceUnitCachingType_2_0.ALL;
- case NONE:
- return XmlPersistenceUnitCachingType_2_0.NONE;
- case ENABLE_SELECTIVE:
- return XmlPersistenceUnitCachingType_2_0.ENABLE_SELECTIVE;
- case DISABLE_SELECTIVE:
- return XmlPersistenceUnitCachingType_2_0.DISABLE_SELECTIVE;
- case UNSPECIFIED:
- return XmlPersistenceUnitCachingType_2_0.UNSPECIFIED;
- default:
- throw new IllegalArgumentException("unknown shared cache mode: " + sharedCacheMode); //$NON-NLS-1$
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/ValidationMode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/ValidationMode.java
deleted file mode 100644
index d5e52506db..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/persistence/options/ValidationMode.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.context.persistence.options;
-
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0;
-
-/**
- * Context model corresponding to the XML resource model
- * {@link XmlPersistenceUnitValidationModeType_2_0},
- * which corresponds to the <code>validation-mode</code> element in the
- * <code>persistence.xml</code> file.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public enum ValidationMode
-{
- AUTO(XmlPersistenceUnitValidationModeType_2_0.AUTO),
- CALLBACK(XmlPersistenceUnitValidationModeType_2_0.CALLBACK),
- NONE(XmlPersistenceUnitValidationModeType_2_0.NONE);
-
- private XmlPersistenceUnitValidationModeType_2_0 xmlEnumValue;
-
- ValidationMode(XmlPersistenceUnitValidationModeType_2_0 xmlEnumValue) {
- if (xmlEnumValue == null) {
- throw new NullPointerException();
- }
- this.xmlEnumValue = xmlEnumValue;
- }
-
- public XmlPersistenceUnitValidationModeType_2_0 getXmlEnumValue() {
- return this.xmlEnumValue;
- }
-
-
- // ********** static methods **********
-
- public static ValidationMode fromXmlResourceModel(XmlPersistenceUnitValidationModeType_2_0 xmlValidationMode) {
- return (xmlValidationMode == null) ? null : fromXmlResourceModel_(xmlValidationMode);
- }
-
- private static ValidationMode fromXmlResourceModel_(XmlPersistenceUnitValidationModeType_2_0 xmlValidationMode) {
- for (ValidationMode validationMode : ValidationMode.values()) {
- if (validationMode.getXmlEnumValue().equals(xmlValidationMode)) {
- return validationMode;
- }
- }
- return null;
- }
-
- public static XmlPersistenceUnitValidationModeType_2_0 toXmlResourceModel(ValidationMode validationMode) {
- return (validationMode == null) ? null : validationMode.getXmlEnumValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Access2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Access2_0Annotation.java
deleted file mode 100644
index 5bd0d84d10..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Access2_0Annotation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.AccessType;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.Access</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Access2_0Annotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA2_0.ACCESS;
-
- /**
- * Corresponds to the 'value' element of the Access annotation.
- * Returns null if the element does not exist in Java.
- */
- AccessType getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the Access annotation.
- * Set to null to remove the element.
- */
- void setValue(AccessType access);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the Access annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/AssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/AssociationOverride2_0Annotation.java
deleted file mode 100644
index 15d8664457..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/AssociationOverride2_0Annotation.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
-import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.AssociationOverride</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface AssociationOverride2_0Annotation
- extends AssociationOverrideAnnotation
-{
- /**
- * Corresponds to the 'joinTable' element of the AssociationOverride annotation.
- * Return null if the element does not exist in Java.
- */
- JoinTableAnnotation getJoinTable();
- String JOIN_TABLE_PROPERTY = "joinTable"; //$NON-NLS-1$
-
- JoinTableAnnotation getNonNullJoinTable();
-
- /**
- * Add the 'joinTable' element to the AssociationOverride annotation.
- */
- JoinTableAnnotation addJoinTable();
-
- /**
- * Remove the 'joinTable' element from the AssociationOverride annotation.
- */
- void removeJoinTable();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Cacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Cacheable2_0Annotation.java
deleted file mode 100644
index 950083ee38..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/Cacheable2_0Annotation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.Cacheable</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface Cacheable2_0Annotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA2_0.CACHEABLE;
-
- /**
- * Corresponds to the 'value' element of the Cacheable annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the Cacheable annotation.
- * Set to null to remove the element.
- */
- void setValue(Boolean value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the Cacheable annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/CollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/CollectionTable2_0Annotation.java
deleted file mode 100644
index abd7aadf29..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/CollectionTable2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.ReferenceTableAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.CollectionTable</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface CollectionTable2_0Annotation
- extends ReferenceTableAnnotation
-{
- String ANNOTATION_NAME = JPA2_0.COLLECTION_TABLE;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ElementCollection2_0Annotation.java
deleted file mode 100644
index fb0b7555df..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ElementCollection2_0Annotation.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.FetchType;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.ElementCollection</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ElementCollection2_0Annotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA2_0.ELEMENT_COLLECTION;
-
- /**
- * Corresponds to the 'targetClass' element of the element collection
- * annotation.
- * Return null if the element does not exist in Java.
- * Return the portion of the value preceding ".class".
- * <pre>
- * &#64;ElementCollection(targetClass=Employee.class)
- * </pre>
- * will return "Employee"
- */
- String getTargetClass();
- String TARGET_CLASS_PROPERTY = "targetClass"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'targetClass' element of the element collection
- * annotation.
- * Set to null to remove the element.
- */
- void setTargetClass(String targetClass);
-
- /**
- * Return the {@link TextRange} for the 'targetClass' element. If the element
- * does not exist return the {@link TextRange} for the element collection annotation.
- */
- TextRange getTargetClassTextRange();
-
- /**
- * Return the fully-qualified target class name as resolved by the AST's
- * bindings.
- * <pre>
- * &#64;ElementCollection(targetClass=Employee.class)
- * </pre>
- * will return <code>"model.Employee"</code> if there is an import for
- * <code>model.Employee</code>.
- */
- String getFullyQualifiedTargetClassName();
-
-
- /**
- * Corresponds to the 'fetch' element of the element collection annotation.
- * Return null if the element does not exist in Java.
- */
- FetchType getFetch();
- String FETCH_PROPERTY = "fetch"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'fetch' element of the element collection annotation.
- * Set to null to remove the element.
- */
- void setFetch(FetchType fetch);
-
- /**
- * Return the {@link TextRange} for the 'fetch' element. If the element
- * does not exist return the {@link TextRange} for the element collection annotation.
- */
- TextRange getFetchTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/GeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/GeneratedAnnotation.java
deleted file mode 100644
index 897d9aad5d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/GeneratedAnnotation.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the Java 6 annotation
- * <code>javax.annotation.Generated</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface GeneratedAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = "javax.annotation.Generated"; // requires JRE 1.6 //$NON-NLS-1$
- String VALUE_ELEMENT_NAME = "value"; //$NON-NLS-1$
- String DATE_ELEMENT_NAME = "date"; //$NON-NLS-1$
- String COMMENTS_ELEMENT_NAME = "comments"; //$NON-NLS-1$
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- * Return <code>null</code> if the element does not exist in the annotation.
- */
- ListIterable<String> getValues();
- String VALUES_LIST = "values"; //$NON-NLS-1$
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- int getValuesSize();
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- String getValue(int index);
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- void addValue(String value);
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- void addValue(int index, String value);
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- void moveValue(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- void removeValue(String value);
-
- /**
- * Corresponds to the <code>value<code> element of the <code>Generated</code>
- * annotation.
- */
- void removeValue(int index);
-
- /**
- * Corresponds to the <code>date</code> element of the <code>Generated</code>
- * annotation.
- * Return <code>null</code> if the element does not exist in the annotation.
- */
- String getDate();
- String DATE_PROPERTY = "date"; //$NON-NLS-1$
-
- /**
- * Corresponds to the <code>date</code> element of the <code>Generated</code>
- * annotation.
- * Set to <code>null</code> to remove the element.
- */
- void setDate(String date);
-
- /**
- * Corresponds to the <code>comments</code> element of the <code>Generated</code>
- * annotation.
- * Return <code>null</code> if the element does not exist in the annotation.
- */
- String getComments();
- String COMMENTS_PROPERTY = "comments"; //$NON-NLS-1$
-
- /**
- * Corresponds to the <code>comments</code> element of the <code>Generated</code>
- * annotation.
- * Set to <code>null</code> to remove the element.
- */
- void setComments(String comments);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/JPA2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/JPA2_0.java
deleted file mode 100644
index 5216c538a2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/JPA2_0.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.JPA;
-
-/**
- * JPA 2.0 Java-related stuff (annotations etc.)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-@SuppressWarnings("nls")
-public interface JPA2_0
-{
- // JPA package
- String PACKAGE = "javax.persistence";
- String PACKAGE_ = PACKAGE + '.';
-
-
- // ********** API **********
-
- // JPA 2.0 annotations
- String ACCESS = PACKAGE_ + "Access";
- String ACCESS__VALUE = "value";
-
- // ASSOCIATION_OVERRIDE
- String ASSOCIATION_OVERRIDE__JOIN_TABLE = "joinTable";
-
- String CACHEABLE = PACKAGE_ + "Cacheable";
- String CACHEABLE__VALUE = "value";
-
- String CASCADE_TYPE__DETACH = JPA.CASCADE_TYPE_ + "DETACH";
-
- String COLLECTION_TABLE = PACKAGE_ + "CollectionTable";
- String COLLECTION_TABLE__NAME = "name";
- String COLLECTION_TABLE__SCHEMA = "schema";
- String COLLECTION_TABLE__CATALOG = "catalog";
- String COLLECTION_TABLE__JOIN_COLUMNS = "joinColumns";
- String COLLECTION_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
-
- String ELEMENT_COLLECTION = PACKAGE_ + "ElementCollection";
- String ELEMENT_COLLECTION__FETCH = "fetch";
- String ELEMENT_COLLECTION__TARGET_CLASS = "targetClass";
-
- String MAP_KEY_CLASS = PACKAGE_ + "MapKeyClass";
- String MAP_KEY_CLASS__VALUE = "value";
-
- String MAP_KEY_COLUMN = PACKAGE_ + "MapKeyColumn";
- String MAP_KEY_COLUMN__NAME = "name";
- String MAP_KEY_COLUMN__UNIQUE = "unique";
- String MAP_KEY_COLUMN__NULLABLE = "nullable";
- String MAP_KEY_COLUMN__INSERTABLE = "insertable";
- String MAP_KEY_COLUMN__UPDATABLE = "updatable";
- String MAP_KEY_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String MAP_KEY_COLUMN__TABLE = "table";
- String MAP_KEY_COLUMN__LENGTH = "length";
- String MAP_KEY_COLUMN__PRECISION = "precision";
- String MAP_KEY_COLUMN__SCALE = "scale";
-
- String MAP_KEY_ENUMERATED = PACKAGE_ + "MapKeyEnumerated";
- String MAP_KEY_ENUMERATED__VALUE = "value";
-
- String MAP_KEY_JOIN_COLUMN = PACKAGE_ + "MapKeyJoinColumn";
- String MAP_KEY_JOIN_COLUMN__NAME = "name";
- String MAP_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
- String MAP_KEY_JOIN_COLUMN__UNIQUE = "unique";
- String MAP_KEY_JOIN_COLUMN__NULLABLE = "nullable";
- String MAP_KEY_JOIN_COLUMN__INSERTABLE = "insertable";
- String MAP_KEY_JOIN_COLUMN__UPDATABLE = "updatable";
- String MAP_KEY_JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String MAP_KEY_JOIN_COLUMN__TABLE = "table";
-
- String MAP_KEY_JOIN_COLUMNS = PACKAGE_ + "MapKeyJoinColumns";
- String MAP_KEY_JOIN_COLUMNS__VALUE = "value";
-
- String MAP_KEY_TEMPORAL = PACKAGE_ + "MapKeyTemporal";
- String MAP_KEY_TEMPORAL__VALUE = "value";
-
- String MAPS_ID = PACKAGE_ + "MapsId";
- String MAPS_ID__VALUE = "value";
-
- // NAMED_QUERY
- String NAMED_QUERY__LOCK_MODE = "lockMode";
-
- // ONE_TO_MANY
- String ONE_TO_MANY__ORPHAN_REMOVAL = "orphanRemoval";
-
- // ONE_TO_ONE
- String ONE_TO_ONE__ORPHAN_REMOVAL = "orphanRemoval";
-
- String ORDER_COLUMN = PACKAGE_ + "OrderColumn";
- String ORDER_COLUMN__NAME = "name";
- String ORDER_COLUMN__NULLABLE = "nullable";
- String ORDER_COLUMN__INSERTABLE = "insertable";
- String ORDER_COLUMN__UPDATABLE = "updatable";
- String ORDER_COLUMN__COLUMN_DEFINITION = "columnDefinition";
-
- // SEQUENCE_GENERATOR
- String SEQUENCE_GENERATOR__CATALOG = "catalog";
- String SEQUENCE_GENERATOR__SCHEMA = "schema";
-
-
- // JPA 2.0 enums
- String ACCESS_TYPE = PACKAGE_ + "AccessType";
- String ACCESS_TYPE_ = ACCESS_TYPE + '.';
- String ACCESS_TYPE__FIELD = ACCESS_TYPE_ + "FIELD";
- String ACCESS_TYPE__PROPERTY = ACCESS_TYPE_ + "PROPERTY";
-
- String LOCK_MODE_TYPE = PACKAGE_ + "LockModeType";
- String LOCK_MODE_TYPE_ = LOCK_MODE_TYPE + '.';
- String LOCK_MODE_TYPE__READ = LOCK_MODE_TYPE_ + "READ";
- String LOCK_MODE_TYPE__WRITE = LOCK_MODE_TYPE_ + "WRITE";
- String LOCK_MODE_TYPE__OPTIMISTIC = LOCK_MODE_TYPE_ + "OPTIMISTIC";
- String LOCK_MODE_TYPE__OPTIMISTIC_FORCE_INCREMENT = LOCK_MODE_TYPE_ + "OPTIMISTIC_FORCE_INCREMENT";
- String LOCK_MODE_TYPE__PESSIMISTIC_READ = LOCK_MODE_TYPE_ + "PESSIMISTIC_READ";
- String LOCK_MODE_TYPE__PESSIMISTIC_WRITE = LOCK_MODE_TYPE_ + "PESSIMISTIC_WRITE";
- String LOCK_MODE_TYPE__PESSIMISTIC_FORCE_INCREMENT = LOCK_MODE_TYPE_ + "PESSIMISTIC_FORCE_INCREMENT";
- String LOCK_MODE_TYPE__NONE = LOCK_MODE_TYPE_ + "NONE";
-
- // JPA 2.0 metamodel
- String METAMODEL_PACKAGE = PACKAGE_ + "metamodel";
- String METAMODEL_PACKAGE_ = METAMODEL_PACKAGE + '.';
-
- String STATIC_METAMODEL = METAMODEL_PACKAGE_ + "StaticMetamodel";
- String STATIC_METAMODEL__VALUE = "value";
-
- String SINGULAR_ATTRIBUTE = METAMODEL_PACKAGE_ + "SingularAttribute";
-
- String COLLECTION_ATTRIBUTE = METAMODEL_PACKAGE_ + "CollectionAttribute";
- String LIST_ATTRIBUTE = METAMODEL_PACKAGE_ + "ListAttribute";
- String MAP_ATTRIBUTE = METAMODEL_PACKAGE_ + "MapAttribute";
- String SET_ATTRIBUTE = METAMODEL_PACKAGE_ + "SetAttribute";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/LockModeType_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/LockModeType_2_0.java
deleted file mode 100644
index e2afe0bfa8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/LockModeType_2_0.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * Corresponds to the JPA 2.0 enum
- * javax.persistence.LockModeType
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public enum LockModeType_2_0 {
-
- READ(JPA2_0.LOCK_MODE_TYPE__READ),
- WRITE(JPA2_0.LOCK_MODE_TYPE__WRITE),
- OPTIMISTIC(JPA2_0.LOCK_MODE_TYPE__OPTIMISTIC),
- OPTIMISTIC_FORCE_INCREMENT(JPA2_0.LOCK_MODE_TYPE__OPTIMISTIC_FORCE_INCREMENT),
- PESSIMISTIC_READ(JPA2_0.LOCK_MODE_TYPE__PESSIMISTIC_READ),
- PESSIMISTIC_WRITE(JPA2_0.LOCK_MODE_TYPE__PESSIMISTIC_WRITE),
- PESSIMISTIC_FORCE_INCREMENT(JPA2_0.LOCK_MODE_TYPE__PESSIMISTIC_FORCE_INCREMENT),
- NONE(JPA2_0.LOCK_MODE_TYPE__NONE);
-
-
- private String javaAnnotationValue;
-
- LockModeType_2_0(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static LockModeType_2_0 fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static LockModeType_2_0 fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (LockModeType_2_0 lockModeType : LockModeType_2_0.values()) {
- if (lockModeType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return lockModeType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(LockModeType_2_0 lockModeType) {
- return (lockModeType == null) ? null : lockModeType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToMany2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToMany2_0Annotation.java
deleted file mode 100644
index 218f9ec1b2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToMany2_0Annotation.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.ManyToMany</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ManyToMany2_0Annotation
- extends ManyToManyAnnotation, RelationshipMapping2_0Annotation
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToOne2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToOne2_0Annotation.java
deleted file mode 100644
index 93bfdb2a3f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/ManyToOne2_0Annotation.java
+++ /dev/null
@@ -1,31 +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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.ManyToOne</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ManyToOne2_0Annotation
- extends ManyToOneAnnotation, RelationshipMapping2_0Annotation
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyClass2_0Annotation.java
deleted file mode 100644
index 1123fec5f2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyClass2_0Annotation.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.MapKeyClass</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MapKeyClass2_0Annotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA2_0.MAP_KEY_CLASS;
-
- /**
- * Corresponds to the 'value' element of the MapKeyClass annotation.
- * Return null if the element does not exist in Java.
- * Return the portion of the value preceding ".class".
- * <pre>
- * &#64;MapKeyClass(value=Employee.class)
- * </pre>
- * will return "Employee"
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the MapKeyClass annotation.
- * Set to null to remove the element.
- */
- void setValue(String value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the IdClass annotation.
- */
- TextRange getValueTextRange();
-
- /**
- * Return the fully-qualified class name as resolved by the AST's
- * bindings.
- * <pre>
- * &#64;IdClass(Employee.class)
- * </pre>
- * will return <code>"model.Employee"</code> if there is an import for
- * <code>model.Employee</code>.
- */
- String getFullyQualifiedClassName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java
deleted file mode 100644
index 5ae12adc69..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.MapKeyColumn</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MapKeyColumn2_0Annotation
- extends CompleteColumnAnnotation
-{
- String ANNOTATION_NAME = JPA2_0.MAP_KEY_COLUMN;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java
deleted file mode 100644
index 4b53251483..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.BaseEnumeratedAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.MapKeyEnumerated</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MapKeyEnumerated2_0Annotation
- extends BaseEnumeratedAnnotation
-{
- String ANNOTATION_NAME = JPA2_0.MAP_KEY_ENUMERATED;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java
deleted file mode 100644
index c61ed15f8c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.CompleteJoinColumnAnnotation;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.MapKeyJoinColumn</code>
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.3
- */
-public interface MapKeyJoinColumn2_0Annotation
- extends CompleteJoinColumnAnnotation
-{
- String ANNOTATION_NAME = JPA2_0.MAP_KEY_JOIN_COLUMN;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java
deleted file mode 100644
index 4edd016e6a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.BaseTemporalAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.MapKeyTemporal</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MapKeyTemporal2_0Annotation
- extends BaseTemporalAnnotation
-{
- String ANNOTATION_NAME = JPA2_0.MAP_KEY_TEMPORAL;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapsId2_0Annotation.java
deleted file mode 100644
index ea37fe334e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/MapsId2_0Annotation.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.MapsId</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface MapsId2_0Annotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA2_0.MAPS_ID;
-
- /**
- * Corresponds to the 'value' element of the MapsId annotation.
- * Returns null if the element does not exist in Java.
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the MapsId annotation.
- * Set to null to remove the element.
- */
- void setValue(String value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the MapsId annotation.
- */
- TextRange getValueTextRange();
-
- /**
- * Return whether the specified position touches the 'value' element.
- * Return false if the element does not exist.
- */
- boolean valueTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/NamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/NamedQuery2_0Annotation.java
deleted file mode 100644
index 450a22e9d4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/NamedQuery2_0Annotation.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.NamedQuery</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface NamedQuery2_0Annotation
- extends NamedQueryAnnotation
-{
- // ********** lock mode **********
-
- /**
- * Corresponds to the 'lockMode' element of the NamedQuery annotation.
- * Return null if the element does not exist in Java.
- */
- LockModeType_2_0 getLockMode();
- String LOCK_MODE_PROPERTY = "lockMode"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'lockMode' element of the NamedQuery annotation.
- * Set to null to remove the element.
- */
- void setLockMode(LockModeType_2_0 lockMode);
-
- /**
- * Return the {@link TextRange} for the 'lockMode' element. If the element
- * does not exist return the {@link TextRange} for the NamedQuery annotation.
- */
- TextRange getLockModeTextRange();
-
- /**
- * Return whether the specified position touches the 'lockMode' element.
- * Return false if the element does not exist.
- */
- boolean lockModeTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToMany2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToMany2_0Annotation.java
deleted file mode 100644
index 2fb6ea7910..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToMany2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.OneToMany</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OneToMany2_0Annotation
- extends OneToManyAnnotation, OwningRelationshipMapping2_0Annotation, RelationshipMapping2_0Annotation
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToOne2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToOne2_0Annotation.java
deleted file mode 100644
index e83be901a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OneToOne2_0Annotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 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.jpa.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.OneToOne</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OneToOne2_0Annotation
- extends OneToOneAnnotation, OwningRelationshipMapping2_0Annotation, RelationshipMapping2_0Annotation
-{
- // combine various interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OrderColumn2_0Annotation.java
deleted file mode 100644
index d0f7c7b70e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OrderColumn2_0Annotation.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.OrderColumn</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OrderColumn2_0Annotation
- extends NamedColumnAnnotation
-{
- String ANNOTATION_NAME = JPA2_0.ORDER_COLUMN;
-
-
- // ********** nullable **********
-
- /**
- * Corresponds to the 'nullable' element of the OrderColumn annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getNullable();
- String NULLABLE_PROPERTY = "nullable"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'nullable' element of the OrderColumn annotation.
- * Set to null to remove the element.
- */
- void setNullable(Boolean nullable);
-
- /**
- * Return the {@link TextRange} for the 'nullable' element. If the element
- * does not exist return the {@link TextRange} for the OrderColumn annotation.
- */
- TextRange getNullableTextRange();
-
-
- // ********** insertable **********
-
- /**
- * Corresponds to the 'insertable' element of the OrderColumn annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getInsertable();
- String INSERTABLE_PROPERTY = "insertable"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'insertable' element of the OrderColumn annotation.
- * Set to null to remove the element.
- */
- void setInsertable(Boolean insertable);
-
- /**
- * Return the {@link TextRange} for the 'insertable' element. If the element
- * does not exist return the {@link TextRange} for the OrderColumn annotation.
- */
- TextRange getInsertableTextRange();
-
-
- // ********** updatable **********
-
- /**
- * Corresponds to the 'updatable' element of the OrderColumn annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getUpdatable();
- String UPDATABLE_PROPERTY = "updatable"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'updatable' element of the OrderColumn annotation.
- * Set to null to remove the element.
- */
- void setUpdatable(Boolean updatable);
-
- /**
- * Return the {@link TextRange} for the 'updatable' element. If the element
- * does not exist return the {@link TextRange} for the OrderColumn annotation.
- */
- TextRange getUpdatableTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OwningRelationshipMapping2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OwningRelationshipMapping2_0Annotation.java
deleted file mode 100644
index b5b6375c77..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/OwningRelationshipMapping2_0Annotation.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Represents a relationship mapping annotation that may have the
- * <code>orphanRemoval</code> element:<code><ul>
- * <li>javax.persistence.OneToMany
- * <li>javax.persistence.OneToOne
- * </ul></code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface OwningRelationshipMapping2_0Annotation
- extends Annotation
-{
- // ********** orphan removal **********
- /**
- * Corresponds to the orphanRemoval element of a OneToMany or OneToOne annotation.
- * Returns null if the orphanRemoval element does not exist in java.
- */
- Boolean getOrphanRemoval();
- String ORPHAN_REMOVAL_PROPERTY = "orphanRemoval"; //$NON-NLS-1$
-
- /**
- * Corresponds to the orphanRemoval element of a OneToMany or OneToOne annotation.
- * Set to null to remove the orphanRemoval element.
- */
- void setOrphanRemoval(Boolean orphanRemoval);
-
- /**
- * Return the {@link TextRange} for the orphanRemoval element. If the orphanRemoval element
- * does not exist return the {@link TextRange} for the OneToMany or OneToOne annotation.
- */
- TextRange getOrphanRemovalTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java
deleted file mode 100644
index 4db9196c55..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation;
-
-/**
- * Common protocol among the following JPA 2.0 relationship mappings:<code><ul>
- * <li>javax.persistence.ManyToOne
- * <li>javax.persistence.ManyToMany
- * <li>javax.persistence.OneToMany
- * <li>javax.persistence.OneToOne
- * </ul></code>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface RelationshipMapping2_0Annotation
- extends RelationshipMappingAnnotation
-{
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- boolean isCascadeDetach();
- String CASCADE_DETACH_PROPERTY = "cascadeDetach"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- void setCascadeDetach(boolean detach);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java
deleted file mode 100644
index 39f2a7bdf5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.SequenceGenerator</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface SequenceGenerator2_0Annotation
- extends SequenceGeneratorAnnotation
-{
- // ********** catalog **********
- /**
- * Corresponds to the 'catalog' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getCatalog();
- String CATALOG_PROPERTY = "catalog"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'catalog' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setCatalog(String catalog);
-
- /**
- * Return the {@link TextRange} for the 'catalog' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getCatalogTextRange();
-
- /**
- * Return whether the specified position touches the 'catalog' element.
- * Return false if the element does not exist.
- */
- boolean catalogTouches(int pos);
-
-
- // ********** schema **********
-
- /**
- * Corresponds to the 'schema' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getSchema();
- String SCHEMA_PROPERTY = "schema"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'schema' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setSchema(String schema);
-
- /**
- * Return the {@link TextRange} for the 'schema' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getSchemaTextRange();
-
- /**
- * Return whether the specified position touches the 'schema' element.
- * Return false if the element does not exist.
- */
- boolean schemaTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/StaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/StaticMetamodelAnnotation.java
deleted file mode 100644
index ef7ff55a29..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/resource/java/StaticMetamodelAnnotation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.jpa2.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA 2.0 annotation
- * <code>javax.persistence.metamodel.StaticMetamodel</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface StaticMetamodelAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA2_0.STATIC_METAMODEL;
-
- /**
- * Corresponds to the <code>value</code> element of the <code>StaticMetamodel</code> annotation.
- * Return <code>null</code> if the element does not exist in Java.
- * Return the portion of the value preceding <code>".class"</code>.
- * <pre>
- * &#64;StaticMetamodel(value=Employee.class)
- * </pre>
- * will return <code>"Employee"</code>.
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the <code>value</code> element of the <code>StaticMetamodel</code> annotation.
- * Set to <code>null</code> to remove the element.
- */
- void setValue(String value);
-
- /**
- * Return the static metamodel's fully-qualified class name as resolved by
- * the AST's bindings.
- * <pre>
- * &#64;StaticMetamodel(Employee.class)
- * </pre>
- * will return <code>"model.Employee"</code> if there is an import for
- * <code>model.Employee</code>.
- */
- String getFullyQualifiedClassName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/JpaJpqlQueryHelper.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/JpaJpqlQueryHelper.java
deleted file mode 100644
index cd13055395..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/JpaJpqlQueryHelper.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql;
-
-import java.util.List;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jpt.common.core.internal.utility.SimpleTextRange;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.jpql.spi.IManagedTypeBuilder;
-import org.eclipse.jpt.jpa.core.jpql.spi.JpaManagedTypeProvider;
-import org.eclipse.jpt.jpa.core.jpql.spi.JpaQuery;
-import org.eclipse.jpt.jpa.core.prefs.JpaValidationPreferencesManager;
-import org.eclipse.persistence.jpa.jpql.AbstractJPQLQueryHelper;
-import org.eclipse.persistence.jpa.jpql.ExpressionTools;
-import org.eclipse.persistence.jpa.jpql.JPQLQueryProblem;
-import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeProvider;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-import org.eclipse.persistence.jpa.jpql.spi.IQuery;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-/**
- * This helper can perform the following operations over a JPQL query:
- * <ul>
- * <li>Calculates the result type of a query: {@link #getResultType()};</li>
- * <li>Calculates the type of an input parameter: {@link #getParameterType(String)}.</li>
- * <li>Calculates the possible choices to complete the query from a given
- * position (used for content assist): {@link #buildContentAssistItems(int)}.</li>
- * <li>Validates the query by introspecting its grammar and semantic:
- * <ul>
- * <li>{@link #validate()},</li>
- * <li>{@link #validateGrammar()},</li>
- * <li>{@link #validateSemantic()}.</li>
- * </ul></li>
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-@SuppressWarnings("nls")
-public abstract class JpaJpqlQueryHelper extends AbstractJPQLQueryHelper {
-
- /**
- * Caches the provider in order to prevent recreating the SPI representation of the JPA artifacts
- * more than once.
- */
- private IManagedTypeProvider managedTypeProvider;
-
- /**
- * Creates a new <code>JpaQueryHelper</code>.
- *
- * @param jpqlGrammar The grammar that defines how to parse a JPQL query
- */
- protected JpaJpqlQueryHelper(JPQLGrammar jpqlGrammar) {
- super(jpqlGrammar);
- }
-
- /**
- * Create the builder that will create the right implementation of {@link org.eclipse.persistence.
- * jpa.jpql.spi.IManagedType IManagedType}.
- *
- * @return A new {@link IMappingBuilder}
- */
- protected abstract IManagedTypeBuilder buildManagedTypeBuilder();
-
- /**
- * Create the builder that will create the right implementation of {@link org.eclipse.persistence.
- * jpa.jpql.spi.IMapping IMapping}.
- *
- * @return A new {@link IMappingBuilder}
- */
- protected abstract IMappingBuilder<AttributeMapping> buildMappingBuilder();
-
- /**
- * Calculates the start and end positions by adjusting them to be at the same position within
- * <em>jpqlQuery</em>, which may differ from <em>parsedJpqlQuery</em> since the parsed tree does
- * not keep track of multiple whitespace. The range is also increased if the start and end
- * positions are the same.
- *
- * @param problem The {@link JPQLQueryProblem problem} that was found in the JPQL query, which is
- * either a grammatical or semantic problem
- * @param parsedJpqlQuery The string representation of the parsed tree representation of the JPQL
- * query
- * @param actualQuery The actual JPQL query that was parsed and validated
- * @return The start and end positions, which may have been adjusted
- */
- public int[] buildPositions(JPQLQueryProblem problem, String parsedJpqlQuery, String actualQuery) {
-
- int startPosition = problem.getStartPosition();
- int endPosition = problem.getEndPosition();
-
- // If the start and end positions are the same, then expand the text range
- if (startPosition == endPosition) {
- startPosition = Math.max(startPosition - 1, 0);
- }
-
- // Reposition the cursor so it's correctly positioned in the actual query, which is the
- // since it may contains more than one whitespace for a single whitespace
- int newStartPosition = ExpressionTools.repositionCursor(parsedJpqlQuery, startPosition, actualQuery);
-
- if (newStartPosition != startPosition) {
- endPosition += (newStartPosition - startPosition);
- startPosition = newStartPosition;
- }
-
- return new int[] { startPosition, endPosition };
- }
-
- /**
- * Creates a new {@link IMessage} for the given {@link JPQLQueryProblem}.
- *
- * @param namedQuery The model object for which a new {@link IMessage} is creating describing the
- * problem
- * @param problem The {@link JPQLQueryProblem problem} that was found in the JPQL query, which is
- * either a grammatical or semantic problem
- * @param textRange The range of the JPQL query in the Java source file
- * @param parsedJpqlQuery The string representation of the parsed tree representation of the JPQL
- * query, which may differ from the actual JPQL query since it does not keep more than one
- * whitespace
- * @param actualQuery The actual JPQL query that was parsed and validated
- * @param offset This offset is used to move the start position
- * @return A new {@link IMessage} that has the required information to display the problem
- * underline and the error message in the Problems view
- */
- protected IMessage buildProblem(NamedQuery namedQuery,
- TextRange textRange,
- JPQLQueryProblem problem,
- String parsedJpqlQuery,
- String actualQuery,
- int offset) {
-
- // Convert the positions from the parsed JPQL query to the actual JPQL query
- int[] positions = buildPositions(problem, parsedJpqlQuery, actualQuery);
-
- // Now convert the adjusted positions once again to be in the query where the escape
- // characters are in their literal forms
- int[] newStartPosition = { positions[0] };
- ExpressionTools.escape(actualQuery, newStartPosition);
- int escapeOffset = positions[0] - newStartPosition[0];
-
- positions[0] -= escapeOffset;
- positions[1] -= escapeOffset;
-
- // Create the text range of the problem
- textRange = new SimpleTextRange(
- textRange.getOffset() + positions[0] + offset,
- positions[1] - positions[0],
- textRange.getLineNumber()
- );
-
- // Now create the message
- IMessage message = DefaultJpaValidationMessages.buildMessage(
- severity(namedQuery.getResource()),
- problem.getMessageKey(),
- problem.getMessageArguments(),
- namedQuery,
- textRange
- );
- message.setBundleName("jpa_jpql_validation");
- return message;
- }
-
- /**
- * Creates a new {@link JpaManagedTypeProvider} which will provide access to the application's
- * JPA metadata information.
- *
- * @param jpaProject The JPA project associated with the Eclipse project
- * @param persistenceUnit The persistence unit model
- * @return A new {@link JpaManagedTypeProvider}
- */
- protected JpaManagedTypeProvider buildProvider(JpaProject jpaProject, PersistenceUnit persistenceUnit) {
- return new JpaManagedTypeProvider(
- jpaProject,
- persistenceUnit,
- buildManagedTypeBuilder(),
- buildMappingBuilder()
- );
- }
-
- protected String getValidationPreference(NamedQuery namedQuery) {
- return JpaValidationPreferencesManager.getProblemPreference(
- namedQuery.getResource(),
- JpaValidationMessages.JPQL_QUERY_VALIDATION);
- }
-
- /**
- * Sets the given named query and string representation of the JPQL query.
- *
- * @param namedQuery The model object where the JPQL query is stored
- * @param actualQuery The actual JPQL query, which can differ from the one owned by the model
- * object, which happens when the model is out of sync because it has not been updated yet
- */
- public void setQuery(NamedQuery namedQuery, String actualQuery) {
-
- if (managedTypeProvider == null) {
- managedTypeProvider = buildProvider(namedQuery.getJpaProject(), namedQuery.getPersistenceUnit());
- }
-
- IQuery query = new JpaQuery(managedTypeProvider, namedQuery, actualQuery);
- super.setQuery(query);
- }
-
- /**
- * Retrieve the severity that is associated to JPQL query validation, which cannot be retrieved
- * using the JPQL problem message key.
-
- * @param targetObject The object for which a new {@link IMessage} is creating describing the
- * problem
- * @return The global severity for validating JPQL queries. The default is {@link IMessage#HIGH_SEVERITY}.
- */
- protected int severity(IResource targetObject) {
- int severity = JpaValidationPreferencesManager.getProblemSeverityPreference(
- targetObject, JpaValidationMessages.JPQL_QUERY_VALIDATION);
- if (severity == JpaValidationPreferencesManager.NO_SEVERITY_PREFERENCE) {
- return IMessage.HIGH_SEVERITY;
- }
- return severity;
- }
-
- protected boolean shouldValidate(NamedQuery namedQuery) {
- return ! StringTools.stringsAreEqual(
- getValidationPreference(namedQuery),
- JpaValidationPreferencesManager.IGNORE);
- }
-
- /**
- * Validates the given {@link NamedQuery} by validating the JPQL query.
- *
- * @param namedQuery The JPQL query to validate
- * @param jpqlQuery The JPQL query, which might be different from what the model object since
- * the escape characters should not be in their literal forms (should have '\r' and not '\\r')
- * @param textRange The range of the JPQL query string within the document
- * @param offset This offset is used to move the start position
- * @param messages The list of {@link IMessage IMessages} that will be used to add validation
- * problems
- */
- public void validate(NamedQuery namedQuery,
- String jpqlQuery,
- TextRange textRange,
- int offset,
- List<IMessage> messages) {
-
- try {
- // Make this quick check so we don't validate the query, which is time consuming
- if (shouldValidate(namedQuery)) {
-
- setQuery(namedQuery, jpqlQuery);
- String parsedJpqlQuery = getParsedJPQLQuery();
-
- for (JPQLQueryProblem problem : validate()) {
-
- IMessage message = buildProblem(
- namedQuery,
- textRange,
- problem,
- parsedJpqlQuery,
- jpqlQuery,
- offset
- );
-
- messages.add(message);
- }
- }
- }
- finally {
- // Only dispose the information related to the query
- dispose();
- }
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/ClassConstructor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/ClassConstructor.java
deleted file mode 100644
index f803abb9db..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/ClassConstructor.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jdt.core.BindingKey;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.persistence.jpa.jpql.spi.IConstructor;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeRepository;
-
-/**
- * The concrete implementation of {@link IConstructor} that is wrapping the {@link IMethod}
- * representation of a Java constructor (either coming from a Java compiled file or a Java source
- * file).
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public class ClassConstructor implements IConstructor {
-
- /**
- * The information of the constructor.
- */
- private IMethod method;
-
- /**
- * The declaring type of this constructor.
- */
- private JpaType type;
-
- /**
- * The cached {@link ITypeDeclaration ITypeDeclarations} representing each of the constructor's
- * parameter types.
- */
- private ITypeDeclaration[] typeDeclarations;
-
- /**
- * Creates a new <code>ClassConstructor</code>.
- *
- * @param type The declaring type of this constructor
- * @param methodInfo The information of the constructor
- */
- public ClassConstructor(JpaType type, IMethod method) {
- super();
- this.type = type;
- this.method = method;
- }
-
- protected ITypeDeclaration[] buildParameterTypes() {
-
- BindingKey bindingKey = new BindingKey(method.getKey());
- String signature = bindingKey.toSignature();
-
- int count = Signature.getParameterCount(signature);
- ITypeDeclaration[] typeDeclarations = new ITypeDeclaration[count];
- int index = 0;
-
- for (String parameterType : Signature.getParameterTypes(signature)) {
-
- // 1. Retrieve the parameter type (without the type parameters)
- String parameterTypeName = Signature.getTypeErasure(parameterType);
-
- // 3. Convert the type signature to a dot-based name
- parameterTypeName = Signature.toString(parameterTypeName);
-
- // 4. Create the ITypeDeclaration
- typeDeclarations[index++] = new JpaTypeDeclaration(
- getTypeRepository().getType(parameterTypeName),
- buildTypeParameters(parameterType),
- Signature.getArrayCount(parameterType)
- );
- }
-
- return typeDeclarations;
- }
-
- protected ITypeDeclaration[] buildTypeParameters(String signature) {
-
- String[] typeParameters = Signature.getTypeArguments(signature);
- ITypeDeclaration[] generics = new ITypeDeclaration[typeParameters.length];
-
- for (int index = 0; index < typeParameters.length; index++) {
- String typeParameter = typeParameters[index];
-
- // 1. Retrieve the parameter type (without the wild cards)
- switch (Signature.getTypeSignatureKind(typeParameter)) {
- case Signature.WILDCARD_TYPE_SIGNATURE: {
- typeParameter = typeParameter.substring(1);
- }
- }
-
- if (typeParameter.length() == 0) {
- generics[index] = getTypeRepository().getTypeHelper().objectTypeDeclaration();
- }
- else {
- String typeParameterName = Signature.getTypeErasure(typeParameter);
-
- // 3. Convert the type signature to a dot-based name
- typeParameterName = Signature.toString(typeParameterName);
-
- // 3. Retrieve the IType for the type parameter
- IType genericType = getTypeRepository().getType(typeParameterName);
-
- if (genericType.isResolvable()) {
- generics[index] = genericType.getTypeDeclaration();
- }
- else {
- generics[index] = getTypeRepository().getTypeHelper().objectTypeDeclaration();
- }
- }
- }
-
- return generics;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration[] getParameterTypes() {
- if (typeDeclarations == null) {
- typeDeclarations = buildParameterTypes();
- }
- return typeDeclarations;
- }
-
- protected ITypeRepository getTypeRepository() {
- return type.getTypeRepository();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericJpaMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericJpaMapping.java
deleted file mode 100644
index fc9cde27aa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericJpaMapping.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedType;
-
-/**
- * A default implementation of Hermes' {@link IMapping}.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.1
- * @author Pascal Filion
- */
-public class GenericJpaMapping extends JpaMapping {
-
- /**
- * Creates a new <code>GenericJpaMapping</code>.
- *
- * @param parent The parent of this mapping
- * @param mapping The design-time {@link AttributeMapping} wrapped by this class
- */
- public GenericJpaMapping(IManagedType parent, AttributeMapping mapping) {
- super(parent, mapping);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericMappingBuilder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericMappingBuilder.java
deleted file mode 100644
index c86f76e740..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/GenericMappingBuilder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedType;
-import org.eclipse.persistence.jpa.jpql.spi.IMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-
-/**
- * The default implementation of {@link IMappingBuilder}.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.1
- * @author Pascal Filion
- */
-public class GenericMappingBuilder implements IMappingBuilder<AttributeMapping> {
-
- /**
- * Creates a new <code>GenericMappingBuilder</code>.
- */
- public GenericMappingBuilder() {
- super();
- }
-
- /**
- * {@inheritDoc}
- */
- public IMapping buildMapping(IManagedType parent, AttributeMapping value) {
- return new GenericJpaMapping(parent, value);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IJpaType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IJpaType.java
deleted file mode 100644
index e7e102ef1e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IJpaType.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-
-/**
- * An internal interface used by all 3 implementations of {@link IType}.
- *
- * 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.
- *
- * @see JavaType
- * @see JpaType
- * @see SimpleType
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public interface IJpaType extends IType {
-
- /**
- * Manually sets the declaration of this {@link IType}, which gives the information about type
- * parameters, dimensionality, etc.
- *
- * @param typeDeclaration The external form of the type declaration
- */
- void setTypeDeclaration(JpaTypeDeclaration typeDeclaration);
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IManagedTypeBuilder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IManagedTypeBuilder.java
deleted file mode 100644
index 2d794c260f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/IManagedTypeBuilder.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IEmbeddable;
-import org.eclipse.persistence.jpa.jpql.spi.IEntity;
-import org.eclipse.persistence.jpa.jpql.spi.IMappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-
-/**
- * This builder is responsible to create the concrete instance of a {@link org.eclipse.persistence.
- * jpa.jpql.spi.IManagedType IManagedType}
- *
- * @version 3.2
- * @since 3.2
- * @author Pascal Filion
- */
-public interface IManagedTypeBuilder {
-
- /**
- * Creates a new concrete instance of an {@link IEmbeddable}.
- *
- * @param provider The provider of JPA managed types
- * @param mappedClass The design-time representation of an embeddable
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- * @return A new instance of {@link IEmbeddable}
- */
- IEmbeddable buildEmbeddable(JpaManagedTypeProvider provider,
- Embeddable mappedClass,
- IMappingBuilder<AttributeMapping> mappingBuilder);
-
- /**
- * Creates a new concrete instance of an {@link IEntity}.
- *
- * @param provider The provider of JPA managed types
- * @param mappedClass The design-time representation of an entity
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- * @return A new instance of {@link IEntity}
- */
- IEntity buildEntity(JpaManagedTypeProvider provider,
- Entity mappedClass,
- IMappingBuilder<AttributeMapping> mappingBuilder);
-
- /**
- * Creates a new concrete instance of a {@link IMappedSuperclass}.
- *
- * @param provider The provider of JPA managed types
- * @param mappedClass The design-time representation of a mapped superclass
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- * @return A new instance of {@link IMappedSuperclass}
- */
- IMappedSuperclass buildMappedSuperclass(JpaManagedTypeProvider provider,
- MappedSuperclass mappedClass,
- IMappingBuilder<AttributeMapping> mappingBuilder);
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaConstructor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaConstructor.java
deleted file mode 100644
index 288940c2c1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaConstructor.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Type;
-import org.eclipse.persistence.jpa.jpql.spi.IConstructor;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeRepository;
-
-/**
- * The concrete implementation of {@link IConstructor} that is wrapping a Java constructor.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public class JavaConstructor implements IConstructor {
-
- /**
- * The actual Java constructor.
- */
- private Constructor<?> constructor;
-
- /**
- * The cached {@link ITypeDeclaration parameter types}.
- */
- private ITypeDeclaration[] parameterTypes;
-
- /**
- * The declaring type of this constructor.
- */
- private JavaType type;
-
- /**
- * Creates a new <code>JavaConstructor</code>.
- *
- * @param type The declaring type of this constructor
- * @param constructor The actual Java constructor
- */
- public JavaConstructor(JavaType type, Constructor<?> constructor) {
- super();
- this.type = type;
- this.constructor = constructor;
- }
-
- protected ITypeDeclaration[] buildParameterTypes() {
-
- Class<?>[] types = constructor.getParameterTypes();
- Type[] genericTypes = constructor.getGenericParameterTypes();
- ITypeDeclaration[] typeDeclarations = new ITypeDeclaration[types.length];
-
- for (int index = 0, count = types.length; index < count; index++) {
- typeDeclarations[index] = buildTypeDeclaration(types[index], genericTypes[index]);
- }
-
- return typeDeclarations;
- }
-
- protected ITypeDeclaration buildTypeDeclaration(Class<?> javaType, Type genericType) {
- ITypeRepository typeRepository = getTypeRepository();
- IType type = typeRepository.getType(javaType);
- return new JavaTypeDeclaration(typeRepository, type, genericType, javaType.isArray());
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration[] getParameterTypes() {
- if (parameterTypes == null) {
- parameterTypes = buildParameterTypes();
- }
- return parameterTypes;
- }
-
- protected ITypeRepository getTypeRepository() {
- return type.getTypeRepository();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return constructor.toGenericString();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaType.java
deleted file mode 100644
index fc55bce778..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaType.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.Collection;
-import org.eclipse.persistence.jpa.jpql.ExpressionTools;
-import org.eclipse.persistence.jpa.jpql.TypeHelper;
-import org.eclipse.persistence.jpa.jpql.spi.IConstructor;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.util.iterator.CloneIterator;
-import org.eclipse.persistence.jpa.jpql.util.iterator.IterableIterator;
-
-/**
- * The concrete implementation of {@link IType} that is wrapping a Java type.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class JavaType implements IJpaType {
-
- /**
- * The cached {@link IConstructor IConstructors}.
- */
- private Collection<IConstructor> constructors;
-
- /**
- * The list of names for the {@link Enum}'s constants otherwise an empty array.
- */
- private String[] enumConstants;
-
- /**
- * The actual Java type.
- */
- private Class<?> type;
-
- /**
- * The cached {@link ITypeDeclaration} for this {@link IType}.
- */
- private ITypeDeclaration typeDeclaration;
-
- /**
- * The fully qualified name of the Java type.
- */
- private String typeName;
-
- /**
- * The external form of a type repository.
- */
- private JpaTypeRepository typeRepository;
-
- /**
- * Creates a new <code>JavaType</code>.
- *
- * @param typeRepository The external form of a type repository
- * @param type The actual Java type wrapped by this class
- */
- public JavaType(JpaTypeRepository typeRepository, Class<?> type) {
- super();
- this.type = type;
- this.typeName = type.getName();
- this.typeRepository = typeRepository;
- }
-
- protected IConstructor buildConstructor(Constructor<?> constructor) {
- return new JavaConstructor(this, constructor);
- }
-
- protected Collection<IConstructor> buildConstructors() {
-
- Constructor<?>[] javaConstructors = type.getDeclaredConstructors();
- Collection<IConstructor> constructors = new ArrayList<IConstructor>(javaConstructors.length);
-
- for (Constructor<?> javaConstructor : javaConstructors) {
- constructors.add(buildConstructor(javaConstructor));
- }
-
- return constructors;
- }
-
- protected String[] buildEnumConstants() {
-
- if (!type.isEnum()) {
- return ExpressionTools.EMPTY_STRING_ARRAY;
- }
-
- Object[] enumConstants = type.getEnumConstants();
- String[] names = new String[enumConstants.length];
-
- for (int index = enumConstants.length; --index >= 0; ) {
- names[index] = ((Enum<?>) enumConstants[index]).name();
- }
-
- return names;
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IConstructor> constructors() {
- if (constructors == null) {
- constructors = buildConstructors();
- }
- return new CloneIterator<IConstructor>(constructors);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean equals(IType type) {
- return (this == type) || typeName.equals(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean equals(Object object) {
- return equals((IType) object);
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getEnumConstants() {
- if (enumConstants == null) {
- enumConstants = buildEnumConstants();
- }
- return enumConstants;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return typeName;
- }
-
- /**
- * Returns the encapsulated {@link Class}, which is the actual type.
- *
- * @return The actual Java type, if <code>null</code> is returned; then the class could not be resolved
- */
- protected Class<?> getType() {
- return type;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration getTypeDeclaration() {
- if (typeDeclaration == null) {
- typeDeclaration = new JavaTypeDeclaration(typeRepository, this, null, (type != null) ? type.isArray() : false);
- }
- return typeDeclaration;
- }
-
- /**
- * Returns the type repository for the application.
- *
- * @return The repository of {@link IType ITypes}
- */
- protected JpaTypeRepository getTypeRepository() {
- return typeRepository;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return type.isAnnotationPresent(annotationType);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int hashCode() {
- return typeName.hashCode();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isAssignableTo(IType otherType) {
-
- if (equals(otherType)) {
- return true;
- }
-
- // Make sure both types are not primitives since isAssignableFrom() does not work.
- // For instance long and Long can't be compared but they are valid for JPQL query
- TypeHelper typeHelper = typeRepository.getTypeHelper();
- IType thisType = typeHelper.convertPrimitive(this);
- otherType = typeHelper.convertPrimitive(otherType);
-
- // Both are JavaType, even doing convertPrimitive() on this type always returns
- // a JavaType when converting a primitive into its Class object
- if (otherType instanceof JavaType) {
- Class<?> thisClass = ((JavaType) thisType) .type;
- Class<?> otherClass = ((JavaType) otherType).type;
- return otherClass.isAssignableFrom(thisClass);
- }
-
- // For JpaType, convert this type into a JpaType and use its isAssignableTo()
- if (otherType instanceof JpaType) {
- org.eclipse.jdt.core.IType jdtType = typeRepository.findType(typeName);
-
- if (jdtType != null) {
- JpaType jpaType = new JpaType(typeRepository, jdtType);
- return jpaType.isAssignableTo(otherType);
- }
-
- return false;
- }
-
- // SimpleType cannot be validated since it's wrapping an unknown type
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isEnum() {
- return (type != null) && type.isEnum();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolvable() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setTypeDeclaration(JpaTypeDeclaration typeDeclaration) {
- this.typeDeclaration = typeDeclaration;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return typeName;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaTypeDeclaration.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaTypeDeclaration.java
deleted file mode 100644
index 419a657094..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JavaTypeDeclaration.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeRepository;
-
-/**
- * The concrete implementation of {@link ITypeDeclaration} that is wrapping the representation
- * of the declaration description of a type.
- *
- * 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.
- *
- * @see IMapping
- * @see IType
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-@SuppressWarnings("nls")
-public class JavaTypeDeclaration implements ITypeDeclaration {
-
- /**
- * Determines whether the type declaration represents an array.
- */
- private boolean array;
-
- /**
- * The actual type that contains the generics, if any is present.
- */
- private Object genericType;
-
- /**
- * The cached {@link ITypeDeclaration ITypeDeclarations} representing the generics of the {@link
- * Type}.
- */
- private ITypeDeclaration[] genericTypes;
-
- /**
- * The external form of the Java type.
- */
- private final IType type;
-
- /**
- * The repository of {@link IType ITypes}.
- */
- private ITypeRepository typeRepository;
-
- /**
- * Creates a new <code>JavaTypeDeclaration</code>.
- *
- * @param typeRepository The repository of {@link IType ITypes}
- * @param type The external form of the Java type
- * @param genericType The actual type that contains the generics, if any is present
- * @param array Determines whether the type declaration represents an array
- */
- public JavaTypeDeclaration(ITypeRepository typeRepository,
- IType type,
- Object genericType,
- boolean array) {
-
- super();
- this.type = type;
- this.array = array;
- this.genericType = genericType;
- this.typeRepository = typeRepository;
- }
-
- protected String buildArrayTypeName(String arrayTypeName) {
-
- StringBuilder sb = new StringBuilder();
- int index = arrayTypeName.indexOf('[');
- int dimensionality = (arrayTypeName.length() - index) / 2;
- String typeName = arrayTypeName.substring(0, index);
-
- while (--dimensionality >= 0) {
- sb.append("[");
- }
-
- String elementType = elementType(typeName);
-
- sb.append(elementType);
- sb.append(typeName);
-
- if (elementType.equals("L")) {
- sb.append(";");
- }
-
- return sb.toString();
- }
-
- protected ITypeDeclaration[] buildParameterTypes() {
-
- List<ITypeDeclaration> parameterTypes = new ArrayList<ITypeDeclaration>();
-
- // Example: Class<T>
- if (genericType instanceof ParameterizedType) {
- ParameterizedType parameterizedType = (ParameterizedType) genericType;
- for (Type type : parameterizedType.getActualTypeArguments()) {
- ITypeDeclaration typeParameter = buildTypeDeclaration(type);
- parameterTypes.add(typeParameter);
- }
- }
- // T[]
- else if (genericType instanceof GenericArrayType) {
- GenericArrayType genericArrayType = (GenericArrayType) genericType;
- parameterTypes.add(buildTypeDeclaration(genericArrayType.getGenericComponentType()));
- }
- // Example: Class
- else if (genericType.getClass() == Class.class) {
- ITypeDeclaration typeParameter = buildTypeDeclaration((Class<?>) genericType);
- parameterTypes.add(typeParameter);
- }
- // Example: <K, V>
- else if (genericType.getClass() == Class[].class) {
- for (Class<?> javaType : ((Class<?>[]) genericType)) {
- ITypeDeclaration typeParameter = buildTypeDeclaration(javaType);
- parameterTypes.add(typeParameter);
- }
- }
- // Example: <K, V>
- else if (genericType.getClass() == IType[].class) {
- for (IType type : ((IType[]) genericType)) {
- ITypeDeclaration typeParameter = new JavaTypeDeclaration(typeRepository, type, null, false);
- parameterTypes.add(typeParameter);
- }
- }
-
- return parameterTypes.toArray(new ITypeDeclaration[parameterTypes.size()]);
- }
-
- protected JavaTypeDeclaration buildTypeDeclaration(Class<?> javaType) {
- return new JavaTypeDeclaration(
- typeRepository,
- getType(javaType),
- null,
- javaType.isArray()
- );
- }
-
- protected JavaTypeDeclaration buildTypeDeclaration(Object genericType) {
-
- // <T1, ..., Tn>
- if (genericType instanceof ParameterizedType) {
- ParameterizedType parameterizedType = (ParameterizedType) genericType;
- return buildTypeDeclaration(parameterizedType.getRawType());
- }
-
- // <T>
- if (genericType instanceof TypeVariable) {
- TypeVariable<?> typeVariable = (TypeVariable<?>) genericType;
- for (Type type : typeVariable.getBounds()) {
- return buildTypeDeclaration(type);
- }
- return buildTypeDeclaration(Object.class);
- }
-
- // ?
- if (genericType instanceof WildcardType) {
- WildcardType wildcardType = (WildcardType) genericType;
- for (Type type : wildcardType.getUpperBounds()) {
- return buildTypeDeclaration(type);
- }
- return buildTypeDeclaration(Object.class);
- }
-
- // T[]
- if (genericType instanceof GenericArrayType) {
- GenericArrayType genericArrayType = (GenericArrayType) genericType;
- String arrayTypeName = buildArrayTypeName(genericArrayType.toString());
- IType arrayType = typeRepository.getType(arrayTypeName);
-
- return new JavaTypeDeclaration(
- typeRepository,
- arrayType,
- genericArrayType.getGenericComponentType(),
- true
- );
- }
-
- return buildTypeDeclaration((Class<?>) genericType);
- }
-
- protected String elementType(String typeName) {
-
- if (typeName.equals("boolean")) return "Z";
- if (typeName.equals("byte")) return "B";
- if (typeName.equals("char")) return "C";
- if (typeName.equals("double")) return "D";
- if (typeName.equals("float")) return "F";
- if (typeName.equals("int")) return "I";
- if (typeName.equals("long")) return "J";
- if (typeName.equals("short")) return "S";
-
- return "L";
- }
-
- /**
- * {@inheritDoc}
- */
- public int getDimensionality() {
- if (array) {
- String name = type.getName();
- int index = 0;
- while (name.charAt(index) == '[') {
- index++;
- }
- return index;
- }
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public IType getType() {
- return type;
- }
-
- protected IType getType(Class<?> type) {
- return typeRepository.getType(type);
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration[] getTypeParameters() {
- if (genericTypes == null) {
- if (genericType == null) {
- genericTypes = new ITypeDeclaration[0];
- }
- else {
- genericTypes = buildParameterTypes();
- }
- }
- return genericTypes;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isArray() {
- return array;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return (genericType != null) ? genericType.toString() : type.toString();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaConstructor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaConstructor.java
deleted file mode 100644
index 6dca9bf47a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaConstructor.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jdt.core.dom.IMethodBinding;
-import org.eclipse.jdt.core.dom.ITypeBinding;
-import org.eclipse.persistence.jpa.jpql.spi.IConstructor;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeRepository;
-
-/**
- * The concrete implementation of {@link IConstructor} that is wrapping the design-time
- * representation of a Java constructor.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaConstructor implements IConstructor {
-
- /**
- * The design-time representation of a Java constructor.
- */
- private IMethodBinding constructor;
-
- /**
- * The cached {@link ITypeDeclaration ITypeDeclarations} representing each of the constructor's
- * parameter types.
- */
- private ITypeDeclaration[] typeDeclarations;
-
- /**
- * The type owning this constructor.
- */
- private JpaType type;
-
- /**
- * Creates a new <code>JpaConstructor</code>.
- *
- * @param type The type owning the constructor
- * @param constructor The design-time representation of a Java constructor
- */
- public JpaConstructor(JpaType type, IMethodBinding constructor) {
- super();
- this.type = type;
- this.constructor = constructor;
- }
-
- protected ITypeDeclaration buildTypeDeclaration(ITypeBinding parameterType) {
-
- boolean array = parameterType.isArray();
- String typeParameterName;
-
- if (array) {
- ITypeBinding componentType = parameterType.getComponentType();
-
- // <T>[] or <? extends <class_name>>[]
- if (componentType.isTypeVariable() ||
- componentType.isParameterizedType()) {
-
- typeParameterName = componentType.getErasure().getQualifiedName();
- }
- else {
- typeParameterName = componentType.getQualifiedName();
- }
-
- // Now for the type arguments, we have to use the component type
- parameterType = componentType;
- }
- // <T> or <? extends <class_name>>
- else if (parameterType.isTypeVariable() ||
- parameterType.isParameterizedType()) {
-
- typeParameterName = parameterType.getErasure().getQualifiedName();
- }
- else {
- typeParameterName = parameterType.getQualifiedName();
- }
-
- // Retrieve the fully qualified name of the type
- ITypeRepository typeRepository = type.getTypeRepository();
- ITypeBinding[] typeArguments = parameterType.getTypeArguments();
- ITypeDeclaration[] genericTypes = new ITypeDeclaration[typeArguments.length];
- int index = 0;
-
- for (ITypeBinding typeArgument : typeArguments) {
- String genericTypeName = typeArgument.getErasure().getQualifiedName();
- IType genericType = typeRepository.getType(genericTypeName);
- genericTypes[index++] = genericType.getTypeDeclaration();
- }
-
- return new JpaTypeDeclaration(
- typeRepository.getType(typeParameterName),
- genericTypes,
- parameterType.getDimensions()
- );
- }
-
- protected ITypeDeclaration[] buildTypeDeclarations() {
-
- ITypeBinding[] parameterTypes = constructor.getParameterTypes();
- ITypeDeclaration[] declarations = new ITypeDeclaration[parameterTypes.length];
-
- for (int index = declarations.length; --index >= 0; ) {
- declarations[index] = buildTypeDeclaration(parameterTypes[index]);
- }
-
- return declarations;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration[] getParameterTypes() {
- if (typeDeclarations == null) {
- typeDeclarations = buildTypeDeclarations();
- }
- return typeDeclarations;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return constructor.toString();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEmbeddable.java
deleted file mode 100644
index 053591f7d3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEmbeddable.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.persistence.jpa.jpql.spi.IEmbeddable;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeVisitor;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-
-/**
- * The concrete implementation of {@link IEmbeddable} that is wrapping the design-time
- * representation of a JPA embeddable.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaEmbeddable extends JpaManagedType
- implements IEmbeddable {
-
- /**
- * Creates a new <code>JpaEmbeddable</code>.
- *
- * @param provider The provider of JPA managed types
- * @param embeddable The design-time model object wrapped by this class
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- */
- public JpaEmbeddable(JpaManagedTypeProvider provider,
- Embeddable embeddable,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- super(provider, embeddable, mappingBuilder);
- }
-
- /**
- * {@inheritDoc}
- */
- public void accept(IManagedTypeVisitor visitor) {
- visitor.visit(this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Embeddable getManagedType() {
- return (Embeddable) super.getManagedType();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return getType().getName();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEntity.java
deleted file mode 100644
index 94b5b25340..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaEntity.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.persistence.jpa.jpql.spi.IEntity;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeVisitor;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-import org.eclipse.persistence.jpa.jpql.spi.IQuery;
-
-/**
- * The concrete implementation of {@link IEntity} that is wrapping the design-time representation
- * of a JPA entity.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaEntity extends JpaManagedType
- implements IEntity {
-
- /**
- * The cached used to quickly retrieve any queries that have been cached.
- */
- private Map<String, IQuery> queries;
-
- /**
- * Creates a new <code>JpaEntity</code>.
- *
- * @param provider The provider of JPA managed types
- * @param entity The design-time model object wrapped by this class
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- */
- public JpaEntity(JpaManagedTypeProvider provider,
- Entity entity,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- super(provider, entity, mappingBuilder);
- }
-
- /**
- * {@inheritDoc}
- */
- public void accept(IManagedTypeVisitor visitor) {
- visitor.visit(this);
- }
-
- protected IQuery buildQuery(JpaManagedTypeProvider provider, NamedQuery namedQuery) {
- return new JpaQuery(provider, namedQuery);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Entity getManagedType() {
- return (Entity) super.getManagedType();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return getManagedType().getName();
- }
-
- /**
- * {@inheritDoc}
- */
- public IQuery getNamedQuery(String queryName) {
- initializeQueries();
- return queries.get(queryName);
- }
-
- /**
- * Initializes the map JPQL queries if it has not been been initialized yet.
- */
- protected void initializeQueries() {
- if (queries == null) {
- queries = new HashMap<String, IQuery>();
- initializeQueries(queries);
- }
- }
-
- protected void initializeQueries(Map<String, IQuery> queries) {
- JpaManagedTypeProvider provider = getProvider();
- for (NamedQuery namedQuery : getNamedQueries()) {
- queries.put(namedQuery.getName(), buildQuery(provider, namedQuery));
- }
- }
-
- protected ListIterable<? extends NamedQuery> getNamedQueries() {
- return getManagedType().getQueryContainer().getNamedQueries();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return getName();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedType.java
deleted file mode 100644
index 4d66656d88..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedType.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedType;
-import org.eclipse.persistence.jpa.jpql.spi.IMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.util.iterator.CloneIterator;
-import org.eclipse.persistence.jpa.jpql.util.iterator.IterableIterator;
-
-/**
- * The abstract definition of {@link IManagedType} defined for wrapping the design-time mapped class
- * object.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public abstract class JpaManagedType implements IManagedType {
-
- /**
- * The design-time model object wrapped by this class.
- */
- private final TypeMapping managedType;
-
- /**
- * The builder that is responsible to create the {@link IMapping} wrapping a persistent attribute
- * or property.
- */
- private IMappingBuilder<AttributeMapping> mappingBuilder;
-
- /**
- * The cached collection of {@link IMapping mappings} that prevent rebuilding them every time one
- * is requested.
- */
- private Map<String, IMapping> mappings;
-
- /**
- * The provider of JPA managed types.
- */
- private final JpaManagedTypeProvider provider;
-
- /**
- * The cached type of this managed type.
- */
- private IType type;
-
- /**
- * Creates a new <code>JDeveloperManagedType</code>.
- *
- * @param managedType The provider of JPA managed types
- * @param mappedClass The design-time model object wrapped by this class
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- */
- protected JpaManagedType(JpaManagedTypeProvider provider,
- TypeMapping managedType,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- super();
- this.provider = provider;
- this.managedType = managedType;
- this.mappingBuilder = mappingBuilder;
- }
-
- /**
- * Creates the external form that needs to wrap the given {@link AttributeMapping}. By default,
- * the call is delegated to {@link IMappingBuilder}.
- *
- * @param mapping The mapping to wrap with a {@link IMapping}
- * @return A new concrete instance of {@link IMapping}
- */
- protected IMapping buildMapping(AttributeMapping mapping) {
- return mappingBuilder.buildMapping(this, mapping);
- }
-
- /**
- * Creates an external form for each {@link AttributeMapping} and stores them by using their
- * mapping name.
- *
- * @return The mappings mapped by their name
- */
- protected Map<String, IMapping> buildMappings() {
- Map<String, IMapping> mappings = new HashMap<String, IMapping>();
- for (AttributeMapping mapping : managedType.getAllAttributeMappings()) {
- mappings.put(mapping.getName(), buildMapping(mapping));
- }
- return mappings;
- }
-
- /**
- * {@inheritDoc}
- */
- public int compareTo(IManagedType managedType) {
- return getType().getName().compareTo(managedType.getType().getName());
- }
-
- /**
- * Returns the encapsulated model object.
- *
- * @return The managed type wrapped by this external form
- */
- public TypeMapping getManagedType() {
- return managedType;
- }
-
- /**
- * Returns the builder that is responsible to create the {@link IMapping} wrapping a persistent
- * attribute or property.
- *
- * @return The concrete implementation of {@link IMappingBuilder}
- */
- protected IMappingBuilder<AttributeMapping> getMappingBuilder() {
- return mappingBuilder;
- }
-
- /**
- * {@inheritDoc}
- */
- public IMapping getMappingNamed(String name) {
- initializeMappings();
- return mappings.get(name);
- }
-
- /**
- * {@inheritDoc}
- */
- public JpaManagedTypeProvider getProvider() {
- return provider;
- }
-
- /**
- * {@inheritDoc}
- */
- public IType getType() {
- if (type == null) {
- type = provider.getTypeRepository().getType(managedType.getPersistentType().getName());
- }
- return type;
- }
-
- /**
- * Initializes this managed type.
- */
- protected void initializeMappings() {
- if (mappings == null) {
- mappings = buildMappings();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IMapping> mappings() {
- initializeMappings();
- return new CloneIterator<IMapping>(mappings.values());
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeBuilder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeBuilder.java
deleted file mode 100644
index d044b8d196..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeBuilder.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IEmbeddable;
-import org.eclipse.persistence.jpa.jpql.spi.IEntity;
-import org.eclipse.persistence.jpa.jpql.spi.IMappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-
-/**
- * @version 3.2
- * @since 3.2
- * @author Pascal Filion
- */
-public class JpaManagedTypeBuilder implements IManagedTypeBuilder {
-
- /**
- * {@inheritDoc}
- */
- public IEmbeddable buildEmbeddable(JpaManagedTypeProvider provider,
- Embeddable mappedClass,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- return new JpaEmbeddable(provider, mappedClass, mappingBuilder);
- }
-
- /**
- * {@inheritDoc}
- */
- public IEntity buildEntity(JpaManagedTypeProvider provider,
- Entity mappedClass,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- return new JpaEntity(provider, mappedClass, mappingBuilder);
- }
-
- /**
- * {@inheritDoc}
- */
- public IMappedSuperclass buildMappedSuperclass(JpaManagedTypeProvider provider,
- MappedSuperclass mappedClass,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- return new JpaMappedSuperclass(provider, mappedClass, mappingBuilder);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeProvider.java
deleted file mode 100644
index 886d59d185..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaManagedTypeProvider.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-import org.eclipse.jpt.jpa.core.JpaProject;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.Embeddable;
-import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.PersistentType;
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer;
-import org.eclipse.persistence.jpa.jpql.spi.IEmbeddable;
-import org.eclipse.persistence.jpa.jpql.spi.IEntity;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedType;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeProvider;
-import org.eclipse.persistence.jpa.jpql.spi.IMappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.util.iterator.CloneIterator;
-import org.eclipse.persistence.jpa.jpql.util.iterator.IterableIterator;
-
-/**
- * An implementation of {@link IManagedTypeProvider} that is wrapping the design-time representation
- * of a provider of managed types.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaManagedTypeProvider implements IManagedTypeProvider {
-
- /**
- * The filtered collection of managed types that are {@link IEmbeddable}.
- */
- private Collection<IEmbeddable> embeddables;
-
- /**
- * The filtered collection of managed types that are the entities.
- */
- private Collection<IEntity> entities;
-
- /**
- * The project that gives access to the application's metadata.
- */
- private final JpaProject jpaProject;
-
- /**
- * The builder that is responsible to create the {@link IManagedType} wrapping a type mapping.
- */
- private IManagedTypeBuilder managedTypeBuilder;
-
- /**
- * The cached {@link IManagedType managed types}.
- */
- private Map<String, IManagedType> managedTypes;
-
- /**
- * The filtered collection of managed types that are {@link IMappedSuperclass}.
- */
- private Collection<IMappedSuperclass> mappedSuperclasses;
-
- /**
- * The builder that is responsible to create the {@link IMapping} wrapping a persistent attribute
- * or property.
- */
- private IMappingBuilder<AttributeMapping> mappingBuilder;
-
- /**
- * The design-time provider of managed types.
- */
- private final PersistentTypeContainer persistentTypeContainer;
-
- /**
- * The external form of a type repository.
- */
- private JpaTypeRepository typeRepository;
-
- /**
- * Creates a new <code>JpaManagedTypeProvider</code>.
- *
- * @param jpaProject The project that gives access to the application's metadata
- * @param persistentTypeContainer The design-time provider of managed types
- * @param managedTypeBuilder The builder that is responsible to create the {@link IManagedType}
- * wrapping a type mapping
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- */
- public JpaManagedTypeProvider(JpaProject jpaProject,
- PersistentTypeContainer persistentTypeContainer,
- IManagedTypeBuilder managedTypeBuilder,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- super();
- this.jpaProject = jpaProject;
- this.mappingBuilder = mappingBuilder;
- this.managedTypeBuilder = managedTypeBuilder;
- this.persistentTypeContainer = persistentTypeContainer;
- }
-
- /**
- * Creates a new <code>JpaManagedTypeProvider</code>.
- *
- * @param jpaProject The project that gives access to the application's metadata
- * @param persistentTypeContainer The design-time provider of managed types
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- */
- public JpaManagedTypeProvider(JpaProject jpaProject,
- PersistentTypeContainer persistentTypeContainer,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- this(jpaProject, persistentTypeContainer, new JpaManagedTypeBuilder(), mappingBuilder);
- }
-
- protected IEmbeddable buildEmbeddable(Embeddable mappedClass) {
- return managedTypeBuilder.buildEmbeddable(this, mappedClass, mappingBuilder);
- }
-
- protected IEntity buildEntity(Entity mappedClass) {
- return managedTypeBuilder.buildEntity(this, mappedClass, mappingBuilder);
- }
-
- protected IManagedType buildManagedType(PersistentType persistentType) {
-
- TypeMapping mappedClass = persistentType.getMapping();
-
- if (mappedClass instanceof Entity) {
- IEntity entity = buildEntity((Entity) mappedClass);
- entities.add(entity);
- return entity;
- }
-
- if (mappedClass instanceof MappedSuperclass) {
- IMappedSuperclass mappedSuperclass = buildMappedSuperclass((MappedSuperclass) mappedClass);
- mappedSuperclasses.add(mappedSuperclass);
- return mappedSuperclass;
- }
-
- if (mappedClass instanceof Embeddable) {
- IEmbeddable embeddable = buildEmbeddable((Embeddable) mappedClass);
- embeddables.add(embeddable);
- return embeddable;
- }
-
- return new JpaNullManagedType(this, mappedClass);
- }
-
- protected Map<String, IManagedType> buildManagedTypes() {
-
- Map<String, IManagedType> managedTypes = new HashMap<String, IManagedType>();
-
- for (PersistentType persistentType : getPersistentTypeContainer().getPersistentTypes()) {
-
- if (persistentType != null) {
- String name = persistentType.getMapping().getName();
-
- // If the persistent type is the overridden (annotation) one and the ORM
- // one is already added, then don't override the ORM one
- if (managedTypes.containsKey(name) && persistentType.getOverriddenPersistentType() == null) {
- continue;
- }
-
- managedTypes.put(name, buildManagedType(persistentType));
- }
- }
-
- return managedTypes;
- }
-
- protected IMappedSuperclass buildMappedSuperclass(MappedSuperclass mappedClass) {
- return managedTypeBuilder.buildMappedSuperclass(this, mappedClass, mappingBuilder);
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IEntity> entities() {
- initializeManagedTypes();
- return new CloneIterator<IEntity>(entities);
- }
-
- /**
- * {@inheritDoc}
- */
- public IEmbeddable getEmbeddable(IType type) {
- return getEmbeddable(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public IEmbeddable getEmbeddable(String typeName) {
- return getManagedType(embeddables, typeName);
- }
-
- /**
- * {@inheritDoc}
- */
- public IEntity getEntity(IType type) {
- return getEntity(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public IEntity getEntity(String typeName) {
- return getManagedType(entities, typeName);
- }
-
- /**
- * {@inheritDoc}
- */
- public IEntity getEntityNamed(String entityName) {
-
- initializeManagedTypes();
-
- for (IEntity entity : entities) {
- if (entity.getName().equals(entityName)) {
- return entity;
- }
- }
-
- return null;
- }
-
- protected <T extends IManagedType> T getManagedType(Collection<T> managedTypes,
- String typeName) {
-
- initializeManagedTypes();
-
- for (T managedType : managedTypes) {
- if (managedType.getType().getName().equals(typeName)) {
- return managedType;
- }
- }
-
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public IManagedType getManagedType(IType type) {
- return getManagedType(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public IManagedType getManagedType(String typeName) {
- return getManagedType(managedTypes.values(), typeName);
- }
-
- /**
- * {@inheritDoc}
- */
- public IMappedSuperclass getMappedSuperclass(IType type) {
- return getMappedSuperclass(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public IMappedSuperclass getMappedSuperclass(String typeName) {
- return getManagedType(mappedSuperclasses, typeName);
- }
-
- /**
- * Returns the container of managed types.
- *
- * @return The container of managed types
- */
- public PersistentTypeContainer getPersistentTypeContainer() {
- return persistentTypeContainer;
- }
-
- /**
- * Returns the encapsulated {@link PersistentType}, which is the actual object.
- *
- * @return The design-time representation of a managed type provider
- */
- protected PersistentTypeContainer getProvider() {
- return persistentTypeContainer;
- }
-
- /**
- * {@inheritDoc}
- */
- public JpaTypeRepository getTypeRepository() {
- if (typeRepository == null) {
- typeRepository = new JpaTypeRepository(jpaProject.getJavaProject());
- }
- return typeRepository;
- }
-
- protected void initializeManagedTypes() {
- if (managedTypes == null) {
- this.entities = new LinkedList<IEntity>();
- this.embeddables = new LinkedList<IEmbeddable>();
- this.mappedSuperclasses = new LinkedList<IMappedSuperclass>();
- this.managedTypes = buildManagedTypes();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IManagedType> managedTypes() {
- initializeManagedTypes();
- return new CloneIterator<IManagedType>(managedTypes.values());
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMappedSuperclass.java
deleted file mode 100644
index df99029c67..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMappedSuperclass.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeVisitor;
-import org.eclipse.persistence.jpa.jpql.spi.IMappedSuperclass;
-import org.eclipse.persistence.jpa.jpql.spi.IMappingBuilder;
-
-/**
- * The concrete implementation of {@link IMappedSuperclass} that is wrapping the design-time
- * representation of a JPA mapped superclass.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaMappedSuperclass extends JpaManagedType
- implements IMappedSuperclass {
-
- /**
- * Creates a new <code>JpaMappedSuperclass</code>.
- *
- * @param provider The provider of JPA managed types
- * @param mappedSuperclass The design-time model object wrapped by this class
- * @param mappingBuilder The builder that is responsible to create the {@link IMapping} wrapping
- * a persistent attribute or property
- */
- public JpaMappedSuperclass(JpaManagedTypeProvider provider,
- MappedSuperclass mappedSuperclass,
- IMappingBuilder<AttributeMapping> mappingBuilder) {
-
- super(provider, mappedSuperclass, mappingBuilder);
- }
-
- /**
- * {@inheritDoc}
- */
- public void accept(IManagedTypeVisitor visitor) {
- visitor.visit(this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public MappedSuperclass getManagedType() {
- return (MappedSuperclass) super.getManagedType();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return getType().getName();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java
deleted file mode 100644
index 0ae0971e4e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.lang.annotation.Annotation;
-import java.util.List;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.context.AttributeMapping;
-import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.persistence.jpa.jpql.spi.IEntity;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedType;
-import org.eclipse.persistence.jpa.jpql.spi.IMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeRepository;
-
-import static org.eclipse.persistence.jpa.jpql.spi.IMappingType.*;
-
-/**
- * The concrete implementation of {@link IMapping} that is wrapping the design-time representation
- * of a mapping.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-@SuppressWarnings("nls")
-public abstract class JpaMapping implements IMapping {
-
- /**
- * The design-time {@link AttributeMapping} wrapped by this class.
- */
- private final AttributeMapping mapping;
-
- /**
- * The type of the actual mapping.
- */
- private int mappingType;
-
- /**
- * The parent of this mapping.
- */
- private final IManagedType parent;
-
- /**
- * The {@link IType} of the property represented by the mapping.
- */
- private IType type;
-
- /**
- * The {@link ITypeDeclaration} of the property represented by the mapping.
- */
- private ITypeDeclaration typeDeclaration;
-
- /**
- * Creates a new <code>JpaMapping</code>.
- *
- * @param parent The parent of this mapping
- * @param mapping The design-time {@link AttributeMapping} wrapped by this class
- */
- protected JpaMapping(IManagedType parent, AttributeMapping mapping) {
- super();
- this.parent = parent;
- this.mapping = mapping;
- this.mappingType = -1;
- }
-
- protected ITypeDeclaration[] buildGenericTypeDeclarations() {
- JavaPersistentAttribute javaPersistentAttribute = mapping.getPersistentAttribute().getJavaPersistentAttribute();
- JavaResourceAttribute resource = javaPersistentAttribute == null ? null : javaPersistentAttribute.getResourceAttribute();
- List<ITypeDeclaration> declarations = CollectionTools.list(buildGenericTypeDeclarations(resource));
- return declarations.toArray(new ITypeDeclaration[declarations.size()]);
- }
-
- protected Iterable<ITypeDeclaration> buildGenericTypeDeclarations(JavaResourceAttribute resource) {
-
- if (resource == null) {
- return EmptyIterable.instance();
- }
-
- return new TransformationIterable<String, ITypeDeclaration>(resource.getTypeTypeArgumentNames()) {
- @Override
- protected ITypeDeclaration transform(String next) {
- return getTypeRepository().getType(next).getTypeDeclaration();
- }
- };
- }
-
- protected IType buildType() {
-
- PersistentAttribute property = mapping.getPersistentAttribute();
- String typeName = property.getTypeName();
-
- // The attribute could be virtual, incorrectly specified in the orm.xml
- if (typeName == null) {
- return getTypeRepository().getTypeHelper().unknownType();
- }
-
- // For relationship mapping, make sure to check the target entity first
- if (isRelationship()) {
-
- String entityName = ((RelationshipMapping) mapping).getTargetEntity();
-
- if (StringTools.stringIsNotEmpty(entityName)) {
- IEntity entity = getParent().getProvider().getEntityNamed(entityName);
- if (entity != null) {
- return entity.getType();
- }
- }
- }
-
- return getTypeRepository().getType(typeName);
- }
-
- protected ITypeDeclaration buildTypeDeclaration() {
-
- PersistentAttribute property = mapping.getPersistentAttribute();
- String typeName = property.getTypeName();
-
- // The attribute could be virtual, incorrectly specified in the orm.xml
- if (typeName == null) {
- return getTypeRepository().getTypeHelper().unknownTypeDeclaration();
- }
-
- boolean array = typeName.endsWith("[]");
- int dimensionality = 0;
-
- if (array) {
- dimensionality = getType().getTypeDeclaration().getDimensionality();
- }
-
- return new JpaTypeDeclaration(
- getType(),
- buildGenericTypeDeclarations(),
- dimensionality
- );
- }
-
- /**
- * Calculates the type of the persistent attribute represented by this external form.
- *
- * @return The mapping type, which is one of the constants defined in {@link org.eclipse.
- * persistence.jpa.jpql.spi.IMappingType IMappingType} when the provider is generic JPA
- */
- protected int calculateMappingType() {
-
- String type = mapping.getKey();
-
- // Basic
- if (type == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) {
- return BASIC;
- }
-
- // Embedded
- if (type == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) {
- return EMBEDDED;
- }
-
- // Embedded Id
- if (type == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) {
- return EMBEDDED_ID;
- }
-
- // Id
- if (type == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) {
- return ID;
- }
-
- // M:M
- if (type == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) {
- return MANY_TO_MANY;
- }
-
- // 1:M
- if (type == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) {
- return ONE_TO_MANY;
- }
-
- // M:1
- if (type == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) {
- return MANY_TO_ONE;
- }
-
- // 1:1
- if (type == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) {
- return ONE_TO_ONE;
- }
-
- // Version
- if (type == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) {
- return VERSION;
- }
-
- // Element Collection
- if (type == MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY) {
- return ELEMENT_COLLECTION;
- }
-
- return TRANSIENT;
- }
-
- /**
- * {@inheritDoc}
- */
- public int compareTo(IMapping mapping) {
- return getName().compareTo(mapping.getName());
- }
-
- /**
- * Returns
- *
- * @return
- */
- protected AttributeMapping getMapping() {
- return mapping;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getMappingType() {
- if (mappingType == -1) {
- mappingType = calculateMappingType();
- }
- return mappingType;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return mapping.getName();
- }
-
- /**
- * {@inheritDoc}
- */
- public IManagedType getParent() {
- return parent;
- }
-
- /**
- * {@inheritDoc}
- */
- public IType getType() {
- if (type == null) {
- type = buildType();
- }
- return type;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration getTypeDeclaration() {
- if (typeDeclaration == null) {
- typeDeclaration = buildTypeDeclaration();
- }
- return typeDeclaration;
- }
-
- /**
- * Returns the type repository for the application.
- *
- * @return The repository of {@link IType ITypes}
- */
- protected ITypeRepository getTypeRepository() {
- return parent.getProvider().getTypeRepository();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- JavaResourceAttribute attribute = mapping.getPersistentAttribute().getJavaPersistentAttribute().getResourceAttribute();
- return attribute.getAnnotation(annotationType.getName()) != null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isCollection() {
- switch (getMappingType()) {
- case ELEMENT_COLLECTION:
- case MANY_TO_MANY:
- case ONE_TO_MANY: return true;
- default: return false;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isProperty() {
- switch (getMappingType()) {
- case BASIC:
- case ID:
- case VERSION: return true;
- default: return false;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isRelationship() {
- switch (getMappingType()) {
- case ELEMENT_COLLECTION:
- case EMBEDDED_ID:
- case MANY_TO_MANY:
- case MANY_TO_ONE:
- case ONE_TO_MANY:
- case ONE_TO_ONE: return true;
- default: return false;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isTransient() {
- return getMappingType() == TRANSIENT;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- StringTools.appendSimpleToString(sb, this);
- sb.append(", name=");
- sb.append(getName());
- sb.append(", mappingType=");
- sb.append(getMappingType());
- return sb.toString();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaNullManagedType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaNullManagedType.java
deleted file mode 100644
index 86272628e4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaNullManagedType.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedType;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeProvider;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeVisitor;
-import org.eclipse.persistence.jpa.jpql.spi.IMapping;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.util.iterator.IterableIterator;
-import org.eclipse.persistence.jpa.jpql.util.iterator.NullIterator;
-
-/**
- * The concrete implementation of {@link IManagedType} that is wrapping the design-time
- * representation a "null" managed type.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaNullManagedType implements IManagedType {
-
- /**
- * The provider of JPA managed types.
- */
- private final JpaManagedTypeProvider provider;
-
- /**
- * The cached {@link IType} of this "null" managed type.
- */
- private IType type;
-
- /**
- * The design-time model object wrapped by this class.
- */
- private final TypeMapping typeMapping;
-
- /**
- * Creates a new <code>JpaNullManagedType</code>.
- *
- * @param managedType The provider of JPA managed types
- * @param typeMapping The design-time model object wrapped by this class
- */
- public JpaNullManagedType(JpaManagedTypeProvider provider, TypeMapping typeMapping) {
- super();
- this.provider = provider;
- this.typeMapping = typeMapping;
- }
-
- /**
- * {@inheritDoc}
- */
- public void accept(IManagedTypeVisitor visitor) {
- }
-
- /**
- * {@inheritDoc}
- */
- public int compareTo(IManagedType managedType) {
- return getType().getName().compareTo(managedType.getType().getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public IMapping getMappingNamed(String name) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public IManagedTypeProvider getProvider() {
- return provider;
- }
-
- /**
- * {@inheritDoc}
- */
- public IType getType() {
- if (type == null) {
- type = provider.getTypeRepository().getType(typeMapping.getPersistentType().getName());
- }
- return type;
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IMapping> mappings() {
- return NullIterator.instance();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return getType().getName();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaQuery.java
deleted file mode 100644
index 901f7116ab..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaQuery.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.context.NamedQuery;
-import org.eclipse.persistence.jpa.jpql.spi.IManagedTypeProvider;
-import org.eclipse.persistence.jpa.jpql.spi.IQuery;
-
-/**
- * The concrete implementation of {@link IQuery} that is wrapping the design-time representation
- * of a JPQL query.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-@SuppressWarnings("nls")
-public class JpaQuery implements IQuery {
-
- /**
- * The actual JPQL query, which can differ from the one owned by the model object, which happens
- * when the model is out of sync because it has not been updated yet.
- */
- private String actualQuery;
-
- /**
- * The provider of managed types.
- */
- private IManagedTypeProvider provider;
-
- /**
- * The model object holding onto the JPQL query.
- */
- private NamedQuery query;
-
- /**
- * Creates a new <code>JpaQuery</code>.
- *
- * @param provider The provider of managed types
- * @param query The model object of the JPQL query
- */
- public JpaQuery(IManagedTypeProvider provider, NamedQuery query) {
- this(provider, query, query.getQuery());
- }
-
- /**
- * Creates a new <code>JpaQuery</code>.
- *
- * @param provider The provider of managed types
- * @param query The model object of the JPQL query
- * @param actualQuery The actual JPQL query, which can differ from the one owned by the model
- * object, which happens when the model is out of sync because it has not been updated yet
- */
- public JpaQuery(IManagedTypeProvider provider, NamedQuery query, String actualQuery) {
- super();
- initialize(provider, query, actualQuery);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getExpression() {
- return actualQuery;
- }
-
- /**
- * {@inheritDoc}
- */
- public IManagedTypeProvider getProvider() {
- return provider;
- }
-
- /**
- * Returns the encapsulated {@link NamedQuery}, which is the actual object.
- *
- * @return The design-time representation of a JPQL query
- */
- protected NamedQuery getQuery() {
- return query;
- }
-
- protected void initialize(IManagedTypeProvider provider, NamedQuery query, String actualQuery) {
-
- this.query = query;
- this.provider = provider;
- this.actualQuery = actualQuery;
-
- if (this.actualQuery == null) {
- this.actualQuery = StringTools.EMPTY_STRING;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(super.toString());
- sb.append(", query=");
- sb.append(getExpression());
- return sb.toString();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaType.java
deleted file mode 100644
index b93bb81838..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaType.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
-import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
-import org.eclipse.jdt.core.dom.ClassInstanceCreation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
-import org.eclipse.jdt.core.dom.IMethodBinding;
-import org.eclipse.jdt.core.dom.ITypeBinding;
-import org.eclipse.jdt.core.dom.NodeFinder;
-import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.persistence.jpa.jpql.ExpressionTools;
-import org.eclipse.persistence.jpa.jpql.spi.IConstructor;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.util.iterator.CloneIterator;
-import org.eclipse.persistence.jpa.jpql.util.iterator.IterableIterator;
-
-/**
- * The concrete implementation of {@link org.eclipse.persistence.jpa.query.spi.IType IType} that is
- * wrapping the design-time representation of a Java type.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaType implements IJpaType {
-
- /**
- * The cached collection of {@link IConstructor constructors}.
- */
- private Collection<IConstructor> constructors;
-
- /**
- * The list of names for the {@link Enum}'s constants otherwise an empty array.
- */
- private String[] enumConstants;
-
- /**
- * The design-time representation of a Java type.
- */
- private IType type;
-
- /**
- * The {@link ITypeBinding} for the type, which is the information that was resolved and which
- * can be used to query information about that type.
- */
- private ITypeBinding typeBinding;
-
- /**
- * This flag makes sure to not try more than once resolving the {@link ITypeBinding} if it fails
- * the first time.
- */
- private boolean typeBindingResolved;
-
- /**
- * Caches the type hierarchy of the {@link IType} in order to prevent rebuilding it each time.
- */
- private ITypeDeclaration typeDeclaration;
-
- /**
- * Caches the type hierarchy of the {@link IType} in order to prevent rebuilding it each time
- * {@link #isAssignableTo(org.eclipse.persistence.jpa.query.spi.IType)} is called.
- */
- private ITypeHierarchy typeHierarchy;
-
- /**
- * The fully qualified name of the Java type.
- */
- private final String typeName;
-
- /**
- * The external form of a type repository.
- */
- private final JpaTypeRepository typeRepository;
-
- /**
- * Creates a new <code>JpaType</code>.
- *
- * @param typeRepository The external form of a type repository
- * @param type The design-time representation of a Java type
- */
- public JpaType(JpaTypeRepository typeRepository, IType type) {
- super();
- this.type = type;
- this.typeName = type.getFullyQualifiedName();
- this.typeRepository = typeRepository;
- }
-
- protected CompilationUnit buildCompilationUnit() {
-
- ASTParser parser = ASTParser.newParser(AST.JLS3);
- parser.setSource(type.getTypeRoot());
- parser.setIgnoreMethodBodies(true);
- parser.setResolveBindings(true);
- parser.setBindingsRecovery(true);
-
- return (CompilationUnit) parser.createAST(new NullProgressMonitor());
- }
-
- protected Collection<IConstructor> buildConstructors() {
-
- ITypeBinding typeBinding = getTypeBinding();
-
- // No Java source is attached to the Java class file, parse the class with a reader
- if ((typeBinding == null) && type.isBinary()) {
- Collection<IConstructor> constructors = new ArrayList<IConstructor>();
-
- try {
- // Root types
- for (IJavaElement rootType : type.getTypeRoot().getChildren()) {
- // Root type
- if (rootType.getElementType() == IJavaElement.TYPE) {
- for (IJavaElement javaElement : ((IType) rootType).getChildren()) {
- // Method
- if (javaElement.getElementType() == IJavaElement.METHOD) {
- IMethod method = (IMethod) javaElement;
- // Constructor
- if (method.isConstructor()) {
- constructors.add(new ClassConstructor(this, method));
- }
- }
- }
- }
- }
- }
- catch (Exception e) {
- JptJpaCorePlugin.log(e);
- }
-
- return constructors;
- }
- // Use the ITypeBinding to retrieve the constructors
- else if (typeBinding != null) {
- Collection<IConstructor> constructors = new ArrayList<IConstructor>();
-
- for (IMethodBinding method : typeBinding.getDeclaredMethods()) {
- if (method.isConstructor()) {
- constructors.add(new JpaConstructor(this, method));
- }
- }
-
- return constructors;
- }
-
- return Collections.emptyList();
- }
-
- protected String[] buildEnumConstants() {
-
- try {
- // Retrieve the enum constants from IType
- if (type.isEnum()) {
- List<String> names = new ArrayList<String>();
-
- for (IField field : type.getFields()) {
- if (field.isEnumConstant()) {
- names.add(field.getElementName());
- }
- }
-
- return names.toArray(new String[names.size()]);
- }
- }
- catch (Exception e) {
- // Just ignore and return an empty array
- }
-
- return ExpressionTools.EMPTY_STRING_ARRAY;
- }
-
- protected ITypeBinding buildTypeBinding() {
-
- // This code was copied from ASTNodes.getTypeBinding(CompilationUnit, IType)
- try {
- CompilationUnit compilationUnit = buildCompilationUnit();
-
- if (type.isAnonymous()) {
- IJavaElement parent = type.getParent();
-
- if ((parent instanceof IField) && Flags.isEnum(((IMember) parent).getFlags())) {
- ASTNode node = NodeFinder.perform(compilationUnit, type.getNameRange());
- EnumConstantDeclaration constant = (EnumConstantDeclaration) node;
-
- if (constant != null) {
- AnonymousClassDeclaration declaration = constant.getAnonymousClassDeclaration();
-
- if (declaration != null) {
- return declaration.resolveBinding();
- }
- }
- }
- else {
- ASTNode node = NodeFinder.perform(compilationUnit, type.getNameRange());
- ClassInstanceCreation creation = (ClassInstanceCreation) getParent(node, ClassInstanceCreation.class);
-
- if (creation != null) {
- return creation.resolveTypeBinding();
- }
- }
- }
- else {
- ASTNode node = NodeFinder.perform(compilationUnit, type.getNameRange());
- AbstractTypeDeclaration declaration = (AbstractTypeDeclaration) getParent(node, AbstractTypeDeclaration.class);
-
- if (declaration != null) {
- return declaration.resolveBinding();
- }
- }
- }
- catch (Exception e) {
- // Simply ignore
- }
-
- return null;
- }
-
- protected ITypeDeclaration buildTypeDeclaration() {
- return new JpaTypeDeclaration(this, new ITypeDeclaration[0]);
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IConstructor> constructors() {
- if (constructors == null) {
- constructors = buildConstructors();
- }
- return new CloneIterator<IConstructor>(constructors);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean equals(Object object) {
- return equals((org.eclipse.persistence.jpa.jpql.spi.IType) object);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean equals(org.eclipse.persistence.jpa.jpql.spi.IType type) {
- return (this == type) || typeName.equals(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getEnumConstants() {
- if (enumConstants == null) {
- enumConstants = buildEnumConstants();
- }
- return enumConstants;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return typeName;
- }
-
- protected ASTNode getParent(ASTNode node, Class<? extends ASTNode> parentClass) {
-
- do {
- node = node.getParent();
- }
- while ((node != null) && !parentClass.isInstance(node));
-
- return node;
- }
-
- /**
- * Returns the encapsulated {@link Type}, which is the actual type.
- *
- * @return The design-time representation of a Java type
- */
- protected IType getType() {
- return type;
- }
-
- protected ITypeBinding getTypeBinding() {
- if ((typeBinding == null) && !typeBindingResolved) {
- typeBinding = buildTypeBinding();
- typeBindingResolved = true;
- }
- return typeBinding;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration getTypeDeclaration() {
- if (typeDeclaration == null) {
- typeDeclaration = buildTypeDeclaration();
- }
- return typeDeclaration;
- }
-
- /**
- * Returns the repository that gives access to the application's classes.
- *
- * @return The external form of the type repository
- */
- protected JpaTypeRepository getTypeRepository() {
- return typeRepository;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return type.getAnnotation(annotationType.getName()) != null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int hashCode() {
- return typeName.hashCode();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isAssignableTo(org.eclipse.persistence.jpa.jpql.spi.IType otherType) {
-
- if (equals(otherType)) {
- return true;
- }
-
- String otherTypeName = otherType.getName();
-
- // Type hierarchy for Java compiled classes
- ITypeBinding typeBinding = getTypeBinding();
-
- // Type hierarchy for Class files
- if ((typeBinding == null) && type.isBinary()) {
-
- // First create the type hierarchy
- if (typeHierarchy == null) {
- try {
- typeHierarchy = type.newSupertypeHierarchy(new NullProgressMonitor());
- }
- catch (Exception e) {
- return false;
- }
- }
-
- // Now check if the other type name is in the type hierarchy
- for (IType superType : typeHierarchy.getAllTypes()) {
- if (superType.getFullyQualifiedName().equals(otherTypeName)) {
- return true;
- }
- }
- }
- // Type hierarchy for Java source files
- else if (typeBinding != null) {
- return ASTTools.typeIsSubTypeOf(typeBinding, otherTypeName);
- }
-
- // Anything else is always false
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isEnum() {
- try {
- return type.isEnum();
- }
- catch (Exception e) {
- // Simply ignore and return no
- return false;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolvable() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setTypeDeclaration(JpaTypeDeclaration typeDeclaration) {
- this.typeDeclaration = typeDeclaration;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, typeName);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeDeclaration.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeDeclaration.java
deleted file mode 100644
index dda053c5c2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeDeclaration.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-
-/**
- * The concrete implementation of {@link ITypeDeclaration} that is wrapping the design-time
- * representation of the declaration description of a type.
- *
- * 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.
- *
- * @version 3.1
- * @since 3.0
- * @author Pascal Filion
- */
-public class JpaTypeDeclaration implements ITypeDeclaration {
-
- /**
- * The dimensionality of the array or 0 if the type is not an array.
- */
- private int dimensionality;
-
- /**
- * The generics of the given type or an empty list if the type is not parameterized.
- */
- private final ITypeDeclaration[] genericTypes;
-
- /**
- * The external form of the Java type.
- */
- private final IType type;
-
- /**
- * Creates a new <code>JpaTypeDeclaration</code>.
- *
- * @param type The external form of the Java type
- * @param genericTypes The generics of the given type or an empty list if the type is not
- * parameterized
- */
- public JpaTypeDeclaration(IType type, ITypeDeclaration[] genericTypes) {
- this(type, genericTypes, 0);
- }
-
- /**
- * Creates a new <code>JpaTypeDeclaration</code>.
- *
- * @param type The external form of the Java type
- * @param genericTypes The generics of the given type or an empty list if the type is not
- * parameterized
- * @param dimensionality The dimensionality of the array or 0 if it's not an array
- */
- public JpaTypeDeclaration(IType type, ITypeDeclaration[] genericTypes, int dimensionality) {
- super();
- this.type = type;
- this.genericTypes = genericTypes;
- this.dimensionality = dimensionality;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getDimensionality() {
- return dimensionality;
- }
-
- /**
- * {@inheritDoc}
- */
- public IType getType() {
- return type;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration[] getTypeParameters() {
- return genericTypes;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isArray() {
- return dimensionality > 0;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return type.getName();
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeRepository.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeRepository.java
deleted file mode 100644
index a6090672c9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaTypeRepository.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.persistence.jpa.jpql.TypeHelper;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeRepository;
-
-/**
- * The concrete implementation of {@link ITypeRepository} that is wrapping the design-time
- * representation of a type repository.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-@SuppressWarnings("nls")
-public class JpaTypeRepository implements ITypeRepository {
-
- /**
- * The Java project that gives access the design-time objects representing the Java types.
- */
- private final IJavaProject javaProject;
-
- /**
- * Keeps a map of the primitives for fast access.
- */
- private Map<String, Class<?>> primitives;
-
- /**
- * The cached helper that is using this repository for retrieving {@link IJpaType types}.
- */
- private TypeHelper typeHelper;
-
- /**
- * The types that have been cached for faster access.
- */
- private final Map<String, IJpaType> types;
-
- /**
- * The {@link IJpaType} that represents a unresolvable or simply an unknown type, which is created
- * when {@link #getType(String)} is invoked with {@link IJpaType#UNRESOLVABLE_TYPE}.
- */
- private IJpaType unresolvableType;
-
- /**
- * Creates a new <code>JpaTypeRepository</code>.
- *
- * @param javaProject The Java project that gives access the design-time objects representing
- * the Java types
- */
- public JpaTypeRepository(IJavaProject javaProject) {
- super();
- this.javaProject = javaProject;
- this.types = new HashMap<String, IJpaType>();
- }
-
- protected String buildInnerTypeName(String typeName, int index) {
- StringBuilder sb = new StringBuilder();
- sb.append(typeName.substring(0, index));
- sb.append("$");
- sb.append(typeName.substring(index + 1, typeName.length()));
- return sb.toString();
- }
-
- protected Map<String, Class<?>> buildPrimitives() {
- Map<String, Class<?>> primitives = new HashMap<String, Class<?>>();
- primitives.put(Byte .TYPE.getName(), Byte .TYPE);
- primitives.put(Short .TYPE.getName(), Short .TYPE);
- primitives.put(Character.TYPE.getName(), Character.TYPE);
- primitives.put(Integer .TYPE.getName(), Integer .TYPE);
- primitives.put(Long .TYPE.getName(), Long .TYPE);
- primitives.put(Float .TYPE.getName(), Float .TYPE);
- primitives.put(Double .TYPE.getName(), Double .TYPE);
- primitives.put(Boolean .TYPE.getName(), Boolean .TYPE);
- return primitives;
- }
-
- protected IJpaType buildType(Class<?> javaType) {
- JavaType jpaType = new JavaType(this, javaType);
- types.put(jpaType.getName(), jpaType);
- return jpaType;
- }
-
- protected IJpaType buildType(IType type) {
- JpaType jpaType = new JpaType(this, type);
- types.put(jpaType.getName(), jpaType);
- return jpaType;
- }
-
- protected IJpaType buildType(String typeName) {
- IJpaType jpaType = new SimpleType(this, typeName);
- types.put(typeName, jpaType);
- return jpaType;
- }
-
- protected String convertToJavaArrayType(String typeName) {
-
- int index = typeName.indexOf("[]");
- int dimensionality = (typeName.length() - index) / 2;
- StringBuilder sb = new StringBuilder();
-
- while (dimensionality-- > 0) {
- sb.append("[");
- }
-
- String type = typeName.substring(0, index);
- Class<?> primitive = primitives.get(type);
-
- if (primitive != null) {
- if (primitive == Byte.TYPE) {
- sb.append("B");
- }
- else if (primitive == Character.TYPE) {
- sb.append("C");
- }
- else if (primitive == Short.TYPE) {
- sb.append("S");
- }
- else if (primitive == Integer.TYPE) {
- sb.append("I");
- }
- else if (primitive == Long.TYPE) {
- sb.append("L");
- }
- else if (primitive == Float.TYPE) {
- sb.append("F");
- }
- else if (primitive == Double.TYPE) {
- sb.append("D");
- }
- else if (primitive == Boolean.TYPE) {
- sb.append("Z");
- }
- }
- else {
- sb.append(type);
- sb.append(";");
- }
-
- return sb.toString();
- }
-
- protected Class<?> findPrimitive(String typeName) {
- if (primitives == null) {
- primitives = buildPrimitives();
- }
- return primitives.get(typeName);
- }
-
- /**
- * Retrieves the design-time Java type for the given type name, which has to be the fully
- * qualified type name.
- *
- * @param typeName The fully qualified type name
- * @return The design-time Java type if it could be retrieved; <code>null</code> otherwise
- */
- protected IType findType(String typeName) {
- try {
- return javaProject.findType(typeName);
- }
- catch (JavaModelException e) {
- return null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public IJpaType getEnumType(String enumTypeName) {
-
- // Make sure the enum type name is not empty before doing operations over it
- if (StringTools.stringIsEmpty(enumTypeName)) {
- return null;
- }
-
- // Get the position of the last dot so the enum constant can be removed
- int lastDotIndex = enumTypeName.lastIndexOf(".");
-
- if (lastDotIndex == -1) {
- return null;
- }
-
- // Retrieve the fully qualified enum type name
- String typeName = enumTypeName.substring(0, lastDotIndex);
-
- // Attempt to load the enum type
- IType type = findType(typeName);
- IJpaType jpaType;
-
- if (type != null) {
- jpaType = buildType(type);
- }
- else {
- jpaType = loadInnerType(typeName);
- }
-
- return (jpaType != null) && jpaType.isEnum() ? jpaType : null;
- }
-
- /**
- * Returns the Java project, which gives access to the class path.
- *
- * @return The Java project, which gives access to the class path
- */
- protected IJavaProject getJavaProject() {
- return javaProject;
- }
-
- /**
- * {@inheritDoc}
- */
- public IJpaType getType(Class<?> javaClass) {
- IJpaType type = types.get(javaClass.getName());
- if (type == null) {
- type = buildType(javaClass);
- }
- return type;
- }
-
- /**
- * Retrieves the {@link IType} for the given {@link IResource}.
- *
- * @param resource The workspace location of the {@link IType} to retrieve
- * @return The design-time representation of a Java type
- */
- protected IType getType(IResource resource) {
- try {
- return (IType) javaProject.findElement((IPath) resource);
- }
- catch (Exception e) {
- return null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public IJpaType getType(String typeName) {
-
- if (StringTools.stringIsEmpty(typeName) ||
- IJpaType.UNRESOLVABLE_TYPE == typeName) {
-
- return unresolvableType();
- }
-
- if (typeName.endsWith("[]")) {
- return loadArrayType(typeName);
- }
-
- if (typeName.charAt(0) == '[') {
- return loadJavaArrayType(typeName);
- }
-
- return loadTypeImp(typeName);
- }
-
- /**
- * {@inheritDoc}
- */
- public TypeHelper getTypeHelper() {
- if (typeHelper == null) {
- typeHelper = new TypeHelper(this);
- }
- return typeHelper;
- }
-
- protected IJpaType loadArrayType(String typeName) {
-
- IJpaType type = types.get(typeName);
-
- if (type == null) {
- try {
- // Try to see if the type is a JDK class, otherwise, just use the type name
- // since IJpaType doesn't support array types
- String javaTypeName = convertToJavaArrayType(typeName);
- type = buildType(Class.forName(javaTypeName));
- }
- catch (Exception e) {
-
- int index = typeName.indexOf("[]");
- int dimensionality = (typeName.length() - index) / 2;
-
- type = getType(typeName.substring(0, index));
-
- type.setTypeDeclaration(
- new JpaTypeDeclaration(type, new ITypeDeclaration[0], dimensionality)
- );
- }
-
- types.put(typeName, type);
- }
-
- return type;
- }
-
- protected IJpaType loadInnerType(String typeName) {
-
- while (true) {
-
- int index = typeName.lastIndexOf(".");
-
- if (index == -1) {
- return null;
- }
-
- typeName = buildInnerTypeName(typeName, index);
- IJpaType cachedType = types.get(typeName);
-
- if (cachedType != null) {
- return cachedType;
- }
-
- // Attempt to load the Java type
- IType type = findType(typeName);
-
- // A Java type exists, return it
- if (type != null) {
- return buildType(type);
- }
- }
- }
-
- protected IJpaType loadJavaArrayType(String typeName) {
-
- IJpaType type = types.get(typeName);
-
- if (type == null) {
- try {
- // Try to see if the type is a JDK class, otherwise, just use the type name
- // since IJpaType doesn't support array types
- type = buildType(Class.forName(typeName));
- }
- catch (Exception e) {
-
- int index = typeName.lastIndexOf("[");
- int dimensionality = index / 2;
-
- type = getType(typeName.substring(index, typeName.endsWith(";") ? typeName.length() - 1 : typeName.length()));
-
- type.setTypeDeclaration(
- new JpaTypeDeclaration(type, new ITypeDeclaration[0], dimensionality)
- );
- }
-
- types.put(typeName, type);
- }
-
- return type;
- }
-
- protected IJpaType loadTypeImp(String typeName) {
-
- IJpaType type = types.get(typeName);
-
- // The type was already cached, simply return it
- if (type != null) {
- return type;
- }
-
- // First check for primitive, they don't have a corresponding IJpaType
- Class<?> primitive = findPrimitive(typeName);
-
- if (primitive != null) {
- return buildType(primitive);
- }
-
- // Attempt to load the Java type
- IType iType = findType(typeName);
-
- // A Java type exists, return it
- if (iType != null) {
- return buildType(iType);
- }
-
- // Now try with a possible inner enum type
- type = loadInnerType(typeName);
-
- // No Java type exists, create a "null" IJpaType
- if (type == null) {
- type = buildType(typeName);
- }
-
- return type;
- }
-
- protected IJpaType unresolvableType() {
- if (unresolvableType == null) {
- unresolvableType = new SimpleType(this, IJpaType.UNRESOLVABLE_TYPE);
- }
- return unresolvableType;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/SimpleType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/SimpleType.java
deleted file mode 100644
index 3f6fc4c1dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/SimpleType.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.jpql.spi;
-
-import java.lang.annotation.Annotation;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.persistence.jpa.jpql.spi.IConstructor;
-import org.eclipse.persistence.jpa.jpql.spi.IType;
-import org.eclipse.persistence.jpa.jpql.spi.ITypeDeclaration;
-import org.eclipse.persistence.jpa.jpql.util.iterator.IterableIterator;
-import org.eclipse.persistence.jpa.jpql.util.iterator.NullIterator;
-
-/**
- * The concrete implementation of {@link IType} that is wrapping the type name only.
- *
- * 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.
- *
- * @version 3.2
- * @since 3.0
- * @author Pascal Filion
- */
-public class SimpleType implements IJpaType {
-
- /**
- * Caches the type hierarchy of the {@link IType} in order to prevent rebuilding it each time.
- */
- private ITypeDeclaration typeDeclaration;
-
- /**
- * The fully qualified name of the Java type.
- */
- private final String typeName;
-
- /**
- * The external form of a type repository.
- */
- private final JpaTypeRepository typeRepository;
-
- /**
- * Creates a new <code>SimpleType</code>.
- *
- * @param typeRepository The external form of a type repository
- * @param typeName The fully qualified name of the Java type
- */
- public SimpleType(JpaTypeRepository typeRepository, String typeName) {
- super();
- this.typeRepository = typeRepository;
- this.typeName = typeName;
- }
-
- /**
- * {@inheritDoc}
- */
- public IterableIterator<IConstructor> constructors() {
- return NullIterator.instance();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean equals(IType type) {
- return typeName.equals(type.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getEnumConstants() {
- return StringTools.EMPTY_STRING_ARRAY;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return typeName;
- }
-
- /**
- * {@inheritDoc}
- */
- public ITypeDeclaration getTypeDeclaration() {
- if (typeDeclaration == null) {
- typeDeclaration = new JpaTypeDeclaration(this, new ITypeDeclaration[0]);
- }
- return typeDeclaration;
- }
-
- protected JpaTypeRepository getTypeRepository() {
- return typeRepository;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isAssignableTo(IType type) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isEnum() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolvable() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setTypeDeclaration(JpaTypeDeclaration typeDeclaration) {
- this.typeDeclaration = typeDeclaration;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return typeName;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/libprov/JpaLibraryProviderInstallOperationConfig.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/libprov/JpaLibraryProviderInstallOperationConfig.java
deleted file mode 100644
index 9ec2b342ae..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/libprov/JpaLibraryProviderInstallOperationConfig.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.libprov;
-
-import org.eclipse.jpt.common.core.libprov.JptLibraryProviderInstallOperationConfig;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-
-
-public interface JpaLibraryProviderInstallOperationConfig
- extends JptLibraryProviderInstallOperationConfig {
-
- /** enablement expression for jpa platform id (String) */
- public static final String JPA_PLATFORM_ENABLEMENT_EXP = "jpaPlatform"; //$NON-NLS-1$
-
- /** enablement expression for jpa platform description (JpaPlatformDescription) */
- public static final String JPA_PLATFORM_DESCRIPTION_ENABLEMENT_EXP = "jpaPlatformDescription"; //$NON-NLS-1$
-
- /** property of all jpa library provider install operation configs */
- public static final String PROP_JPA_PLATFORM = "JPA_PLATFORM"; //$NON-NLS-1$
-
- JpaPlatformDescription getJpaPlatform();
-
- void setJpaPlatform(JpaPlatformDescription jpaPlatform);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/GenericPlatform.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/GenericPlatform.java
deleted file mode 100644
index 35738d1dd8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/GenericPlatform.java
+++ /dev/null
@@ -1,41 +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.jpa.core.platform;
-
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-
-/**
- * Constants pertaining to the Generic JPA platforms and their group.
- *
- * 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.
- *
- * @version 3.0
- * @since 3.0
- */
-public class GenericPlatform {
-
- public static final JpaPlatformGroupDescription GROUP
- = JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatformGroup("generic"); //$NON-NLS-1$
-
- public static final JpaPlatformDescription VERSION_1_0
- = JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatform("generic"); //$NON-NLS-1$
-
- public static final JpaPlatformDescription VERSION_2_0
- = JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatform("generic2_0"); //$NON-NLS-1$
-
- /**
- * Not for instantiation
- */
- private GenericPlatform() {}
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformDescription.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformDescription.java
deleted file mode 100644
index f695f5a549..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformDescription.java
+++ /dev/null
@@ -1,41 +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.jpa.core.platform;
-
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * Contains metadata that describes a JPA platform. Not intended to be implemented by clients.
- *
- * 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.
- *
- * @version 3.0
- * @since 3.0
- */
-public interface JpaPlatformDescription {
-
- public String getId();
-
- public String getPluginId();
-
- public String getLabel();
-
- public String getFactoryClassName();
-
- public boolean supportsJpaFacetVersion(IProjectFacetVersion jpaFacetVersion);
-
- public boolean isDefault();
-
- public JpaPlatformGroupDescription getGroup();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformGroupDescription.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformGroupDescription.java
deleted file mode 100644
index 2da2975284..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformGroupDescription.java
+++ /dev/null
@@ -1,33 +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.jpa.core.platform;
-
-/**
- * Contains metadata that describes a JPA platform group. Not intended to be implemented by clients.
- *
- * 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.
- *
- * @version 3.0
- * @since 3.0
- */
-public interface JpaPlatformGroupDescription {
-
- public String getId();
-
- public String getPluginId();
-
- public String getLabel();
-
- public Iterable<JpaPlatformDescription> getPlatforms();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformManager.java
deleted file mode 100644
index 9e510e6295..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/platform/JpaPlatformManager.java
+++ /dev/null
@@ -1,46 +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.jpa.core.platform;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.jpa.core.JpaPlatform;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * Entry point to the "jpaPlatforms" extension point
- *
- * 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.
- *
- * @version 3.0
- * @since 3.0
- */
-public interface JpaPlatformManager {
-
- Iterable<JpaPlatformGroupDescription> getJpaPlatformGroups();
-
- JpaPlatformGroupDescription getJpaPlatformGroup(String groupId);
-
- Iterable<JpaPlatformDescription> getJpaPlatforms();
-
- JpaPlatformDescription getJpaPlatform(String platformId);
-
- /**
- * Returns the first JPA platform registered as a default platform and which supports the given
- * JPA facet version.
- * Returns null if there are no such registered platforms.
- */
- JpaPlatformDescription getDefaultJpaPlatform(IProjectFacetVersion jpaFacetVersion);
-
- JpaPlatform buildJpaPlatformImplementation(IProject project);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java
deleted file mode 100644
index 653874c366..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaEntityGenPreferencesManager.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2012 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.core.prefs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager;
-/**
- * JpaEntityGenPreferencesManager
- */
-public class JpaEntityGenPreferencesManager extends JpaPreferencesManager
-{
- // ********** public constants **********
-
- private static final String ENTITY_GEN_PREFIX = "entitygen."; //$NON-NLS-1$
-
- public static final String DEFAULT_PACKAGE = "DEFAULT_PACKAGE"; //$NON-NLS-1$
-
- public static final String DEFAULT_PACKAGE_NAME = "model"; //$NON-NLS-1$
-
- // ********** static methods **************************************************
-
- public static String getDefaultPackageWorkspacePreference() {
- return getLegacyWorkspacePreference(appendPrefix(DEFAULT_PACKAGE), getDefaultDefaultPackage());
- }
-
- public static void setDefaultPackageWorkspacePreference(String value) {
- if(StringTools.stringsAreEqual(value, getDefaultDefaultPackage())) {
- removeLegacyWorkspacePreference(appendPrefix(DEFAULT_PACKAGE));
- }
- else {
- setLegacyWorkspacePreference(appendPrefix(DEFAULT_PACKAGE), value);
- }
- }
-
- public static String getDefaultDefaultPackage() {
- return DEFAULT_PACKAGE_NAME;
- }
-
- private static String appendPrefix(String prefId) {
- return ENTITY_GEN_PREFIX + prefId;
- }
-
- // ********** implementation **************************************************
-
- public JpaEntityGenPreferencesManager(IProject project) {
- super(project);
- }
-
- // ********** project preference **********
-
- public String getDefaultPackagePreference() {
- return this.getLegacyPreference(appendPrefix(DEFAULT_PACKAGE), getDefaultDefaultPackage());
- }
-
- public void setDefaultPackagePreference(String preferenceValue) {
- if(StringTools.stringsAreEqual(preferenceValue, getDefaultPackageWorkspacePreference())) {
- this.removeDefaultPackagePreference();
- }
- else {
- this.setLegacyProjectPreference(appendPrefix(DEFAULT_PACKAGE), preferenceValue);
- }
- }
-
- public void removeDefaultPackagePreference() {
- this.removeLegacyProjectPreference(appendPrefix(DEFAULT_PACKAGE));
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java
deleted file mode 100644
index 21abb570d2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaJpqlPreferencesManager.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2012 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.core.prefs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager;
-/**
- * JpaEntityGenPreferencesManager
- */
-public class JpaJpqlPreferencesManager extends JpaPreferencesManager
-{
- // ********** public constants **********
-
- private static final String JPQL_IDENTIFIER_PREFIX = "jpqlIdentifier.";
- public static final String JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE = "lowercase"; //$NON-NLS-1$
- public static final String JPQL_IDENTIFIER_UPPERCASE_PREF_VALUE = "uppercase"; //$NON-NLS-1$
-
- public static final String CASE = "CASE"; //$NON-NLS-1$
- public static final String DEFAULT_CASE = JPQL_IDENTIFIER_LOWERCASE_PREF_VALUE; //$NON-NLS-1$
-
- public static final String MATCH_FIRST_CHARACTER_CASE = "MATCH_FIRST_CHARACTER_CASE"; //$NON-NLS-1$
- public static final boolean DEFAULT_MATCH_FIRST_CHARACTER_CASE = true; //$NON-NLS-1$
-
- // ********** workspace preference **********
-
- public static String getIdentifiersCaseWorkspacePreference() {
- return getLegacyWorkspacePreference(appendPrefix(CASE), getDefaultIdentifiersCase());
- }
-
- public static void setIdentifiersCaseWorkspacePreference(String value) {
- if(StringTools.stringsAreEqual(value, getDefaultIdentifiersCase())) {
- removeLegacyWorkspacePreference(appendPrefix(CASE));
- }
- else {
- setLegacyWorkspacePreference(appendPrefix(CASE), value);
- }
- }
-
- public static String getDefaultIdentifiersCase() {
- return DEFAULT_CASE;
- }
-
- public static boolean getMatchFirstCharacterCaseWorkspacePreference() {
- return getLegacyWorkspacePreference(appendPrefix(MATCH_FIRST_CHARACTER_CASE), getDefaultMatchFirstCharacterCase());
- }
-
- public static void setMatchFirstCharacterCaseWorkspacePreference(boolean value) {
- if(value == getDefaultMatchFirstCharacterCase()) {
- removeLegacyWorkspacePreference(appendPrefix(MATCH_FIRST_CHARACTER_CASE));
- }
- else {
- setLegacyWorkspacePreference(appendPrefix(MATCH_FIRST_CHARACTER_CASE), value);
- }
- }
-
- public static boolean getDefaultMatchFirstCharacterCase() {
- return DEFAULT_MATCH_FIRST_CHARACTER_CASE;
- }
-
- private static String appendPrefix(String prefId) {
- return JPQL_IDENTIFIER_PREFIX + prefId;
- }
-
- // ********** constructor **********
-
- public JpaJpqlPreferencesManager(IProject project) {
- super(project);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaValidationPreferencesManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaValidationPreferencesManager.java
deleted file mode 100644
index d65e4e18e8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/prefs/JpaValidationPreferencesManager.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2012 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.core.prefs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jpt.common.utility.internal.Tools;
-import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-/**
- * JpaValidationPreferencesManager
- */
-public class JpaValidationPreferencesManager extends JpaPreferencesManager
-{
- /*
- * prefix for all preference strings. This is only used internally.
- * Clients of get*LevelProblemPrefernce() and set*LevelProblemPreference
- * should not include the prefix.
- */
- private static final String PROBLEM_PREFIX = "problem."; //$NON-NLS-1$
-
- public static final String ERROR = "error"; //$NON-NLS-1$
- public static final String WARNING = "warning"; //$NON-NLS-1$
- public static final String INFO = "info"; //$NON-NLS-1$
- public static final String IGNORE = "ignore"; //$NON-NLS-1$
-
- public static final int NO_SEVERITY_PREFERENCE = -1;
-
- public static final String WORKSPACE_PREFERENCES_OVERRIDEN = "workspace_preferences_overriden"; //$NON-NLS-1$
-
- // ********** public static methods **********
-
- public static String getProblemPreference(IResource targetObject, String messageId) {
- return new JpaValidationPreferencesManager(targetObject.getProject()).
- getLegacyPreference(appendProblemPrefix(messageId));
-
- }
-
- /**
- * Returns only the severity level of a given problem preference. This does not
- * include information on whether the problem is ignored. See isProblemIgnored.
- * @return an IMessage severity level
- */
- public static int getProblemSeverityPreference(IResource targetObject, String messageId) {
- String problemPreference = getProblemPreference(targetObject, messageId);
-
- if(problemPreference == null) {
- return NO_SEVERITY_PREFERENCE;
- }
- else if (problemPreference.equals(ERROR)) {
- return IMessage.HIGH_SEVERITY;
- }
- else if (problemPreference.equals(WARNING)) {
- return IMessage.NORMAL_SEVERITY;
- }
- else if (problemPreference.equals(INFO)) {
- return IMessage.LOW_SEVERITY;
- }
- return NO_SEVERITY_PREFERENCE;
- }
-
-
- // ********** workspace preference **********
-
- /**
- * Returns the String value of the problem preference from the workspace preferences
- */
- public static String getWorkspaceLevelProblemPreference(String messageId) {
- return getLegacyWorkspacePreference(appendProblemPrefix(messageId));
- }
-
- public static void setWorkspaceLevelProblemPreference(String messageId, String problemPreference) {
- setLegacyWorkspacePreference(appendProblemPrefix(messageId), problemPreference);
- }
-
- protected static String appendProblemPrefix(String messageId) {
- return PROBLEM_PREFIX + messageId;
- }
-
- // ********** implementation **************************************************
-
- public JpaValidationPreferencesManager(IProject project) {
-
- super(project);
- }
-
- // ********** behavior **********
-
- /**
- * Return whether the specified problem should <em>not</em> be ignored based
- * on project or workspace preferences.
- */
- public boolean problemIsNotIgnored(String messageId) {
- return ! problemIsIgnored(messageId);
- }
-
- /**
- * Return whether the specified problem should be ignored based on project or
- * workspace preferences.
- */
- public boolean problemIsIgnored(String messageId) {
- return Tools.valuesAreEqual(this.getLegacyPreference(appendProblemPrefix(messageId)), IGNORE);
- }
-
- public boolean projectHasSpecificOptions() {
- return this.getLegacyProjectPreference(WORKSPACE_PREFERENCES_OVERRIDEN, false);
- }
-
- public void setProjectHasSpecificOptions(boolean booleanValue) {
- this.setLegacyProjectPreference(WORKSPACE_PREFERENCES_OVERRIDEN, booleanValue);
- }
-
- // ********** project preference **********
-
- /**
- * Returns the String value of the problem preference from the project preferences
- */
- public String getProjectLevelProblemPreference(String messageId) {
- return this.getLegacyProjectPreference(appendProblemPrefix(messageId));
- }
-
- public void setProjectLevelProblemPreference(String messageId, String problemPreference) {
- this.setLegacyProjectPreference(appendProblemPrefix(messageId), problemPreference);
- }
-
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/AbstractXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/AbstractXmlResourceProvider.java
deleted file mode 100644
index fcc955a24a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/AbstractXmlResourceProvider.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.resource;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.jem.util.emf.workbench.EMFWorkbenchContextBase;
-import org.eclipse.jem.util.emf.workbench.FlexibleProjectResourceSet;
-import org.eclipse.jem.util.emf.workbench.IEMFContextContributor;
-import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
-import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorImpl;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public abstract class AbstractXmlResourceProvider
- implements JpaXmlResourceProvider, IEMFContextContributor, ResourceStateInputProvider, ResourceStateValidator
-{
- protected IProject project;
-
- protected URI fileUri;
-
- protected JpaXmlResource resource;
-
- protected IContentType contentType;
-
- protected ResourceStateValidator stateValidator;
-
-
- /**
- * Create a new AbstractResourceModelProvider for the given project and
- * resourcePath. The resourcePath may be either
- * a) an absolute workspace-relative platform resource path (e.g. "/MyProject/src/META-INF/foobar.xml")
- * or b) a relative runtime path (e.g. "META-INF/foobar.xml".)
- * In either case, {@link #buildFileUri(IPath)} will attempt to build an absolutely pathed
- * URI for the given path.
- */
- public AbstractXmlResourceProvider(IProject project, IPath resourcePath, IContentType contentType) {
- super();
- this.project = project;
- this.fileUri = buildFileUri(resourcePath);
- this.contentType = contentType;
- }
-
- protected URI buildFileUri(IPath resourcePath) {
- URI resourceUri = null;
-
- if (resourcePath.isAbsolute()) {
- resourceUri = URI.createPlatformResourceURI(resourcePath.toString(), false);
- }
- else {
- IPath absolutePath = this.getProjectResourceLocator().getResourcePath(resourcePath);
- resourceUri = URI.createPlatformResourceURI(absolutePath.toString(), false);
- }
-
- URIConverter uriConverter = getResourceSet().getURIConverter();
- return uriConverter.normalize(resourceUri);
- }
-
- protected ProjectResourceLocator getProjectResourceLocator() {
- return (ProjectResourceLocator) this.project.getAdapter(ProjectResourceLocator.class);
- }
-
- /**
- * Return the resource, if it exists. If no file exists for this resource,
- * this will return a stub resource. You must call #createResource() to
- * create the file on the file system.
- */
- public JpaXmlResource getXmlResource() {
- if (this.resource == null) {
- JpaXmlResource newResource = (JpaXmlResource) WorkbenchResourceHelper.getOrCreateResource(this.fileUri, getResourceSet());
- //EMF caches resources based on URI. If the resource has changed content types (say the schema was changed
- //from orm to eclipselink-orm), then the resource will be of the wrong type and we need to create a new one.
- if (newResource.getContentType().equals(this.contentType)) {
- this.resource = newResource;
- }
- else {
- this.createResourceAndLoad();
- }
- }
- return this.resource;
- }
-
- protected JpaXmlResource createResourceAndLoad() {
- this.resource = createResource();
- this.loadResource();
- return this.resource;
- }
-
- protected JpaXmlResource createResource() {
- Resource.Factory resourceFactory =
- WTPResourceFactoryRegistry.INSTANCE.getFactory(this.fileUri, this.contentType.getDefaultDescription());
- return (JpaXmlResource) getResourceSet().createResource(this.fileUri, resourceFactory);
- }
-
- protected void loadResource() {
- try {
- this.resource.load(((ProjectResourceSet) getResourceSet()).getLoadOptions());
- }
- catch (IOException e) {
- JptJpaCorePlugin.log(e);
- }
- }
-
- protected void createResourceAndUnderlyingFile(Object config) {
- this.resource = createResource();
- if (this.resource.fileExists()) { //always possible that the file already exists when the jpa facet is added
- loadResource();
- }
- else {
- populateRoot(config);
- try {
- this.resource.saveIfNecessary(); //this writes out the file
- }
- catch (Exception e) {
- JptJpaCorePlugin.log(e);
- }
- }
- }
-
- /**
- * This will actually create the underlying file and the JpaXmlResource that corresponds to it.
- * It also populates the root of the file.
- * @param config - A configuration object used to specify options for creation of the resource
- */
- public JpaXmlResource createFileAndResource(final Object config, IProgressMonitor monitor) throws CoreException {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- createResourceAndUnderlyingFile(config);
- }
- };
- workspace.run(runnable, this.project, IWorkspace.AVOID_UPDATE, monitor);
- return this.resource;
- }
-
- /**
- * Used to optionally fill in the root information of a resource if it does not
- * exist as a file
- */
- protected void populateRoot(Object config) {
- //TODO potentially call resource.populateRoot() instead of the resourceProvider doing this
- }
-
-
- /**
- * minimize the scope of the suppressed warnings
- */
- protected EList<EObject> getResourceContents() {
- return this.resource.getContents();
- }
-
- protected FlexibleProjectResourceSet getResourceSet() {
- return (FlexibleProjectResourceSet) getEmfContext().getResourceSet();
- }
-
- protected EMFWorkbenchContextBase getEmfContext() {
- return WorkbenchResourceHelper.createEMFContext(this.project, this);
- }
-
- public IProject getProject() {
- return this.project;
- }
-
- public IStatus validateEdit(Object context) {
- IWorkspace work = ResourcesPlugin.getWorkspace();
- IFile file = WorkbenchResourceHelper.getFile(this.resource);
- if (file != null) {
- IFile[] files = { file };
- if (context == null) {
- context = IWorkspace.VALIDATE_PROMPT;
- }
- return work.validateEdit(files, context);
- }
- return Status.OK_STATUS;
- }
-
-
- // **************** IEMFContextContributor impl ***************************
-
- private boolean contributedToEmfContext = false;
-
- public void primaryContributeToContext(EMFWorkbenchContextBase context) {
- if (! this.contributedToEmfContext) {
- context.getResourceSet().setResourceFactoryRegistry(WTPResourceFactoryRegistry.INSTANCE);
- this.contributedToEmfContext = true;
- }
- }
-
- public void secondaryContributeToContext(EMFWorkbenchContextBase aNature) {
- // no op
- }
-
-
- // **************** ResourceStateValidator impl ****************************
-
- public ResourceStateValidator getStateValidator() {
- if (this.stateValidator == null) {
- this.stateValidator = createStateValidator();
- }
- return this.stateValidator;
- }
-
- private ResourceStateValidator createStateValidator() {
- return new ResourceStateValidatorImpl(this);
- }
-
- public void checkActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
- getStateValidator().checkActivation(presenter);
- }
-
- public void lostActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
- getStateValidator().lostActivation(presenter);
- }
-
- public IStatus validateState(ResourceStateValidatorPresenter presenter) throws CoreException {
- if (presenter == null) {
- return Status.OK_STATUS;
- }
- return getStateValidator().validateState(presenter);
- }
-
- public boolean checkSave(ResourceStateValidatorPresenter presenter) throws CoreException {
- return getStateValidator().checkSave(presenter);
- }
-
- public boolean checkReadOnly() {
- return getStateValidator().checkReadOnly();
- }
-
-
- // **************** ResourceStateInputProvider impl ************************
-
- public boolean isDirty() {
- return this.resource.isModified();
- }
-
- @SuppressWarnings("unchecked")
- public List getNonResourceFiles() {
- return Collections.emptyList();
- }
-
- @SuppressWarnings("unchecked")
- public List getNonResourceInconsistentFiles() {
- return Collections.emptyList();
- }
-
- @SuppressWarnings("unchecked")
- public List getResources() {
- return Collections.singletonList(getXmlResource());
- }
-
- @SuppressWarnings("unchecked")
- public void cacheNonResourceValidateState(List roNonResourceFiles) {
- // do nothing
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/JpaXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/JpaXmlResourceProvider.java
deleted file mode 100644
index 5862c01b9a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/JpaXmlResourceProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.resource;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-
-/**
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface JpaXmlResourceProvider
-{
- JpaXmlResource getXmlResource();
-
- IStatus validateEdit(Object context);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AccessType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AccessType.java
deleted file mode 100644
index 62b8e502dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AccessType.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * Corresponds to the JPA 2.0 enum
- * javax.persistence.AccessType
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-// TODO move to jpa2 package? currently intertwined with 1.0 code...
-public enum AccessType {
-
- FIELD(JPA2_0.ACCESS_TYPE__FIELD),
- PROPERTY(JPA2_0.ACCESS_TYPE__PROPERTY);
-
-
- private String javaAnnotationValue;
-
- AccessType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static AccessType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static AccessType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (AccessType accessType : AccessType.values()) {
- if (accessType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return accessType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(AccessType accessType) {
- return (accessType == null) ? null : accessType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AssociationOverrideAnnotation.java
deleted file mode 100644
index 7e5eedc0c8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AssociationOverrideAnnotation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.AssociationOverride</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface AssociationOverrideAnnotation
- extends OverrideAnnotation
-{
- String ANNOTATION_NAME = JPA.ASSOCIATION_OVERRIDE;
-
-
- /**
- * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
- * Return an empty iterator if the element does not exist in Java.
- */
- ListIterable<JoinColumnAnnotation> getJoinColumns();
- String JOIN_COLUMNS_LIST = "joinColumns"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
- */
- int getJoinColumnsSize();
-
- /**
- * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
- */
- JoinColumnAnnotation joinColumnAt(int index);
-
- /**
- * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
- */
- JoinColumnAnnotation addJoinColumn(int index);
-
- /**
- * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
- */
- void moveJoinColumn(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
- */
- void removeJoinColumn(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AttributeOverrideAnnotation.java
deleted file mode 100644
index 8d479264b3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/AttributeOverrideAnnotation.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.AttributeOverride</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface AttributeOverrideAnnotation
- extends OverrideAnnotation
-{
- String ANNOTATION_NAME = JPA.ATTRIBUTE_OVERRIDE;
-
-
- /**
- * Corresponds to the 'column' element of the AttributeOverride annotation.
- * Return null if the element does not exist in Java.
- */
- ColumnAnnotation getColumn();
- String COLUMN_PROPERTY = "column"; //$NON-NLS-1$
-
- ColumnAnnotation getNonNullColumn();
-
- /**
- * Add the 'column' element to the AttributeOverride annotation.
- */
- ColumnAnnotation addColumn();
-
- /**
- * Remove the 'column' element from the AttributeOverride annotation.
- */
- void removeColumn();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseColumnAnnotation.java
deleted file mode 100644
index e969f97609..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseColumnAnnotation.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface BaseColumnAnnotation
- extends NamedColumnAnnotation
-{
- // ********** unique **********
-
- /**
- * Corresponds to the 'unique' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getUnique();
- String UNIQUE_PROPERTY = "unique"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'unique' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setUnique(Boolean unique);
-
- /**
- * Return the {@link TextRange} for the 'unique' element. If the element
- * does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getUniqueTextRange();
-
-
- // ********** nullable **********
-
- /**
- * Corresponds to the 'nullable' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getNullable();
- String NULLABLE_PROPERTY = "nullable"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'nullable' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setNullable(Boolean nullable);
-
- /**
- * Return the {@link TextRange} for the 'nullable' element. If the element
- * does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getNullableTextRange();
-
-
- // ********** insertable **********
-
- /**
- * Corresponds to the 'insertable' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getInsertable();
- String INSERTABLE_PROPERTY = "insertable"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'insertable' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setInsertable(Boolean insertable);
-
- /**
- * Return the {@link TextRange} for the 'insertable' element. If the element
- * does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getInsertableTextRange();
-
-
- // ********** updatable **********
-
- /**
- * Corresponds to the 'updatable' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getUpdatable();
- String UPDATABLE_PROPERTY = "updatable"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'updatable' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setUpdatable(Boolean updatable);
-
- /**
- * Return the {@link TextRange} for the 'updatable' element. If the element
- * does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getUpdatableTextRange();
-
-
- // ********** table **********
-
- /**
- * Corresponds to the 'table' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- String getTable();
- String TABLE_PROPERTY = "table"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'table' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setTable(String table);
-
- /**
- * Return the {@link TextRange} for the 'table' element. If the element
- * does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getTableTextRange();
-
- /**
- * Return whether the specified position touches the 'table' element.
- * Return false if the element does not exist.
- */
- boolean tableTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseEnumeratedAnnotation.java
deleted file mode 100644
index 5b3dc7713e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseEnumeratedAnnotation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.Enumerated
- * <li>javax.persistence.MapKeyEnumerated
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface BaseEnumeratedAnnotation
- extends Annotation
-{
- /**
- * Corresponds to the 'value' element of the Enumerated annotation.
- * Return null if the element does not exist in Java.
- */
- EnumType getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the Enumerated annotation.
- * Set to null to remove the element.
- */
- void setValue(EnumType value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the Enumerated annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseJoinColumnAnnotation.java
deleted file mode 100644
index 8672c1cf80..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseJoinColumnAnnotation.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * <li>javax.persistence.PrimaryKeyJoinColumn
- * </ul></code>
- * 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.
- *
- * @version 3.1
- * @since 2.3
- */
-public interface BaseJoinColumnAnnotation
- extends NamedColumnAnnotation, NestableAnnotation
-{
- // ********** referenced column name **********
- /**
- * Corresponds to the 'referencedColumnName' element of the JoinColumn annotation.
- * Return null if the element does not exist in Java.
- */
- String getReferencedColumnName();
- String REFERENCED_COLUMN_NAME_PROPERTY = "referencedColumnName"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'referencedColumnName' element of the JoinColumn annotation.
- * Set to null to remove the element.
- */
- void setReferencedColumnName(String referencedColumnName);
-
- /**
- * Return the {@link TextRange} for the 'referencedColumnName' element. If element
- * does not exist return the {@link TextRange} for the JoinColumn annotation.
- */
- TextRange getReferencedColumnNameTextRange();
-
- /**
- * Return whether the specified position touches the 'referencedColumnName' element.
- * Return false if the element does not exist.
- */
- boolean referencedColumnNameTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTableAnnotation.java
deleted file mode 100644
index 98cd21ba48..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTableAnnotation.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.Table
- * <li>javax.persistence.JoinTable
- * <li>javax.persistence.SecondaryTable
- * <li>javax.persistence.CollectionTable
- * </ul></code>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public interface BaseTableAnnotation
- extends Annotation
-{
- /**
- * Return whether the annotation exists in Java.
- */
- boolean isSpecified();
-
-
- // ********** name **********
-
- /**
- * Corresponds to the 'name' element of the *Table annotation.
- * Return null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the *Table annotation.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If the element
- * does not exist return the {@link TextRange} for the *Table annotation.
- */
- TextRange getNameTextRange();
-
- /**
- * Return whether the specified position touches the 'name' element.
- * Return false if the element does not exist.
- */
- boolean nameTouches(int pos);
-
-
- // ********** schema **********
-
- /**
- * Corresponds to the 'schema' element of the *Table annotation.
- * Return null if the element does not exist in Java.
- */
- String getSchema();
- String SCHEMA_PROPERTY = "schema"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'schema' element of the *Table annotation.
- * Set to null to remove the element.
- */
- void setSchema(String schema);
-
- /**
- * Return the {@link TextRange} for the 'schema' element. If the element
- * does not exist return the {@link TextRange} for the *Table annotation.
- */
- TextRange getSchemaTextRange();
-
- /**
- * Return whether the specified position touches the 'schema' element.
- * Return false if the element does not exist.
- */
- boolean schemaTouches(int pos);
-
-
- // ********** catalog **********
-
- /**
- * Corresponds to the 'catalog' element of the *Table annotation.
- * Return null if the element does not exist in Java.
- */
- String getCatalog();
- String CATALOG_PROPERTY = "catalog"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'catalog' element of the *Table annotation.
- * Set to null to remove the element.
- */
- void setCatalog(String catalog);
-
- /**
- * Return the {@link TextRange} for the 'catalog' element. If the element
- * does not exist return the {@link TextRange} for the *Table annotation.
- */
- TextRange getCatalogTextRange();
-
- /**
- * Return whether the specified position touches the 'catalog' element.
- * Return false if the element does not exist.
- */
- boolean catalogTouches(int pos);
-
-
- // ********** unique constraints **********
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
- * Return an empty iterator if the element does not exist in Java.
- */
- ListIterable<UniqueConstraintAnnotation> getUniqueConstraints();
- String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
- */
- int getUniqueConstraintsSize();
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
- */
- UniqueConstraintAnnotation uniqueConstraintAt(int index);
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
- */
- UniqueConstraintAnnotation addUniqueConstraint(int index);
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
- */
- void moveUniqueConstraint(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
- */
- void removeUniqueConstraint(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTemporalAnnotation.java
deleted file mode 100644
index 36e45e75bf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BaseTemporalAnnotation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.Temporal
- * <li>javax.persistence.MapKeyTemporal
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface BaseTemporalAnnotation
- extends Annotation
-{
- /**
- * Corresponds to the 'value' element of the Temporal annotation.
- * Return null if the element does not exist in Java.
- */
- TemporalType getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the Temporal annotation.
- * Set to null to remove the element.
- */
- void setValue(TemporalType value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the Temporal annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BasicAnnotation.java
deleted file mode 100644
index 62174f57ca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/BasicAnnotation.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Basic</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface BasicAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.BASIC;
-
- /**
- * Corresponds to the 'fetch' element of the Basic annotation.
- * Return null if the element does not exist in Java.
- */
- FetchType getFetch();
- String FETCH_PROPERTY = "fetch"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'fetch' element of the Basic annotation.
- * Set to null to remove the element.
- */
- void setFetch(FetchType fetch);
-
- /**
- * Return the {@link TextRange} for the 'fetch' element. If the element
- * does not exist return the {@link TextRange} for the Basic annotation.
- */
- TextRange getFetchTextRange();
-
-
- /**
- * Corresponds to the 'optional' element of the Basic annotation.
- * Return null if the element does not exist in Java.
- */
- Boolean getOptional();
- String OPTIONAL_PROPERTY = "optional"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'optional' element of the Basic annotation.
- * Set to null to remove the element.
- */
- void setOptional(Boolean optional);
-
- /**
- * Return the {@link TextRange} for the 'optional' element. If the element
- * does not exist return the {@link TextRange} for the Basic annotation.
- */
- TextRange getOptionalTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CascadeType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CascadeType.java
deleted file mode 100644
index 3ced144c62..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CascadeType.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-import org.eclipse.jpt.common.utility.internal.ArrayTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
-
-/**
- * Corresponds to the JPA 1.0/2.0 enum
- * javax.persistence.CascadeType
- *
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public enum CascadeType {
-
- ALL(JPA.CASCADE_TYPE__ALL),
- PERSIST(JPA.CASCADE_TYPE__PERSIST),
- MERGE(JPA.CASCADE_TYPE__MERGE),
- REMOVE(JPA.CASCADE_TYPE__REMOVE),
- REFRESH(JPA.CASCADE_TYPE__REFRESH),
- DETACH(JPA2_0.CASCADE_TYPE__DETACH); //added in JPA 2.0
-
-
- private String javaAnnotationValue;
-
- CascadeType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static CascadeType[] fromJavaAnnotationValues(Object[] javaAnnotationValues) {
- if (javaAnnotationValues == null) {
- return EMPTY_CASCADE_TYPE_ARRAY;
- }
- if (javaAnnotationValues.length == 0) {
- return EMPTY_CASCADE_TYPE_ARRAY;
- }
- //nulls will exist if there is a typo in one of the enums
- javaAnnotationValues = ArrayTools.removeAllOccurrences(javaAnnotationValues, null);
- int len = javaAnnotationValues.length;
- CascadeType[] cascadeTypes = new CascadeType[len];
- for (int i = 0; i < len; i++) {
- cascadeTypes[i] = fromJavaAnnotationValue(javaAnnotationValues[i]);
- }
- return cascadeTypes;
- }
- private static final CascadeType[] EMPTY_CASCADE_TYPE_ARRAY = new CascadeType[0];
-
- public static CascadeType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static CascadeType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (CascadeType cascadeType : CascadeType.values()) {
- if (cascadeType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return cascadeType;
- }
- }
- return null;
- }
-
- public static String[] toJavaAnnotationValues(CascadeType[] cascadeTypes) {
- if (cascadeTypes == null) {
- return StringTools.EMPTY_STRING_ARRAY;
- }
- int len = cascadeTypes.length;
- if (len == 0) {
- return StringTools.EMPTY_STRING_ARRAY;
- }
-
- String[] javaAnnotationValues = new String[len];
- for (int i = 0; i < len; i++) {
- javaAnnotationValues[i] = toJavaAnnotationValue(cascadeTypes[i]);
- }
- return javaAnnotationValues;
- }
-
- public static String toJavaAnnotationValue(CascadeType cascadeType) {
- return (cascadeType == null) ? null : cascadeType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ColumnAnnotation.java
deleted file mode 100644
index 59efaa1fea..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ColumnAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Column</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface ColumnAnnotation
- extends CompleteColumnAnnotation
-{
- String ANNOTATION_NAME = JPA.COLUMN;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteColumnAnnotation.java
deleted file mode 100644
index 60783537b1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteColumnAnnotation.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.MapKeyColumn
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface CompleteColumnAnnotation
- extends BaseColumnAnnotation
-{
- // ********** length **********
-
- /**
- * Corresponds to the 'length' element of the Column annotation.
- * Return null if the element does not exist in Java.
- */
- Integer getLength();
- String LENGTH_PROPERTY = "length"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'length' element of the Column annotation.
- * Set to null to remove the element.
- */
- void setLength(Integer length);
-
- /**
- * Return the {@link TextRange} for the 'length' element. If element
- * does not exist return the {@link TextRange} for the Column annotation.
- */
- TextRange getLengthTextRange();
-
-
- // ********** precision **********
-
- /**
- * Corresponds to the 'precision' element of the Column annotation.
- * Return null if the element does not exist in Java.
- */
- Integer getPrecision();
- String PRECISION_PROPERTY = "precision"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'precision' element of the Column annotation.
- * Set to null to remove the element.
- */
- void setPrecision(Integer precision);
-
- /**
- * Return the {@link TextRange} for the 'precision' element. If element
- * does not exist return the {@link TextRange} for the Column annotation.
- */
- TextRange getPrecisionTextRange();
-
-
- // ********** scale **********
-
- /**
- * Corresponds to the 'scale' element of the Column annotation.
- * Return null if the element does not exist in Java.
- */
- Integer getScale();
- String SCALE_PROPERTY = "scale"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'scale' element of the Column annotation.
- * Set to null to remove the element.
- */
- void setScale(Integer scale);
-
- /**
- * Return the {@link TextRange} for the 'scale' element. If element
- * does not exist return the {@link TextRange} for the Column annotation.
- */
- TextRange getScaleTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteJoinColumnAnnotation.java
deleted file mode 100644
index aef2b08648..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/CompleteJoinColumnAnnotation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.core.resource.java;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * </ul></code>
- * 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.
- *
- * @version 3.1
- * @since 3.1
- */
-public interface CompleteJoinColumnAnnotation
- extends BaseJoinColumnAnnotation, BaseColumnAnnotation
-{
- //combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorColumnAnnotation.java
deleted file mode 100644
index 20255c2e75..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorColumnAnnotation.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.DiscriminatorColumn</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface DiscriminatorColumnAnnotation
- extends NamedColumnAnnotation
-{
- String ANNOTATION_NAME = JPA.DISCRIMINATOR_COLUMN;
-
-
- // ********** discriminator type **********
-
- /**
- * Corresponds to the 'discriminatorType' element of the DiscriminatorColumn annotation.
- * Return null if the element does not exist in Java.
- */
- DiscriminatorType getDiscriminatorType();
- String DISCRIMINATOR_TYPE_PROPERTY = "discriminatorType"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'discriminatorType' element of the DiscriminatorColumn annotation.
- * Set the to null to remove the element.
- */
- void setDiscriminatorType(DiscriminatorType discriminatorType);
-
-
- // ********** length **********
-
- /**
- * Corresponds to the 'length' element of the DiscriminatorColumn annotation.
- * Return null if the element does not exist in Java.
- */
- Integer getLength();
- String LENGTH_PROPERTY = "length"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'length' element of the DiscriminatorColumn annotation.
- * Set the to null to remove the element.
- */
- void setLength(Integer length);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorType.java
deleted file mode 100644
index df81a30d64..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA enum
- * javax.persistence.DiscriminatorType
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum DiscriminatorType {
-
- STRING(JPA.DISCRIMINATOR_TYPE__STRING),
- CHAR(JPA.DISCRIMINATOR_TYPE__CHAR),
- INTEGER(JPA.DISCRIMINATOR_TYPE__INTEGER);
-
-
- private String javaAnnotationValue;
-
- DiscriminatorType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static DiscriminatorType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static DiscriminatorType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (DiscriminatorType discriminatorType : DiscriminatorType.values()) {
- if (discriminatorType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return discriminatorType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(DiscriminatorType discriminatorType) {
- return (discriminatorType == null) ? null : discriminatorType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorValueAnnotation.java
deleted file mode 100644
index 009c9113cf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/DiscriminatorValueAnnotation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.DiscriminatorValue</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface DiscriminatorValueAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.DISCRIMINATOR_VALUE;
-
- /**
- * Corresponds to the 'value' element of the DiscriminatorValue annotation.
- * Return null if the element does not exist in the annotation.
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the DiscriminatorValue annotation.
- */
- void setValue(String value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the DiscriminatorValue annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddableAnnotation.java
deleted file mode 100644
index c1946cd595..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddableAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.Embeddable
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface EmbeddableAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.EMBEDDABLE;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedAnnotation.java
deleted file mode 100644
index 6e8a9e2e93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.Embedded
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface EmbeddedAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.EMBEDDED;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedIdAnnotation.java
deleted file mode 100644
index a61efbda6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EmbeddedIdAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.EmbeddedId
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface EmbeddedIdAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.EMBEDDED_ID;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EntityAnnotation.java
deleted file mode 100644
index 4538838785..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EntityAnnotation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Entity</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface EntityAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.ENTITY;
-
- /**
- * Corresponds to the 'name' element of the Entity annotation.
- * Return null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the Entity annotation.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If the element
- * does not exist return the {@link TextRange} for the Entity annotation.
- */
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumType.java
deleted file mode 100644
index 6c0d134d4b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumType.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA enum
- * javax.persistence.EnumType
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum EnumType {
-
- ORDINAL(JPA.ENUM_TYPE__ORDINAL),
- STRING(JPA.ENUM_TYPE__STRING);
-
-
- private String javaAnnotationValue;
-
- EnumType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static EnumType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static EnumType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (EnumType enumType : EnumType.values()) {
- if (enumType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return enumType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(EnumType enumType) {
- return (enumType == null) ? null : enumType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumeratedAnnotation.java
deleted file mode 100644
index 7ef44f7ee8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/EnumeratedAnnotation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Enumerated</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface EnumeratedAnnotation
- extends BaseEnumeratedAnnotation
-{
- String ANNOTATION_NAME = JPA.ENUMERATED;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/FetchType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/FetchType.java
deleted file mode 100644
index 7856834151..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/FetchType.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA enum
- * javax.persistence.FetchType
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum FetchType {
-
- EAGER(JPA.FETCH_TYPE__EAGER),
- LAZY(JPA.FETCH_TYPE__LAZY);
-
-
- private String javaAnnotationValue;
-
- FetchType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static FetchType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static FetchType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (FetchType fetchType : FetchType.values()) {
- if (fetchType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return fetchType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(FetchType fetchType) {
- return (fetchType == null) ? null : fetchType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratedValueAnnotation.java
deleted file mode 100644
index 4ee8244b75..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratedValueAnnotation.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.GeneratedValue</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface GeneratedValueAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.GENERATED_VALUE;
-
- /**
- * Corresponds to the 'strategy' element of the GeneratedValue annotation.
- * Return null if the element does not exist in Java.
- */
- GenerationType getStrategy();
- String STRATEGY_PROPERTY = "strategy"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'strategy' element of the GeneratedValue annotation.
- * Set to null to remove the element.
- */
- void setStrategy(GenerationType strategy);
-
- /**
- * Return the {@link TextRange} for the 'strategy' element. If the element
- * does not exist return the {@link TextRange} for the GeneratedValue annotation.
- */
- TextRange getStrategyTextRange();
-
-
- /**
- * Corresponds to the 'generator' element of the GeneratedValue annotation.
- * Return null if the element does not exist in Java.
- */
- String getGenerator();
- String GENERATOR_PROPERTY = "generator"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'generator' element of the GeneratedValue annotation.
- * Set to null to remove the element.
- */
- void setGenerator(String generator);
-
- /**
- * Return the {@link TextRange} for the 'generator' element. If the element
- * does not exist return the {@link TextRange} for the GeneratedValue annotation.
- */
- TextRange getGeneratorTextRange();
-
- /**
- * Return whether the specified position touches the 'generator' element.
- * Return false if the element does not exist.
- */
- boolean generatorTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GenerationType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GenerationType.java
deleted file mode 100644
index 7907a03b27..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GenerationType.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA enum
- * javax.persistence.GenerationType
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum GenerationType {
-
- TABLE(JPA.GENERATION_TYPE__TABLE),
- SEQUENCE(JPA.GENERATION_TYPE__SEQUENCE),
- IDENTITY(JPA.GENERATION_TYPE__IDENTITY),
- AUTO(JPA.GENERATION_TYPE__AUTO);
-
-
- private String javaAnnotationValue;
-
- GenerationType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static GenerationType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static GenerationType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (GenerationType generationType : GenerationType.values()) {
- if (generationType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return generationType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(GenerationType generationType) {
- return (generationType == null) ? null : generationType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratorAnnotation.java
deleted file mode 100644
index 5819c5f2b7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/GeneratorAnnotation.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Common protocol among:<code><ul>
- * <li>javax.persistence.SequenceGenerator
- * <li>javax.persistence.TableGenerator
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface GeneratorAnnotation
- extends Annotation
-{
- /**
- * Corresponds to the 'name' element of the *Generator annotation.
- * Return null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the *Generator annotation.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If the element
- * does not exist return the {@link TextRange} for the *Generator annotation.
- */
- TextRange getNameTextRange();
-
-
- /**
- * Corresponds to the 'initialValue' element of the *Generator annotation.
- * Return null if the element does not exist in Java.
- */
- Integer getInitialValue();
- String INITIAL_VALUE_PROPERTY = "initialValue"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'initialValue' element of the *Generator annotation.
- * Set to null to remove the element.
- */
- void setInitialValue(Integer initialValue);
-
- /**
- * Return the {@link TextRange} for the 'initialValue' element. If the element
- * does not exist return the {@link TextRange} for the *Generator annotation.
- */
- TextRange getInitialValueTextRange();
-
-
- /**
- * Corresponds to the 'allocationSize' element of the *Generator annotation.
- * Return null if the element does not exist in Java.
- */
- Integer getAllocationSize();
- String ALLOCATION_SIZE_PROPERTY = "allocationSize"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'allocationSize' element of the *Generator annotation.
- * Set to null to remove the element.
- */
- void setAllocationSize(Integer allocationSize);
-
- /**
- * Return the {@link TextRange} for the 'allocationSize' element. If the element
- * does not exist return the {@link TextRange} for the *Generator annotation.
- */
- TextRange getAllocationSizeTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdAnnotation.java
deleted file mode 100644
index 472736ed9f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.Id
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface IdAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.ID;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdClassAnnotation.java
deleted file mode 100644
index 2f58a8ace7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/IdClassAnnotation.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * This interface corresponds to the JPA annotation
- * <code>javax.persistence.IdClass</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface IdClassAnnotation
- extends Annotation
-{
- final String ANNOTATION_NAME = JPA.ID_CLASS;
-
- /**
- * Corresponds to the 'value' element of the IdClass annotation.
- * Return null if the element does not exist in Java.
- * Return the portion of the value preceding ".class".
- * <pre>
- * &#64;IdClass(value=Employee.class)
- * </pre>
- * will return "Employee"
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the IdClass annotation.
- * Set to null to remove the element.
- */
- void setValue(String value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the IdClass annotation.
- */
- TextRange getValueTextRange();
-
- /**
- * Return the fully-qualified ID class name as resolved by the
- * AST's bindings.
- * <pre>
- * &#64;IdClass(Employee.class)
- * </pre>
- * will return <code>"model.Employee"</code> if there is an import for
- * <code>model.Employee</code>.
- */
- String getFullyQualifiedClassName();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceAnnotation.java
deleted file mode 100644
index cf79e7803d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceAnnotation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Inheritance</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface InheritanceAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.INHERITANCE;
-
- /**
- * Corresponds to the 'strategy' element of the Inheritance annotation.
- * Return null if the element does not exist in Java.
- */
- InheritanceType getStrategy();
- String STRATEGY_PROPERTY = "strategy"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'strategy' element of the Inheritance annotation.
- * Set to null to remove the element.
- */
- void setStrategy(InheritanceType strategy);
-
- /**
- * Return the {@link TextRange} for the 'strategy' element. If the element
- * does not exist return the {@link TextRange} for the Inheritance annotation.
- */
- TextRange getStrategyTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceType.java
deleted file mode 100644
index 3560579937..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/InheritanceType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA enum
- * javax.persistence.InheritanceType
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum InheritanceType {
-
- SINGLE_TABLE(JPA.INHERITANCE_TYPE__SINGLE_TABLE),
- JOINED(JPA.INHERITANCE_TYPE__JOINED),
- TABLE_PER_CLASS(JPA.INHERITANCE_TYPE__TABLE_PER_CLASS);
-
-
- private String javaAnnotationValue;
-
- InheritanceType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static InheritanceType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static InheritanceType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (InheritanceType inheritanceType : InheritanceType.values()) {
- if (inheritanceType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return inheritanceType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(InheritanceType inheritanceType) {
- return (inheritanceType == null) ? null : inheritanceType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JPA.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JPA.java
deleted file mode 100644
index f1c2ce017d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JPA.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.resource.java;
-
-/**
- * JPA Java-related stuff (annotations etc.)
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-@SuppressWarnings("nls")
-public interface JPA {
-
- // JPA package
- String PACKAGE = "javax.persistence";
- String PACKAGE_ = PACKAGE + '.';
-
-
- // ********** API **********
-
- // JPA annotations
- String ASSOCIATION_OVERRIDE = PACKAGE_ + "AssociationOverride";
- String ASSOCIATION_OVERRIDE__NAME = "name";
- String ASSOCIATION_OVERRIDE__JOIN_COLUMNS = "joinColumns";
- String ASSOCIATION_OVERRIDES = PACKAGE_ + "AssociationOverrides";
- String ASSOCIATION_OVERRIDES__VALUE = "value";
- String ATTRIBUTE_OVERRIDE = PACKAGE_ + "AttributeOverride";
- String ATTRIBUTE_OVERRIDE__NAME = "name";
- String ATTRIBUTE_OVERRIDE__COLUMN = "column";
- String ATTRIBUTE_OVERRIDES = PACKAGE_ + "AttributeOverrides";
- String ATTRIBUTE_OVERRIDES__VALUE = "value";
- String BASIC = PACKAGE_ + "Basic";
- String BASIC__FETCH = "fetch";
- String BASIC__OPTIONAL = "optional";
- String COLUMN = PACKAGE_ + "Column";
- String COLUMN__NAME = "name";
- String COLUMN__UNIQUE = "unique";
- String COLUMN__NULLABLE = "nullable";
- String COLUMN__INSERTABLE = "insertable";
- String COLUMN__UPDATABLE = "updatable";
- String COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String COLUMN__TABLE = "table";
- String COLUMN__LENGTH = "length";
- String COLUMN__PRECISION = "precision";
- String COLUMN__SCALE = "scale";
- String COLUMN_RESULT = PACKAGE_ + "ColumnResult";
- String COLUMN_RESULT__NAME = "name";
- String DISCRIMINATOR_COLUMN = PACKAGE_ + "DiscriminatorColumn";
- String DISCRIMINATOR_COLUMN__NAME = "name";
- String DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = "discriminatorType";
- String DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String DISCRIMINATOR_COLUMN__LENGTH = "length";
- String DISCRIMINATOR_VALUE = PACKAGE_ + "DiscriminatorValue";
- String DISCRIMINATOR_VALUE__VALUE = "value";
- String EMBEDDABLE = PACKAGE_ + "Embeddable";
- String EMBEDDED = PACKAGE_ + "Embedded";
- String EMBEDDED_ID = PACKAGE_ + "EmbeddedId";
- String ENTITY = PACKAGE_ + "Entity";
- String ENTITY__NAME = "name";
- String ENTITY_LISTENERS = PACKAGE_ + "EntityListeners";
- String ENTITY_LISTENERS__VALUE = "value";
- String ENTITY_RESULT = PACKAGE_ + "EntityResult";
- String ENTITY_RESULT__ENTITY_CLASS = "entityClass";
- String ENTITY_RESULT__FIELDS = "fields";
- String ENTITY_RESULT__DISCRIMINATOR_COLUMN = "discriminatorColumn";
- String ENUMERATED = PACKAGE_ + "Enumerated";
- String ENUMERATED__VALUE = "value";
- String EXCLUDE_DEFAULT_LISTENERS = PACKAGE_ + "ExcludeDefaultListeners";
- String EXCLUDE_SUPERCLASS_LISTENERS = PACKAGE_ + "ExcludeSuperclassListeners";
- String FIELD_RESULT = PACKAGE_ + "FieldResult";
- String FIELD_RESULT__NAME = "name";
- String FIELD_RESULT__COLUMN = "column";
- String FLUSH_MODE = PACKAGE_ + "FlushMode";
- String FLUSH_MODE__VALUE = "value";
- String GENERATED_VALUE = PACKAGE_ + "GeneratedValue";
- String GENERATED_VALUE__STRATEGY = "strategy";
- String GENERATED_VALUE__GENERATOR = "generator";
- String ID = PACKAGE_ + "Id";
- String ID_CLASS = PACKAGE_ + "IdClass";
- String ID_CLASS__VALUE = "value";
- String INHERITANCE = PACKAGE_ + "Inheritance";
- String INHERITANCE__STRATEGY = "strategy";
- String JOIN_COLUMN = PACKAGE_ + "JoinColumn";
- String JOIN_COLUMN__NAME = "name";
- String JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
- String JOIN_COLUMN__UNIQUE = "unique";
- String JOIN_COLUMN__NULLABLE = "nullable";
- String JOIN_COLUMN__INSERTABLE = "insertable";
- String JOIN_COLUMN__UPDATABLE = "updatable";
- String JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String JOIN_COLUMN__TABLE = "table";
- String JOIN_COLUMNS = PACKAGE_ + "JoinColumns";
- String JOIN_COLUMNS__VALUE = "value";
- String JOIN_TABLE = PACKAGE_ + "JoinTable";
- String JOIN_TABLE__NAME = "name";
- String JOIN_TABLE__CATALOG = "catalog";
- String JOIN_TABLE__SCHEMA = "schema";
- String JOIN_TABLE__JOIN_COLUMNS = "joinColumns";
- String JOIN_TABLE__INVERSE_JOIN_COLUMNS = "inverseJoinColumns";
- String JOIN_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String LOB = PACKAGE_ + "Lob";
- String MANY_TO_MANY = PACKAGE_ + "ManyToMany";
- String MANY_TO_MANY__TARGET_ENTITY = "targetEntity";
- String MANY_TO_MANY__CASCADE = "cascade";
- String MANY_TO_MANY__FETCH = "fetch";
- String MANY_TO_MANY__MAPPED_BY = "mappedBy";
- String MANY_TO_ONE = PACKAGE_ + "ManyToOne";
- String MANY_TO_ONE__TARGET_ENTITY = "targetEntity";
- String MANY_TO_ONE__CASCADE = "cascade";
- String MANY_TO_ONE__FETCH = "fetch";
- String MANY_TO_ONE__OPTIONAL = "optional";
- String MAP_KEY = PACKAGE_ + "MapKey";
- String MAP_KEY__NAME = "name";
- String MAPPED_SUPERCLASS = PACKAGE_ + "MappedSuperclass";
- String NAMED_NATIVE_QUERIES = PACKAGE_ + "NamedNativeQueries";
- String NAMED_NATIVE_QUERIES__VALUE = "value";
- String NAMED_NATIVE_QUERY = PACKAGE_ + "NamedNativeQuery";
- String NAMED_NATIVE_QUERY__NAME = "name";
- String NAMED_NATIVE_QUERY__QUERY = "query";
- String NAMED_NATIVE_QUERY__HINTS = "hints";
- String NAMED_NATIVE_QUERY__RESULT_CLASS = "resultClass";
- String NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = "resultSetMapping";
- String NAMED_QUERIES = PACKAGE_ + "NamedQueries";
- String NAMED_QUERIES__VALUE = "value";
- String NAMED_QUERY = PACKAGE_ + "NamedQuery";
- String NAMED_QUERY__NAME = "name";
- String NAMED_QUERY__QUERY = "query";
- String NAMED_QUERY__HINTS = "hints";
- String ONE_TO_MANY = PACKAGE_ + "OneToMany";
- String ONE_TO_MANY__TARGET_ENTITY = "targetEntity";
- String ONE_TO_MANY__CASCADE = "cascade";
- String ONE_TO_MANY__FETCH = "fetch";
- String ONE_TO_MANY__MAPPED_BY = "mappedBy";
- String ONE_TO_ONE = PACKAGE_ + "OneToOne";
- String ONE_TO_ONE__TARGET_ENTITY = "targetEntity";
- String ONE_TO_ONE__CASCADE = "cascade";
- String ONE_TO_ONE__FETCH = "fetch";
- String ONE_TO_ONE__OPTIONAL = "optional";
- String ONE_TO_ONE__MAPPED_BY = "mappedBy";
- String ORDER_BY = PACKAGE_ + "OrderBy";
- String ORDER_BY__VALUE = "value";
- String PERSISTENCE_CONTEXT = PACKAGE_ + "PersistenceContext";
- String PERSISTENCE_CONTEXT__NAME = "name";
- String PERSISTENCE_CONTEXT__UNIT_NAME = "unitName";
- String PERSISTENCE_CONTEXT__TYPE = "type";
- String PERSISTENCE_CONTEXTS = PACKAGE_ + "PersistenceContexts";
- String PERSISTENCE_CONTEXTS__VALUE = "value";
- String PERSISTENCE_UNIT = PACKAGE_ + "XmlPersistenceUnit";
- String PERSISTENCE_UNIT__NAME = "name";
- String PERSISTENCE_UNIT__UNIT_NAME = "unitName";
- String PERSISTENCE_UNITS = PACKAGE_ + "PersistenceUnits";
- String PERSISTENCE_UNITS__VALUE = "value";
- String POST_LOAD = PACKAGE_ + "PostLoad";
- String POST_PERSIST = PACKAGE_ + "PostPersist";
- String POST_REMOVE = PACKAGE_ + "PostRemove";
- String POST_UPDATE = PACKAGE_ + "PostUpdate";
- String PRE_PERSIST = PACKAGE_ + "PrePersist";
- String PRE_REMOVE = PACKAGE_ + "PreRemove";
- String PRE_UPDATE = PACKAGE_ + "PreUpdate";
- String PRIMARY_KEY_JOIN_COLUMN = PACKAGE_ + "PrimaryKeyJoinColumn";
- String PRIMARY_KEY_JOIN_COLUMN__NAME = "name";
- String PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
- String PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String PRIMARY_KEY_JOIN_COLUMNS = PACKAGE_ + "PrimaryKeyJoinColumns";
- String PRIMARY_KEY_JOIN_COLUMNS__VALUE = "value";
- String QUERY_HINT = PACKAGE_ + "QueryHint";
- String QUERY_HINT__NAME = "name";
- String QUERY_HINT__VALUE = "value";
- String SECONDARY_TABLE = PACKAGE_ + "SecondaryTable";
- String SECONDARY_TABLE__NAME = "name";
- String SECONDARY_TABLE__CATALOG = "catalog";
- String SECONDARY_TABLE__SCHEMA = "schema";
- String SECONDARY_TABLE__PK_JOIN_COLUMNS = "pkJoinColumns";
- String SECONDARY_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String SECONDARY_TABLES = PACKAGE_ + "SecondaryTables";
- String SECONDARY_TABLES__VALUE = "value";
- String SEQUENCE_GENERATOR = PACKAGE_ + "SequenceGenerator";
- String SEQUENCE_GENERATOR__NAME = "name";
- String SEQUENCE_GENERATOR__SEQUENCE_NAME = "sequenceName";
- String SEQUENCE_GENERATOR__INITIAL_VALUE = "initialValue";
- String SEQUENCE_GENERATOR__ALLOCATION_SIZE = "allocationSize";
- String SQL_RESULT_SET_MAPPING = PACKAGE_ + "SqlResultSetMapping";
- String SQL_RESULT_SET_MAPPING__NAME = "name";
- String SQL_RESULT_SET_MAPPING__ENTITIES = "entities";
- String SQL_RESULT_SET_MAPPING__COLUMNS = "columns";
- String TABLE = PACKAGE_ + "Table";
- String TABLE__NAME = "name";
- String TABLE__CATALOG = "catalog";
- String TABLE__SCHEMA = "schema";
- String TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String TABLE_GENERATOR = PACKAGE_ + "TableGenerator";
- String TABLE_GENERATOR__NAME = "name";
- String TABLE_GENERATOR__TABLE = "table";
- String TABLE_GENERATOR__CATALOG = "catalog";
- String TABLE_GENERATOR__SCHEMA = "schema";
- String TABLE_GENERATOR__PK_COLUMN_NAME = "pkColumnName";
- String TABLE_GENERATOR__VALUE_COLUMN_NAME = "valueColumnName";
- String TABLE_GENERATOR__PK_COLUMN_VALUE = "pkColumnValue";
- String TABLE_GENERATOR__INITIAL_VALUE = "initialValue";
- String TABLE_GENERATOR__ALLOCATION_SIZE = "allocationSize";
- String TABLE_GENERATOR__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String TEMPORAL = PACKAGE_ + "Temporal";
- String TEMPORAL__VALUE = "value";
- String TRANSIENT = PACKAGE_ + "Transient";
- String UNIQUE_CONSTRAINT = PACKAGE_ + "UniqueConstraint";
- String UNIQUE_CONSTRAINT__COLUMN_NAMES = "columnNames";
- String VERSION = PACKAGE_ + "Version";
-
- // JPA enums
- String CASCADE_TYPE = PACKAGE_ + "CascadeType";
- String CASCADE_TYPE_ = CASCADE_TYPE + '.';
- String CASCADE_TYPE__ALL = CASCADE_TYPE_ + "ALL";
- String CASCADE_TYPE__MERGE = CASCADE_TYPE_ + "MERGE";
- String CASCADE_TYPE__PERSIST = CASCADE_TYPE_ + "PERSIST";
- String CASCADE_TYPE__REFRESH = CASCADE_TYPE_ + "REFRESH";
- String CASCADE_TYPE__REMOVE = CASCADE_TYPE_ + "REMOVE";
-
- String DISCRIMINATOR_TYPE = PACKAGE_ + "DiscriminatorType";
- String DISCRIMINATOR_TYPE_ = DISCRIMINATOR_TYPE + '.';
- String DISCRIMINATOR_TYPE__CHAR = DISCRIMINATOR_TYPE_ + "CHAR";
- String DISCRIMINATOR_TYPE__INTEGER = DISCRIMINATOR_TYPE_ + "INTEGER";
- String DISCRIMINATOR_TYPE__STRING = DISCRIMINATOR_TYPE_ + "STRING";
-
- String ENUM_TYPE = PACKAGE_ + "EnumType";
- String ENUM_TYPE_ = ENUM_TYPE + '.';
- String ENUM_TYPE__ORDINAL = ENUM_TYPE_ + "ORDINAL";
- String ENUM_TYPE__STRING = ENUM_TYPE_ + "STRING";
-
- String FETCH_TYPE = PACKAGE_ + "FetchType";
- String FETCH_TYPE_ = FETCH_TYPE + '.';
- String FETCH_TYPE__EAGER = FETCH_TYPE_ + "EAGER";
- String FETCH_TYPE__LAZY = FETCH_TYPE_ + "LAZY";
-
- String FLUSH_MODE_TYPE = PACKAGE_ + "FlushModeType";
- String FLUSH_MODE_TYPE_ = FLUSH_MODE_TYPE + '.';
- String FLUSH_MODE_TYPE__AUTO = FLUSH_MODE_TYPE_ + "AUTO";
- String FLUSH_MODE_TYPE__COMMIT = FLUSH_MODE_TYPE_ + "COMMIT";
-
- String GENERATION_TYPE = PACKAGE_ + "GenerationType";
- String GENERATION_TYPE_ = GENERATION_TYPE + '.';
- String GENERATION_TYPE__AUTO = GENERATION_TYPE_ + "AUTO";
- String GENERATION_TYPE__IDENTITY = GENERATION_TYPE_ + "IDENTITY";
- String GENERATION_TYPE__SEQUENCE = GENERATION_TYPE_ + "SEQUENCE";
- String GENERATION_TYPE__TABLE = GENERATION_TYPE_ + "TABLE";
-
- String INHERITANCE_TYPE = PACKAGE_ + "InheritanceType";
- String INHERITANCE_TYPE_ = INHERITANCE_TYPE + '.';
- String INHERITANCE_TYPE__JOINED = INHERITANCE_TYPE_ + "JOINED";
- String INHERITANCE_TYPE__SINGLE_TABLE = INHERITANCE_TYPE_ + "SINGLE_TABLE";
- String INHERITANCE_TYPE__TABLE_PER_CLASS = INHERITANCE_TYPE_ + "TABLE_PER_CLASS";
-
- String PERSISTENCE_CONTEXT_TYPE = PACKAGE_ + "PersistenceContextType";
- String PERSISTENCE_CONTEXT_TYPE_ = PERSISTENCE_CONTEXT_TYPE + '.';
- String PERSISTENCE_CONTEXT_TYPE__EXTENDED = PERSISTENCE_CONTEXT_TYPE_ + "EXTENDED";
- String PERSISTENCE_CONTEXT_TYPE__TRANSACTION = PERSISTENCE_CONTEXT_TYPE_ + "TRANSACTION";
-
- String TEMPORAL_TYPE = PACKAGE_ + "TemporalType";
- String TEMPORAL_TYPE_ = TEMPORAL_TYPE + '.';
- String TEMPORAL_TYPE__DATE = TEMPORAL_TYPE_ + "DATE";
- String TEMPORAL_TYPE__TIME = TEMPORAL_TYPE_ + "TIME";
- String TEMPORAL_TYPE__TIMESTAMP = TEMPORAL_TYPE_ + "TIMESTAMP";
-
- // JPA interfaces
- String ENTITY_MANAGER = PACKAGE_ + "EntityManager";
- String ENTITY_MANAGER_FACTORY = PACKAGE_ + "EntityManagerFactory";
- String ENTITY_TRANSACTION = PACKAGE_ + "EntityTransaction";
- String INSTRUMENTABLE_CLASS_LOADER = PACKAGE_ + "InstrumentableClassLoader";
- String QUERY = PACKAGE_ + "Query";
-
- // JPA classes
- String PERSISTENCE = PACKAGE_ + "XmlPersistence";
-
- // JPA exceptions
- String NON_UNIQUE_RESULT_EXCEPTION = PACKAGE_ + "NonUniqueResultException";
- String OBJECT_NOT_FOUND_EXCEPTION = PACKAGE_ + "ObjectNotFoundException";
- String PERSISTENCE_EXCEPTION = PACKAGE_ + "PersistenceException";
-
-
- // ********** SPI **********
-
- // JPA SPI package
- String SPI_PACKAGE = PACKAGE_ + "spi";
- String SPI_PACKAGE_ = SPI_PACKAGE + '.';
-
- // JPA SPI interfaces
- String ENTITY_MANAGER_FACTORY_PROVIDER = SPI_PACKAGE_ + "EntityManagerFactoryProvider";
- String PERSISTENCE_INFO = SPI_PACKAGE_ + "PersistenceInfo";
- String PERSISTENCE_PROVIDER = SPI_PACKAGE_ + "PersistenceProvider";
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinColumnAnnotation.java
deleted file mode 100644
index b49d94ac58..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinColumnAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.JoinColumn</code>
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface JoinColumnAnnotation
- extends CompleteJoinColumnAnnotation
-{
- String ANNOTATION_NAME = JPA.JOIN_COLUMN;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinTableAnnotation.java
deleted file mode 100644
index de6583e7e8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JoinTableAnnotation.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.JoinTable</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface JoinTableAnnotation
- extends ReferenceTableAnnotation
-{
- String ANNOTATION_NAME = JPA.JOIN_TABLE;
-
-
- // ********** inverse join columns **********
-
- /**
- * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
- * Return an empty iterator if the element does not exist in Java.
- */
- ListIterable<JoinColumnAnnotation> getInverseJoinColumns();
- String INVERSE_JOIN_COLUMNS_LIST = "inverseJoinColumns"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
- */
- int getInverseJoinColumnsSize();
-
- /**
- * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
- */
- JoinColumnAnnotation inverseJoinColumnAt(int index);
-
- /**
- * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
- */
- JoinColumnAnnotation addInverseJoinColumn(int index);
-
- /**
- * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
- */
- void moveInverseJoinColumn(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
- */
- void removeInverseJoinColumn(int index);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/LobAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/LobAnnotation.java
deleted file mode 100644
index a3b4fa9a01..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/LobAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.Lob
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface LobAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.LOB;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToManyAnnotation.java
deleted file mode 100644
index f3495256ca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToManyAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.ManyToMany</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface ManyToManyAnnotation
- extends OwnableRelationshipMappingAnnotation
-{
- String ANNOTATION_NAME = JPA.MANY_TO_MANY;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToOneAnnotation.java
deleted file mode 100644
index 3890b40ac2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ManyToOneAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.ManyToOne</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface ManyToOneAnnotation
- extends SingleRelationshipMappingAnnotation
-{
- String ANNOTATION_NAME = JPA.MANY_TO_ONE;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MapKeyAnnotation.java
deleted file mode 100644
index fc076a85a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MapKeyAnnotation.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.MapKey</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface MapKeyAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.MAP_KEY;
-
- /**
- * Corresponds to the 'name' element of the MapKey annotation.
- * Returns null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the MapKey annotation.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If the element
- * does not exist return the {@link TextRange} for the MapKey annotation.
- */
- TextRange getNameTextRange();
-
- /**
- * Return whether the specified position touches the 'name' element.
- * Return false if the element does not exist.
- */
- boolean nameTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MappedSuperclassAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MappedSuperclassAnnotation.java
deleted file mode 100644
index 8bdaa11d7a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/MappedSuperclassAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.MappedSuperclass
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface MappedSuperclassAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.MAPPED_SUPERCLASS;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedColumnAnnotation.java
deleted file mode 100644
index 360db4e6ab..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedColumnAnnotation.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.Column
- * <li>javax.persistence.MapKeyColumn
- * <li>javax.persistence.JoinColumn
- * <li>javax.persistence.MapKeyJoinColumn
- * <li>javax.persistence.DiscriminatorColumn
- * <li>javax.persistence.OrderColumn
- * <li>javax.persistence.PrimaryKeyJoinColumn
- * </ul></code>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface NamedColumnAnnotation
- extends Annotation
-{
- /**
- * Return whether the annotation exists in Java.
- */
- boolean isSpecified();
-
-
- // ********** name **********
-
- /**
- * Corresponds to the 'name' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If the element
- * does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getNameTextRange();
-
- /**
- * Return whether the specified position touches the 'name' element.
- * Return false if the element does not exist.
- */
- boolean nameTouches(int pos);
-
-
- // ********** column definition **********
-
- /**
- * Corresponds to the 'columnDefinition' element of the *Column annotation.
- * Return null if the element does not exist in Java.
- */
- String getColumnDefinition();
- String COLUMN_DEFINITION_PROPERTY = "columnDefinition"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'columnDefinition' element of the *Column annotation.
- * Set to null to remove the element.
- */
- void setColumnDefinition(String columnDefinition);
-
- /**
- * Return the {@link TextRange} for the 'columnDefinition' element. If the
- * element does not exist return the {@link TextRange} for the *Column annotation.
- */
- TextRange getColumnDefinitionTextRange();
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedNativeQueryAnnotation.java
deleted file mode 100644
index 67b3c2bdcf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedNativeQueryAnnotation.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.NamedNativeQuery</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface NamedNativeQueryAnnotation
- extends QueryAnnotation
-{
- String ANNOTATION_NAME = JPA.NAMED_NATIVE_QUERY;
-
-
- // ********** result class **********
-
- /**
- * Corresponds to the 'resultClass' element of the NamedNativeQuery annotation.
- * Return null if the element does not exist in Java.
- */
- String getResultClass();
- String RESULT_CLASS_PROPERTY = "resultClass"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'resultClass' element of the NamedNativeQuery annotation.
- * Set to null to remove the element.
- */
- void setResultClass(String resultClass);
-
- /**
- * Return the {@link TextRange} for the 'resultClass' element. If element
- * does not exist return the {@link TextRange} for the NamedNativeQuery annotation.
- */
- TextRange getResultClassTextRange();
-
- /**
- * Return the named native query's fully-qualified result class name as
- * resolved by the AST's bindings.
- * <pre>
- * &#64;NamedNativeQuery(resultClass=Employee.class)
- * </pre>
- * will return <code>"model.Employee"</code> if there is an import for
- * <code>model.Employee</code>.
- */
- String getFullyQualifiedResultClassName();
-
-
- // ********** result set mapping **********
-
- /**
- * Corresponds to the 'resultSetMapping' element of the NamedNativeQuery annotation.
- * Return null if the element does not exist in Java.
- */
- String getResultSetMapping();
- String RESULT_SET_MAPPING_PROPERTY = "resultSetMapping"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'resultSetMapping' element of the NamedNativeQuery annotation.
- * Set to null to remove the element.
- */
- void setResultSetMapping(String resultSetMapping);
-
- /**
- * Return the {@link TextRange} for the 'resultSetMapping' element. If element
- * does not exist return the {@link TextRange} for the NamedNativeQuery annotation.
- */
- TextRange getResultSetMappingTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedQueryAnnotation.java
deleted file mode 100644
index e0c098e2b8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/NamedQueryAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.NamedQuery</code>
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.0
- */
-public interface NamedQueryAnnotation
- extends QueryAnnotation
-{
- String ANNOTATION_NAME = JPA.NAMED_QUERY;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToManyAnnotation.java
deleted file mode 100644
index 9b57b0cf6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToManyAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.OneToMany</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OneToManyAnnotation
- extends OwnableRelationshipMappingAnnotation
-{
- String ANNOTATION_NAME = JPA.ONE_TO_MANY;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToOneAnnotation.java
deleted file mode 100644
index 185ffb304f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OneToOneAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.OneToOne</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OneToOneAnnotation
- extends SingleRelationshipMappingAnnotation, OwnableRelationshipMappingAnnotation
-{
- String ANNOTATION_NAME = JPA.ONE_TO_ONE;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OrderByAnnotation.java
deleted file mode 100644
index 69615ca474..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OrderByAnnotation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.OrderBy</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OrderByAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.ORDER_BY;
-
- /**
- * Corresponds to the 'value' element of the OrderBy annotation.
- * Return null if the element does not exist in the annotation.
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the OrderBy annotation.
- * Setting the element to null will not remove the OrderBy annotation.
- */
- void setValue(String value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the OrderBy annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OverrideAnnotation.java
deleted file mode 100644
index 2f767e6f58..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OverrideAnnotation.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Common protocol for<code><ul>
- * <li>javax.persistence.AttributeOverride
- * <li>javax.persistence.AssociationOverride
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface OverrideAnnotation
- extends NestableAnnotation
-{
- /**
- * Corresponds to the 'name' element of the override annotations.
- * Return null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the override annotations.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If element
- * does not exist return the {@link TextRange} for the override annotation.
- */
- TextRange getNameTextRange();
-
- /**
- * Return whether the specified position touches the 'name' element.
- * Return false if the element does not exist in Java.
- */
- boolean nameTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OwnableRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OwnableRelationshipMappingAnnotation.java
deleted file mode 100644
index 490f77f73a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/OwnableRelationshipMappingAnnotation.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Represents a relationship mapping annotation that may have the
- * <code>mappedBy</code> element:<code><ul>
- * <li>javax.persistence.ManyToMany
- * <li>javax.persistence.OneToMany
- * <li>javax.persistence.OneToOne
- * </ul></code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface OwnableRelationshipMappingAnnotation
- extends RelationshipMappingAnnotation
-{
-// TODO bjv rename to MappedByRelationshipMappingAnnotation
- /**
- * Corresponds to the 'mappedBy' element of the annotation.
- * Return null if the element does not exist in Java.
- */
- String getMappedBy();
- String MAPPED_BY_PROPERTY = "mappedBy"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'mappedBy' element of the annotation.
- * Set to null to remove the element.
- */
- void setMappedBy(String mappedBy);
-
- /**
- * Return the {@link TextRange} for the 'mappedBy' element. If the element
- * does not exist return the {@link TextRange} for the annotation.
- */
- TextRange getMappedByTextRange();
-
- /**
- * Return whether the specified position touches the 'mappedBy' element.
- * Return false if the element does not exist.
- */
- boolean mappedByTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/PrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/PrimaryKeyJoinColumnAnnotation.java
deleted file mode 100644
index ea51df0f85..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/PrimaryKeyJoinColumnAnnotation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.PrimaryKeyJoinColumn</code>
- * <p>
- * 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.
- *
- * @version 3.1
- * @since 2.0
- */
-public interface PrimaryKeyJoinColumnAnnotation
- extends BaseJoinColumnAnnotation
-{
- String ANNOTATION_NAME = JPA.PRIMARY_KEY_JOIN_COLUMN;
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryAnnotation.java
deleted file mode 100644
index dd656c5dee..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryAnnotation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Common protocol among:<code><ul>
- * <li>javax.persistence.NamedQuery
- * <li>javax.persistence.NamedNativeQuery
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.2
- */
-public interface QueryAnnotation
- extends NestableAnnotation
-{
- // ********** name **********
-
- /**
- * Corresponds to the 'name' element of the *Query annotation.
- * Return null if the element does not exist in Java.
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the *Query annotation.
- * Set to null to remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If element
- * does not exist return the {@link TextRange} for the *Query annotation.
- */
- TextRange getNameTextRange();
-
-
- // ********** query **********
-
- /**
- * Corresponds to the 'query' element of the *Query annotation.
- * Return null if the element does not exist in Java.
- */
- String getQuery();
- String QUERY_PROPERTY = "query"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'query' element of the *Query annotation.
- * Set to null to remove the element.
- */
- void setQuery(String query);
-
- /**
- * Return the {@link TextRange} for the 'query' element. If element
- * does not exist return the {@link TextRange} for the *Query annotation.
- */
- TextRange getQueryTextRange();
-
-
- // ********** hints **********
-
- /**
- * Corresponds to the 'hints' element of the *Query annotation.
- * Return an empty iterator if the element does not exist in Java.
- */
- ListIterable<QueryHintAnnotation> getHints();
- String HINTS_LIST = "hints"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'hints' element of the *Query annotation.
- */
- int getHintsSize();
-
- /**
- * Corresponds to the 'hints' element of the *Query annotation.
- */
- QueryHintAnnotation hintAt(int index);
-
- /**
- * Corresponds to the 'hints' element of the *Query annotation.
- */
- QueryHintAnnotation addHint(int index);
-
- /**
- * Corresponds to the 'hints' element of the *Query annotation.
- */
- void moveHint(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'hints' element of the *Query annotation.
- */
- void removeHint(int index);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryHintAnnotation.java
deleted file mode 100644
index b7e58f4b73..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/QueryHintAnnotation.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.QueryHint</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface QueryHintAnnotation
- extends NestableAnnotation
-{
- String ANNOTATION_NAME = JPA.QUERY_HINT;
-
- /**
- * Corresponds to the 'name' element of the QueryHint annotation.
- * Return null if the element does not exist in the annotation
- */
- String getName();
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'name' element of the QueryHint annotation.
- * Setting to null will remove the element.
- */
- void setName(String name);
-
- /**
- * Return the {@link TextRange} for the 'name' element. If the element
- * does not exist return the {@link TextRange} for the QueryHint annotation.
- */
- TextRange getNameTextRange();
-
-
- /**
- * Corresponds to the 'value' element of the QueryHint annotation.
- * Return null if the element does not exist in the annotation
- */
- String getValue();
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'value' element of the QueryHint annotation.
- * Setting to null will remove the element.
- */
- void setValue(String value);
-
- /**
- * Return the {@link TextRange} for the 'value' element. If the element
- * does not exist return the {@link TextRange} for the QueryHint annotation.
- */
- TextRange getValueTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ReferenceTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ReferenceTableAnnotation.java
deleted file mode 100644
index 6b05ea4f72..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/ReferenceTableAnnotation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotations:<code><ul>
- * <li>javax.persistence.JoinTable
- * <li>javax.persistence.CollectionTable
- * </ul></code>
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public interface ReferenceTableAnnotation
- extends BaseTableAnnotation
-{
- // ********** join columns **********
-
- /**
- * Corresponds to the 'joinColumns' element of the JoinTable annotation.
- * Return an empty iterator if the element does not exist in Java.
- */
- ListIterable<JoinColumnAnnotation> getJoinColumns();
- String JOIN_COLUMNS_LIST = "joinColumns"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'joinColumns' element of the JoinTable annotation.
- */
- int getJoinColumnsSize();
-
- /**
- * Corresponds to the 'joinColumns' element of the JoinTable annotation.
- */
- JoinColumnAnnotation joinColumnAt(int index);
-
- /**
- * Corresponds to the 'joinColumns' element of the JoinTable annotation.
- */
- JoinColumnAnnotation addJoinColumn(int index);
-
- /**
- * Corresponds to the 'joinColumns' element of the JoinTable annotation.
- */
- void moveJoinColumn(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'joinColumns' element of the JoinTable annotation.
- */
- void removeJoinColumn(int index);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/RelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/RelationshipMappingAnnotation.java
deleted file mode 100644
index c8b6ca883d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/RelationshipMappingAnnotation.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Common protocol among the following relationship mappings:<code><ul>
- * <li>javax.persistence.ManyToOne
- * <li>javax.persistence.ManyToMany
- * <li>javax.persistence.OneToMany
- * <li>javax.persistence.OneToOne
- * </ul></code>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface RelationshipMappingAnnotation
- extends Annotation
-{
- /**
- * Corresponds to the 'targetEntity' element of the relationship mapping
- * annotations.
- * Return null if the element does not exist in Java.
- * Return the portion of the value preceding ".class".
- * <pre>
- * &#64;ManyToMany(targetEntity=Employee.class)
- * </pre>
- * will return "Employee"
- */
- String getTargetEntity();
- String TARGET_ENTITY_PROPERTY = "targetEntity"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'targetEntity' element of the relationship mapping
- * annotations.
- * Set to null to remove the element.
- */
- void setTargetEntity(String targetEntity);
-
- /**
- * Return the {@link TextRange} for the 'targetEntity' element. If the element
- * does not exist return the {@link TextRange} for the relationship mapping annotation.
- */
- TextRange getTargetEntityTextRange();
-
- /**
- * Return the fully-qualified target entity class name as resolved by the
- * AST's bindings.
- * <pre>
- * &#64;ManyToMany(targetEntity=Employee.class)
- * </pre>
- * will return <code>"model.Employee"</code> if there is an import for
- * <code>model.Employee</code>.
- */
- String getFullyQualifiedTargetEntityClassName();
-
-
- /**
- * Corresponds to the 'fetch' element of the relationship mapping annotations.
- * Return null if the element does not exist in Java.
- */
- FetchType getFetch();
- String FETCH_PROPERTY = "fetch"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'fetch' element of the relationship annotations.
- * Set to null to remove the element.
- */
- void setFetch(FetchType fetch);
-
- /**
- * Return the {@link TextRange} for the 'fetch' element. If the element
- * does not exist return the {@link TextRange} for the relationship mapping annotation.
- */
- TextRange getFetchTextRange();
-
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- boolean isCascadeAll();
- String CASCADE_ALL_PROPERTY = "cascadeAll"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- void setCascadeAll(boolean all);
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- boolean isCascadeMerge();
- String CASCADE_MERGE_PROPERTY = "cascadeMerge"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- void setCascadeMerge(boolean merge);
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- boolean isCascadePersist();
- String CASCADE_PERSIST_PROPERTY = "cascadePersist"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- void setCascadePersist(boolean persist);
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- boolean isCascadeRefresh();
- String CASCADE_REFRESH_PROPERTY = "cascadeRefresh"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- void setCascadeRefresh(boolean refresh);
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- boolean isCascadeRemove();
- String CASCADE_REMOVE_PROPERTY = "cascadeRemove"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'cascade' element of the relationship annotations.
- */
- void setCascadeRemove(boolean remove);
-
- /**
- * Return the {@link TextRange} for the 'cascade' element. If the element
- * does not exist return the {@link TextRange} for the relationship mapping annotation.
- */
- TextRange getCascadeTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SecondaryTableAnnotation.java
deleted file mode 100644
index 5266fff5e2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SecondaryTableAnnotation.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.SecondaryTable</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface SecondaryTableAnnotation
- extends BaseTableAnnotation, NestableAnnotation
-{
- String ANNOTATION_NAME = JPA.SECONDARY_TABLE;
-
-
- // ********** primary key join columns **********
-
- /**
- * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
- * Return an empty iterator if the element does not exist in Java.
- */
- ListIterable<PrimaryKeyJoinColumnAnnotation> getPkJoinColumns();
- String PK_JOIN_COLUMNS_LIST = "pkJoinColumns"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
- */
- int getPkJoinColumnsSize();
-
- /**
- * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
- */
- PrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index);
-
- /**
- * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
- */
- PrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index);
-
- /**
- * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
- */
- void removePkJoinColumn(int index);
-
- /**
- * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
- */
- void movePkJoinColumn(int targetIndex, int sourceIndex);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SequenceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SequenceGeneratorAnnotation.java
deleted file mode 100644
index ab9a2ccf2a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SequenceGeneratorAnnotation.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.SequenceGenerator</code>
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface SequenceGeneratorAnnotation
- extends GeneratorAnnotation
-{
- String ANNOTATION_NAME = JPA.SEQUENCE_GENERATOR;
-
- /**
- * Corresponds to the 'sequenceName' element of the *Generator annotation.
- * Return null if the element does not exist in Java.
- */
- String getSequenceName();
- String SEQUENCE_NAME_PROPERTY = "sequenceName"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'sequenceName' element of the *Generator annotation.
- * Set to null to remove the element.
- */
- void setSequenceName(String sequenceName);
-
- /**
- * Return the {@link TextRange} for the 'sequenceName' element. If the element
- * does not exist return the {@link TextRange} for the SequenceGenerator annotation.
- */
- TextRange getSequenceNameTextRange();
-
- /**
- * Return whether the specified position touches the 'sequenceName' element.
- * Return false if the element does not exist.
- */
- boolean sequenceNameTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SingleRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SingleRelationshipMappingAnnotation.java
deleted file mode 100644
index 584de50bee..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/SingleRelationshipMappingAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Common protocol among the following relationship mappings:<code><ul>
- * <li>javax.persistence.ManyToOne
- * <li>javax.persistence.OneToOne
- * </ul></code>
- * 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.
- */
-public interface SingleRelationshipMappingAnnotation
- extends RelationshipMappingAnnotation
-{
- /**
- * Corresponds to the optional element of a single relationship annotation.
- * Returns null if the optional element does not exist in java.
- */
- Boolean getOptional();
-
- /**
- * Corresponds to the optional element of a single relationship annotation.
- * Set to null to remove the optional element.
- */
- void setOptional(Boolean optional);
- String OPTIONAL_PROPERTY = "optional"; //$NON-NLS-1$
-
- /**
- * Return the {@link TextRange} for the optional element. If the optional element
- * does not exist return the {@link TextRange} for the ManyToOne annotation.
- */
- TextRange getOptionalTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableAnnotation.java
deleted file mode 100644
index 88cc9cde36..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Table</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface TableAnnotation
- extends BaseTableAnnotation
-{
- String ANNOTATION_NAME = JPA.TABLE;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableGeneratorAnnotation.java
deleted file mode 100644
index 00603a5536..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TableGeneratorAnnotation.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.TableGenerator</code>
- * <p>
- * 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.
- *
- * @version 2.1
- * @since 2.0
- */
-public interface TableGeneratorAnnotation
- extends GeneratorAnnotation
-{
- String ANNOTATION_NAME = JPA.TABLE_GENERATOR;
-
- /**
- * Corresponds to the 'table' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getTable();
- String TABLE_PROPERTY = "table"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'table' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setTable(String table);
-
- /**
- * Return the {@link TextRange} for the 'table' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getTableTextRange();
-
- /**
- * Return whether the specified position touches the 'table' element.
- * Return false if the element does not exist.
- */
- boolean tableTouches(int pos);
-
-
- /**
- * Corresponds to the 'schema' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getSchema();
- String SCHEMA_PROPERTY = "schema"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'schema' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setSchema(String schema);
-
- /**
- * Return the {@link TextRange} for the 'schema' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getSchemaTextRange();
-
- /**
- * Return whether the specified position touches the 'schema' element.
- * Return false if the element does not exist.
- */
- boolean schemaTouches(int pos);
-
-
- /**
- * Corresponds to the 'catalog' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getCatalog();
- String CATALOG_PROPERTY = "catalog"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'catalog' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setCatalog(String catalog);
-
- /**
- * Return the {@link TextRange} for the 'catalog' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getCatalogTextRange();
-
- /**
- * Return whether the specified position touches the 'catalog' element.
- * Return false if the element does not exist.
- */
- boolean catalogTouches(int pos);
-
-
- /**
- * Corresponds to the 'pkColumnName' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getPkColumnName();
- String PK_COLUMN_NAME_PROPERTY = "pkColumnName"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'pkColumnName' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setPkColumnName(String pkColumnName);
-
- /**
- * Return the {@link TextRange} for the 'pkColumnName' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getPkColumnNameTextRange();
-
- /**
- * Return whether the specified position touches the 'pkColumnName' element.
- * Return false if the element does not exist.
- */
- boolean pkColumnNameTouches(int pos);
-
-
- /**
- * Corresponds to the 'valueColumnName' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getValueColumnName();
- String VALUE_COLUMN_NAME_PROPERTY = "valueColumnName"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'valueColumnName' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setValueColumnName(String valueColumnName);
-
- /**
- * Return the {@link TextRange} for the 'valueColumnName' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getValueColumnNameTextRange();
-
- /**
- * Return whether the specified position touches the 'valueColumnName' element.
- * Return false if the element does not exist.
- */
- boolean valueColumnNameTouches(int pos);
-
-
- /**
- * Corresponds to the 'pkColumnValue' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- String getPkColumnValue();
- String PK_COLUMN_VALUE_PROPERTY = "pkColumnValue"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'pkColumnValue' element of the TableGenerator annotation.
- * Set to null to remove the element.
- */
- void setPkColumnValue(String pkColumnValue);
-
- /**
- * Return the {@link TextRange} for the 'pkColumnValue' element. If the element
- * does not exist return the {@link TextRange} for the TableGenerator annotation.
- */
- TextRange getPkColumnValueTextRange();
-
- /**
- * Return whether the specified position touches the 'pkColumnValue' element.
- * Return false if the element does not exist.
- */
- boolean pkColumnValueTouches(int pos);
-
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
- * Return null if the element does not exist in Java.
- */
- ListIterable<UniqueConstraintAnnotation> getUniqueConstraints();
- String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
- */
- int getUniqueConstraintsSize();
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
- */
- UniqueConstraintAnnotation uniqueConstraintAt(int index);
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
- */
- UniqueConstraintAnnotation addUniqueConstraint(int index);
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
- */
- void moveUniqueConstraint(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
- */
- void removeUniqueConstraint(int index);
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalAnnotation.java
deleted file mode 100644
index 354c7c09b1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.Temporal</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface TemporalAnnotation
- extends BaseTemporalAnnotation
-{
- String ANNOTATION_NAME = JPA.TEMPORAL;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalType.java
deleted file mode 100644
index f81fa26b2b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TemporalType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.java;
-
-/**
- * Corresponds to the JPA enum
- * javax.persistence.TemporalType
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public enum TemporalType {
-
- DATE(JPA.TEMPORAL_TYPE__DATE),
- TIME(JPA.TEMPORAL_TYPE__TIME),
- TIMESTAMP(JPA.TEMPORAL_TYPE__TIMESTAMP);
-
-
- private String javaAnnotationValue;
-
- TemporalType(String javaAnnotationValue) {
- if (javaAnnotationValue == null) {
- throw new NullPointerException();
- }
- this.javaAnnotationValue = javaAnnotationValue;
- }
-
- public String getJavaAnnotationValue() {
- return this.javaAnnotationValue;
- }
-
-
- // ********** static methods **********
-
- public static TemporalType fromJavaAnnotationValue(Object javaAnnotationValue) {
- return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
- }
-
- private static TemporalType fromJavaAnnotationValue_(Object javaAnnotationValue) {
- for (TemporalType temporalType : TemporalType.values()) {
- if (temporalType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
- return temporalType;
- }
- }
- return null;
- }
-
- public static String toJavaAnnotationValue(TemporalType temporalType) {
- return (temporalType == null) ? null : temporalType.getJavaAnnotationValue();
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TransientAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TransientAnnotation.java
deleted file mode 100644
index 64ff33fb84..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/TransientAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.Transient
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface TransientAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.TRANSIENT;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/UniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/UniqueConstraintAnnotation.java
deleted file mode 100644
index c513864085..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/UniqueConstraintAnnotation.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-
-/**
- * Corresponds to the JPA annotation
- * <code>javax.persistence.UniqueConstraint</code>
- * <p>
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface UniqueConstraintAnnotation
- extends NestableAnnotation
-{
- String ANNOTATION_NAME = JPA.UNIQUE_CONSTRAINT;
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- * Return null if the element does not exist in the annotation.
- */
- ListIterable<String> getColumnNames();
- String COLUMN_NAMES_LIST = "columnNames"; //$NON-NLS-1$
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- int getColumnNamesSize();
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- String columnNameAt(int index);
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- void addColumnName(String columnName);
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- void addColumnName(int index, String columnName);
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- void moveColumnName(int targetIndex, int sourceIndex);
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- void removeColumnName(String columnName);
-
- /**
- * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
- */
- void removeColumnName(int index);
-
- /**
- * Return whether the specified position touches the 'columnNames' element.
- * Return false if the element does not exist.
- */
- boolean columnNamesTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/VersionAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/VersionAnnotation.java
deleted file mode 100644
index 4354f5caa6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/VersionAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.java;
-
-import org.eclipse.jpt.common.core.resource.java.Annotation;
-
-/**
- * Corresponds to the JPA annotation
- * javax.persistence.Version
- *
- * 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.
- *
- * @version 2.2
- * @since 2.0
- */
-public interface VersionAnnotation
- extends Annotation
-{
- String ANNOTATION_NAME = JPA.VERSION;
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlAttributeMapping.java
deleted file mode 100644
index 60d9290ae7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlAttributeMapping.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Xml Attribute Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlAttributeMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlAttributeMapping
- extends AbstractJpaEObject
- implements XmlAttributeMapping
-{
-
- /**
- * The default value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected static final String ACCESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected String access = ACCESS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlAttributeMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_ATTRIBUTE_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Access</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Access</em>' attribute.
- * @see #setAccess(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getAccess()
- {
- return access;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping#getAccess <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Access</em>' attribute.
- * @see #getAccess()
- * @generated
- */
- public void setAccess(String newAccess)
- {
- String oldAccess = access;
- access = newAccess;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS, oldAccess, access));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeMapping_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
- return getAccess();
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
- setAccess((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
- setAccess(ACCESS_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
- return ACCESS_EDEFAULT == null ? access != null : !ACCESS_EDEFAULT.equals(access);
- case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (access: ");
- result.append(access);
- result.append(", name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** validation ***********
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
- // ********** translators **********
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlAttributeMapping_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildAccessTranslator() {
- return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access(), Translator.DOM_ATTRIBUTE);
- }
-
- // *********** content assist ************
-
- protected TextRange getNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.NAME);
- }
-
- public boolean nameTouches(int pos) {
- TextRange textRange = this.getNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseColumn.java
deleted file mode 100644
index 72d68fbe62..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseColumn.java
+++ /dev/null
@@ -1,547 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.BooleanTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Xml Abstract Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlBaseColumn()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlBaseColumn extends AbstractXmlNamedColumn implements XmlBaseColumn
-{
- /**
- * The default value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInsertable()
- * @generated
- * @ordered
- */
- protected static final Boolean INSERTABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInsertable()
- * @generated
- * @ordered
- */
- protected Boolean insertable = INSERTABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNullable()
- * @generated
- * @ordered
- */
- protected static final Boolean NULLABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNullable()
- * @generated
- * @ordered
- */
- protected Boolean nullable = NULLABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getTable() <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected static final String TABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTable() <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected String table = TABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getUnique() <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUnique()
- * @generated
- * @ordered
- */
- protected static final Boolean UNIQUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getUnique() <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUnique()
- * @generated
- * @ordered
- */
- protected Boolean unique = UNIQUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUpdatable()
- * @generated
- * @ordered
- */
- protected static final Boolean UPDATABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUpdatable()
- * @generated
- * @ordered
- */
- protected Boolean updatable = UPDATABLE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlBaseColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_BASE_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Insertable</em>' attribute.
- * @see #setInsertable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Insertable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getInsertable()
- {
- return insertable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn#getInsertable <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Insertable</em>' attribute.
- * @see #getInsertable()
- * @generated
- */
- public void setInsertable(Boolean newInsertable)
- {
- Boolean oldInsertable = insertable;
- insertable = newInsertable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE, oldInsertable, insertable));
- }
-
- /**
- * Returns the value of the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Nullable</em>' attribute.
- * @see #setNullable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Nullable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getNullable()
- {
- return nullable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn#getNullable <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Nullable</em>' attribute.
- * @see #getNullable()
- * @generated
- */
- public void setNullable(Boolean newNullable)
- {
- Boolean oldNullable = nullable;
- nullable = newNullable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE, oldNullable, nullable));
- }
-
- /**
- * Returns the value of the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table</em>' attribute.
- * @see #setTable(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Table()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getTable()
- {
- return table;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn#getTable <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table</em>' attribute.
- * @see #getTable()
- * @generated
- */
- public void setTable(String newTable)
- {
- String oldTable = table;
- table = newTable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE, oldTable, table));
- }
-
- /**
- * Returns the value of the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Unique</em>' attribute.
- * @see #setUnique(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Unique()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getUnique()
- {
- return unique;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn#getUnique <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Unique</em>' attribute.
- * @see #getUnique()
- * @generated
- */
- public void setUnique(Boolean newUnique)
- {
- Boolean oldUnique = unique;
- unique = newUnique;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE, oldUnique, unique));
- }
-
- /**
- * Returns the value of the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Updatable</em>' attribute.
- * @see #setUpdatable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Updatable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getUpdatable()
- {
- return updatable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn#getUpdatable <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Updatable</em>' attribute.
- * @see #getUpdatable()
- * @generated
- */
- public void setUpdatable(Boolean newUpdatable)
- {
- Boolean oldUpdatable = updatable;
- updatable = newUpdatable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE, oldUpdatable, updatable));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE:
- return getInsertable();
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE:
- return getNullable();
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE:
- return getTable();
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE:
- return getUnique();
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE:
- return getUpdatable();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE:
- setInsertable((Boolean)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE:
- setNullable((Boolean)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE:
- setTable((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE:
- setUnique((Boolean)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE:
- setUpdatable((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE:
- setInsertable(INSERTABLE_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE:
- setNullable(NULLABLE_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE:
- setTable(TABLE_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE:
- setUnique(UNIQUE_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE:
- setUpdatable(UPDATABLE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE:
- return INSERTABLE_EDEFAULT == null ? insertable != null : !INSERTABLE_EDEFAULT.equals(insertable);
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE:
- return NULLABLE_EDEFAULT == null ? nullable != null : !NULLABLE_EDEFAULT.equals(nullable);
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE:
- return TABLE_EDEFAULT == null ? table != null : !TABLE_EDEFAULT.equals(table);
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE:
- return UNIQUE_EDEFAULT == null ? unique != null : !UNIQUE_EDEFAULT.equals(unique);
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE:
- return UPDATABLE_EDEFAULT == null ? updatable != null : !UPDATABLE_EDEFAULT.equals(updatable);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseColumn.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE: return OrmPackage.XML_BASE_COLUMN__INSERTABLE;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE: return OrmPackage.XML_BASE_COLUMN__NULLABLE;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE: return OrmPackage.XML_BASE_COLUMN__TABLE;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE: return OrmPackage.XML_BASE_COLUMN__UNIQUE;
- case OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE: return OrmPackage.XML_BASE_COLUMN__UPDATABLE;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseColumn.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_BASE_COLUMN__INSERTABLE: return OrmPackage.ABSTRACT_XML_BASE_COLUMN__INSERTABLE;
- case OrmPackage.XML_BASE_COLUMN__NULLABLE: return OrmPackage.ABSTRACT_XML_BASE_COLUMN__NULLABLE;
- case OrmPackage.XML_BASE_COLUMN__TABLE: return OrmPackage.ABSTRACT_XML_BASE_COLUMN__TABLE;
- case OrmPackage.XML_BASE_COLUMN__UNIQUE: return OrmPackage.ABSTRACT_XML_BASE_COLUMN__UNIQUE;
- case OrmPackage.XML_BASE_COLUMN__UPDATABLE: return OrmPackage.ABSTRACT_XML_BASE_COLUMN__UPDATABLE;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (insertable: ");
- result.append(insertable);
- result.append(", nullable: ");
- result.append(nullable);
- result.append(", table: ");
- result.append(table);
- result.append(", unique: ");
- result.append(unique);
- result.append(", updatable: ");
- result.append(updatable);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getTableTextRange() {
- return getAttributeTextRange(JPA.TABLE);
- }
-
- // ********** translators **********
-
- protected static Translator buildUniqueTranslator() {
- return new BooleanTranslator(JPA.UNIQUE, OrmPackage.eINSTANCE.getXmlBaseColumn_Unique(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildNullableTranslator() {
- return new BooleanTranslator(JPA.NULLABLE, OrmPackage.eINSTANCE.getXmlBaseColumn_Nullable(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildInsertableTranslator() {
- return new BooleanTranslator(JPA.INSERTABLE, OrmPackage.eINSTANCE.getXmlBaseColumn_Insertable(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildUpdatableTranslator() {
- return new BooleanTranslator(JPA.UPDATABLE, OrmPackage.eINSTANCE.getXmlBaseColumn_Updatable(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildTableTranslator() {
- return new Translator(JPA.TABLE, OrmPackage.eINSTANCE.getXmlBaseColumn_Table(), Translator.DOM_ATTRIBUTE);
- }
-
- // ************ content assist ************
-
- private TextRange getTableCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.TABLE);
- }
-
- public boolean tableTouches(int pos) {
- TextRange textRange = this.getTableCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
-} // AbstractXmlAbstractColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseDiscriminatorColumn.java
deleted file mode 100644
index 613d87c8b8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlBaseDiscriminatorColumn.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Xml Discriminator Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlBaseDiscriminatorColumn()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlBaseDiscriminatorColumn extends AbstractXmlNamedColumn implements XmlBaseDiscriminatorColumn
-{
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final DiscriminatorType DISCRIMINATOR_TYPE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorType()
- * @generated
- * @ordered
- */
- protected DiscriminatorType discriminatorType = DISCRIMINATOR_TYPE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected static final Integer LENGTH_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected Integer length = LENGTH_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlBaseDiscriminatorColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Type</b></em>' attribute.
- * The default value is <code>"STRING"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Type</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @see #setDiscriminatorType(DiscriminatorType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn_DiscriminatorType()
- * @model default="STRING"
- * @generated
- */
- public DiscriminatorType getDiscriminatorType()
- {
- return discriminatorType;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Discriminator Type</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @see #getDiscriminatorType()
- * @generated
- */
- public void setDiscriminatorType(DiscriminatorType newDiscriminatorType)
- {
- DiscriminatorType oldDiscriminatorType = discriminatorType;
- discriminatorType = newDiscriminatorType == null ? DISCRIMINATOR_TYPE_EDEFAULT : newDiscriminatorType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE, oldDiscriminatorType, discriminatorType));
- }
-
- /**
- * Returns the value of the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Length</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Length</em>' attribute.
- * @see #setLength(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn_Length()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getLength()
- {
- return length;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn#getLength <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Length</em>' attribute.
- * @see #getLength()
- * @generated
- */
- public void setLength(Integer newLength)
- {
- Integer oldLength = length;
- length = newLength;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH, oldLength, length));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
- return getDiscriminatorType();
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH:
- return getLength();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
- setDiscriminatorType((DiscriminatorType)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH:
- setLength((Integer)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
- setDiscriminatorType(DISCRIMINATOR_TYPE_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH:
- setLength(LENGTH_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
- return discriminatorType != DISCRIMINATOR_TYPE_EDEFAULT;
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH:
- return LENGTH_EDEFAULT == null ? length != null : !LENGTH_EDEFAULT.equals(length);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseDiscriminatorColumn.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE: return OrmPackage.XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH: return OrmPackage.XML_BASE_DISCRIMINATOR_COLUMN__LENGTH;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseDiscriminatorColumn.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE: return OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case OrmPackage.XML_BASE_DISCRIMINATOR_COLUMN__LENGTH: return OrmPackage.ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (discriminatorType: ");
- result.append(discriminatorType);
- result.append(", length: ");
- result.append(length);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- protected static Translator buildDiscriminatorTypeTranslator() {
- return new Translator(JPA.DISCRIMINATOR_TYPE, OrmPackage.eINSTANCE.getXmlBaseDiscriminatorColumn_DiscriminatorType(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildLengthTranslator() {
- return new Translator(JPA.LENGTH, OrmPackage.eINSTANCE.getXmlBaseDiscriminatorColumn_Length(), Translator.DOM_ATTRIBUTE);
- }
-} // AbstractXmlDiscriminatorColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlEmbedded.java
deleted file mode 100644
index f464f8f385..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlEmbedded.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Base Xml Embedded</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlEmbedded()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlEmbedded extends AbstractXmlAttributeMapping implements XmlAttributeOverrideContainer
-{
- /**
- * The cached value of the '{@link #getAttributeOverrides() <em>Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAttributeOverride> attributeOverrides;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlEmbedded()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_EMBEDDED;
- }
-
- /**
- * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAttributeOverride> getAttributeOverrides() {
- if (attributeOverrides == null)
- {
- attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES);
- }
- return attributeOverrides;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
- return ((InternalEList<?>)getAttributeOverrides()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
- return getAttributeOverrides();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
- getAttributeOverrides().clear();
- getAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
- getAttributeOverrides().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
- return attributeOverrides != null && !attributeOverrides.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlAttributeOverrideContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlAttributeOverrideContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES: return OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
-
- // ********** translators **********
-
- protected static Translator buildAttributeOverrideTranslator() {
- return XmlAttributeOverride.buildTranslator(JPA.ATTRIBUTE_OVERRIDE, OrmPackage.eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlMultiRelationshipMapping.java
deleted file mode 100644
index 53a7fb2531..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlMultiRelationshipMapping.java
+++ /dev/null
@@ -1,1146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Multi Relationship Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey <em>Map Key</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlMultiRelationshipMapping extends AbstractXmlRelationshipMapping implements XmlMappedByMapping, XmlJoinTableContainer, XmlOrderable, XmlMultiRelationshipMapping_2_0
-{
- /**
- * The default value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected static final String MAPPED_BY_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected String mappedBy = MAPPED_BY_EDEFAULT;
- /**
- * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinTable()
- * @generated
- * @ordered
- */
- protected XmlJoinTable joinTable;
- /**
- * The cached value of the '{@link #getOrderColumn() <em>Order Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderColumn()
- * @generated
- * @ordered
- */
- protected XmlOrderColumn orderColumn;
- /**
- * The default value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected static final String ORDER_BY_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected String orderBy = ORDER_BY_EDEFAULT;
- /**
- * The cached value of the '{@link #getMapKeyAttributeOverrides() <em>Map Key Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAttributeOverride> mapKeyAttributeOverrides;
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final TemporalType MAP_KEY_TEMPORAL_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getMapKeyTemporal() <em>Map Key Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType mapKeyTemporal = MAP_KEY_TEMPORAL_EDEFAULT;
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final EnumType MAP_KEY_ENUMERATED_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getMapKeyEnumerated() <em>Map Key Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType mapKeyEnumerated = MAP_KEY_ENUMERATED_EDEFAULT;
- /**
- * The cached value of the '{@link #getMapKeyClass() <em>Map Key Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyClass()
- * @generated
- * @ordered
- */
- protected XmlClassReference mapKeyClass;
- /**
- * The cached value of the '{@link #getMapKeyColumn() <em>Map Key Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn mapKeyColumn;
- /**
- * The cached value of the '{@link #getMapKeyJoinColumns() <em>Map Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> mapKeyJoinColumns;
- /**
- * The cached value of the '{@link #getMapKey() <em>Map Key</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKey()
- * @generated
- * @ordered
- */
- protected MapKey mapKey;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlMultiRelationshipMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapped By</em>' attribute.
- * @see #setMappedBy(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedByMapping_MappedBy()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getMappedBy()
- {
- return mappedBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMappedBy <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Mapped By</em>' attribute.
- * @see #getMappedBy()
- * @generated
- */
- public void setMappedBy(String newMappedBy)
- {
- String oldMappedBy = mappedBy;
- mappedBy = newMappedBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY, oldMappedBy, mappedBy));
- }
-
- /**
- * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Table</em>' containment reference.
- * @see #setJoinTable(XmlJoinTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer_JoinTable()
- * @model containment="true"
- * @generated
- */
- public XmlJoinTable getJoinTable()
- {
- return joinTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetJoinTable(XmlJoinTable newJoinTable, NotificationChain msgs)
- {
- XmlJoinTable oldJoinTable = joinTable;
- joinTable = newJoinTable;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, oldJoinTable, newJoinTable);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getJoinTable <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Join Table</em>' containment reference.
- * @see #getJoinTable()
- * @generated
- */
- public void setJoinTable(XmlJoinTable newJoinTable)
- {
- if (newJoinTable != joinTable)
- {
- NotificationChain msgs = null;
- if (joinTable != null)
- msgs = ((InternalEObject)joinTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
- if (newJoinTable != null)
- msgs = ((InternalEObject)newJoinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
- msgs = basicSetJoinTable(newJoinTable, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, newJoinTable, newJoinTable));
- }
-
- /**
- * Returns the value of the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order Column</em>' containment reference.
- * @see #setOrderColumn(XmlOrderColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable_2_0_OrderColumn()
- * @model containment="true"
- * @generated
- */
- public XmlOrderColumn getOrderColumn()
- {
- return orderColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetOrderColumn(XmlOrderColumn newOrderColumn, NotificationChain msgs)
- {
- XmlOrderColumn oldOrderColumn = orderColumn;
- orderColumn = newOrderColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, oldOrderColumn, newOrderColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getOrderColumn <em>Order Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order Column</em>' containment reference.
- * @see #getOrderColumn()
- * @generated
- */
- public void setOrderColumn(XmlOrderColumn newOrderColumn)
- {
- if (newOrderColumn != orderColumn)
- {
- NotificationChain msgs = null;
- if (orderColumn != null)
- msgs = ((InternalEObject)orderColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, null, msgs);
- if (newOrderColumn != null)
- msgs = ((InternalEObject)newOrderColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, null, msgs);
- msgs = basicSetOrderColumn(newOrderColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, newOrderColumn, newOrderColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order By</em>' attribute.
- * @see #setOrderBy(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable_OrderBy()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getOrderBy() {
- return orderBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getOrderBy <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order By</em>' attribute.
- * @see #getOrderBy()
- * @generated
- */
- public void setOrderBy(String newOrderBy) {
- String oldOrderBy = orderBy;
- orderBy = newOrderBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY, oldOrderBy, orderBy));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAttributeOverride> getMapKeyAttributeOverrides()
- {
- if (mapKeyAttributeOverrides == null)
- {
- mapKeyAttributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES);
- }
- return mapKeyAttributeOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Class</em>' containment reference.
- * @see #setMapKeyClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyClass()
- * @model containment="true"
- * @generated
- */
- public XmlClassReference getMapKeyClass()
- {
- return mapKeyClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMapKeyClass(XmlClassReference newMapKeyClass, NotificationChain msgs)
- {
- XmlClassReference oldMapKeyClass = mapKeyClass;
- mapKeyClass = newMapKeyClass;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, oldMapKeyClass, newMapKeyClass);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyClass <em>Map Key Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Class</em>' containment reference.
- * @see #getMapKeyClass()
- * @generated
- */
- public void setMapKeyClass(XmlClassReference newMapKeyClass)
- {
- if (newMapKeyClass != mapKeyClass)
- {
- NotificationChain msgs = null;
- if (mapKeyClass != null)
- msgs = ((InternalEObject)mapKeyClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, null, msgs);
- if (newMapKeyClass != null)
- msgs = ((InternalEObject)newMapKeyClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, null, msgs);
- msgs = basicSetMapKeyClass(newMapKeyClass, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, newMapKeyClass, newMapKeyClass));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setMapKeyTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal()
- * @model
- * @generated
- */
- public TemporalType getMapKeyTemporal()
- {
- return mapKeyTemporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getMapKeyTemporal()
- * @generated
- */
- public void setMapKeyTemporal(TemporalType newMapKeyTemporal)
- {
- TemporalType oldMapKeyTemporal = mapKeyTemporal;
- mapKeyTemporal = newMapKeyTemporal == null ? MAP_KEY_TEMPORAL_EDEFAULT : newMapKeyTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL, oldMapKeyTemporal, mapKeyTemporal));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setMapKeyEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated()
- * @model
- * @generated
- */
- public EnumType getMapKeyEnumerated()
- {
- return mapKeyEnumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getMapKeyEnumerated()
- * @generated
- */
- public void setMapKeyEnumerated(EnumType newMapKeyEnumerated)
- {
- EnumType oldMapKeyEnumerated = mapKeyEnumerated;
- mapKeyEnumerated = newMapKeyEnumerated == null ? MAP_KEY_ENUMERATED_EDEFAULT : newMapKeyEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED, oldMapKeyEnumerated, mapKeyEnumerated));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Column</em>' containment reference.
- * @see #setMapKeyColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyColumn()
- * @model containment="true"
- * @generated
- */
- public XmlColumn getMapKeyColumn()
- {
- return mapKeyColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMapKeyColumn(XmlColumn newMapKeyColumn, NotificationChain msgs)
- {
- XmlColumn oldMapKeyColumn = mapKeyColumn;
- mapKeyColumn = newMapKeyColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, oldMapKeyColumn, newMapKeyColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Column</em>' containment reference.
- * @see #getMapKeyColumn()
- * @generated
- */
- public void setMapKeyColumn(XmlColumn newMapKeyColumn)
- {
- if (newMapKeyColumn != mapKeyColumn)
- {
- NotificationChain msgs = null;
- if (mapKeyColumn != null)
- msgs = ((InternalEObject)mapKeyColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, null, msgs);
- if (newMapKeyColumn != null)
- msgs = ((InternalEObject)newMapKeyColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, null, msgs);
- msgs = basicSetMapKeyColumn(newMapKeyColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, newMapKeyColumn, newMapKeyColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getMapKeyJoinColumns()
- {
- if (mapKeyJoinColumns == null)
- {
- mapKeyJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS);
- }
- return mapKeyJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key</em>' containment reference.
- * @see #setMapKey(MapKey)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping_MapKey()
- * @model containment="true"
- * @generated
- */
- public MapKey getMapKey() {
- return mapKey;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMapKey(MapKey newMapKey, NotificationChain msgs)
- {
- MapKey oldMapKey = mapKey;
- mapKey = newMapKey;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, oldMapKey, newMapKey);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey <em>Map Key</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key</em>' containment reference.
- * @see #getMapKey()
- * @generated
- */
- public void setMapKey(MapKey newMapKey) {
- if (newMapKey != mapKey)
- {
- NotificationChain msgs = null;
- if (mapKey != null)
- msgs = ((InternalEObject)mapKey).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, null, msgs);
- if (newMapKey != null)
- msgs = ((InternalEObject)newMapKey).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, null, msgs);
- msgs = basicSetMapKey(newMapKey, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, newMapKey, newMapKey));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
- return basicSetJoinTable(null, msgs);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
- return basicSetOrderColumn(null, msgs);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
- return ((InternalEList<?>)getMapKeyAttributeOverrides()).basicRemove(otherEnd, msgs);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
- return basicSetMapKeyClass(null, msgs);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
- return basicSetMapKeyColumn(null, msgs);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
- return ((InternalEList<?>)getMapKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
- return basicSetMapKey(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
- return getMappedBy();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
- return getJoinTable();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
- return getOrderColumn();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
- return getOrderBy();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
- return getMapKeyAttributeOverrides();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
- return getMapKeyTemporal();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
- return getMapKeyEnumerated();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
- return getMapKeyClass();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
- return getMapKeyColumn();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
- return getMapKeyJoinColumns();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
- return getMapKey();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
- setMappedBy((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
- setJoinTable((XmlJoinTable)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
- setOrderColumn((XmlOrderColumn)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
- setOrderBy((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
- getMapKeyAttributeOverrides().clear();
- getMapKeyAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
- setMapKeyTemporal((TemporalType)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
- setMapKeyEnumerated((EnumType)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
- setMapKeyClass((XmlClassReference)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
- setMapKeyColumn((XmlColumn)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
- getMapKeyJoinColumns().clear();
- getMapKeyJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
- setMapKey((MapKey)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
- setMappedBy(MAPPED_BY_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
- setJoinTable((XmlJoinTable)null);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
- setOrderColumn((XmlOrderColumn)null);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
- setOrderBy(ORDER_BY_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
- getMapKeyAttributeOverrides().clear();
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
- setMapKeyTemporal(MAP_KEY_TEMPORAL_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
- setMapKeyEnumerated(MAP_KEY_ENUMERATED_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
- setMapKeyClass((XmlClassReference)null);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
- setMapKeyColumn((XmlColumn)null);
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
- getMapKeyJoinColumns().clear();
- return;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
- setMapKey((MapKey)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
- return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
- return joinTable != null;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
- return orderColumn != null;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
- return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
- return mapKeyAttributeOverrides != null && !mapKeyAttributeOverrides.isEmpty();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
- return mapKeyTemporal != MAP_KEY_TEMPORAL_EDEFAULT;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
- return mapKeyEnumerated != MAP_KEY_ENUMERATED_EDEFAULT;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
- return mapKeyClass != null;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
- return mapKeyColumn != null;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
- return mapKeyJoinColumns != null && !mapKeyJoinColumns.isEmpty();
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
- return mapKey != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlMappedByMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY: return OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlJoinTableContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE: return OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN: return OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY: return OrmPackage.XML_ORDERABLE__ORDER_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyConvertibleMapping_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL: return OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED: return OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlMultiRelationshipMapping_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN;
- case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlMappedByMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlJoinTableContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ORDERABLE__ORDER_BY: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyConvertibleMapping_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL;
- case OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlMultiRelationshipMapping_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS;
- case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN;
- case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (mappedBy: ");
- result.append(mappedBy);
- result.append(", orderBy: ");
- result.append(orderBy);
- result.append(", mapKeyTemporal: ");
- result.append(mapKeyTemporal);
- result.append(", mapKeyEnumerated: ");
- result.append(mapKeyEnumerated);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getMappedByTextRange() {
- return getAttributeTextRange(JPA.MAPPED_BY);
- }
-
- public TextRange getMapKeyEnumeratedTextRange() {
- return getAttributeTextRange(JPA2_0.MAP_KEY_ENUMERATED);
- }
-
- public TextRange getMapKeyTemporalTextRange() {
- return getAttributeTextRange(JPA2_0.MAP_KEY_TEMPORAL);
- }
-
- public TextRange getMapKeyClassTextRange() {
- return getElementTextRange(JPA2_0.MAP_KEY_CLASS);
- }
-
- // ********** refactoring **********
-
- public ReplaceEdit createRenameMapKeyClassEdit(IType originalType, String newName) {
- return getMapKeyClass().createRenameEdit(originalType, newName);
- }
-
- public ReplaceEdit createRenameMapKeyClassPackageEdit(String newName) {
- return getMapKeyClass().createRenamePackageEdit(newName);
- }
-
-
- // ********** translators **********
-
- protected static Translator buildOrderByTranslator() {
- return new Translator(JPA.ORDER_BY, OrmPackage.eINSTANCE.getXmlOrderable_OrderBy());
- }
-
- protected static Translator buildMapKeyTranslator() {
- return MapKey.buildTranslator(JPA.MAP_KEY, OrmPackage.eINSTANCE.getAbstractXmlMultiRelationshipMapping_MapKey());
- }
-
- protected static Translator buildMapKeyTemporalTranslator() {
- return new Translator(JPA2_0.MAP_KEY_TEMPORAL, OrmV2_0Package.eINSTANCE.getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal());
- }
-
- protected static Translator buildMapKeyEnumeratedTranslator() {
- return new Translator(JPA2_0.MAP_KEY_ENUMERATED, OrmV2_0Package.eINSTANCE.getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated());
- }
-
- protected static Translator buildMapKeyClassTranslator() {
- return XmlClassReference.buildTranslator(JPA2_0.MAP_KEY_CLASS, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyClass());
- }
-
- protected static Translator buildMapKeyColumnTranslator() {
- return XmlColumn.buildTranslator(JPA2_0.MAP_KEY_COLUMN, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyColumn());
- }
-
- protected static Translator buildMapKeyJoinColumnTranslator() {
- return XmlJoinColumn.buildTranslator(JPA2_0.MAP_KEY_JOIN_COLUMN, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns());
- }
-
- protected static Translator buildMappedByTranslator() {
- return new Translator(JPA.MAPPED_BY, OrmPackage.eINSTANCE.getXmlMappedByMapping_MappedBy(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildMapKeyAttributeOverrideTranslator() {
- return XmlAttributeOverride.buildTranslator(JPA2_0.MAP_KEY_ATTRIBUTE_OVERRIDE, OrmV2_0Package.eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides());
- }
-
- protected static Translator buildJoinTableTranslator() {
- return XmlJoinTable.buildTranslator(JPA.JOIN_TABLE, OrmPackage.eINSTANCE.getXmlJoinTableContainer_JoinTable());
- }
-
- protected static Translator buildOrderColumnTranslator() {
- return XmlOrderColumn.buildTranslator(JPA2_0.ORDER_COLUMN, OrmV2_0Package.eINSTANCE.getXmlOrderable_2_0_OrderColumn());
- }
-
- // ********** content assist ***************
-
- public TextRange getMappedByCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.MAPPED_BY);
- }
-
- public TextRange getMapKeyNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.MAP_KEY);
- }
-
- public boolean mappedByTouches(int pos) {
- TextRange textRange = this.getMappedByCodeAssistTextRange();
- return (textRange!= null) && textRange.touches(pos);
- }
-
- public boolean mapKeyNameTouches(int pos) {
- TextRange textRange = this.getMapKeyNameCodeAssistTextRange();
- return (textRange != null) && textRange.touches(pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlNamedColumn.java
deleted file mode 100644
index 961b31aaaa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlNamedColumn.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Xml Named Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlNamedColumn extends AbstractJpaEObject implements XmlNamedColumn
-{
- /**
- * The default value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinition()
- * @generated
- * @ordered
- */
- protected static final String COLUMN_DEFINITION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinition()
- * @generated
- * @ordered
- */
- protected String columnDefinition = COLUMN_DEFINITION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlNamedColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_NAMED_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Definition</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Definition</em>' attribute.
- * @see #setColumnDefinition(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn_ColumnDefinition()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getColumnDefinition()
- {
- return columnDefinition;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn#getColumnDefinition <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column Definition</em>' attribute.
- * @see #getColumnDefinition()
- * @generated
- */
- public void setColumnDefinition(String newColumnDefinition)
- {
- String oldColumnDefinition = columnDefinition;
- columnDefinition = newColumnDefinition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION, oldColumnDefinition, columnDefinition));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
- return getColumnDefinition();
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
- setColumnDefinition((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
- setColumnDefinition(COLUMN_DEFINITION_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
- return COLUMN_DEFINITION_EDEFAULT == null ? columnDefinition != null : !COLUMN_DEFINITION_EDEFAULT.equals(columnDefinition);
- case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (columnDefinition: ");
- result.append(columnDefinition);
- result.append(", name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
- // ********** translators **********
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlNamedColumn_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildColumnDefinitionTranslator() {
- return new Translator(JPA.COLUMN_DEFINITION, OrmPackage.eINSTANCE.getXmlNamedColumn_ColumnDefinition(), Translator.DOM_ATTRIBUTE);
- }
-
- // *********** content assist ***********
-
- public TextRange getColumnNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.NAME);
- }
-
- public boolean columnNameTouches(int pos) {
- TextRange textRange = this.getColumnNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
-} // AbstractXmlNamedColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlReferenceTable.java
deleted file mode 100644
index a79e9d9222..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlReferenceTable.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Xml Reference Table</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlReferenceTable()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlReferenceTable extends AbstractXmlTable implements XmlReferenceTable
-{
- /**
- * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> joinColumns;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlReferenceTable()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_REFERENCE_TABLE;
- }
-
- /**
- * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlReferenceTable_JoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getJoinColumns()
- {
- if (joinColumns == null)
- {
- joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS);
- }
- return joinColumns;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
- return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
- return getJoinColumns();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
- getJoinColumns().clear();
- getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
- getJoinColumns().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
- return joinColumns != null && !joinColumns.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlReferenceTable.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS: return OrmPackage.XML_REFERENCE_TABLE__JOIN_COLUMNS;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlReferenceTable.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_REFERENCE_TABLE__JOIN_COLUMNS: return OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
-
- // ********** translators **********
-
- protected static Translator buildJoinColumnTranslator() {
- return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlReferenceTable_JoinColumns());
- }
-
-} // AbstractXmlReferenceTable
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlRelationshipMapping.java
deleted file mode 100644
index c7e73f0765..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlRelationshipMapping.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Relationship Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity <em>Target Entity</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getFetch <em>Fetch</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getCascade <em>Cascade</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlRelationshipMapping extends AbstractXmlAttributeMapping
-{
- /**
- * The default value of the '{@link #getTargetEntity() <em>Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTargetEntity()
- * @generated
- * @ordered
- */
- protected static final String TARGET_ENTITY_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getTargetEntity() <em>Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTargetEntity()
- * @generated
- * @ordered
- */
- protected String targetEntity = TARGET_ENTITY_EDEFAULT;
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final FetchType FETCH_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected FetchType fetch = FETCH_EDEFAULT;
- /**
- * The cached value of the '{@link #getCascade() <em>Cascade</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCascade()
- * @generated
- * @ordered
- */
- protected CascadeType cascade;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlRelationshipMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_RELATIONSHIP_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Target Entity</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Target Entity</em>' attribute.
- * @see #setTargetEntity(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping_TargetEntity()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getTargetEntity() {
- return targetEntity;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity <em>Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Target Entity</em>' attribute.
- * @see #getTargetEntity()
- * @generated
- */
- public void setTargetEntity(String newTargetEntity) {
- String oldTargetEntity = targetEntity;
- targetEntity = newTargetEntity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY, oldTargetEntity, targetEntity));
- }
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The default value is <code>"LAZY"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.FetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #setFetch(FetchType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping_Fetch()
- * @model default="LAZY"
- * @generated
- */
- public FetchType getFetch() {
- return fetch;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #getFetch()
- * @generated
- */
- public void setFetch(FetchType newFetch) {
- FetchType oldFetch = fetch;
- fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH, oldFetch, fetch));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade</em>' containment reference.
- * @see #setCascade(CascadeType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping_Cascade()
- * @model containment="true"
- * @generated
- */
- public CascadeType getCascade() {
- return cascade;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetCascade(CascadeType newCascade, NotificationChain msgs)
- {
- CascadeType oldCascade = cascade;
- cascade = newCascade;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, oldCascade, newCascade);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getCascade <em>Cascade</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade</em>' containment reference.
- * @see #getCascade()
- * @generated
- */
- public void setCascade(CascadeType newCascade) {
- if (newCascade != cascade)
- {
- NotificationChain msgs = null;
- if (cascade != null)
- msgs = ((InternalEObject)cascade).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, null, msgs);
- if (newCascade != null)
- msgs = ((InternalEObject)newCascade).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, null, msgs);
- msgs = basicSetCascade(newCascade, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, newCascade, newCascade));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
- return basicSetCascade(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
- return getTargetEntity();
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
- return getFetch();
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
- return getCascade();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
- setTargetEntity((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
- setFetch((FetchType)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
- setCascade((CascadeType)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
- setTargetEntity(TARGET_ENTITY_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
- setFetch(FETCH_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
- setCascade((CascadeType)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
- return TARGET_ENTITY_EDEFAULT == null ? targetEntity != null : !TARGET_ENTITY_EDEFAULT.equals(targetEntity);
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
- return fetch != FETCH_EDEFAULT;
- case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
- return cascade != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (targetEntity: ");
- result.append(targetEntity);
- result.append(", fetch: ");
- result.append(fetch);
- result.append(')');
- return result.toString();
- }
-
- /**
- * Return the {@link TextRange} for the target-entity attribute.
- */
-
- public TextRange getTargetEntityTextRange() {
- return getAttributeTextRange(JPA.TARGET_ENTITY);
- }
-
-
- // ********** translators **********
-
- protected static Translator buildTargetEntityTranslator() {
- return new Translator(JPA.TARGET_ENTITY, OrmPackage.eINSTANCE.getAbstractXmlRelationshipMapping_TargetEntity(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildFetchTranslator() {
- return new Translator(JPA.FETCH, OrmPackage.eINSTANCE.getAbstractXmlRelationshipMapping_Fetch(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildCascadeTranslator() {
- return CascadeType.buildTranslator(JPA.CASCADE, OrmPackage.eINSTANCE.getAbstractXmlRelationshipMapping_Cascade());
- }
-
-
- // ********** refactoring **********
-
- public ReplaceEdit createRenameTargetEntityEdit(IType originalType, String newName) {
- String originalName = originalType.getElementName();
- int nameIndex = this.targetEntity.lastIndexOf(originalName);
- int offset = getAttributeNode(JPA.TARGET_ENTITY).getValueRegionStartOffset() + 1;
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenameTargetEntityPackageEdit(String newPackageName) {
- int packageLength = this.targetEntity.lastIndexOf('.');
- if (newPackageName == "") {//$NON-NLS-1$
- //moving to the default package, remove the '.'
- packageLength++;
- }
- if (packageLength == -1) {
- //moving from the default package or unspecified package
- packageLength = 0;
- newPackageName = newPackageName + '.';
- }
- int offset = getAttributeNode(JPA.TARGET_ENTITY).getValueRegionStartOffset() + 1; // +1 = opening double quote
- return new ReplaceEdit(offset, packageLength, newPackageName);
- }
-
-} // RelationshipMapping
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlSingleRelationshipMapping.java
deleted file mode 100644
index 6ddc04736a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlSingleRelationshipMapping.java
+++ /dev/null
@@ -1,614 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Single Relationship Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional <em>Optional</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlSingleRelationshipMapping extends AbstractXmlRelationshipMapping implements XmlJoinTableContainer, XmlJoinColumnContainer, XmlSingleRelationshipMapping_2_0
-{
- /**
- * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinTable()
- * @generated
- * @ordered
- */
- protected XmlJoinTable joinTable;
- /**
- * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> joinColumns;
- /**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected static final Boolean ID_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected Boolean id = ID_EDEFAULT;
- /**
- * The default value of the '{@link #getMapsId() <em>Maps Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapsId()
- * @generated
- * @ordered
- */
- protected static final String MAPS_ID_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getMapsId() <em>Maps Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapsId()
- * @generated
- * @ordered
- */
- protected String mapsId = MAPS_ID_EDEFAULT;
- /**
- * The default value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected static final Boolean OPTIONAL_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected Boolean optional = OPTIONAL_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlSingleRelationshipMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Table</em>' containment reference.
- * @see #setJoinTable(XmlJoinTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer_JoinTable()
- * @model containment="true"
- * @generated
- */
- public XmlJoinTable getJoinTable()
- {
- return joinTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetJoinTable(XmlJoinTable newJoinTable, NotificationChain msgs)
- {
- XmlJoinTable oldJoinTable = joinTable;
- joinTable = newJoinTable;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, oldJoinTable, newJoinTable);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getJoinTable <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Join Table</em>' containment reference.
- * @see #getJoinTable()
- * @generated
- */
- public void setJoinTable(XmlJoinTable newJoinTable)
- {
- if (newJoinTable != joinTable)
- {
- NotificationChain msgs = null;
- if (joinTable != null)
- msgs = ((InternalEObject)joinTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
- if (newJoinTable != null)
- msgs = ((InternalEObject)newJoinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
- msgs = basicSetJoinTable(newJoinTable, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, newJoinTable, newJoinTable));
- }
-
- /**
- * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer_JoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getJoinColumns()
- {
- if (joinColumns == null)
- {
- joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS);
- }
- return joinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlDerivedId_2_0_Id()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getId()
- {
- return id;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- public void setId(Boolean newId)
- {
- Boolean oldId = id;
- id = newId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID, oldId, id));
- }
-
- /**
- * Returns the value of the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Maps Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Maps Id</em>' attribute.
- * @see #setMapsId(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapsId_2_0_MapsId()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getMapsId()
- {
- return mapsId;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getMapsId <em>Maps Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Maps Id</em>' attribute.
- * @see #getMapsId()
- * @generated
- */
- public void setMapsId(String newMapsId)
- {
- String oldMapsId = mapsId;
- mapsId = newMapsId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID, oldMapsId, mapsId));
- }
-
- /**
- * Returns the value of the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Optional</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Optional</em>' attribute.
- * @see #setOptional(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping_Optional()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getOptional() {
- return optional;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Optional</em>' attribute.
- * @see #getOptional()
- * @generated
- */
- public void setOptional(Boolean newOptional) {
- Boolean oldOptional = optional;
- optional = newOptional;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL, oldOptional, optional));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
- return basicSetJoinTable(null, msgs);
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
- return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
- return getJoinTable();
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
- return getJoinColumns();
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
- return getId();
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
- return getMapsId();
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
- return getOptional();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
- setJoinTable((XmlJoinTable)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
- getJoinColumns().clear();
- getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
- setId((Boolean)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
- setMapsId((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
- setOptional((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
- setJoinTable((XmlJoinTable)null);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
- getJoinColumns().clear();
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
- setId(ID_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
- setMapsId(MAPS_ID_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
- setOptional(OPTIONAL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
- return joinTable != null;
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
- return joinColumns != null && !joinColumns.isEmpty();
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
- return MAPS_ID_EDEFAULT == null ? mapsId != null : !MAPS_ID_EDEFAULT.equals(mapsId);
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
- return OPTIONAL_EDEFAULT == null ? optional != null : !OPTIONAL_EDEFAULT.equals(optional);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlJoinTableContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE: return OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlJoinColumnContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS: return OrmPackage.XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlDerivedId_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID: return OrmV2_0Package.XML_DERIVED_ID_20__ID;
- default: return -1;
- }
- }
- if (baseClass == XmlMapsId_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID: return OrmV2_0Package.XML_MAPS_ID_20__MAPS_ID;
- default: return -1;
- }
- }
- if (baseClass == XmlSingleRelationshipMapping_2_0.class)
- {
- switch (derivedFeatureID)
- {
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlJoinTableContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlJoinColumnContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlDerivedId_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_DERIVED_ID_20__ID: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID;
- default: return -1;
- }
- }
- if (baseClass == XmlMapsId_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_MAPS_ID_20__MAPS_ID: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID;
- default: return -1;
- }
- }
- if (baseClass == XmlSingleRelationshipMapping_2_0.class)
- {
- switch (baseFeatureID)
- {
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (id: ");
- result.append(id);
- result.append(", mapsId: ");
- result.append(mapsId);
- result.append(", optional: ");
- result.append(optional);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** validation ***********
-
- public TextRange getMapsIdTextRange() {
- return getAttributeTextRange(JPA2_0.MAPS_ID);
- }
-
- public TextRange getIdTextRange() {
- return getAttributeTextRange(JPA2_0.ID);
- }
-
-
- // ********** translators **********
-
- protected static Translator buildOptionalTranslator() {
- return new Translator(JPA.OPTIONAL, OrmPackage.eINSTANCE.getAbstractXmlSingleRelationshipMapping_Optional(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildMapsIdTranslator() {
- return new Translator(JPA2_0.MAPS_ID, OrmV2_0Package.eINSTANCE.getXmlMapsId_2_0_MapsId(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildIdTranslator() {
- return new Translator(JPA2_0.ID, OrmV2_0Package.eINSTANCE.getXmlDerivedId_2_0_Id(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildJoinColumnTranslator() {
- return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinColumnContainer_JoinColumns());
- }
-
- protected static Translator buildJoinTableTranslator() {
- return XmlJoinTable.buildTranslator(JPA.JOIN_TABLE, OrmPackage.eINSTANCE.getXmlJoinTableContainer_JoinTable());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTable.java
deleted file mode 100644
index f28ddccf69..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTable.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Xml Base Table</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getCatalog <em>Catalog</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getSchema <em>Schema</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getUniqueConstraints <em>Unique Constraints</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable()
- * @model kind="class" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public abstract class AbstractXmlTable extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected String catalog = CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected String schema = SCHEMA_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getUniqueConstraints() <em>Unique Constraints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUniqueConstraints()
- * @generated
- * @ordered
- */
- protected EList<XmlUniqueConstraint> uniqueConstraints;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlTable()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_TABLE;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TABLE__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see #setCatalog(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable_Catalog()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getCatalog()
- {
- return catalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getCatalog <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Catalog</em>' attribute.
- * @see #getCatalog()
- * @generated
- */
- public void setCatalog(String newCatalog)
- {
- String oldCatalog = catalog;
- catalog = newCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TABLE__CATALOG, oldCatalog, catalog));
- }
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see #setSchema(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable_Schema()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getSchema()
- {
- return schema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getSchema <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema</em>' attribute.
- * @see #getSchema()
- * @generated
- */
- public void setSchema(String newSchema)
- {
- String oldSchema = schema;
- schema = newSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TABLE__SCHEMA, oldSchema, schema));
- }
-
- /**
- * Returns the value of the '<em><b>Unique Constraints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique Constraints</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Unique Constraints</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable_UniqueConstraints()
- * @model containment="true"
- * @generated
- */
- public EList<XmlUniqueConstraint> getUniqueConstraints()
- {
- if (uniqueConstraints == null)
- {
- uniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS);
- }
- return uniqueConstraints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
- return ((InternalEList<?>)getUniqueConstraints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TABLE__NAME:
- return getName();
- case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
- return getCatalog();
- case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
- return getSchema();
- case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
- return getUniqueConstraints();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TABLE__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
- setCatalog((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
- setSchema((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
- getUniqueConstraints().clear();
- getUniqueConstraints().addAll((Collection<? extends XmlUniqueConstraint>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TABLE__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
- setCatalog(CATALOG_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
- setSchema(SCHEMA_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
- getUniqueConstraints().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TABLE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
- return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
- case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
- return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
- case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
- return uniqueConstraints != null && !uniqueConstraints.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", catalog: ");
- result.append(catalog);
- result.append(", schema: ");
- result.append(schema);
- result.append(')');
- return result.toString();
- }
-
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
- public TextRange getCatalogTextRange() {
- return getAttributeTextRange(JPA.CATALOG);
- }
-
- public TextRange getSchemaTextRange() {
- return getAttributeTextRange(JPA.SCHEMA);
- }
-
- // ********** translators **********
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getAbstractXmlTable_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildCatalogTranslator() {
- return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getAbstractXmlTable_Catalog(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildSchemaTranslator() {
- return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getAbstractXmlTable_Schema(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildUniqueConstraintTranslator() {
- return XmlUniqueConstraint.buildTranslator(JPA.UNIQUE_CONSTRAINT, OrmPackage.eINSTANCE.getAbstractXmlTable_UniqueConstraints());
- }
-
- //***************** content assist ****************
-
- public TextRange getNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.NAME);
- }
-
- public TextRange getSchemaCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.SCHEMA);
- }
-
- public TextRange getCatalogCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.CATALOG);
- }
-
- public boolean nameTouches(int pos) {
- TextRange textRange = this.getNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean schemaTouches(int pos) {
- TextRange textRange = this.getSchemaCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean catalogTouches(int pos) {
- TextRange textRange = this.getCatalogCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-} // AbstractXmlBaseTable
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTypeMapping.java
deleted file mode 100644
index fb759529b2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AbstractXmlTypeMapping.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Type Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTypeMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractXmlTypeMapping extends AbstractJpaEObject implements XmlTypeMapping
-{
-
- /**
- * The default value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected static final String ACCESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected String access = ACCESS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClassName()
- * @generated
- * @ordered
- */
- protected static final String CLASS_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClassName()
- * @generated
- * @ordered
- */
- protected String className = CLASS_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getMetadataComplete() <em>Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMetadataComplete()
- * @generated
- * @ordered
- */
- protected static final Boolean METADATA_COMPLETE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getMetadataComplete() <em>Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMetadataComplete()
- * @generated
- * @ordered
- */
- protected Boolean metadataComplete = METADATA_COMPLETE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAttributes()
- * @generated
- * @ordered
- */
- protected Attributes attributes;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractXmlTypeMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ABSTRACT_XML_TYPE_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Class Name</em>' attribute.
- * @see #setClassName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_ClassName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getClassName()
- {
- return className;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping#getClassName <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Class Name</em>' attribute.
- * @see #getClassName()
- * @generated
- */
- public void setClassName(String newClassName)
- {
- String oldClassName = className;
- className = newClassName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME, oldClassName, className));
- }
-
- /**
- * Returns the value of the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Access</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Access</em>' attribute.
- * @see #setAccess(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getAccess()
- {
- return access;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping#getAccess <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Access</em>' attribute.
- * @see #getAccess()
- * @generated
- */
- public void setAccess(String newAccess)
- {
- String oldAccess = access;
- access = newAccess;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS, oldAccess, access));
- }
-
- /**
- * Returns the value of the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Metadata Complete</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Metadata Complete</em>' attribute.
- * @see #setMetadataComplete(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_MetadataComplete()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getMetadataComplete()
- {
- return metadataComplete;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Metadata Complete</em>' attribute.
- * @see #getMetadataComplete()
- * @generated
- */
- public void setMetadataComplete(Boolean newMetadataComplete)
- {
- Boolean oldMetadataComplete = metadataComplete;
- metadataComplete = newMetadataComplete;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE, oldMetadataComplete, metadataComplete));
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attributes</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attributes</em>' containment reference.
- * @see #setAttributes(Attributes)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_Attributes()
- * @model containment="true"
- * @generated
- */
- public Attributes getAttributes()
- {
- return attributes;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetAttributes(Attributes newAttributes, NotificationChain msgs)
- {
- Attributes oldAttributes = attributes;
- attributes = newAttributes;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, oldAttributes, newAttributes);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping#getAttributes <em>Attributes</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Attributes</em>' containment reference.
- * @see #getAttributes()
- * @generated
- */
- public void setAttributes(Attributes newAttributes)
- {
- if (newAttributes != attributes)
- {
- NotificationChain msgs = null;
- if (attributes != null)
- msgs = ((InternalEObject)attributes).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, null, msgs);
- if (newAttributes != null)
- msgs = ((InternalEObject)newAttributes).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, null, msgs);
- msgs = basicSetAttributes(newAttributes, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, newAttributes, newAttributes));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
- return basicSetAttributes(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
- return getAccess();
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
- return getClassName();
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
- return getMetadataComplete();
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
- return getDescription();
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
- return getAttributes();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
- setAccess((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
- setClassName((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
- setMetadataComplete((Boolean)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
- setAttributes((Attributes)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
- setAccess(ACCESS_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
- setClassName(CLASS_NAME_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
- setMetadataComplete(METADATA_COMPLETE_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
- setAttributes((Attributes)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
- return ACCESS_EDEFAULT == null ? access != null : !ACCESS_EDEFAULT.equals(access);
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
- return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
- return METADATA_COMPLETE_EDEFAULT == null ? metadataComplete != null : !METADATA_COMPLETE_EDEFAULT.equals(metadataComplete);
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
- return attributes != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (access: ");
- result.append(access);
- result.append(", className: ");
- result.append(className);
- result.append(", metadataComplete: ");
- result.append(metadataComplete);
- result.append(", description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-
- public TextRange getClassTextRange() {
- return getAttributeTextRange(JPA.CLASS);
- }
-
- public TextRange getAttributesTextRange() {
- return getAttributeTextRange(JPA.ATTRIBUTES);
- }
-
- public TextRange getNameTextRange(){
- return getAttributeTextRange(JPA.NAME);
- }
-
- // ********** translators **********
-
- protected static Translator buildClassTranslator() {
- return new Translator(JPA.CLASS, OrmPackage.eINSTANCE.getXmlTypeMapping_ClassName(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildMetadataCompleteTranslator() {
- return new Translator(JPA.METADATA_COMPLETE, OrmPackage.eINSTANCE.getXmlTypeMapping_MetadataComplete(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmPackage.eINSTANCE.getXmlTypeMapping_Description());
- }
-
- protected static Translator buildAttributesTranslator() {
- return Attributes.buildTranslator();
- }
-
- protected static Translator buildAccessTranslator() {
- return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access(), Translator.DOM_ATTRIBUTE);
- }
-
-
- // ********** refactoring **********
-
- public ReplaceEdit createRenameTypeEdit(IType originalType, String newName) {
- String originalName = originalType.getTypeQualifiedName();
- int nameIndex = this.className.lastIndexOf(originalName);
- int offset = getAttributeNode(JPA.CLASS).getValueRegionStartOffset() + 1; // +1 = opening double quote
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenamePackageEdit(String newPackageName) {
- int packageLength = this.className.lastIndexOf('.');
- if (newPackageName == "") {//$NON-NLS-1$
- //moving to the default package, remove the '.'
- packageLength++;
- }
- if (packageLength == -1) {
- //moving from the default package or unspecified package
- packageLength = 0;
- newPackageName = newPackageName + '.';
- }
- int offset = getAttributeNode(JPA.CLASS).getValueRegionStartOffset() + 1; // +1 = opening double quote
- return new ReplaceEdit(offset, packageLength, newPackageName);
- }
-
- // *********** content assist ************
-
- protected TextRange getClassNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.CLASS);
- }
-
- public boolean classNameTouches(int pos) {
- TextRange textRange = this.getClassNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-} // TypeMapping
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AccessType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AccessType.java
deleted file mode 100644
index a9eccfae6e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/AccessType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-/**
- * 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.
- */
-public interface AccessType
-{
- String PROPERTY = "PROPERTY"; //$NON-NLS-1$
- String FIELD = "FIELD"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Attributes.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Attributes.java
deleted file mode 100644
index 865b71b343..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Attributes.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Attributes</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getIds <em>Ids</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getEmbeddedIds <em>Embedded Ids</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getBasics <em>Basics</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getVersions <em>Versions</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getManyToOnes <em>Many To Ones</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getOneToManys <em>One To Manys</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getOneToOnes <em>One To Ones</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getManyToManys <em>Many To Manys</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getEmbeddeds <em>Embeddeds</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getTransients <em>Transients</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes()
- * @model kind="class"
- * @generated
- */
-public class Attributes extends AbstractJpaEObject implements XmlAttributes_2_0
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getElementCollections() <em>Element Collections</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getElementCollections()
- * @generated
- * @ordered
- */
- protected EList<XmlElementCollection> elementCollections;
-
- /**
- * The cached value of the '{@link #getIds() <em>Ids</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIds()
- * @generated
- * @ordered
- */
- protected EList<XmlId> ids;
-
- /**
- * The cached value of the '{@link #getEmbeddedIds() <em>Embedded Ids</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEmbeddedIds()
- * @generated
- * @ordered
- */
- protected EList<XmlEmbeddedId> embeddedIds;
-
- /**
- * The cached value of the '{@link #getBasics() <em>Basics</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBasics()
- * @generated
- * @ordered
- */
- protected EList<XmlBasic> basics;
-
- /**
- * The cached value of the '{@link #getVersions() <em>Versions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersions()
- * @generated
- * @ordered
- */
- protected EList<XmlVersion> versions;
-
- /**
- * The cached value of the '{@link #getManyToOnes() <em>Many To Ones</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getManyToOnes()
- * @generated
- * @ordered
- */
- protected EList<XmlManyToOne> manyToOnes;
-
- /**
- * The cached value of the '{@link #getOneToManys() <em>One To Manys</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOneToManys()
- * @generated
- * @ordered
- */
- protected EList<XmlOneToMany> oneToManys;
-
- /**
- * The cached value of the '{@link #getOneToOnes() <em>One To Ones</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOneToOnes()
- * @generated
- * @ordered
- */
- protected EList<XmlOneToOne> oneToOnes;
-
- /**
- * The cached value of the '{@link #getManyToManys() <em>Many To Manys</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getManyToManys()
- * @generated
- * @ordered
- */
- protected EList<XmlManyToMany> manyToManys;
-
- /**
- * The cached value of the '{@link #getEmbeddeds() <em>Embeddeds</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEmbeddeds()
- * @generated
- * @ordered
- */
- protected EList<XmlEmbedded> embeddeds;
-
- /**
- * The cached value of the '{@link #getTransients() <em>Transients</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransients()
- * @generated
- * @ordered
- */
- protected EList<XmlTransient> transients;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Attributes()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ATTRIBUTES;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributes_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ATTRIBUTES__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Element Collections</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Element Collections</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Element Collections</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributes_2_0_ElementCollections()
- * @model containment="true"
- * @generated
- */
- public EList<XmlElementCollection> getElementCollections()
- {
- if (elementCollections == null)
- {
- elementCollections = new EObjectContainmentEList<XmlElementCollection>(XmlElementCollection.class, this, OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS);
- }
- return elementCollections;
- }
-
- /**
- * Returns the value of the '<em><b>Ids</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlId}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Ids</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Ids</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_Ids()
- * @model containment="true"
- * @generated
- */
- public EList<XmlId> getIds()
- {
- if (ids == null)
- {
- ids = new EObjectContainmentEList<XmlId>(XmlId.class, this, OrmPackage.ATTRIBUTES__IDS);
- }
- return ids;
- }
-
- /**
- * Returns the value of the '<em><b>Embedded Ids</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Embedded Ids</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Embedded Ids</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_EmbeddedIds()
- * @model containment="true"
- * @generated
- */
- public EList<XmlEmbeddedId> getEmbeddedIds()
- {
- if (embeddedIds == null)
- {
- embeddedIds = new EObjectContainmentEList<XmlEmbeddedId>(XmlEmbeddedId.class, this, OrmPackage.ATTRIBUTES__EMBEDDED_IDS);
- }
- return embeddedIds;
- }
-
- /**
- * Returns the value of the '<em><b>Basics</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Basics</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Basics</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_Basics()
- * @model containment="true"
- * @generated
- */
- public EList<XmlBasic> getBasics()
- {
- if (basics == null)
- {
- basics = new EObjectContainmentEList<XmlBasic>(XmlBasic.class, this, OrmPackage.ATTRIBUTES__BASICS);
- }
- return basics;
- }
-
- /**
- * Returns the value of the '<em><b>Versions</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Versions</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Versions</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_Versions()
- * @model containment="true"
- * @generated
- */
- public EList<XmlVersion> getVersions()
- {
- if (versions == null)
- {
- versions = new EObjectContainmentEList<XmlVersion>(XmlVersion.class, this, OrmPackage.ATTRIBUTES__VERSIONS);
- }
- return versions;
- }
-
- /**
- * Returns the value of the '<em><b>Many To Ones</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Many To Ones</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Many To Ones</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_ManyToOnes()
- * @model containment="true"
- * @generated
- */
- public EList<XmlManyToOne> getManyToOnes()
- {
- if (manyToOnes == null)
- {
- manyToOnes = new EObjectContainmentEList<XmlManyToOne>(XmlManyToOne.class, this, OrmPackage.ATTRIBUTES__MANY_TO_ONES);
- }
- return manyToOnes;
- }
-
- /**
- * Returns the value of the '<em><b>One To Manys</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>One To Manys</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>One To Manys</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_OneToManys()
- * @model containment="true"
- * @generated
- */
- public EList<XmlOneToMany> getOneToManys()
- {
- if (oneToManys == null)
- {
- oneToManys = new EObjectContainmentEList<XmlOneToMany>(XmlOneToMany.class, this, OrmPackage.ATTRIBUTES__ONE_TO_MANYS);
- }
- return oneToManys;
- }
-
- /**
- * Returns the value of the '<em><b>One To Ones</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>One To Ones</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>One To Ones</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_OneToOnes()
- * @model containment="true"
- * @generated
- */
- public EList<XmlOneToOne> getOneToOnes()
- {
- if (oneToOnes == null)
- {
- oneToOnes = new EObjectContainmentEList<XmlOneToOne>(XmlOneToOne.class, this, OrmPackage.ATTRIBUTES__ONE_TO_ONES);
- }
- return oneToOnes;
- }
-
- /**
- * Returns the value of the '<em><b>Many To Manys</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Many To Manys</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Many To Manys</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_ManyToManys()
- * @model containment="true"
- * @generated
- */
- public EList<XmlManyToMany> getManyToManys()
- {
- if (manyToManys == null)
- {
- manyToManys = new EObjectContainmentEList<XmlManyToMany>(XmlManyToMany.class, this, OrmPackage.ATTRIBUTES__MANY_TO_MANYS);
- }
- return manyToManys;
- }
-
- /**
- * Returns the value of the '<em><b>Embeddeds</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Embeddeds</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Embeddeds</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_Embeddeds()
- * @model containment="true"
- * @generated
- */
- public EList<XmlEmbedded> getEmbeddeds()
- {
- if (embeddeds == null)
- {
- embeddeds = new EObjectContainmentEList<XmlEmbedded>(XmlEmbedded.class, this, OrmPackage.ATTRIBUTES__EMBEDDEDS);
- }
- return embeddeds;
- }
-
- /**
- * Returns the value of the '<em><b>Transients</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlTransient}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Transients</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Transients</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes_Transients()
- * @model containment="true"
- * @generated
- */
- public EList<XmlTransient> getTransients()
- {
- if (transients == null)
- {
- transients = new EObjectContainmentEList<XmlTransient>(XmlTransient.class, this, OrmPackage.ATTRIBUTES__TRANSIENTS);
- }
- return transients;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
- return ((InternalEList<?>)getElementCollections()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__IDS:
- return ((InternalEList<?>)getIds()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
- return ((InternalEList<?>)getEmbeddedIds()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__BASICS:
- return ((InternalEList<?>)getBasics()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__VERSIONS:
- return ((InternalEList<?>)getVersions()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
- return ((InternalEList<?>)getManyToOnes()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
- return ((InternalEList<?>)getOneToManys()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
- return ((InternalEList<?>)getOneToOnes()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
- return ((InternalEList<?>)getManyToManys()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__EMBEDDEDS:
- return ((InternalEList<?>)getEmbeddeds()).basicRemove(otherEnd, msgs);
- case OrmPackage.ATTRIBUTES__TRANSIENTS:
- return ((InternalEList<?>)getTransients()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ATTRIBUTES__DESCRIPTION:
- return getDescription();
- case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
- return getElementCollections();
- case OrmPackage.ATTRIBUTES__IDS:
- return getIds();
- case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
- return getEmbeddedIds();
- case OrmPackage.ATTRIBUTES__BASICS:
- return getBasics();
- case OrmPackage.ATTRIBUTES__VERSIONS:
- return getVersions();
- case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
- return getManyToOnes();
- case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
- return getOneToManys();
- case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
- return getOneToOnes();
- case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
- return getManyToManys();
- case OrmPackage.ATTRIBUTES__EMBEDDEDS:
- return getEmbeddeds();
- case OrmPackage.ATTRIBUTES__TRANSIENTS:
- return getTransients();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ATTRIBUTES__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
- getElementCollections().clear();
- getElementCollections().addAll((Collection<? extends XmlElementCollection>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__IDS:
- getIds().clear();
- getIds().addAll((Collection<? extends XmlId>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
- getEmbeddedIds().clear();
- getEmbeddedIds().addAll((Collection<? extends XmlEmbeddedId>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__BASICS:
- getBasics().clear();
- getBasics().addAll((Collection<? extends XmlBasic>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__VERSIONS:
- getVersions().clear();
- getVersions().addAll((Collection<? extends XmlVersion>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
- getManyToOnes().clear();
- getManyToOnes().addAll((Collection<? extends XmlManyToOne>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
- getOneToManys().clear();
- getOneToManys().addAll((Collection<? extends XmlOneToMany>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
- getOneToOnes().clear();
- getOneToOnes().addAll((Collection<? extends XmlOneToOne>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
- getManyToManys().clear();
- getManyToManys().addAll((Collection<? extends XmlManyToMany>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__EMBEDDEDS:
- getEmbeddeds().clear();
- getEmbeddeds().addAll((Collection<? extends XmlEmbedded>)newValue);
- return;
- case OrmPackage.ATTRIBUTES__TRANSIENTS:
- getTransients().clear();
- getTransients().addAll((Collection<? extends XmlTransient>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ATTRIBUTES__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
- getElementCollections().clear();
- return;
- case OrmPackage.ATTRIBUTES__IDS:
- getIds().clear();
- return;
- case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
- getEmbeddedIds().clear();
- return;
- case OrmPackage.ATTRIBUTES__BASICS:
- getBasics().clear();
- return;
- case OrmPackage.ATTRIBUTES__VERSIONS:
- getVersions().clear();
- return;
- case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
- getManyToOnes().clear();
- return;
- case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
- getOneToManys().clear();
- return;
- case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
- getOneToOnes().clear();
- return;
- case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
- getManyToManys().clear();
- return;
- case OrmPackage.ATTRIBUTES__EMBEDDEDS:
- getEmbeddeds().clear();
- return;
- case OrmPackage.ATTRIBUTES__TRANSIENTS:
- getTransients().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ATTRIBUTES__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
- return elementCollections != null && !elementCollections.isEmpty();
- case OrmPackage.ATTRIBUTES__IDS:
- return ids != null && !ids.isEmpty();
- case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
- return embeddedIds != null && !embeddedIds.isEmpty();
- case OrmPackage.ATTRIBUTES__BASICS:
- return basics != null && !basics.isEmpty();
- case OrmPackage.ATTRIBUTES__VERSIONS:
- return versions != null && !versions.isEmpty();
- case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
- return manyToOnes != null && !manyToOnes.isEmpty();
- case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
- return oneToManys != null && !oneToManys.isEmpty();
- case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
- return oneToOnes != null && !oneToOnes.isEmpty();
- case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
- return manyToManys != null && !manyToManys.isEmpty();
- case OrmPackage.ATTRIBUTES__EMBEDDEDS:
- return embeddeds != null && !embeddeds.isEmpty();
- case OrmPackage.ATTRIBUTES__TRANSIENTS:
- return transients != null && !transients.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
- public List<XmlAttributeMapping> getAttributeMappings() {
- // convert lists to arrays to avoid ConcurrentModificationException while adding to result list
- ArrayList<XmlAttributeMapping> attributeMappings = new ArrayList<XmlAttributeMapping>();
- CollectionTools.addAll(attributeMappings, this.getIds().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getEmbeddedIds().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getBasics().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getVersions().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getManyToOnes().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getOneToManys().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getOneToOnes().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getManyToManys().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getElementCollections().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getEmbeddeds().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- CollectionTools.addAll(attributeMappings, this.getTransients().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
- return attributeMappings;
- }
-
- private static final XmlAttributeMapping[] EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY = new XmlAttributeMapping[0];
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.ATTRIBUTES,
- OrmPackage.eINSTANCE.getXmlTypeMapping_Attributes());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- XmlId.buildTranslator(JPA.ID, OrmPackage.eINSTANCE.getAttributes_Ids()),
- XmlEmbeddedId.buildTranslator(JPA.EMBEDDED_ID, OrmPackage.eINSTANCE.getAttributes_EmbeddedIds()),
- XmlBasic.buildTranslator(JPA.BASIC, OrmPackage.eINSTANCE.getAttributes_Basics()),
- XmlVersion.buildTranslator(JPA.VERSION, OrmPackage.eINSTANCE.getAttributes_Versions()),
- XmlManyToOne.buildTranslator(JPA.MANY_TO_ONE, OrmPackage.eINSTANCE.getAttributes_ManyToOnes()),
- XmlOneToMany.buildTranslator(JPA.ONE_TO_MANY, OrmPackage.eINSTANCE.getAttributes_OneToManys()),
- XmlOneToOne.buildTranslator(JPA.ONE_TO_ONE, OrmPackage.eINSTANCE.getAttributes_OneToOnes()),
- XmlManyToMany.buildTranslator(JPA.MANY_TO_MANY, OrmPackage.eINSTANCE.getAttributes_ManyToManys()),
- XmlElementCollection.buildTranslator(JPA2_0.ELEMENT_COLLECTION, OrmV2_0Package.eINSTANCE.getXmlAttributes_2_0_ElementCollections()),
- XmlEmbedded.buildTranslator(JPA.EMBEDDED, OrmPackage.eINSTANCE.getAttributes_Embeddeds()),
- XmlTransient.buildTranslator(JPA.TRANSIENT, OrmPackage.eINSTANCE.getAttributes_Transients()),
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/CascadeType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/CascadeType.java
deleted file mode 100644
index 9ac4f35697..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/CascadeType.java
+++ /dev/null
@@ -1,586 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Cascade Type</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeAll <em>Cascade All</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadePersist <em>Cascade Persist</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeMerge <em>Cascade Merge</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRemove <em>Cascade Remove</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRefresh <em>Cascade Refresh</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType()
- * @model kind="class"
- * @generated
- */
-public class CascadeType extends AbstractJpaEObject implements XmlCascadeType_2_0
-{
- /**
- * The default value of the '{@link #isCascadeDetach() <em>Cascade Detach</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeDetach()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_DETACH_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadeDetach() <em>Cascade Detach</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeDetach()
- * @generated
- * @ordered
- */
- protected boolean cascadeDetach = CASCADE_DETACH_EDEFAULT;
-
- /**
- * The default value of the '{@link #isCascadeAll() <em>Cascade All</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeAll()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_ALL_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadeAll() <em>Cascade All</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeAll()
- * @generated
- * @ordered
- */
- protected boolean cascadeAll = CASCADE_ALL_EDEFAULT;
-
- /**
- * The default value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadePersist()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_PERSIST_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadePersist()
- * @generated
- * @ordered
- */
- protected boolean cascadePersist = CASCADE_PERSIST_EDEFAULT;
-
- /**
- * The default value of the '{@link #isCascadeMerge() <em>Cascade Merge</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeMerge()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_MERGE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadeMerge() <em>Cascade Merge</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeMerge()
- * @generated
- * @ordered
- */
- protected boolean cascadeMerge = CASCADE_MERGE_EDEFAULT;
-
- /**
- * The default value of the '{@link #isCascadeRemove() <em>Cascade Remove</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeRemove()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_REMOVE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadeRemove() <em>Cascade Remove</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeRemove()
- * @generated
- * @ordered
- */
- protected boolean cascadeRemove = CASCADE_REMOVE_EDEFAULT;
-
- /**
- * The default value of the '{@link #isCascadeRefresh() <em>Cascade Refresh</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeRefresh()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_REFRESH_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadeRefresh() <em>Cascade Refresh</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeRefresh()
- * @generated
- * @ordered
- */
- protected boolean cascadeRefresh = CASCADE_REFRESH_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected CascadeType()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.CASCADE_TYPE;
- }
-
- /**
- * Returns the value of the '<em><b>Cascade Detach</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Detach</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Detach</em>' attribute.
- * @see #setCascadeDetach(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlCascadeType_2_0_CascadeDetach()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadeDetach()
- {
- return cascadeDetach;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeDetach <em>Cascade Detach</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Detach</em>' attribute.
- * @see #isCascadeDetach()
- * @generated
- */
- public void setCascadeDetach(boolean newCascadeDetach)
- {
- boolean oldCascadeDetach = cascadeDetach;
- cascadeDetach = newCascadeDetach;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_DETACH, oldCascadeDetach, cascadeDetach));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade All</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade All</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade All</em>' attribute.
- * @see #setCascadeAll(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType_CascadeAll()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadeAll()
- {
- return cascadeAll;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeAll <em>Cascade All</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade All</em>' attribute.
- * @see #isCascadeAll()
- * @generated
- */
- public void setCascadeAll(boolean newCascadeAll)
- {
- boolean oldCascadeAll = cascadeAll;
- cascadeAll = newCascadeAll;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_ALL, oldCascadeAll, cascadeAll));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade Persist</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Persist</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Persist</em>' attribute.
- * @see #setCascadePersist(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType_CascadePersist()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadePersist()
- {
- return cascadePersist;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadePersist <em>Cascade Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Persist</em>' attribute.
- * @see #isCascadePersist()
- * @generated
- */
- public void setCascadePersist(boolean newCascadePersist)
- {
- boolean oldCascadePersist = cascadePersist;
- cascadePersist = newCascadePersist;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_PERSIST, oldCascadePersist, cascadePersist));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade Merge</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Merge</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Merge</em>' attribute.
- * @see #setCascadeMerge(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType_CascadeMerge()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadeMerge()
- {
- return cascadeMerge;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeMerge <em>Cascade Merge</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Merge</em>' attribute.
- * @see #isCascadeMerge()
- * @generated
- */
- public void setCascadeMerge(boolean newCascadeMerge)
- {
- boolean oldCascadeMerge = cascadeMerge;
- cascadeMerge = newCascadeMerge;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_MERGE, oldCascadeMerge, cascadeMerge));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade Remove</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Remove</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Remove</em>' attribute.
- * @see #setCascadeRemove(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType_CascadeRemove()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadeRemove()
- {
- return cascadeRemove;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRemove <em>Cascade Remove</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Remove</em>' attribute.
- * @see #isCascadeRemove()
- * @generated
- */
- public void setCascadeRemove(boolean newCascadeRemove)
- {
- boolean oldCascadeRemove = cascadeRemove;
- cascadeRemove = newCascadeRemove;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_REMOVE, oldCascadeRemove, cascadeRemove));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade Refresh</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Refresh</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Refresh</em>' attribute.
- * @see #setCascadeRefresh(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType_CascadeRefresh()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadeRefresh()
- {
- return cascadeRefresh;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRefresh <em>Cascade Refresh</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Refresh</em>' attribute.
- * @see #isCascadeRefresh()
- * @generated
- */
- public void setCascadeRefresh(boolean newCascadeRefresh)
- {
- boolean oldCascadeRefresh = cascadeRefresh;
- cascadeRefresh = newCascadeRefresh;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_REFRESH, oldCascadeRefresh, cascadeRefresh));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
- return isCascadeDetach();
- case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
- return isCascadeAll();
- case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
- return isCascadePersist();
- case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
- return isCascadeMerge();
- case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
- return isCascadeRemove();
- case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
- return isCascadeRefresh();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
- setCascadeDetach((Boolean)newValue);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
- setCascadeAll((Boolean)newValue);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
- setCascadePersist((Boolean)newValue);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
- setCascadeMerge((Boolean)newValue);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
- setCascadeRemove((Boolean)newValue);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
- setCascadeRefresh((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
- setCascadeDetach(CASCADE_DETACH_EDEFAULT);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
- setCascadeAll(CASCADE_ALL_EDEFAULT);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
- setCascadePersist(CASCADE_PERSIST_EDEFAULT);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
- setCascadeMerge(CASCADE_MERGE_EDEFAULT);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
- setCascadeRemove(CASCADE_REMOVE_EDEFAULT);
- return;
- case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
- setCascadeRefresh(CASCADE_REFRESH_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
- return cascadeDetach != CASCADE_DETACH_EDEFAULT;
- case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
- return cascadeAll != CASCADE_ALL_EDEFAULT;
- case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
- return cascadePersist != CASCADE_PERSIST_EDEFAULT;
- case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
- return cascadeMerge != CASCADE_MERGE_EDEFAULT;
- case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
- return cascadeRemove != CASCADE_REMOVE_EDEFAULT;
- case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
- return cascadeRefresh != CASCADE_REFRESH_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (cascadeDetach: ");
- result.append(cascadeDetach);
- result.append(", cascadeAll: ");
- result.append(cascadeAll);
- result.append(", cascadePersist: ");
- result.append(cascadePersist);
- result.append(", cascadeMerge: ");
- result.append(cascadeMerge);
- result.append(", cascadeRemove: ");
- result.append(cascadeRemove);
- result.append(", cascadeRefresh: ");
- result.append(cascadeRefresh);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildCascadeAllTranslator(),
- buildCascadePersistTranslator(),
- buildCascadeMergeTranslator(),
- buildCascadeRemoveTranslator(),
- buildCascadeRefreshTranslator(),
- buildCascadeDetachTranslator()
- };
- }
-
- protected static Translator buildCascadeAllTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_ALL, OrmPackage.eINSTANCE.getCascadeType_CascadeAll());
- }
-
- protected static Translator buildCascadePersistTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_PERSIST, OrmPackage.eINSTANCE.getCascadeType_CascadePersist());
- }
-
- protected static Translator buildCascadeMergeTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_MERGE, OrmPackage.eINSTANCE.getCascadeType_CascadeMerge());
- }
-
- protected static Translator buildCascadeRemoveTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_REMOVE, OrmPackage.eINSTANCE.getCascadeType_CascadeRemove());
- }
-
- protected static Translator buildCascadeRefreshTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_REFRESH, OrmPackage.eINSTANCE.getCascadeType_CascadeRefresh());
- }
-
- protected static Translator buildCascadeDetachTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_DETACH, OrmV2_0Package.eINSTANCE.getXmlCascadeType_2_0_CascadeDetach());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnMapping.java
deleted file mode 100644
index 7d56dd107e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnMapping.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Column Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping#getColumn <em>Column</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface ColumnMapping extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping_Column()
- * @model containment="true"
- * @generated
- */
- XmlColumn getColumn();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- void setColumn(XmlColumn value);
-
-} // ColumnMapping
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnResult.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnResult.java
deleted file mode 100644
index 5a62b6af10..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/ColumnResult.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Column Result</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnResult()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class ColumnResult extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ColumnResult()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.COLUMN_RESULT;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnResult_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.COLUMN_RESULT__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.COLUMN_RESULT__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.COLUMN_RESULT__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.COLUMN_RESULT__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.COLUMN_RESULT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getColumnResult_Name(), Translator.DOM_ATTRIBUTE);
- }
-
-} // ColumnResult
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/DiscriminatorType.java
deleted file mode 100644
index 112880bef5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/DiscriminatorType.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.core.resource.orm;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Discriminator Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getDiscriminatorType()
- * @model
- * @generated
- */
-public enum DiscriminatorType implements Enumerator
-{
- /**
- * The '<em><b>STRING</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #STRING_VALUE
- * @generated
- * @ordered
- */
- STRING(0, "STRING", "STRING"),
-
- /**
- * The '<em><b>CHAR</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #CHAR_VALUE
- * @generated
- * @ordered
- */
- CHAR(1, "CHAR", "CHAR"),
-
- /**
- * The '<em><b>INTEGER</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #INTEGER_VALUE
- * @generated
- * @ordered
- */
- INTEGER(2, "INTEGER", "INTEGER");
-
- /**
- * The '<em><b>STRING</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>STRING</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #STRING
- * @model
- * @generated
- * @ordered
- */
- public static final int STRING_VALUE = 0;
-
- /**
- * The '<em><b>CHAR</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>CHAR</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #CHAR
- * @model
- * @generated
- * @ordered
- */
- public static final int CHAR_VALUE = 1;
-
- /**
- * The '<em><b>INTEGER</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>INTEGER</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #INTEGER
- * @model
- * @generated
- * @ordered
- */
- public static final int INTEGER_VALUE = 2;
-
- /**
- * An array of all the '<em><b>Discriminator Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final DiscriminatorType[] VALUES_ARRAY =
- new DiscriminatorType[]
- {
- STRING,
- CHAR,
- INTEGER,
- };
-
- /**
- * A public read-only list of all the '<em><b>Discriminator Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<DiscriminatorType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Discriminator Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static DiscriminatorType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- DiscriminatorType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Discriminator Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static DiscriminatorType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- DiscriminatorType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Discriminator Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static DiscriminatorType get(int value)
- {
- switch (value)
- {
- case STRING_VALUE: return STRING;
- case CHAR_VALUE: return CHAR;
- case INTEGER_VALUE: return INTEGER;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private DiscriminatorType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //DiscriminatorType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListener.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListener.java
deleted file mode 100644
index 8786a2f9e7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListener.java
+++ /dev/null
@@ -1,928 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Entity Listener</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getClassName <em>Class Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListener()
- * @model kind="class"
- * @generated
- */
-public class EntityListener extends AbstractJpaEObject implements XmlEventMethodContainer, XmlEntityListener_2_0
-{
- /**
- * The cached value of the '{@link #getPrePersist() <em>Pre Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrePersist()
- * @generated
- * @ordered
- */
- protected PrePersist prePersist;
-
- /**
- * The cached value of the '{@link #getPostPersist() <em>Post Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostPersist()
- * @generated
- * @ordered
- */
- protected PostPersist postPersist;
-
- /**
- * The cached value of the '{@link #getPreRemove() <em>Pre Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPreRemove()
- * @generated
- * @ordered
- */
- protected PreRemove preRemove;
-
- /**
- * The cached value of the '{@link #getPostRemove() <em>Post Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostRemove()
- * @generated
- * @ordered
- */
- protected PostRemove postRemove;
-
- /**
- * The cached value of the '{@link #getPreUpdate() <em>Pre Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPreUpdate()
- * @generated
- * @ordered
- */
- protected PreUpdate preUpdate;
-
- /**
- * The cached value of the '{@link #getPostUpdate() <em>Post Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostUpdate()
- * @generated
- * @ordered
- */
- protected PostUpdate postUpdate;
-
- /**
- * The cached value of the '{@link #getPostLoad() <em>Post Load</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostLoad()
- * @generated
- * @ordered
- */
- protected PostLoad postLoad;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClassName()
- * @generated
- * @ordered
- */
- protected static final String CLASS_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClassName()
- * @generated
- * @ordered
- */
- protected String className = CLASS_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EntityListener()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ENTITY_LISTENER;
- }
-
- /**
- * Returns the value of the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Class Name</em>' attribute.
- * @see #setClassName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListener_ClassName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getClassName()
- {
- return className;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getClassName <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Class Name</em>' attribute.
- * @see #getClassName()
- * @generated
- */
- public void setClassName(String newClassName)
- {
- String oldClassName = className;
- className = newClassName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__CLASS_NAME, oldClassName, className));
- }
-
- /**
- * Returns the value of the '<em><b>Pre Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Persist</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Persist</em>' containment reference.
- * @see #setPrePersist(PrePersist)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PrePersist()
- * @model containment="true"
- * @generated
- */
- public PrePersist getPrePersist()
- {
- return prePersist;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPrePersist(PrePersist newPrePersist, NotificationChain msgs)
- {
- PrePersist oldPrePersist = prePersist;
- prePersist = newPrePersist;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_PERSIST, oldPrePersist, newPrePersist);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPrePersist <em>Pre Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Persist</em>' containment reference.
- * @see #getPrePersist()
- * @generated
- */
- public void setPrePersist(PrePersist newPrePersist)
- {
- if (newPrePersist != prePersist)
- {
- NotificationChain msgs = null;
- if (prePersist != null)
- msgs = ((InternalEObject)prePersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_PERSIST, null, msgs);
- if (newPrePersist != null)
- msgs = ((InternalEObject)newPrePersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_PERSIST, null, msgs);
- msgs = basicSetPrePersist(newPrePersist, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_PERSIST, newPrePersist, newPrePersist));
- }
-
- /**
- * Returns the value of the '<em><b>Post Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Persist</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Persist</em>' containment reference.
- * @see #setPostPersist(PostPersist)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostPersist()
- * @model containment="true"
- * @generated
- */
- public PostPersist getPostPersist()
- {
- return postPersist;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostPersist(PostPersist newPostPersist, NotificationChain msgs)
- {
- PostPersist oldPostPersist = postPersist;
- postPersist = newPostPersist;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_PERSIST, oldPostPersist, newPostPersist);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPostPersist <em>Post Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Persist</em>' containment reference.
- * @see #getPostPersist()
- * @generated
- */
- public void setPostPersist(PostPersist newPostPersist)
- {
- if (newPostPersist != postPersist)
- {
- NotificationChain msgs = null;
- if (postPersist != null)
- msgs = ((InternalEObject)postPersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_PERSIST, null, msgs);
- if (newPostPersist != null)
- msgs = ((InternalEObject)newPostPersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_PERSIST, null, msgs);
- msgs = basicSetPostPersist(newPostPersist, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_PERSIST, newPostPersist, newPostPersist));
- }
-
- /**
- * Returns the value of the '<em><b>Pre Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Remove</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Remove</em>' containment reference.
- * @see #setPreRemove(PreRemove)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreRemove()
- * @model containment="true"
- * @generated
- */
- public PreRemove getPreRemove()
- {
- return preRemove;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPreRemove(PreRemove newPreRemove, NotificationChain msgs)
- {
- PreRemove oldPreRemove = preRemove;
- preRemove = newPreRemove;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_REMOVE, oldPreRemove, newPreRemove);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPreRemove <em>Pre Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Remove</em>' containment reference.
- * @see #getPreRemove()
- * @generated
- */
- public void setPreRemove(PreRemove newPreRemove)
- {
- if (newPreRemove != preRemove)
- {
- NotificationChain msgs = null;
- if (preRemove != null)
- msgs = ((InternalEObject)preRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_REMOVE, null, msgs);
- if (newPreRemove != null)
- msgs = ((InternalEObject)newPreRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_REMOVE, null, msgs);
- msgs = basicSetPreRemove(newPreRemove, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_REMOVE, newPreRemove, newPreRemove));
- }
-
- /**
- * Returns the value of the '<em><b>Post Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Remove</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Remove</em>' containment reference.
- * @see #setPostRemove(PostRemove)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostRemove()
- * @model containment="true"
- * @generated
- */
- public PostRemove getPostRemove()
- {
- return postRemove;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostRemove(PostRemove newPostRemove, NotificationChain msgs)
- {
- PostRemove oldPostRemove = postRemove;
- postRemove = newPostRemove;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_REMOVE, oldPostRemove, newPostRemove);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPostRemove <em>Post Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Remove</em>' containment reference.
- * @see #getPostRemove()
- * @generated
- */
- public void setPostRemove(PostRemove newPostRemove)
- {
- if (newPostRemove != postRemove)
- {
- NotificationChain msgs = null;
- if (postRemove != null)
- msgs = ((InternalEObject)postRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_REMOVE, null, msgs);
- if (newPostRemove != null)
- msgs = ((InternalEObject)newPostRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_REMOVE, null, msgs);
- msgs = basicSetPostRemove(newPostRemove, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_REMOVE, newPostRemove, newPostRemove));
- }
-
- /**
- * Returns the value of the '<em><b>Pre Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Update</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Update</em>' containment reference.
- * @see #setPreUpdate(PreUpdate)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreUpdate()
- * @model containment="true"
- * @generated
- */
- public PreUpdate getPreUpdate()
- {
- return preUpdate;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPreUpdate(PreUpdate newPreUpdate, NotificationChain msgs)
- {
- PreUpdate oldPreUpdate = preUpdate;
- preUpdate = newPreUpdate;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_UPDATE, oldPreUpdate, newPreUpdate);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPreUpdate <em>Pre Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Update</em>' containment reference.
- * @see #getPreUpdate()
- * @generated
- */
- public void setPreUpdate(PreUpdate newPreUpdate)
- {
- if (newPreUpdate != preUpdate)
- {
- NotificationChain msgs = null;
- if (preUpdate != null)
- msgs = ((InternalEObject)preUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_UPDATE, null, msgs);
- if (newPreUpdate != null)
- msgs = ((InternalEObject)newPreUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_UPDATE, null, msgs);
- msgs = basicSetPreUpdate(newPreUpdate, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_UPDATE, newPreUpdate, newPreUpdate));
- }
-
- /**
- * Returns the value of the '<em><b>Post Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Update</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Update</em>' containment reference.
- * @see #setPostUpdate(PostUpdate)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostUpdate()
- * @model containment="true"
- * @generated
- */
- public PostUpdate getPostUpdate()
- {
- return postUpdate;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostUpdate(PostUpdate newPostUpdate, NotificationChain msgs)
- {
- PostUpdate oldPostUpdate = postUpdate;
- postUpdate = newPostUpdate;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_UPDATE, oldPostUpdate, newPostUpdate);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPostUpdate <em>Post Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Update</em>' containment reference.
- * @see #getPostUpdate()
- * @generated
- */
- public void setPostUpdate(PostUpdate newPostUpdate)
- {
- if (newPostUpdate != postUpdate)
- {
- NotificationChain msgs = null;
- if (postUpdate != null)
- msgs = ((InternalEObject)postUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_UPDATE, null, msgs);
- if (newPostUpdate != null)
- msgs = ((InternalEObject)newPostUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_UPDATE, null, msgs);
- msgs = basicSetPostUpdate(newPostUpdate, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_UPDATE, newPostUpdate, newPostUpdate));
- }
-
- /**
- * Returns the value of the '<em><b>Post Load</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Load</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Load</em>' containment reference.
- * @see #setPostLoad(PostLoad)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostLoad()
- * @model containment="true"
- * @generated
- */
- public PostLoad getPostLoad()
- {
- return postLoad;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostLoad(PostLoad newPostLoad, NotificationChain msgs)
- {
- PostLoad oldPostLoad = postLoad;
- postLoad = newPostLoad;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_LOAD, oldPostLoad, newPostLoad);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getPostLoad <em>Post Load</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Load</em>' containment reference.
- * @see #getPostLoad()
- * @generated
- */
- public void setPostLoad(PostLoad newPostLoad)
- {
- if (newPostLoad != postLoad)
- {
- NotificationChain msgs = null;
- if (postLoad != null)
- msgs = ((InternalEObject)postLoad).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_LOAD, null, msgs);
- if (newPostLoad != null)
- msgs = ((InternalEObject)newPostLoad).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_LOAD, null, msgs);
- msgs = basicSetPostLoad(newPostLoad, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_LOAD, newPostLoad, newPostLoad));
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityListener_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
- return basicSetPrePersist(null, msgs);
- case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
- return basicSetPostPersist(null, msgs);
- case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
- return basicSetPreRemove(null, msgs);
- case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
- return basicSetPostRemove(null, msgs);
- case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
- return basicSetPreUpdate(null, msgs);
- case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
- return basicSetPostUpdate(null, msgs);
- case OrmPackage.ENTITY_LISTENER__POST_LOAD:
- return basicSetPostLoad(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
- return getPrePersist();
- case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
- return getPostPersist();
- case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
- return getPreRemove();
- case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
- return getPostRemove();
- case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
- return getPreUpdate();
- case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
- return getPostUpdate();
- case OrmPackage.ENTITY_LISTENER__POST_LOAD:
- return getPostLoad();
- case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
- return getDescription();
- case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
- return getClassName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
- setPrePersist((PrePersist)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
- setPostPersist((PostPersist)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
- setPreRemove((PreRemove)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
- setPostRemove((PostRemove)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
- setPreUpdate((PreUpdate)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
- setPostUpdate((PostUpdate)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_LOAD:
- setPostLoad((PostLoad)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
- setClassName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
- setPrePersist((PrePersist)null);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
- setPostPersist((PostPersist)null);
- return;
- case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
- setPreRemove((PreRemove)null);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
- setPostRemove((PostRemove)null);
- return;
- case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
- setPreUpdate((PreUpdate)null);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
- setPostUpdate((PostUpdate)null);
- return;
- case OrmPackage.ENTITY_LISTENER__POST_LOAD:
- setPostLoad((PostLoad)null);
- return;
- case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
- setClassName(CLASS_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
- return prePersist != null;
- case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
- return postPersist != null;
- case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
- return preRemove != null;
- case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
- return postRemove != null;
- case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
- return preUpdate != null;
- case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
- return postUpdate != null;
- case OrmPackage.ENTITY_LISTENER__POST_LOAD:
- return postLoad != null;
- case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
- return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlEntityListener_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.ENTITY_LISTENER__DESCRIPTION: return OrmV2_0Package.XML_ENTITY_LISTENER_20__DESCRIPTION;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlEntityListener_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ENTITY_LISTENER_20__DESCRIPTION: return OrmPackage.ENTITY_LISTENER__DESCRIPTION;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", className: ");
- result.append(className);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildDescriptionTranslator(),
- buildClassTranslator(),
- PrePersist.buildTranslator(),
- PostPersist.buildTranslator(),
- PreRemove.buildTranslator(),
- PostRemove.buildTranslator(),
- PreUpdate.buildTranslator(),
- PostUpdate.buildTranslator(),
- PostLoad.buildTranslator()
- };
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlEntityListener_2_0_Description());
- }
-
- protected static Translator buildClassTranslator() {
- return new Translator(JPA.CLASS, OrmPackage.eINSTANCE.getEntityListener_ClassName());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListeners.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListeners.java
deleted file mode 100644
index 7276b96958..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityListeners.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Entity Listeners</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListeners#getEntityListeners <em>Entity Listeners</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListeners()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class EntityListeners extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityListeners()
- * @generated
- * @ordered
- */
- protected EList<EntityListener> entityListeners;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EntityListeners()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ENTITY_LISTENERS;
- }
-
- /**
- * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Listeners</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entity Listeners</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListeners_EntityListeners()
- * @model containment="true"
- * @generated
- */
- public EList<EntityListener> getEntityListeners()
- {
- if (entityListeners == null)
- {
- entityListeners = new EObjectContainmentEList<EntityListener>(EntityListener.class, this, OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS);
- }
- return entityListeners;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
- return ((InternalEList<?>)getEntityListeners()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
- return getEntityListeners();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
- getEntityListeners().clear();
- getEntityListeners().addAll((Collection<? extends EntityListener>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
- getEntityListeners().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
- return entityListeners != null && !entityListeners.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- EntityListener.buildTranslator(JPA.ENTITY_LISTENER, OrmPackage.eINSTANCE.getEntityListeners_EntityListeners())
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityResult.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityResult.java
deleted file mode 100644
index f7548f267b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EntityResult.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Entity Result</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getDiscriminatorColumn <em>Discriminator Column</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getEntityClass <em>Entity Class</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getFieldResults <em>Field Results</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityResult()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class EntityResult extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorColumn()
- * @generated
- * @ordered
- */
- protected static final String DISCRIMINATOR_COLUMN_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorColumn()
- * @generated
- * @ordered
- */
- protected String discriminatorColumn = DISCRIMINATOR_COLUMN_EDEFAULT;
-
- /**
- * The default value of the '{@link #getEntityClass() <em>Entity Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityClass()
- * @generated
- * @ordered
- */
- protected static final String ENTITY_CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getEntityClass() <em>Entity Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityClass()
- * @generated
- * @ordered
- */
- protected String entityClass = ENTITY_CLASS_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getFieldResults() <em>Field Results</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFieldResults()
- * @generated
- * @ordered
- */
- protected EList<FieldResult> fieldResults;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EntityResult()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.ENTITY_RESULT;
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Column</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Column</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Column</em>' attribute.
- * @see #setDiscriminatorColumn(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityResult_DiscriminatorColumn()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDiscriminatorColumn()
- {
- return discriminatorColumn;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getDiscriminatorColumn <em>Discriminator Column</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Discriminator Column</em>' attribute.
- * @see #getDiscriminatorColumn()
- * @generated
- */
- public void setDiscriminatorColumn(String newDiscriminatorColumn)
- {
- String oldDiscriminatorColumn = discriminatorColumn;
- discriminatorColumn = newDiscriminatorColumn;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN, oldDiscriminatorColumn, discriminatorColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Entity Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entity Class</em>' attribute.
- * @see #setEntityClass(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityResult_EntityClass()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getEntityClass()
- {
- return entityClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getEntityClass <em>Entity Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Entity Class</em>' attribute.
- * @see #getEntityClass()
- * @generated
- */
- public void setEntityClass(String newEntityClass)
- {
- String oldEntityClass = entityClass;
- entityClass = newEntityClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_RESULT__ENTITY_CLASS, oldEntityClass, entityClass));
- }
-
- /**
- * Returns the value of the '<em><b>Field Results</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Field Results</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Field Results</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityResult_FieldResults()
- * @model containment="true"
- * @generated
- */
- public EList<FieldResult> getFieldResults()
- {
- if (fieldResults == null)
- {
- fieldResults = new EObjectContainmentEList<FieldResult>(FieldResult.class, this, OrmPackage.ENTITY_RESULT__FIELD_RESULTS);
- }
- return fieldResults;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
- return ((InternalEList<?>)getFieldResults()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
- return getDiscriminatorColumn();
- case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
- return getEntityClass();
- case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
- return getFieldResults();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
- setDiscriminatorColumn((String)newValue);
- return;
- case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
- setEntityClass((String)newValue);
- return;
- case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
- getFieldResults().clear();
- getFieldResults().addAll((Collection<? extends FieldResult>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
- setDiscriminatorColumn(DISCRIMINATOR_COLUMN_EDEFAULT);
- return;
- case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
- setEntityClass(ENTITY_CLASS_EDEFAULT);
- return;
- case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
- getFieldResults().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
- return DISCRIMINATOR_COLUMN_EDEFAULT == null ? discriminatorColumn != null : !DISCRIMINATOR_COLUMN_EDEFAULT.equals(discriminatorColumn);
- case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
- return ENTITY_CLASS_EDEFAULT == null ? entityClass != null : !ENTITY_CLASS_EDEFAULT.equals(entityClass);
- case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
- return fieldResults != null && !fieldResults.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (discriminatorColumn: ");
- result.append(discriminatorColumn);
- result.append(", entityClass: ");
- result.append(entityClass);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildEntityClassTranslator(),
- buildDiscriminatorColumnTranslator(),
- FieldResult.buildTranslator(JPA.FIELD_RESULT, OrmPackage.eINSTANCE.getEntityResult_FieldResults()),
- };
- }
-
- protected static Translator buildEntityClassTranslator() {
- return new Translator(JPA.ENTITY_CLASS, OrmPackage.eINSTANCE.getEntityResult_EntityClass(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDiscriminatorColumnTranslator() {
- return new Translator(JPA.DISCRIMINATOR_COLUMN, OrmPackage.eINSTANCE.getEntityResult_DiscriminatorColumn(), Translator.DOM_ATTRIBUTE);
- }
-} // EntityResult
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EnumType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EnumType.java
deleted file mode 100644
index 7b3cc29f98..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EnumType.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.core.resource.orm;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Enum Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEnumType()
- * @model
- * @generated
- */
-public enum EnumType implements Enumerator
-{
- /**
- * The '<em><b>ORDINAL</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #ORDINAL_VALUE
- * @generated
- * @ordered
- */
- ORDINAL(0, "ORDINAL", "ORDINAL"),
-
- /**
- * The '<em><b>STRING</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #STRING_VALUE
- * @generated
- * @ordered
- */
- STRING(1, "STRING", "STRING");
-
- /**
- * The '<em><b>ORDINAL</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ORDINAL</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #ORDINAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ORDINAL_VALUE = 0;
-
- /**
- * The '<em><b>STRING</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>STRING</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #STRING
- * @model
- * @generated
- * @ordered
- */
- public static final int STRING_VALUE = 1;
-
- /**
- * An array of all the '<em><b>Enum Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final EnumType[] VALUES_ARRAY =
- new EnumType[]
- {
- ORDINAL,
- STRING,
- };
-
- /**
- * A public read-only list of all the '<em><b>Enum Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<EnumType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Enum Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static EnumType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- EnumType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Enum Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static EnumType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- EnumType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Enum Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static EnumType get(int value)
- {
- switch (value)
- {
- case ORDINAL_VALUE: return ORDINAL;
- case STRING_VALUE: return STRING;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EnumType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //EnumType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EventMethod.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EventMethod.java
deleted file mode 100644
index 8487c7b6b8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/EventMethod.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Event Method</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod#getMethodName <em>Method Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEventMethod()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class EventMethod extends AbstractJpaEObject implements XmlEventMethod_2_0
-{
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getMethodName() <em>Method Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMethodName()
- * @generated
- * @ordered
- */
- protected static final String METHOD_NAME_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getMethodName() <em>Method Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMethodName()
- * @generated
- * @ordered
- */
- protected String methodName = METHOD_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EventMethod()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.EVENT_METHOD;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethod_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.EVENT_METHOD__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Method Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Method Name</em>' attribute.
- * @see #setMethodName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEventMethod_MethodName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getMethodName() {
- return methodName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod#getMethodName <em>Method Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Method Name</em>' attribute.
- * @see #getMethodName()
- * @generated
- */
- public void setMethodName(String newMethodName) {
- String oldMethodName = methodName;
- methodName = newMethodName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.EVENT_METHOD__METHOD_NAME, oldMethodName, methodName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.EVENT_METHOD__DESCRIPTION:
- return getDescription();
- case OrmPackage.EVENT_METHOD__METHOD_NAME:
- return getMethodName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.EVENT_METHOD__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.EVENT_METHOD__METHOD_NAME:
- setMethodName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.EVENT_METHOD__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.EVENT_METHOD__METHOD_NAME:
- setMethodName(METHOD_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.EVENT_METHOD__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.EVENT_METHOD__METHOD_NAME:
- return METHOD_NAME_EDEFAULT == null ? methodName != null : !METHOD_NAME_EDEFAULT.equals(methodName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", methodName: ");
- result.append(methodName);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- protected static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildMethodNameTranslator(),
- buildDescriptionTranslator()
- };
- }
-
- protected static Translator buildMethodNameTranslator() {
- return new Translator(JPA.METHOD_NAME, OrmPackage.eINSTANCE.getEventMethod_MethodName(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlEventMethod_2_0_Description());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FetchType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FetchType.java
deleted file mode 100644
index 5f77353477..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FetchType.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.core.resource.orm;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Fetch Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFetchType()
- * @model
- * @generated
- */
-public enum FetchType implements Enumerator
-{
- /**
- * The '<em><b>LAZY</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #LAZY_VALUE
- * @generated
- * @ordered
- */
- LAZY(0, "LAZY", "LAZY"),
-
- /**
- * The '<em><b>EAGER</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #EAGER_VALUE
- * @generated
- * @ordered
- */
- EAGER(1, "EAGER", "EAGER");
-
- /**
- * The '<em><b>LAZY</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>LAZY</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #LAZY
- * @model
- * @generated
- * @ordered
- */
- public static final int LAZY_VALUE = 0;
-
- /**
- * The '<em><b>EAGER</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>EAGER</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #EAGER
- * @model
- * @generated
- * @ordered
- */
- public static final int EAGER_VALUE = 1;
-
- /**
- * An array of all the '<em><b>Fetch Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final FetchType[] VALUES_ARRAY =
- new FetchType[]
- {
- LAZY,
- EAGER,
- };
-
- /**
- * A public read-only list of all the '<em><b>Fetch Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<FetchType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Fetch Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static FetchType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- FetchType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Fetch Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static FetchType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- FetchType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Fetch Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static FetchType get(int value)
- {
- switch (value)
- {
- case LAZY_VALUE: return LAZY;
- case EAGER_VALUE: return EAGER;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private FetchType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //FetchType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FieldResult.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FieldResult.java
deleted file mode 100644
index c180b7b96f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/FieldResult.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Field Result</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getColumn <em>Column</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFieldResult()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class FieldResult extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getColumn() <em>Column</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected static final String COLUMN_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected String column = COLUMN_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected FieldResult()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.FIELD_RESULT;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFieldResult_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.FIELD_RESULT__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' attribute.
- * @see #setColumn(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFieldResult_Column()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getColumn()
- {
- return column;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getColumn <em>Column</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' attribute.
- * @see #getColumn()
- * @generated
- */
- public void setColumn(String newColumn)
- {
- String oldColumn = column;
- column = newColumn;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.FIELD_RESULT__COLUMN, oldColumn, column));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.FIELD_RESULT__NAME:
- return getName();
- case OrmPackage.FIELD_RESULT__COLUMN:
- return getColumn();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.FIELD_RESULT__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.FIELD_RESULT__COLUMN:
- setColumn((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.FIELD_RESULT__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.FIELD_RESULT__COLUMN:
- setColumn(COLUMN_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.FIELD_RESULT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.FIELD_RESULT__COLUMN:
- return COLUMN_EDEFAULT == null ? column != null : !COLUMN_EDEFAULT.equals(column);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", column: ");
- result.append(column);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- createColumnTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getFieldResult_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator createColumnTranslator() {
- return new Translator(JPA.COLUMN, OrmPackage.eINSTANCE.getFieldResult_Column(), Translator.DOM_ATTRIBUTE);
- }
-
-} // FieldResult
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/GenerationType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/GenerationType.java
deleted file mode 100644
index 383484cdfc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/GenerationType.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.core.resource.orm;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Generation Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getGenerationType()
- * @model
- * @generated
- */
-public enum GenerationType implements Enumerator
-{
- /**
- * The '<em><b>TABLE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #TABLE_VALUE
- * @generated
- * @ordered
- */
- TABLE(0, "TABLE", "TABLE"),
-
- /**
- * The '<em><b>SEQUENCE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #SEQUENCE_VALUE
- * @generated
- * @ordered
- */
- SEQUENCE(1, "SEQUENCE", "SEQUENCE"),
-
- /**
- * The '<em><b>IDENTITY</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #IDENTITY_VALUE
- * @generated
- * @ordered
- */
- IDENTITY(2, "IDENTITY", "IDENTITY"),
-
- /**
- * The '<em><b>AUTO</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #AUTO_VALUE
- * @generated
- * @ordered
- */
- AUTO(3, "AUTO", "AUTO");
-
- /**
- * The '<em><b>TABLE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TABLE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #TABLE
- * @model
- * @generated
- * @ordered
- */
- public static final int TABLE_VALUE = 0;
-
- /**
- * The '<em><b>SEQUENCE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>SEQUENCE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #SEQUENCE
- * @model
- * @generated
- * @ordered
- */
- public static final int SEQUENCE_VALUE = 1;
-
- /**
- * The '<em><b>IDENTITY</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>IDENTITY</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #IDENTITY
- * @model
- * @generated
- * @ordered
- */
- public static final int IDENTITY_VALUE = 2;
-
- /**
- * The '<em><b>AUTO</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>AUTO</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #AUTO
- * @model
- * @generated
- * @ordered
- */
- public static final int AUTO_VALUE = 3;
-
- /**
- * An array of all the '<em><b>Generation Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final GenerationType[] VALUES_ARRAY =
- new GenerationType[]
- {
- TABLE,
- SEQUENCE,
- IDENTITY,
- AUTO,
- };
-
- /**
- * A public read-only list of all the '<em><b>Generation Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<GenerationType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Generation Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static GenerationType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- GenerationType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Generation Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static GenerationType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- GenerationType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Generation Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static GenerationType get(int value)
- {
- switch (value)
- {
- case TABLE_VALUE: return TABLE;
- case SEQUENCE_VALUE: return SEQUENCE;
- case IDENTITY_VALUE: return IDENTITY;
- case AUTO_VALUE: return AUTO;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private GenerationType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //GenerationType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Inheritance.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Inheritance.java
deleted file mode 100644
index 7e83fc41ee..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Inheritance.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Inheritance</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.Inheritance#getStrategy <em>Strategy</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritance()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class Inheritance extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final InheritanceType STRATEGY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStrategy()
- * @generated
- * @ordered
- */
- protected InheritanceType strategy = STRATEGY_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Inheritance()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.INHERITANCE;
- }
-
- /**
- * Returns the value of the '<em><b>Strategy</b></em>' attribute.
- * The default value is <code>"SINGLE_TABLE"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.InheritanceType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Strategy</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Strategy</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.InheritanceType
- * @see #setStrategy(InheritanceType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritance_Strategy()
- * @model default="SINGLE_TABLE"
- * @generated
- */
- public InheritanceType getStrategy()
- {
- return strategy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.Inheritance#getStrategy <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Strategy</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.InheritanceType
- * @see #getStrategy()
- * @generated
- */
- public void setStrategy(InheritanceType newStrategy)
- {
- InheritanceType oldStrategy = strategy;
- strategy = newStrategy == null ? STRATEGY_EDEFAULT : newStrategy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.INHERITANCE__STRATEGY, oldStrategy, strategy));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.INHERITANCE__STRATEGY:
- return getStrategy();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.INHERITANCE__STRATEGY:
- setStrategy((InheritanceType)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.INHERITANCE__STRATEGY:
- setStrategy(STRATEGY_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.INHERITANCE__STRATEGY:
- return strategy != STRATEGY_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (strategy: ");
- result.append(strategy);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getStrategyTextRange() {
- return getAttributeTextRange(JPA.STRATEGY);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildStrategyTranslator(),
- };
- }
-
- protected static Translator buildStrategyTranslator() {
- return new Translator(JPA.STRATEGY, OrmPackage.eINSTANCE.getInheritance_Strategy(), Translator.DOM_ATTRIBUTE);
- }
-
-} // Inheritance
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/InheritanceType.java
deleted file mode 100644
index e290ddfa18..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/InheritanceType.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.core.resource.orm;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Inheritance Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritanceType()
- * @model
- * @generated
- */
-public enum InheritanceType implements Enumerator
-{
- /**
- * The '<em><b>SINGLE TABLE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #SINGLE_TABLE_VALUE
- * @generated
- * @ordered
- */
- SINGLE_TABLE(0, "SINGLE_TABLE", "SINGLE_TABLE"), /**
- * The '<em><b>JOINED</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #JOINED_VALUE
- * @generated
- * @ordered
- */
- JOINED(1, "JOINED", "JOINED"),
-
- /**
- * The '<em><b>TABLE PER CLASS</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #TABLE_PER_CLASS_VALUE
- * @generated
- * @ordered
- */
- TABLE_PER_CLASS(2, "TABLE_PER_CLASS", "TABLE_PER_CLASS");
-
- /**
- * The '<em><b>SINGLE TABLE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>SINGLE TABLE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #SINGLE_TABLE
- * @model
- * @generated
- * @ordered
- */
- public static final int SINGLE_TABLE_VALUE = 0;
-
- /**
- * The '<em><b>JOINED</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>JOINED</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #JOINED
- * @model
- * @generated
- * @ordered
- */
- public static final int JOINED_VALUE = 1;
-
- /**
- * The '<em><b>TABLE PER CLASS</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TABLE PER CLASS</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #TABLE_PER_CLASS
- * @model
- * @generated
- * @ordered
- */
- public static final int TABLE_PER_CLASS_VALUE = 2;
-
- /**
- * An array of all the '<em><b>Inheritance Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final InheritanceType[] VALUES_ARRAY =
- new InheritanceType[]
- {
- SINGLE_TABLE,
- JOINED,
- TABLE_PER_CLASS,
- };
-
- /**
- * A public read-only list of all the '<em><b>Inheritance Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<InheritanceType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Inheritance Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static InheritanceType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- InheritanceType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Inheritance Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static InheritanceType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- InheritanceType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Inheritance Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static InheritanceType get(int value)
- {
- switch (value)
- {
- case SINGLE_TABLE_VALUE: return SINGLE_TABLE;
- case JOINED_VALUE: return JOINED;
- case TABLE_PER_CLASS_VALUE: return TABLE_PER_CLASS;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private InheritanceType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //InheritanceType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/JPA.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/JPA.java
deleted file mode 100644
index 30f3626978..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/JPA.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.resource.orm;
-
-@SuppressWarnings("nls")
-public interface JPA
-{
- String SCHEMA_NAMESPACE = "http://java.sun.com/xml/ns/persistence/orm";
- String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
- String SCHEMA_VERSION = "1.0";
-
- String ACCESS = "access";
- String ALLOCATION_SIZE = "allocation-size";
- String ASSOCIATION_OVERRIDE = "association-override";
- String ATTRIBUTE_OVERRIDE = "attribute-override";
- String ATTRIBUTES = "attributes";
- String BASIC = "basic";
- String CASCADE = "cascade";
- String CASCADE_ALL = "cascade-all";
- String CASCADE_DETACH = "cascade-detach";
- String CASCADE_MERGE = "cascade-merge";
- String CASCADE_PERSIST = "cascade-persist";
- String CASCADE_REFRESH = "cascade-refresh";
- String CASCADE_REMOVE = "cascade-remove";
- String CATALOG = "catalog";
- String CLASS = "class";
- String COLUMN = "column";
- String COLUMN_DEFINITION= "column-definition";
- String COLUMN_NAME = "column-name";
- String COLUMN_RESULT = "column-result";
- String DESCRIPTION = "description";
- String DISCRIMINATOR_COLUMN = "discriminator-column";
- String DISCRIMINATOR_TYPE = "discriminator-type";
- String DISCRIMINATOR_VALUE = "discriminator-value";
- String EMBEDDABLE = "embeddable";
- String EMBEDDED = "embedded";
- String EMBEDDED_ID = "embedded-id";
- String ENTITY = "entity";
- String ENTITY_CLASS = "entity-class";
- String ENTITY_LISTENER = "entity-listener";
- String ENTITY_LISTENERS = "entity-listeners";
- String ENTITY_MAPPINGS = "entity-mappings";
- String ENTITY_RESULT = "entity-result";
- String ENUMERATED = "enumerated";
- String EXCLUDE_DEFAULT_LISTENERS = "exclude-default-listeners";
- String EXCLUDE_SUPERCLASS_LISTENERS = "exclude-superclass-listeners";
- String FETCH = "fetch";
- String FIELD_RESULT = "field-result";
- String GENERATED_VALUE = "generated-value";
- String GENERATOR = "generator";
- String HINT = "hint";
- String ID = "id";
- String ID_CLASS = "id-class";
- String INHERITANCE = "inheritance";
- String INITIAL_VALUE = "initial-value";
- String INSERTABLE = "insertable";
- String INVERSE_JOIN_COLUMN = "inverse-join-column";
- String JOIN_COLUMN = "join-column";
- String JOIN_TABLE = "join-table";
- String LENGTH = "length";
- String LOB = "lob";
- String MANY_TO_MANY = "many-to-many";
- String MANY_TO_ONE = "many-to-one";
- String MAP_KEY = "map-key";
- String MAPPED_BY = "mapped-by";
- String MAPPED_SUPERCLASS = "mapped-superclass";
- String METADATA_COMPLETE = "metadata-complete";
- String METHOD_NAME = "method-name";
- String NAME = "name";
- String NAMED_NATIVE_QUERY = "named-native-query";
- String NAMED_QUERY = "named-query";
- String NULLABLE = "nullable";
- String ONE_TO_MANY = "one-to-many";
- String ONE_TO_ONE = "one-to-one";
- String OPTIONAL = "optional";
- String ORDER_BY = "order-by";
- String PACKAGE = "package";
- String PERSISTENCE_UNIT_DEFAULTS = "persistence-unit-defaults";
- String PERSISTENCE_UNIT_METADATA = "persistence-unit-metadata";
- String PK_COLUMN_NAME = "pk-column-name";
- String PK_COLUMN_VALUE = "pk-column-value";
- String POST_LOAD = "post-load";
- String POST_PERSIST = "post-persist";
- String POST_REMOVE = "post-remove";
- String POST_UPDATE = "post-update";
- String PRE_PERSIST = "pre-persist";
- String PRE_REMOVE = "pre-remove";
- String PRE_UPDATE = "pre-update";
- String PRECISION= "precision";
- String PRIMARY_KEY_JOIN_COLUMN = "primary-key-join-column";
- String QUERY = "query";
- String REFERENCED_COLUMN_NAME = "referenced-column-name";
- String RESULT_CLASS = "result-class";
- String RESULT_SET_MAPPING = "result-set-mapping";
- String SCALE= "scale";
- String SCHEMA = "schema";
- String SECONDARY_TABLE = "secondary-table";
- String SEQUENCE_GENERATOR = "sequence-generator";
- String SEQUENCE_NAME = "sequence-name";
- String SQL_RESULT_SET_MAPPING = "sql-result-set-mapping";
- String STRATEGY = "strategy";
- String TABLE = "table";
- String TABLE_GENERATOR = "table-generator";
- String TARGET_ENTITY = "target-entity";
- String TEMPORAL = "temporal";
- String TRANSIENT = "transient";
- String UNIQUE = "unique";
- String UNIQUE_CONSTRAINT = "unique-constraint";
- String UPDATABLE = "updatable";
- String VALUE = "value";
- String VALUE_COLUMN_NAME = "value-column-name";
- String VERSION = "version";
- String XML_MAPPING_METADATA_COMPLETE = "xml-mapping-metadata-complete";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Lob.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Lob.java
deleted file mode 100644
index 28f1e40433..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/Lob.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Lob</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getLob()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class Lob extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Lob()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.LOB;
- }
-
-} // Lob
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/MapKey.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/MapKey.java
deleted file mode 100644
index 5eec067638..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/MapKey.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Map Key</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.MapKey#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getMapKey()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class MapKey extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MapKey()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.MAP_KEY;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getMapKey_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.MapKey#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.MAP_KEY__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.MAP_KEY__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.MAP_KEY__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.MAP_KEY__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.MAP_KEY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getMapKey_Name(), Translator.DOM_ATTRIBUTE);
- }
-
-} // MapKey
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmFactory.java
deleted file mode 100644
index bc6a519b1d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmFactory.java
+++ /dev/null
@@ -1,944 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage
- * @generated
- */
-public class OrmFactory extends EFactoryImpl
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final OrmFactory eINSTANCE = init();
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static OrmFactory init()
- {
- try
- {
- OrmFactory theOrmFactory = (OrmFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.orm.xmi");
- if (theOrmFactory != null)
- {
- return theOrmFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new OrmFactory();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OrmFactory()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE: return (EObject)createXmlAssociationOverride();
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE: return (EObject)createXmlAttributeOverride();
- case OrmPackage.ATTRIBUTES: return (EObject)createAttributes();
- case OrmPackage.XML_BASIC: return (EObject)createXmlBasic();
- case OrmPackage.CASCADE_TYPE: return (EObject)createCascadeType();
- case OrmPackage.XML_CLASS_REFERENCE: return (EObject)createXmlClassReference();
- case OrmPackage.XML_COLLECTION_TABLE: return (EObject)createXmlCollectionTable();
- case OrmPackage.XML_COLUMN: return (EObject)createXmlColumn();
- case OrmPackage.COLUMN_RESULT: return (EObject)createColumnResult();
- case OrmPackage.XML_DISCRIMINATOR_COLUMN: return (EObject)createXmlDiscriminatorColumn();
- case OrmPackage.XML_ELEMENT_COLLECTION: return (EObject)createXmlElementCollection();
- case OrmPackage.XML_EMBEDDABLE: return (EObject)createXmlEmbeddable();
- case OrmPackage.XML_EMBEDDED: return (EObject)createXmlEmbedded();
- case OrmPackage.XML_EMBEDDED_ID: return (EObject)createXmlEmbeddedId();
- case OrmPackage.XML_ENTITY: return (EObject)createXmlEntity();
- case OrmPackage.ENTITY_LISTENER: return (EObject)createEntityListener();
- case OrmPackage.ENTITY_LISTENERS: return (EObject)createEntityListeners();
- case OrmPackage.XML_ENTITY_MAPPINGS: return (EObject)createXmlEntityMappings();
- case OrmPackage.ENTITY_RESULT: return (EObject)createEntityResult();
- case OrmPackage.FIELD_RESULT: return (EObject)createFieldResult();
- case OrmPackage.XML_GENERATED_VALUE: return (EObject)createXmlGeneratedValue();
- case OrmPackage.XML_ID: return (EObject)createXmlId();
- case OrmPackage.INHERITANCE: return (EObject)createInheritance();
- case OrmPackage.XML_JOIN_COLUMN: return (EObject)createXmlJoinColumn();
- case OrmPackage.XML_JOIN_TABLE: return (EObject)createXmlJoinTable();
- case OrmPackage.LOB: return (EObject)createLob();
- case OrmPackage.XML_MANY_TO_MANY: return (EObject)createXmlManyToMany();
- case OrmPackage.XML_MANY_TO_ONE: return (EObject)createXmlManyToOne();
- case OrmPackage.MAP_KEY: return (EObject)createMapKey();
- case OrmPackage.XML_MAPPED_SUPERCLASS: return (EObject)createXmlMappedSuperclass();
- case OrmPackage.XML_NAMED_NATIVE_QUERY: return (EObject)createXmlNamedNativeQuery();
- case OrmPackage.XML_NAMED_QUERY: return (EObject)createXmlNamedQuery();
- case OrmPackage.XML_ONE_TO_MANY: return (EObject)createXmlOneToMany();
- case OrmPackage.XML_ONE_TO_ONE: return (EObject)createXmlOneToOne();
- case OrmPackage.XML_ORDER_COLUMN: return (EObject)createXmlOrderColumn();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS: return (EObject)createXmlPersistenceUnitDefaults();
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA: return (EObject)createXmlPersistenceUnitMetadata();
- case OrmPackage.POST_LOAD: return (EObject)createPostLoad();
- case OrmPackage.POST_PERSIST: return (EObject)createPostPersist();
- case OrmPackage.POST_REMOVE: return (EObject)createPostRemove();
- case OrmPackage.POST_UPDATE: return (EObject)createPostUpdate();
- case OrmPackage.PRE_PERSIST: return (EObject)createPrePersist();
- case OrmPackage.PRE_REMOVE: return (EObject)createPreRemove();
- case OrmPackage.PRE_UPDATE: return (EObject)createPreUpdate();
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN: return (EObject)createXmlPrimaryKeyJoinColumn();
- case OrmPackage.XML_QUERY_HINT: return (EObject)createXmlQueryHint();
- case OrmPackage.XML_SECONDARY_TABLE: return (EObject)createXmlSecondaryTable();
- case OrmPackage.XML_SEQUENCE_GENERATOR: return (EObject)createXmlSequenceGenerator();
- case OrmPackage.SQL_RESULT_SET_MAPPING: return (EObject)createSqlResultSetMapping();
- case OrmPackage.XML_TABLE: return (EObject)createXmlTable();
- case OrmPackage.XML_TABLE_GENERATOR: return (EObject)createXmlTableGenerator();
- case OrmPackage.XML_TRANSIENT: return (EObject)createXmlTransient();
- case OrmPackage.XML_UNIQUE_CONSTRAINT: return (EObject)createXmlUniqueConstraint();
- case OrmPackage.XML_VERSION: return (EObject)createXmlVersion();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- case OrmPackage.DISCRIMINATOR_TYPE:
- return createDiscriminatorTypeFromString(eDataType, initialValue);
- case OrmPackage.ENUM_TYPE:
- return createEnumTypeFromString(eDataType, initialValue);
- case OrmPackage.FETCH_TYPE:
- return createFetchTypeFromString(eDataType, initialValue);
- case OrmPackage.GENERATION_TYPE:
- return createGenerationTypeFromString(eDataType, initialValue);
- case OrmPackage.INHERITANCE_TYPE:
- return createInheritanceTypeFromString(eDataType, initialValue);
- case OrmPackage.TEMPORAL_TYPE:
- return createTemporalTypeFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- case OrmPackage.DISCRIMINATOR_TYPE:
- return convertDiscriminatorTypeToString(eDataType, instanceValue);
- case OrmPackage.ENUM_TYPE:
- return convertEnumTypeToString(eDataType, instanceValue);
- case OrmPackage.FETCH_TYPE:
- return convertFetchTypeToString(eDataType, instanceValue);
- case OrmPackage.GENERATION_TYPE:
- return convertGenerationTypeToString(eDataType, instanceValue);
- case OrmPackage.INHERITANCE_TYPE:
- return convertInheritanceTypeToString(eDataType, instanceValue);
- case OrmPackage.TEMPORAL_TYPE:
- return convertTemporalTypeToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlAssociationOverride createXmlAssociationOverride()
- {
- XmlAssociationOverride xmlAssociationOverride = new XmlAssociationOverride();
- return xmlAssociationOverride;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlAttributeOverride createXmlAttributeOverride()
- {
- XmlAttributeOverride xmlAttributeOverride = new XmlAttributeOverride();
- return xmlAttributeOverride;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Attributes createAttributes()
- {
- Attributes attributes = new Attributes();
- return attributes;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlBasic createXmlBasic()
- {
- XmlBasic xmlBasic = new XmlBasic();
- return xmlBasic;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CascadeType createCascadeType()
- {
- CascadeType cascadeType = new CascadeType();
- return cascadeType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlClassReference createXmlClassReference()
- {
- XmlClassReference xmlClassReference = new XmlClassReference();
- return xmlClassReference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlCollectionTable createXmlCollectionTable()
- {
- XmlCollectionTable xmlCollectionTable = new XmlCollectionTable();
- return xmlCollectionTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlColumn createXmlColumn()
- {
- XmlColumn xmlColumn = new XmlColumn();
- return xmlColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ColumnResult createColumnResult()
- {
- ColumnResult columnResult = new ColumnResult();
- return columnResult;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlDiscriminatorColumn createXmlDiscriminatorColumn()
- {
- XmlDiscriminatorColumn xmlDiscriminatorColumn = new XmlDiscriminatorColumn();
- return xmlDiscriminatorColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlElementCollection createXmlElementCollection()
- {
- XmlElementCollection xmlElementCollection = new XmlElementCollection();
- return xmlElementCollection;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlEmbeddable createXmlEmbeddable()
- {
- XmlEmbeddable xmlEmbeddable = new XmlEmbeddable();
- return xmlEmbeddable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlEmbedded createXmlEmbedded()
- {
- XmlEmbedded xmlEmbedded = new XmlEmbedded();
- return xmlEmbedded;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlEmbeddedId createXmlEmbeddedId()
- {
- XmlEmbeddedId xmlEmbeddedId = new XmlEmbeddedId();
- return xmlEmbeddedId;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlEntity createXmlEntity()
- {
- XmlEntity xmlEntity = new XmlEntity();
- return xmlEntity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EntityListener createEntityListener()
- {
- EntityListener entityListener = new EntityListener();
- return entityListener;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EntityListeners createEntityListeners()
- {
- EntityListeners entityListeners = new EntityListeners();
- return entityListeners;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlEntityMappings createXmlEntityMappings()
- {
- XmlEntityMappings xmlEntityMappings = new XmlEntityMappings();
- return xmlEntityMappings;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EntityResult createEntityResult()
- {
- EntityResult entityResult = new EntityResult();
- return entityResult;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FieldResult createFieldResult()
- {
- FieldResult fieldResult = new FieldResult();
- return fieldResult;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlGeneratedValue createXmlGeneratedValue()
- {
- XmlGeneratedValue xmlGeneratedValue = new XmlGeneratedValue();
- return xmlGeneratedValue;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlId createXmlId()
- {
- XmlId xmlId = new XmlId();
- return xmlId;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Inheritance createInheritance()
- {
- Inheritance inheritance = new Inheritance();
- return inheritance;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlJoinColumn createXmlJoinColumn()
- {
- XmlJoinColumn xmlJoinColumn = new XmlJoinColumn();
- return xmlJoinColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlJoinTable createXmlJoinTable()
- {
- XmlJoinTable xmlJoinTable = new XmlJoinTable();
- return xmlJoinTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Lob createLob()
- {
- Lob lob = new Lob();
- return lob;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlManyToMany createXmlManyToMany()
- {
- XmlManyToMany xmlManyToMany = new XmlManyToMany();
- return xmlManyToMany;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlManyToOne createXmlManyToOne()
- {
- XmlManyToOne xmlManyToOne = new XmlManyToOne();
- return xmlManyToOne;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MapKey createMapKey()
- {
- MapKey mapKey = new MapKey();
- return mapKey;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlMappedSuperclass createXmlMappedSuperclass()
- {
- XmlMappedSuperclass xmlMappedSuperclass = new XmlMappedSuperclass();
- return xmlMappedSuperclass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlNamedNativeQuery createXmlNamedNativeQuery()
- {
- XmlNamedNativeQuery xmlNamedNativeQuery = new XmlNamedNativeQuery();
- return xmlNamedNativeQuery;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlNamedQuery createXmlNamedQuery()
- {
- XmlNamedQuery xmlNamedQuery = new XmlNamedQuery();
- return xmlNamedQuery;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlOneToMany createXmlOneToMany()
- {
- XmlOneToMany xmlOneToMany = new XmlOneToMany();
- return xmlOneToMany;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlOneToOne createXmlOneToOne()
- {
- XmlOneToOne xmlOneToOne = new XmlOneToOne();
- return xmlOneToOne;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlOrderColumn createXmlOrderColumn()
- {
- XmlOrderColumn xmlOrderColumn = new XmlOrderColumn();
- return xmlOrderColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistenceUnitDefaults createXmlPersistenceUnitDefaults()
- {
- XmlPersistenceUnitDefaults xmlPersistenceUnitDefaults = new XmlPersistenceUnitDefaults();
- return xmlPersistenceUnitDefaults;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistenceUnitMetadata createXmlPersistenceUnitMetadata()
- {
- XmlPersistenceUnitMetadata xmlPersistenceUnitMetadata = new XmlPersistenceUnitMetadata();
- return xmlPersistenceUnitMetadata;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PostLoad createPostLoad()
- {
- PostLoad postLoad = new PostLoad();
- return postLoad;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PostPersist createPostPersist()
- {
- PostPersist postPersist = new PostPersist();
- return postPersist;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PostRemove createPostRemove()
- {
- PostRemove postRemove = new PostRemove();
- return postRemove;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PostUpdate createPostUpdate()
- {
- PostUpdate postUpdate = new PostUpdate();
- return postUpdate;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PrePersist createPrePersist()
- {
- PrePersist prePersist = new PrePersist();
- return prePersist;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PreRemove createPreRemove()
- {
- PreRemove preRemove = new PreRemove();
- return preRemove;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PreUpdate createPreUpdate()
- {
- PreUpdate preUpdate = new PreUpdate();
- return preUpdate;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPrimaryKeyJoinColumn createXmlPrimaryKeyJoinColumn()
- {
- XmlPrimaryKeyJoinColumn xmlPrimaryKeyJoinColumn = new XmlPrimaryKeyJoinColumn();
- return xmlPrimaryKeyJoinColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlQueryHint createXmlQueryHint()
- {
- XmlQueryHint xmlQueryHint = new XmlQueryHint();
- return xmlQueryHint;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlSecondaryTable createXmlSecondaryTable()
- {
- XmlSecondaryTable xmlSecondaryTable = new XmlSecondaryTable();
- return xmlSecondaryTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlSequenceGenerator createXmlSequenceGenerator()
- {
- XmlSequenceGenerator xmlSequenceGenerator = new XmlSequenceGenerator();
- return xmlSequenceGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SqlResultSetMapping createSqlResultSetMapping()
- {
- SqlResultSetMapping sqlResultSetMapping = new SqlResultSetMapping();
- return sqlResultSetMapping;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlTable createXmlTable()
- {
- XmlTable xmlTable = new XmlTable();
- return xmlTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlTableGenerator createXmlTableGenerator()
- {
- XmlTableGenerator xmlTableGenerator = new XmlTableGenerator();
- return xmlTableGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlTransient createXmlTransient()
- {
- XmlTransient xmlTransient = new XmlTransient();
- return xmlTransient;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlUniqueConstraint createXmlUniqueConstraint()
- {
- XmlUniqueConstraint xmlUniqueConstraint = new XmlUniqueConstraint();
- return xmlUniqueConstraint;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlVersion createXmlVersion()
- {
- XmlVersion xmlVersion = new XmlVersion();
- return xmlVersion;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DiscriminatorType createDiscriminatorTypeFromString(EDataType eDataType, String initialValue)
- {
- DiscriminatorType result = DiscriminatorType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertDiscriminatorTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EnumType createEnumTypeFromString(EDataType eDataType, String initialValue)
- {
- EnumType result = EnumType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertEnumTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FetchType createFetchTypeFromString(EDataType eDataType, String initialValue)
- {
- FetchType result = FetchType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertFetchTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GenerationType createGenerationTypeFromString(EDataType eDataType, String initialValue)
- {
- GenerationType result = GenerationType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertGenerationTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public InheritanceType createInheritanceTypeFromString(EDataType eDataType, String initialValue)
- {
- InheritanceType result = InheritanceType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertInheritanceTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public TemporalType createTemporalTypeFromString(EDataType eDataType, String initialValue)
- {
- TemporalType result = TemporalType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertTemporalTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OrmPackage getOrmPackage()
- {
- return (OrmPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static OrmPackage getPackage()
- {
- return OrmPackage.eINSTANCE;
- }
-
-} //OrmFactory
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java
deleted file mode 100644
index 6edb8e0d7f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java
+++ /dev/null
@@ -1,12955 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.xml.CommonPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmFactory
- * @model kind="package"
- * @generated
- */
-public class OrmPackage extends EPackageImpl
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNAME = "orm";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_URI = "jpt.orm.xmi";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_PREFIX = "org.eclipse.jpt.jpa.core.resource.orm";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final OrmPackage eINSTANCE = org.eclipse.jpt.jpa.core.resource.orm.OrmPackage.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder <em>Xml Access Holder</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder()
- * @generated
- */
- public static final int XML_ACCESS_HOLDER = 15;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ACCESS_HOLDER__ACCESS = 0;
-
- /**
- * The number of structural features of the '<em>Xml Access Holder</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ACCESS_HOLDER_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping <em>Xml Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeMapping()
- * @generated
- */
- public static final int XML_ATTRIBUTE_MAPPING = 16;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_MAPPING__ACCESS = OrmV2_0Package.XML_ATTRIBUTE_MAPPING_20__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_MAPPING__NAME = OrmV2_0Package.XML_ATTRIBUTE_MAPPING_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Attribute Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_MAPPING_FEATURE_COUNT = OrmV2_0Package.XML_ATTRIBUTE_MAPPING_20_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping <em>Abstract Xml Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlAttributeMapping()
- * @generated
- */
- public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING = 0;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS = XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME = XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Attribute Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT = XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn <em>Xml Named Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn()
- * @generated
- */
- public static final int XML_NAMED_COLUMN = 6;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_COLUMN__COLUMN_DEFINITION = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_COLUMN__NAME = 1;
-
- /**
- * The number of structural features of the '<em>Xml Named Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_COLUMN_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn <em>Xml Base Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn()
- * @generated
- */
- public static final int XML_BASE_COLUMN = 1;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__COLUMN_DEFINITION = XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__NAME = XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__INSERTABLE = XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__NULLABLE = XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__TABLE = XML_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__UNIQUE = XML_NAMED_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN__UPDATABLE = XML_NAMED_COLUMN_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Xml Base Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_COLUMN_FEATURE_COUNT = XML_NAMED_COLUMN_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn <em>Abstract Xml Named Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn()
- * @generated
- */
- public static final int ABSTRACT_XML_NAMED_COLUMN = 9;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION = XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_NAMED_COLUMN__NAME = XML_NAMED_COLUMN__NAME;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Named Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT = XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn <em>Abstract Xml Base Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlBaseColumn()
- * @generated
- */
- public static final int ABSTRACT_XML_BASE_COLUMN = 2;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__INSERTABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__NULLABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__TABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__UNIQUE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN__UPDATABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Base Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn <em>Abstract Xml Base Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlBaseDiscriminatorColumn()
- * @generated
- */
- public static final int ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN = 3;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Base Discriminator Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded <em>Abstract Xml Embedded</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlEmbedded()
- * @generated
- */
- public static final int ABSTRACT_XML_EMBEDDED = 4;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_EMBEDDED__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_EMBEDDED__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Embedded</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_EMBEDDED_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping <em>Abstract Xml Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping()
- * @generated
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING = 10;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Relationship Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping <em>Abstract Xml Multi Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping()
- * @generated
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING = 5;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ACCESS = ABSTRACT_XML_RELATIONSHIP_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__NAME = ABSTRACT_XML_RELATIONSHIP_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY = ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__FETCH = ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__CASCADE = ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 10;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Multi Relationship Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 11;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn <em>Xml Base Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn()
- * @generated
- */
- public static final int XML_BASE_DISCRIMINATOR_COLUMN = 7;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_DISCRIMINATOR_COLUMN__NAME = XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_DISCRIMINATOR_COLUMN__LENGTH = XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Xml Base Discriminator Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_DISCRIMINATOR_COLUMN_FEATURE_COUNT = XML_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn <em>Xml Base Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseJoinColumn()
- * @generated
- */
- public static final int XML_BASE_JOIN_COLUMN = 8;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_JOIN_COLUMN__COLUMN_DEFINITION = XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_JOIN_COLUMN__NAME = XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME = XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Base Join Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASE_JOIN_COLUMN_FEATURE_COUNT = XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping <em>Abstract Xml Single Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping()
- * @generated
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING = 11;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ACCESS = ABSTRACT_XML_RELATIONSHIP_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__NAME = ABSTRACT_XML_RELATIONSHIP_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY = ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__FETCH = ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__CASCADE = ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Single Relationship Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable <em>Abstract Xml Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable()
- * @generated
- */
- public static final int ABSTRACT_XML_TABLE = 13;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TABLE__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TABLE__CATALOG = 1;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TABLE__SCHEMA = 2;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS = 3;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TABLE_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping <em>Xml Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping()
- * @generated
- */
- public static final int XML_TYPE_MAPPING = 88;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping <em>Abstract Xml Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTypeMapping()
- * @generated
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING = 14;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride <em>Xml Association Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverride()
- * @generated
- */
- public static final int XML_ASSOCIATION_OVERRIDE = 17;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer <em>Xml Association Override Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer()
- * @generated
- */
- public static final int XML_ASSOCIATION_OVERRIDE_CONTAINER = 18;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride <em>Xml Attribute Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverride()
- * @generated
- */
- public static final int XML_ATTRIBUTE_OVERRIDE = 19;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer <em>Xml Attribute Override Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer()
- * @generated
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_CONTAINER = 20;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes <em>Attributes</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes()
- * @generated
- */
- public static final int ATTRIBUTES = 21;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic <em>Xml Basic</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBasic
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBasic()
- * @generated
- */
- public static final int XML_BASIC = 22;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType <em>Cascade Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType()
- * @generated
- */
- public static final int CASCADE_TYPE = 23;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable <em>Abstract Xml Reference Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlReferenceTable()
- * @generated
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE = 12;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE__NAME = ABSTRACT_XML_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE__CATALOG = ABSTRACT_XML_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE__SCHEMA = ABSTRACT_XML_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS = ABSTRACT_XML_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Reference Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT = ABSTRACT_XML_TABLE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TYPE_MAPPING__ACCESS = XML_ACCESS_HOLDER__ACCESS;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TYPE_MAPPING__CLASS_NAME = XML_ACCESS_HOLDER_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TYPE_MAPPING__METADATA_COMPLETE = XML_ACCESS_HOLDER_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TYPE_MAPPING__DESCRIPTION = XML_ACCESS_HOLDER_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TYPE_MAPPING__ATTRIBUTES = XML_ACCESS_HOLDER_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>Xml Type Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TYPE_MAPPING_FEATURE_COUNT = XML_ACCESS_HOLDER_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING__ACCESS = XML_TYPE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME = XML_TYPE_MAPPING__CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE = XML_TYPE_MAPPING__METADATA_COMPLETE;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION = XML_TYPE_MAPPING__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES = XML_TYPE_MAPPING__ATTRIBUTES;
-
- /**
- * The number of structural features of the '<em>Abstract Xml Type Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT = XML_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOverride <em>Xml Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOverride
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOverride()
- * @generated
- */
- public static final int XML_OVERRIDE = 66;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_OVERRIDE__NAME = 0;
-
- /**
- * The number of structural features of the '<em>Xml Override</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_OVERRIDE_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE__NAME = XML_OVERRIDE__NAME;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS = XML_OVERRIDE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE__JOIN_TABLE = XML_OVERRIDE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE__DESCRIPTION = XML_OVERRIDE_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml Association Override</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE_FEATURE_COUNT = XML_OVERRIDE_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES = 0;
-
- /**
- * The number of structural features of the '<em>Xml Association Override Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE__NAME = XML_OVERRIDE__NAME;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE__DESCRIPTION = XML_OVERRIDE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE__COLUMN = XML_OVERRIDE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Xml Attribute Override</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_FEATURE_COUNT = XML_OVERRIDE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES = 0;
-
- /**
- * The number of structural features of the '<em>Xml Attribute Override Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__DESCRIPTION = OrmV2_0Package.XML_ATTRIBUTES_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Element Collections</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__ELEMENT_COLLECTIONS = OrmV2_0Package.XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS;
-
- /**
- * The feature id for the '<em><b>Ids</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__IDS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Embedded Ids</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__EMBEDDED_IDS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Basics</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__BASICS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Versions</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__VERSIONS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Many To Ones</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__MANY_TO_ONES = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>One To Manys</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__ONE_TO_MANYS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>One To Ones</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__ONE_TO_ONES = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Many To Manys</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__MANY_TO_MANYS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Embeddeds</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__EMBEDDEDS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Transients</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES__TRANSIENTS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 9;
-
- /**
- * The number of structural features of the '<em>Attributes</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ATTRIBUTES_FEATURE_COUNT = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__FETCH = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC__OPTIONAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Xml Basic</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_BASIC_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Cascade Detach</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE__CASCADE_DETACH = OrmV2_0Package.XML_CASCADE_TYPE_20__CASCADE_DETACH;
-
- /**
- * The feature id for the '<em><b>Cascade All</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE__CASCADE_ALL = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Cascade Persist</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE__CASCADE_PERSIST = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Cascade Merge</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE__CASCADE_MERGE = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Cascade Remove</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE__CASCADE_REMOVE = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Cascade Refresh</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE__CASCADE_REFRESH = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Cascade Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int CASCADE_TYPE_FEATURE_COUNT = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference <em>Xml Class Reference</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlClassReference()
- * @generated
- */
- public static final int XML_CLASS_REFERENCE = 24;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CLASS_REFERENCE__CLASS_NAME = 0;
-
- /**
- * The number of structural features of the '<em>Xml Class Reference</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CLASS_REFERENCE_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable <em>Xml Collection Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlCollectionTable()
- * @generated
- */
- public static final int XML_COLLECTION_TABLE = 25;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE__NAME = ABSTRACT_XML_REFERENCE_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE__CATALOG = ABSTRACT_XML_REFERENCE_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE__SCHEMA = ABSTRACT_XML_REFERENCE_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_REFERENCE_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE__JOIN_COLUMNS = ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS;
-
- /**
- * The number of structural features of the '<em>Xml Collection Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE_FEATURE_COUNT = ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn <em>Xml Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlColumn()
- * @generated
- */
- public static final int XML_COLUMN = 26;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_BASE_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__NAME = ABSTRACT_XML_BASE_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__INSERTABLE = ABSTRACT_XML_BASE_COLUMN__INSERTABLE;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__NULLABLE = ABSTRACT_XML_BASE_COLUMN__NULLABLE;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__TABLE = ABSTRACT_XML_BASE_COLUMN__TABLE;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__UNIQUE = ABSTRACT_XML_BASE_COLUMN__UNIQUE;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__UPDATABLE = ABSTRACT_XML_BASE_COLUMN__UPDATABLE;
-
- /**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__LENGTH = ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Precision</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__PRECISION = ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Scale</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN__SCALE = ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLUMN_FEATURE_COUNT = ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping <em>Column Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping()
- * @generated
- */
- public static final int COLUMN_MAPPING = 27;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int COLUMN_MAPPING__COLUMN = 0;
-
- /**
- * The number of structural features of the '<em>Column Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int COLUMN_MAPPING_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult <em>Column Result</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnResult
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnResult()
- * @generated
- */
- public static final int COLUMN_RESULT = 28;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int COLUMN_RESULT__NAME = 0;
-
- /**
- * The number of structural features of the '<em>Column Result</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int COLUMN_RESULT_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping <em>Xml Convertible Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping()
- * @generated
- */
- public static final int XML_CONVERTIBLE_MAPPING = 29;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CONVERTIBLE_MAPPING__LOB = 0;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CONVERTIBLE_MAPPING__TEMPORAL = 1;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CONVERTIBLE_MAPPING__ENUMERATED = 2;
-
- /**
- * The number of structural features of the '<em>Xml Convertible Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CONVERTIBLE_MAPPING_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn <em>Xml Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn()
- * @generated
- */
- public static final int XML_DISCRIMINATOR_COLUMN = 30;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DISCRIMINATOR_COLUMN__NAME = ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
-
- /**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DISCRIMINATOR_COLUMN__LENGTH = ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN__LENGTH;
-
- /**
- * The number of structural features of the '<em>Xml Discriminator Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DISCRIMINATOR_COLUMN_FEATURE_COUNT = ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection <em>Xml Element Collection</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection()
- * @generated
- */
- public static final int XML_ELEMENT_COLLECTION = 31;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__ORDER_COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__ORDER_BY = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Target Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__TARGET_CLASS = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__FETCH = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 11;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 12;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY_CLASS = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 13;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 14;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 15;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 16;
-
- /**
- * The feature id for the '<em><b>Collection Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION__COLLECTION_TABLE = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 17;
-
- /**
- * The number of structural features of the '<em>Xml Element Collection</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 18;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable <em>Xml Embeddable</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbeddable()
- * @generated
- */
- public static final int XML_EMBEDDABLE = 32;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDABLE__ACCESS = ABSTRACT_XML_TYPE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDABLE__CLASS_NAME = ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDABLE__METADATA_COMPLETE = ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDABLE__DESCRIPTION = ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDABLE__ATTRIBUTES = ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES;
-
- /**
- * The number of structural features of the '<em>Xml Embeddable</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDABLE_FEATURE_COUNT = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded <em>Xml Embedded</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbedded()
- * @generated
- */
- public static final int XML_EMBEDDED = 33;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED__ACCESS = ABSTRACT_XML_EMBEDDED__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED__NAME = ABSTRACT_XML_EMBEDDED__NAME;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES;
-
- /**
- * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED__ASSOCIATION_OVERRIDES = ABSTRACT_XML_EMBEDDED_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Embedded</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_FEATURE_COUNT = ABSTRACT_XML_EMBEDDED_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId <em>Xml Embedded Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbeddedId()
- * @generated
- */
- public static final int XML_EMBEDDED_ID = 34;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_ID__ACCESS = ABSTRACT_XML_EMBEDDED__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_ID__NAME = ABSTRACT_XML_EMBEDDED__NAME;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_ID__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES;
-
- /**
- * The number of structural features of the '<em>Xml Embedded Id</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_ID_FEATURE_COUNT = ABSTRACT_XML_EMBEDDED_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity <em>Xml Entity</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity()
- * @generated
- */
- public static final int XML_ENTITY = 35;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__ACCESS = ABSTRACT_XML_TYPE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__CLASS_NAME = ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__METADATA_COMPLETE = ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__DESCRIPTION = ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__ATTRIBUTES = ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES;
-
- /**
- * The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__NAMED_QUERIES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__NAMED_NATIVE_QUERIES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__SEQUENCE_GENERATOR = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__TABLE_GENERATOR = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Pre Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__PRE_PERSIST = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Post Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__POST_PERSIST = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Pre Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__PRE_REMOVE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Post Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__POST_REMOVE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Pre Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__PRE_UPDATE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Post Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__POST_UPDATE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Post Load</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__POST_LOAD = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 11;
-
- /**
- * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__ASSOCIATION_OVERRIDES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 12;
-
- /**
- * The feature id for the '<em><b>Cacheable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__CACHEABLE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 13;
-
- /**
- * The feature id for the '<em><b>Id Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__ID_CLASS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 14;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__NAME = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 15;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__TABLE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 16;
-
- /**
- * The feature id for the '<em><b>Secondary Tables</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__SECONDARY_TABLES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 17;
-
- /**
- * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 18;
-
- /**
- * The feature id for the '<em><b>Inheritance</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__INHERITANCE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 19;
-
- /**
- * The feature id for the '<em><b>Discriminator Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__DISCRIMINATOR_VALUE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 20;
-
- /**
- * The feature id for the '<em><b>Discriminator Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__DISCRIMINATOR_COLUMN = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 21;
-
- /**
- * The feature id for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__SQL_RESULT_SET_MAPPINGS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 22;
-
- /**
- * The feature id for the '<em><b>Exclude Default Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 23;
-
- /**
- * The feature id for the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 24;
-
- /**
- * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__ENTITY_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 25;
-
- /**
- * The number of structural features of the '<em>Xml Entity</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_FEATURE_COUNT = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 26;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer <em>Xml Event Method Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer()
- * @generated
- */
- public static final int XML_EVENT_METHOD_CONTAINER = 41;
-
- /**
- * The feature id for the '<em><b>Pre Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__PRE_PERSIST = 0;
-
- /**
- * The feature id for the '<em><b>Post Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__POST_PERSIST = 1;
-
- /**
- * The feature id for the '<em><b>Pre Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__PRE_REMOVE = 2;
-
- /**
- * The feature id for the '<em><b>Post Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__POST_REMOVE = 3;
-
- /**
- * The feature id for the '<em><b>Pre Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__PRE_UPDATE = 4;
-
- /**
- * The feature id for the '<em><b>Post Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__POST_UPDATE = 5;
-
- /**
- * The feature id for the '<em><b>Post Load</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER__POST_LOAD = 6;
-
- /**
- * The number of structural features of the '<em>Xml Event Method Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT = 7;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener <em>Entity Listener</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListener
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListener()
- * @generated
- */
- public static final int ENTITY_LISTENER = 36;
-
- /**
- * The feature id for the '<em><b>Pre Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__PRE_PERSIST = XML_EVENT_METHOD_CONTAINER__PRE_PERSIST;
-
- /**
- * The feature id for the '<em><b>Post Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__POST_PERSIST = XML_EVENT_METHOD_CONTAINER__POST_PERSIST;
-
- /**
- * The feature id for the '<em><b>Pre Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__PRE_REMOVE = XML_EVENT_METHOD_CONTAINER__PRE_REMOVE;
-
- /**
- * The feature id for the '<em><b>Post Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__POST_REMOVE = XML_EVENT_METHOD_CONTAINER__POST_REMOVE;
-
- /**
- * The feature id for the '<em><b>Pre Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__PRE_UPDATE = XML_EVENT_METHOD_CONTAINER__PRE_UPDATE;
-
- /**
- * The feature id for the '<em><b>Post Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__POST_UPDATE = XML_EVENT_METHOD_CONTAINER__POST_UPDATE;
-
- /**
- * The feature id for the '<em><b>Post Load</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__POST_LOAD = XML_EVENT_METHOD_CONTAINER__POST_LOAD;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__DESCRIPTION = XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER__CLASS_NAME = XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Entity Listener</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENER_FEATURE_COUNT = XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListeners <em>Entity Listeners</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListeners
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListeners()
- * @generated
- */
- public static final int ENTITY_LISTENERS = 37;
-
- /**
- * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENERS__ENTITY_LISTENERS = 0;
-
- /**
- * The number of structural features of the '<em>Entity Listeners</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_LISTENERS_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings <em>Xml Entity Mappings</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings()
- * @generated
- */
- public static final int XML_ENTITY_MAPPINGS = 38;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult <em>Entity Result</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityResult
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityResult()
- * @generated
- */
- public static final int ENTITY_RESULT = 39;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod <em>Event Method</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EventMethod
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEventMethod()
- * @generated
- */
- public static final int EVENT_METHOD = 40;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult <em>Field Result</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.FieldResult
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFieldResult()
- * @generated
- */
- public static final int FIELD_RESULT = 42;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue <em>Xml Generated Value</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratedValue()
- * @generated
- */
- public static final int XML_GENERATED_VALUE = 43;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator <em>Xml Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator()
- * @generated
- */
- public static final int XML_GENERATOR = 44;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer <em>Xml Generator Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer()
- * @generated
- */
- public static final int XML_GENERATOR_CONTAINER = 45;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId <em>Xml Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlId
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlId()
- * @generated
- */
- public static final int XML_ID = 46;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.Inheritance <em>Inheritance</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.Inheritance
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritance()
- * @generated
- */
- public static final int INHERITANCE = 48;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn <em>Xml Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumn()
- * @generated
- */
- public static final int XML_JOIN_COLUMN = 49;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable <em>Xml Join Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTable()
- * @generated
- */
- public static final int XML_JOIN_TABLE = 51;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.Lob <em>Lob</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.Lob
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getLob()
- * @generated
- */
- public static final int LOB = 53;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany <em>Xml Many To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlManyToMany()
- * @generated
- */
- public static final int XML_MANY_TO_MANY = 54;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne <em>Xml Many To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlManyToOne()
- * @generated
- */
- public static final int XML_MANY_TO_ONE = 55;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.MapKey <em>Map Key</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.MapKey
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getMapKey()
- * @generated
- */
- public static final int MAP_KEY = 56;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping <em>Xml Mapped By Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedByMapping()
- * @generated
- */
- public static final int XML_MAPPED_BY_MAPPING = 57;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass <em>Xml Mapped Superclass</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedSuperclass()
- * @generated
- */
- public static final int XML_MAPPED_SUPERCLASS = 58;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery <em>Xml Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQuery
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery()
- * @generated
- */
- public static final int XML_QUERY = 79;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery <em>Xml Named Native Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedNativeQuery()
- * @generated
- */
- public static final int XML_NAMED_NATIVE_QUERY = 59;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery <em>Xml Named Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedQuery()
- * @generated
- */
- public static final int XML_NAMED_QUERY = 60;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping <em>Xml Null Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNullAttributeMapping()
- * @generated
- */
- public static final int XML_NULL_ATTRIBUTE_MAPPING = 61;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany <em>Xml One To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOneToMany()
- * @generated
- */
- public static final int XML_ONE_TO_MANY = 62;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne <em>Xml One To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOneToOne()
- * @generated
- */
- public static final int XML_ONE_TO_ONE = 63;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn <em>Xml Order Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderColumn()
- * @generated
- */
- public static final int XML_ORDER_COLUMN = 65;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults <em>Xml Persistence Unit Defaults</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS = 67;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata <em>Xml Persistence Unit Metadata</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA = 68;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostLoad <em>Post Load</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostLoad
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostLoad()
- * @generated
- */
- public static final int POST_LOAD = 70;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostPersist <em>Post Persist</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostPersist
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostPersist()
- * @generated
- */
- public static final int POST_PERSIST = 71;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostRemove <em>Post Remove</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostRemove
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostRemove()
- * @generated
- */
- public static final int POST_REMOVE = 72;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostUpdate <em>Post Update</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostUpdate
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostUpdate()
- * @generated
- */
- public static final int POST_UPDATE = 73;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PrePersist <em>Pre Persist</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PrePersist
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPrePersist()
- * @generated
- */
- public static final int PRE_PERSIST = 74;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PreRemove <em>Pre Remove</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PreRemove
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPreRemove()
- * @generated
- */
- public static final int PRE_REMOVE = 75;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PreUpdate <em>Pre Update</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PreUpdate
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPreUpdate()
- * @generated
- */
- public static final int PRE_UPDATE = 76;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn <em>Xml Primary Key Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn()
- * @generated
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN = 77;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer <em>Xml Query Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer()
- * @generated
- */
- public static final int XML_QUERY_CONTAINER = 80;
-
- /**
- * The feature id for the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__VERSION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION;
-
- /**
- * The feature id for the '<em><b>Schema Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__SCHEMA_LOCATION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION;
-
- /**
- * The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__NAMED_QUERIES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__ACCESS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__DESCRIPTION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Persistence Unit Metadata</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Package</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__PACKAGE = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__SCHEMA = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__CATALOG = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Sequence Generators</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Table Generators</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__TABLE_GENERATORS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Mapped Superclasses</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 11;
-
- /**
- * The feature id for the '<em><b>Entities</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__ENTITIES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 12;
-
- /**
- * The feature id for the '<em><b>Embeddables</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS__EMBEDDABLES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 13;
-
- /**
- * The number of structural features of the '<em>Xml Entity Mappings</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_MAPPINGS_FEATURE_COUNT = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 14;
-
- /**
- * The feature id for the '<em><b>Discriminator Column</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_RESULT__DISCRIMINATOR_COLUMN = 0;
-
- /**
- * The feature id for the '<em><b>Entity Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_RESULT__ENTITY_CLASS = 1;
-
- /**
- * The feature id for the '<em><b>Field Results</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_RESULT__FIELD_RESULTS = 2;
-
- /**
- * The number of structural features of the '<em>Entity Result</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ENTITY_RESULT_FEATURE_COUNT = 3;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int EVENT_METHOD__DESCRIPTION = OrmV2_0Package.XML_EVENT_METHOD_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int EVENT_METHOD__METHOD_NAME = OrmV2_0Package.XML_EVENT_METHOD_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Event Method</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int EVENT_METHOD_FEATURE_COUNT = OrmV2_0Package.XML_EVENT_METHOD_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int FIELD_RESULT__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int FIELD_RESULT__COLUMN = 1;
-
- /**
- * The number of structural features of the '<em>Field Result</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int FIELD_RESULT_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Generator</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATED_VALUE__GENERATOR = 0;
-
- /**
- * The feature id for the '<em><b>Strategy</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATED_VALUE__STRATEGY = 1;
-
- /**
- * The number of structural features of the '<em>Xml Generated Value</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATED_VALUE_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR__DESCRIPTION = OrmV2_0Package.XML_GENERATOR_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR__NAME = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR__INITIAL_VALUE = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR__ALLOCATION_SIZE = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml Generator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR_FEATURE_COUNT = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR = 0;
-
- /**
- * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR_CONTAINER__TABLE_GENERATOR = 1;
-
- /**
- * The number of structural features of the '<em>Xml Generator Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR_CONTAINER_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__SEQUENCE_GENERATOR = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__TABLE_GENERATOR = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Generated Value</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID__GENERATED_VALUE = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The number of structural features of the '<em>Xml Id</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 7;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer <em>Xml Id Class Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlIdClassContainer()
- * @generated
- */
- public static final int XML_ID_CLASS_CONTAINER = 47;
-
- /**
- * The feature id for the '<em><b>Id Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID_CLASS_CONTAINER__ID_CLASS = 0;
-
- /**
- * The number of structural features of the '<em>Xml Id Class Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ID_CLASS_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Strategy</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int INHERITANCE__STRATEGY = 0;
-
- /**
- * The number of structural features of the '<em>Inheritance</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int INHERITANCE_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_BASE_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__NAME = ABSTRACT_XML_BASE_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__INSERTABLE = ABSTRACT_XML_BASE_COLUMN__INSERTABLE;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__NULLABLE = ABSTRACT_XML_BASE_COLUMN__NULLABLE;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__TABLE = ABSTRACT_XML_BASE_COLUMN__TABLE;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__UNIQUE = ABSTRACT_XML_BASE_COLUMN__UNIQUE;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__UPDATABLE = ABSTRACT_XML_BASE_COLUMN__UPDATABLE;
-
- /**
- * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME = ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Join Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN_FEATURE_COUNT = ABSTRACT_XML_BASE_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer <em>Xml Join Column Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer()
- * @generated
- */
- public static final int XML_JOIN_COLUMN_CONTAINER = 50;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS = 0;
-
- /**
- * The number of structural features of the '<em>Xml Join Column Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_COLUMN_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable <em>Xml Reference Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlReferenceTable()
- * @generated
- */
- public static final int XML_REFERENCE_TABLE = 69;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE__NAME = ABSTRACT_XML_REFERENCE_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE__CATALOG = ABSTRACT_XML_REFERENCE_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE__SCHEMA = ABSTRACT_XML_REFERENCE_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_REFERENCE_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE__JOIN_COLUMNS = ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Inverse Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS = ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Join Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE_FEATURE_COUNT = ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer <em>Xml Join Table Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer()
- * @generated
- */
- public static final int XML_JOIN_TABLE_CONTAINER = 52;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE_CONTAINER__JOIN_TABLE = 0;
-
- /**
- * The number of structural features of the '<em>Xml Join Table Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JOIN_TABLE_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The number of structural features of the '<em>Lob</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int LOB_FEATURE_COUNT = 0;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__ACCESS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__NAME = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__TARGET_ENTITY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__FETCH = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__CASCADE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAPPED_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__JOIN_TABLE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__ORDER_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__ORDER_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY_TEMPORAL = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY_ENUMERATED = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY_CLASS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__MAP_KEY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
-
- /**
- * The number of structural features of the '<em>Xml Many To Many</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_FEATURE_COUNT = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__ACCESS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__NAME = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__TARGET_ENTITY = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__FETCH = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__CASCADE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__JOIN_TABLE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__JOIN_COLUMNS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID;
-
- /**
- * The feature id for the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__MAPS_ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE__OPTIONAL = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
-
- /**
- * The number of structural features of the '<em>Xml Many To One</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_ONE_FEATURE_COUNT = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int MAP_KEY__NAME = 0;
-
- /**
- * The number of structural features of the '<em>Map Key</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int MAP_KEY_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_BY_MAPPING__MAPPED_BY = 0;
-
- /**
- * The number of structural features of the '<em>Xml Mapped By Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_BY_MAPPING_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__ACCESS = ABSTRACT_XML_TYPE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__CLASS_NAME = ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__METADATA_COMPLETE = ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__DESCRIPTION = ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__ATTRIBUTES = ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES;
-
- /**
- * The feature id for the '<em><b>Id Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__ID_CLASS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Exclude Default Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>Xml Mapped Superclass</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPED_SUPERCLASS_FEATURE_COUNT = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY__DESCRIPTION = OrmV2_0Package.XML_QUERY_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY__NAME = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY__QUERY = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Hints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY__HINTS = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml Query</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_FEATURE_COUNT = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY__DESCRIPTION = XML_QUERY__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY__NAME = XML_QUERY__NAME;
-
- /**
- * The feature id for the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY__QUERY = XML_QUERY__QUERY;
-
- /**
- * The feature id for the '<em><b>Hints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY__HINTS = XML_QUERY__HINTS;
-
- /**
- * The feature id for the '<em><b>Result Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY__RESULT_CLASS = XML_QUERY_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Result Set Mapping</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = XML_QUERY_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Xml Named Native Query</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_NATIVE_QUERY_FEATURE_COUNT = XML_QUERY_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY__DESCRIPTION = XML_QUERY__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY__NAME = XML_QUERY__NAME;
-
- /**
- * The feature id for the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY__QUERY = XML_QUERY__QUERY;
-
- /**
- * The feature id for the '<em><b>Hints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY__HINTS = XML_QUERY__HINTS;
-
- /**
- * The feature id for the '<em><b>Lock Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY__LOCK_MODE = XML_QUERY_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Named Query</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY_FEATURE_COUNT = XML_QUERY_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NULL_ATTRIBUTE_MAPPING__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NULL_ATTRIBUTE_MAPPING__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The number of structural features of the '<em>Xml Null Attribute Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NULL_ATTRIBUTE_MAPPING_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__ACCESS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__NAME = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__TARGET_ENTITY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__FETCH = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__CASCADE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAPPED_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__JOIN_TABLE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__ORDER_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__ORDER_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY_TEMPORAL = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY_ENUMERATED = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY_CLASS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__MAP_KEY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__JOIN_COLUMNS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__ORPHAN_REMOVAL = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Xml One To Many</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_FEATURE_COUNT = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__ACCESS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__NAME = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__TARGET_ENTITY = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__FETCH = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__CASCADE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__JOIN_TABLE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__JOIN_COLUMNS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID;
-
- /**
- * The feature id for the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__MAPS_ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__OPTIONAL = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__MAPPED_BY = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE__ORPHAN_REMOVAL = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml One To One</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE_FEATURE_COUNT = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint <em>Xml Query Hint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryHint()
- * @generated
- */
- public static final int XML_QUERY_HINT = 81;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSecondaryTable()
- * @generated
- */
- public static final int XML_SECONDARY_TABLE = 82;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator <em>Xml Sequence Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSequenceGenerator()
- * @generated
- */
- public static final int XML_SEQUENCE_GENERATOR = 83;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping <em>Sql Result Set Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getSqlResultSetMapping()
- * @generated
- */
- public static final int SQL_RESULT_SET_MAPPING = 84;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTable <em>Xml Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTable()
- * @generated
- */
- public static final int XML_TABLE = 85;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator <em>Xml Table Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator()
- * @generated
- */
- public static final int XML_TABLE_GENERATOR = 86;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTransient <em>Xml Transient</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTransient
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTransient()
- * @generated
- */
- public static final int XML_TRANSIENT = 87;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint <em>Xml Unique Constraint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlUniqueConstraint()
- * @generated
- */
- public static final int XML_UNIQUE_CONSTRAINT = 89;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion <em>Xml Version</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlVersion
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlVersion()
- * @generated
- */
- public static final int XML_VERSION = 90;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable <em>Xml Orderable</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable()
- * @generated
- */
- public static final int XML_ORDERABLE = 64;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDERABLE__ORDER_COLUMN = OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDERABLE__ORDER_BY = OrmV2_0Package.XML_ORDERABLE_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Orderable</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDERABLE_FEATURE_COUNT = OrmV2_0Package.XML_ORDERABLE_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN__NULLABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN__INSERTABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN__UPDATABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml Order Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS = XML_ACCESS_HOLDER__ACCESS;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION = XML_ACCESS_HOLDER_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Delimited Identifiers</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS = XML_ACCESS_HOLDER_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA = XML_ACCESS_HOLDER_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG = XML_ACCESS_HOLDER_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Cascade Persist</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST = XML_ACCESS_HOLDER_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS = XML_ACCESS_HOLDER_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Xml Persistence Unit Defaults</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS_FEATURE_COUNT = XML_ACCESS_HOLDER_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Persistence Unit Defaults</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Xml Persistence Unit Metadata</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA_FEATURE_COUNT = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_REFERENCE_TABLE__JOIN_COLUMNS = 0;
-
- /**
- * The number of structural features of the '<em>Xml Reference Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_REFERENCE_TABLE_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_LOAD__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_LOAD__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Post Load</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_LOAD_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_PERSIST__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_PERSIST__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Post Persist</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_PERSIST_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_REMOVE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_REMOVE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Post Remove</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_REMOVE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_UPDATE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_UPDATE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Post Update</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int POST_UPDATE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_PERSIST__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_PERSIST__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Pre Persist</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_PERSIST_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_REMOVE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_REMOVE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Pre Remove</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_REMOVE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_UPDATE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Method Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_UPDATE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
-
- /**
- * The number of structural features of the '<em>Pre Update</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int PRE_UPDATE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Primary Key Join Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer <em>Xml Primary Key Join Column Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumnContainer()
- * @generated
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER = 78;
-
- /**
- * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER__PRIMARY_KEY_JOIN_COLUMNS = 0;
-
- /**
- * The number of structural features of the '<em>Xml Primary Key Join Column Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_CONTAINER__NAMED_QUERIES = 0;
-
- /**
- * The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES = 1;
-
- /**
- * The number of structural features of the '<em>Xml Query Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_CONTAINER_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_HINT__DESCRIPTION = OrmV2_0Package.XML_QUERY_HINT_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_HINT__NAME = OrmV2_0Package.XML_QUERY_HINT_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_HINT__VALUE = OrmV2_0Package.XML_QUERY_HINT_20_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Xml Query Hint</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_HINT_FEATURE_COUNT = OrmV2_0Package.XML_QUERY_HINT_20_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SECONDARY_TABLE__NAME = ABSTRACT_XML_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SECONDARY_TABLE__CATALOG = ABSTRACT_XML_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SECONDARY_TABLE__SCHEMA = ABSTRACT_XML_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SECONDARY_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_XML_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Secondary Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SECONDARY_TABLE_FEATURE_COUNT = ABSTRACT_XML_TABLE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__DESCRIPTION = XML_GENERATOR__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__NAME = XML_GENERATOR__NAME;
-
- /**
- * The feature id for the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__INITIAL_VALUE = XML_GENERATOR__INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE = XML_GENERATOR__ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__CATALOG = XML_GENERATOR_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__SCHEMA = XML_GENERATOR_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR__SEQUENCE_NAME = XML_GENERATOR_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Xml Sequence Generator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR_FEATURE_COUNT = XML_GENERATOR_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int SQL_RESULT_SET_MAPPING__DESCRIPTION = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int SQL_RESULT_SET_MAPPING__NAME = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Entity Results</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int SQL_RESULT_SET_MAPPING__ENTITY_RESULTS = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Column Results</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int SQL_RESULT_SET_MAPPING__COLUMN_RESULTS = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Sql Result Set Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int SQL_RESULT_SET_MAPPING_FEATURE_COUNT = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE__NAME = ABSTRACT_XML_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE__CATALOG = ABSTRACT_XML_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE__SCHEMA = ABSTRACT_XML_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The number of structural features of the '<em>Xml Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_FEATURE_COUNT = ABSTRACT_XML_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__DESCRIPTION = XML_GENERATOR__DESCRIPTION;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__NAME = XML_GENERATOR__NAME;
-
- /**
- * The feature id for the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__INITIAL_VALUE = XML_GENERATOR__INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__ALLOCATION_SIZE = XML_GENERATOR__ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__TABLE = XML_GENERATOR_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__CATALOG = XML_GENERATOR_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__SCHEMA = XML_GENERATOR_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__PK_COLUMN_NAME = XML_GENERATOR_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__VALUE_COLUMN_NAME = XML_GENERATOR_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__PK_COLUMN_VALUE = XML_GENERATOR_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS = XML_GENERATOR_FEATURE_COUNT + 6;
-
- /**
- * The number of structural features of the '<em>Xml Table Generator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TABLE_GENERATOR_FEATURE_COUNT = XML_GENERATOR_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TRANSIENT__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TRANSIENT__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The number of structural features of the '<em>Xml Transient</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_TRANSIENT_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_UNIQUE_CONSTRAINT__NAME = OrmV2_0Package.XML_UNIQUE_CONSTRAINT_20__NAME;
-
- /**
- * The feature id for the '<em><b>Column Names</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_UNIQUE_CONSTRAINT__COLUMN_NAMES = OrmV2_0Package.XML_UNIQUE_CONSTRAINT_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Unique Constraint</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_UNIQUE_CONSTRAINT_FEATURE_COUNT = OrmV2_0Package.XML_UNIQUE_CONSTRAINT_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>Xml Version</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_VERSION_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType <em>Discriminator Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getDiscriminatorType()
- * @generated
- */
- public static final int DISCRIMINATOR_TYPE = 91;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EnumType <em>Enum Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEnumType()
- * @generated
- */
- public static final int ENUM_TYPE = 92;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.FetchType <em>Fetch Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFetchType()
- * @generated
- */
- public static final int FETCH_TYPE = 93;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.GenerationType <em>Generation Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.GenerationType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getGenerationType()
- * @generated
- */
- public static final int GENERATION_TYPE = 94;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.InheritanceType <em>Inheritance Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.InheritanceType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritanceType()
- * @generated
- */
- public static final int INHERITANCE_TYPE = 95;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType <em>Temporal Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getTemporalType()
- * @generated
- */
- public static final int TEMPORAL_TYPE = 96;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlAttributeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlBaseColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlBaseColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlBaseDiscriminatorColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlEmbeddedEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlMultiRelationshipMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlNamedColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlBaseDiscriminatorColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlBaseJoinColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlNamedColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlRelationshipMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlSingleRelationshipMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlTypeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAccessHolderEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAttributeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAssociationOverrideEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAssociationOverrideContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAttributeOverrideEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAttributeOverrideContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass attributesEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlBasicEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass cascadeTypeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlClassReferenceEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlCollectionTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass columnMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass columnResultEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlConvertibleMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlDiscriminatorColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlElementCollectionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEmbeddableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEmbeddedEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEmbeddedIdEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEntityEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass entityListenerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass entityListenersEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEntityMappingsEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass entityResultEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass eventMethodEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEventMethodContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass fieldResultEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlGeneratedValueEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlGeneratorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlGeneratorContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlIdEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlIdClassContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass inheritanceEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlJoinColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlJoinColumnContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlJoinTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlJoinTableContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass lobEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlManyToManyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlManyToOneEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass mapKeyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMappedByMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMappedSuperclassEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlNamedNativeQueryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlNamedQueryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlNullAttributeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOneToManyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOneToOneEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOrderColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOverrideEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceUnitDefaultsEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceUnitMetadataEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractXmlReferenceTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlReferenceTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass postLoadEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass postPersistEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass postRemoveEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass postUpdateEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass prePersistEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass preRemoveEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass preUpdateEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPrimaryKeyJoinColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPrimaryKeyJoinColumnContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlQueryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlQueryContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlQueryHintEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlSecondaryTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlSequenceGeneratorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass sqlResultSetMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlTableGeneratorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlTransientEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlTypeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlUniqueConstraintEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlVersionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOrderableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum discriminatorTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum enumTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum fetchTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum generationTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum inheritanceTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum temporalTypeEEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private OrmPackage()
- {
- super(eNS_URI, OrmFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link OrmPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static OrmPackage init()
- {
- if (isInited) return (OrmPackage)EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI);
-
- // Obtain or create and register package
- OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new OrmPackage());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
- XMLTypePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
- OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
- PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
- PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
-
- // Create package meta-data objects
- theOrmPackage.createPackageContents();
- theCommonPackage.createPackageContents();
- theOrmV2_0Package.createPackageContents();
- thePersistencePackage.createPackageContents();
- thePersistenceV2_0Package.createPackageContents();
-
- // Initialize created meta-data
- theOrmPackage.initializePackageContents();
- theCommonPackage.initializePackageContents();
- theOrmV2_0Package.initializePackageContents();
- thePersistencePackage.initializePackageContents();
- thePersistenceV2_0Package.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theOrmPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(OrmPackage.eNS_URI, theOrmPackage);
- return theOrmPackage;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping <em>Abstract Xml Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Attribute Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping
- * @generated
- */
- public EClass getAbstractXmlAttributeMapping()
- {
- return abstractXmlAttributeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn <em>Xml Base Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Base Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn
- * @generated
- */
- public EClass getXmlBaseColumn()
- {
- return xmlBaseColumnEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getInsertable <em>Insertable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Insertable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getInsertable()
- * @see #getXmlBaseColumn()
- * @generated
- */
- public EAttribute getXmlBaseColumn_Insertable()
- {
- return (EAttribute)xmlBaseColumnEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getNullable <em>Nullable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Nullable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getNullable()
- * @see #getXmlBaseColumn()
- * @generated
- */
- public EAttribute getXmlBaseColumn_Nullable()
- {
- return (EAttribute)xmlBaseColumnEClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getTable <em>Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getTable()
- * @see #getXmlBaseColumn()
- * @generated
- */
- public EAttribute getXmlBaseColumn_Table()
- {
- return (EAttribute)xmlBaseColumnEClass.getEStructuralFeatures().get(2);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUnique <em>Unique</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Unique</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUnique()
- * @see #getXmlBaseColumn()
- * @generated
- */
- public EAttribute getXmlBaseColumn_Unique()
- {
- return (EAttribute)xmlBaseColumnEClass.getEStructuralFeatures().get(3);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUpdatable <em>Updatable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Updatable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUpdatable()
- * @see #getXmlBaseColumn()
- * @generated
- */
- public EAttribute getXmlBaseColumn_Updatable()
- {
- return (EAttribute)xmlBaseColumnEClass.getEStructuralFeatures().get(4);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn <em>Abstract Xml Base Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Base Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn
- * @generated
- */
- public EClass getAbstractXmlBaseColumn()
- {
- return abstractXmlBaseColumnEClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn <em>Abstract Xml Base Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Base Discriminator Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn
- * @generated
- */
- public EClass getAbstractXmlBaseDiscriminatorColumn()
- {
- return abstractXmlBaseDiscriminatorColumnEClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded <em>Abstract Xml Embedded</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Embedded</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded
- * @generated
- */
- public EClass getAbstractXmlEmbedded()
- {
- return abstractXmlEmbeddedEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping <em>Abstract Xml Multi Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Multi Relationship Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping
- * @generated
- */
- public EClass getAbstractXmlMultiRelationshipMapping()
- {
- return abstractXmlMultiRelationshipMappingEClass;
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey <em>Map Key</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Map Key</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey()
- * @see #getAbstractXmlMultiRelationshipMapping()
- * @generated
- */
- public EReference getAbstractXmlMultiRelationshipMapping_MapKey()
- {
- return (EReference)abstractXmlMultiRelationshipMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn <em>Xml Named Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Named Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn
- * @generated
- */
- public EClass getXmlNamedColumn()
- {
- return xmlNamedColumnEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getColumnDefinition <em>Column Definition</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Column Definition</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getColumnDefinition()
- * @see #getXmlNamedColumn()
- * @generated
- */
- public EAttribute getXmlNamedColumn_ColumnDefinition()
- {
- return (EAttribute)xmlNamedColumnEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getName()
- * @see #getXmlNamedColumn()
- * @generated
- */
- public EAttribute getXmlNamedColumn_Name()
- {
- return (EAttribute)xmlNamedColumnEClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn <em>Xml Base Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Base Discriminator Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn
- * @generated
- */
- public EClass getXmlBaseDiscriminatorColumn()
- {
- return xmlBaseDiscriminatorColumnEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Discriminator Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getDiscriminatorType()
- * @see #getXmlBaseDiscriminatorColumn()
- * @generated
- */
- public EAttribute getXmlBaseDiscriminatorColumn_DiscriminatorType()
- {
- return (EAttribute)xmlBaseDiscriminatorColumnEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getLength <em>Length</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Length</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getLength()
- * @see #getXmlBaseDiscriminatorColumn()
- * @generated
- */
- public EAttribute getXmlBaseDiscriminatorColumn_Length()
- {
- return (EAttribute)xmlBaseDiscriminatorColumnEClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn <em>Xml Base Join Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Base Join Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn
- * @generated
- */
- public EClass getXmlBaseJoinColumn()
- {
- return xmlBaseJoinColumnEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Referenced Column Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn#getReferencedColumnName()
- * @see #getXmlBaseJoinColumn()
- * @generated
- */
- public EAttribute getXmlBaseJoinColumn_ReferencedColumnName()
- {
- return (EAttribute)xmlBaseJoinColumnEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn <em>Abstract Xml Named Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Named Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn
- * @generated
- */
- public EClass getAbstractXmlNamedColumn()
- {
- return abstractXmlNamedColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping <em>Abstract Xml Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Relationship Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping
- * @generated
- */
- public EClass getAbstractXmlRelationshipMapping()
- {
- return abstractXmlRelationshipMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity <em>Target Entity</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Target Entity</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity()
- * @see #getAbstractXmlRelationshipMapping()
- * @generated
- */
- public EAttribute getAbstractXmlRelationshipMapping_TargetEntity()
- {
- return (EAttribute)abstractXmlRelationshipMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getFetch <em>Fetch</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Fetch</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getFetch()
- * @see #getAbstractXmlRelationshipMapping()
- * @generated
- */
- public EAttribute getAbstractXmlRelationshipMapping_Fetch()
- {
- return (EAttribute)abstractXmlRelationshipMappingEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getCascade <em>Cascade</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Cascade</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping#getCascade()
- * @see #getAbstractXmlRelationshipMapping()
- * @generated
- */
- public EReference getAbstractXmlRelationshipMapping_Cascade()
- {
- return (EReference)abstractXmlRelationshipMappingEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping <em>Abstract Xml Single Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Single Relationship Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping
- * @generated
- */
- public EClass getAbstractXmlSingleRelationshipMapping()
- {
- return abstractXmlSingleRelationshipMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional <em>Optional</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Optional</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional()
- * @see #getAbstractXmlSingleRelationshipMapping()
- * @generated
- */
- public EAttribute getAbstractXmlSingleRelationshipMapping_Optional()
- {
- return (EAttribute)abstractXmlSingleRelationshipMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable <em>Abstract Xml Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable
- * @generated
- */
- public EClass getAbstractXmlTable()
- {
- return abstractXmlTableEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getName()
- * @see #getAbstractXmlTable()
- * @generated
- */
- public EAttribute getAbstractXmlTable_Name()
- {
- return (EAttribute)abstractXmlTableEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getCatalog <em>Catalog</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Catalog</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getCatalog()
- * @see #getAbstractXmlTable()
- * @generated
- */
- public EAttribute getAbstractXmlTable_Catalog()
- {
- return (EAttribute)abstractXmlTableEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getSchema <em>Schema</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Schema</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getSchema()
- * @see #getAbstractXmlTable()
- * @generated
- */
- public EAttribute getAbstractXmlTable_Schema()
- {
- return (EAttribute)abstractXmlTableEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getUniqueConstraints <em>Unique Constraints</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Unique Constraints</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable#getUniqueConstraints()
- * @see #getAbstractXmlTable()
- * @generated
- */
- public EReference getAbstractXmlTable_UniqueConstraints()
- {
- return (EReference)abstractXmlTableEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping <em>Abstract Xml Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Type Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping
- * @generated
- */
- public EClass getAbstractXmlTypeMapping()
- {
- return abstractXmlTypeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder <em>Xml Access Holder</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Access Holder</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder
- * @generated
- */
- public EClass getXmlAccessHolder()
- {
- return xmlAccessHolderEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder#getAccess <em>Access</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Access</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder#getAccess()
- * @see #getXmlAccessHolder()
- * @generated
- */
- public EAttribute getXmlAccessHolder_Access()
- {
- return (EAttribute)xmlAccessHolderEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping <em>Xml Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Attribute Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping
- * @generated
- */
- public EClass getXmlAttributeMapping()
- {
- return xmlAttributeMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping#getName()
- * @see #getXmlAttributeMapping()
- * @generated
- */
- public EAttribute getXmlAttributeMapping_Name()
- {
- return (EAttribute)xmlAttributeMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride <em>Xml Association Override</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Association Override</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride
- * @generated
- */
- public EClass getXmlAssociationOverride()
- {
- return xmlAssociationOverrideEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer <em>Xml Association Override Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Association Override Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer
- * @generated
- */
- public EClass getXmlAssociationOverrideContainer()
- {
- return xmlAssociationOverrideContainerEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer#getAssociationOverrides <em>Association Overrides</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Association Overrides</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer#getAssociationOverrides()
- * @see #getXmlAssociationOverrideContainer()
- * @generated
- */
- public EReference getXmlAssociationOverrideContainer_AssociationOverrides()
- {
- return (EReference)xmlAssociationOverrideContainerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride <em>Xml Attribute Override</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Attribute Override</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride
- * @generated
- */
- public EClass getXmlAttributeOverride()
- {
- return xmlAttributeOverrideEClass;
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride#getColumn <em>Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride#getColumn()
- * @see #getXmlAttributeOverride()
- * @generated
- */
- public EReference getXmlAttributeOverride_Column()
- {
- return (EReference)xmlAttributeOverrideEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer <em>Xml Attribute Override Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Attribute Override Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer
- * @generated
- */
- public EClass getXmlAttributeOverrideContainer()
- {
- return xmlAttributeOverrideContainerEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer#getAttributeOverrides <em>Attribute Overrides</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Attribute Overrides</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer#getAttributeOverrides()
- * @see #getXmlAttributeOverrideContainer()
- * @generated
- */
- public EReference getXmlAttributeOverrideContainer_AttributeOverrides()
- {
- return (EReference)xmlAttributeOverrideContainerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes <em>Attributes</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Attributes</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes
- * @generated
- */
- public EClass getAttributes()
- {
- return attributesEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getIds <em>Ids</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Ids</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getIds()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_Ids()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getEmbeddedIds <em>Embedded Ids</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Embedded Ids</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getEmbeddedIds()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_EmbeddedIds()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getBasics <em>Basics</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Basics</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getBasics()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_Basics()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getVersions <em>Versions</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Versions</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getVersions()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_Versions()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getManyToOnes <em>Many To Ones</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Many To Ones</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getManyToOnes()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_ManyToOnes()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getOneToManys <em>One To Manys</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>One To Manys</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getOneToManys()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_OneToManys()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getOneToOnes <em>One To Ones</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>One To Ones</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getOneToOnes()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_OneToOnes()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getManyToManys <em>Many To Manys</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Many To Manys</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getManyToManys()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_ManyToManys()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getEmbeddeds <em>Embeddeds</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Embeddeds</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getEmbeddeds()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_Embeddeds()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes#getTransients <em>Transients</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Transients</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes#getTransients()
- * @see #getAttributes()
- * @generated
- */
- public EReference getAttributes_Transients()
- {
- return (EReference)attributesEClass.getEStructuralFeatures().get(9);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic <em>Xml Basic</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Basic</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBasic
- * @generated
- */
- public EClass getXmlBasic()
- {
- return xmlBasicEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getFetch <em>Fetch</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Fetch</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getFetch()
- * @see #getXmlBasic()
- * @generated
- */
- public EAttribute getXmlBasic_Fetch()
- {
- return (EAttribute)xmlBasicEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getOptional <em>Optional</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Optional</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getOptional()
- * @see #getXmlBasic()
- * @generated
- */
- public EAttribute getXmlBasic_Optional()
- {
- return (EAttribute)xmlBasicEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType <em>Cascade Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Cascade Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType
- * @generated
- */
- public EClass getCascadeType()
- {
- return cascadeTypeEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeAll <em>Cascade All</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade All</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeAll()
- * @see #getCascadeType()
- * @generated
- */
- public EAttribute getCascadeType_CascadeAll()
- {
- return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadePersist <em>Cascade Persist</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade Persist</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadePersist()
- * @see #getCascadeType()
- * @generated
- */
- public EAttribute getCascadeType_CascadePersist()
- {
- return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeMerge <em>Cascade Merge</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade Merge</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeMerge()
- * @see #getCascadeType()
- * @generated
- */
- public EAttribute getCascadeType_CascadeMerge()
- {
- return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRemove <em>Cascade Remove</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade Remove</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRemove()
- * @see #getCascadeType()
- * @generated
- */
- public EAttribute getCascadeType_CascadeRemove()
- {
- return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRefresh <em>Cascade Refresh</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade Refresh</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType#isCascadeRefresh()
- * @see #getCascadeType()
- * @generated
- */
- public EAttribute getCascadeType_CascadeRefresh()
- {
- return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference <em>Xml Class Reference</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Class Reference</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference
- * @generated
- */
- public EClass getXmlClassReference()
- {
- return xmlClassReferenceEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference#getClassName <em>Class Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Class Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference#getClassName()
- * @see #getXmlClassReference()
- * @generated
- */
- public EAttribute getXmlClassReference_ClassName()
- {
- return (EAttribute)xmlClassReferenceEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable <em>Xml Collection Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Collection Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable
- * @generated
- */
- public EClass getXmlCollectionTable()
- {
- return xmlCollectionTableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn <em>Xml Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlColumn
- * @generated
- */
- public EClass getXmlColumn()
- {
- return xmlColumnEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getLength <em>Length</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Length</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getLength()
- * @see #getXmlColumn()
- * @generated
- */
- public EAttribute getXmlColumn_Length()
- {
- return (EAttribute)xmlColumnEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getPrecision <em>Precision</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Precision</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getPrecision()
- * @see #getXmlColumn()
- * @generated
- */
- public EAttribute getXmlColumn_Precision()
- {
- return (EAttribute)xmlColumnEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getScale <em>Scale</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Scale</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getScale()
- * @see #getXmlColumn()
- * @generated
- */
- public EAttribute getXmlColumn_Scale()
- {
- return (EAttribute)xmlColumnEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping <em>Column Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Column Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping
- * @generated
- */
- public EClass getColumnMapping()
- {
- return columnMappingEClass;
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping#getColumn <em>Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping#getColumn()
- * @see #getColumnMapping()
- * @generated
- */
- public EReference getColumnMapping_Column()
- {
- return (EReference)columnMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult <em>Column Result</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Column Result</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnResult
- * @generated
- */
- public EClass getColumnResult()
- {
- return columnResultEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnResult#getName()
- * @see #getColumnResult()
- * @generated
- */
- public EAttribute getColumnResult_Name()
- {
- return (EAttribute)columnResultEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping <em>Xml Convertible Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Convertible Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping
- * @generated
- */
- public EClass getXmlConvertibleMapping()
- {
- return xmlConvertibleMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#isLob <em>Lob</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Lob</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#isLob()
- * @see #getXmlConvertibleMapping()
- * @generated
- */
- public EAttribute getXmlConvertibleMapping_Lob()
- {
- return (EAttribute)xmlConvertibleMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getTemporal <em>Temporal</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Temporal</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getTemporal()
- * @see #getXmlConvertibleMapping()
- * @generated
- */
- public EAttribute getXmlConvertibleMapping_Temporal()
- {
- return (EAttribute)xmlConvertibleMappingEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getEnumerated <em>Enumerated</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Enumerated</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getEnumerated()
- * @see #getXmlConvertibleMapping()
- * @generated
- */
- public EAttribute getXmlConvertibleMapping_Enumerated()
- {
- return (EAttribute)xmlConvertibleMappingEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn <em>Xml Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Discriminator Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn
- * @generated
- */
- public EClass getXmlDiscriminatorColumn()
- {
- return xmlDiscriminatorColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection <em>Xml Element Collection</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Element Collection</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection
- * @generated
- */
- public EClass getXmlElementCollection()
- {
- return xmlElementCollectionEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable <em>Xml Embeddable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Embeddable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable
- * @generated
- */
- public EClass getXmlEmbeddable()
- {
- return xmlEmbeddableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded <em>Xml Embedded</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Embedded</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded
- * @generated
- */
- public EClass getXmlEmbedded()
- {
- return xmlEmbeddedEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId <em>Xml Embedded Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Embedded Id</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId
- * @generated
- */
- public EClass getXmlEmbeddedId()
- {
- return xmlEmbeddedIdEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity <em>Xml Entity</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Entity</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity
- * @generated
- */
- public EClass getXmlEntity()
- {
- return xmlEntityEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getName()
- * @see #getXmlEntity()
- * @generated
- */
- public EAttribute getXmlEntity_Name()
- {
- return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getTable <em>Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getTable()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_Table()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSecondaryTables <em>Secondary Tables</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Secondary Tables</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSecondaryTables()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_SecondaryTables()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Primary Key Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPrimaryKeyJoinColumns()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_PrimaryKeyJoinColumns()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getInheritance <em>Inheritance</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Inheritance</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getInheritance()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_Inheritance()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorValue <em>Discriminator Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Discriminator Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorValue()
- * @see #getXmlEntity()
- * @generated
- */
- public EAttribute getXmlEntity_DiscriminatorValue()
- {
- return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorColumn <em>Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Discriminator Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorColumn()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_DiscriminatorColumn()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Sql Result Set Mappings</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSqlResultSetMappings()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_SqlResultSetMappings()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Exclude Default Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeDefaultListeners()
- * @see #getXmlEntity()
- * @generated
- */
- public EAttribute getXmlEntity_ExcludeDefaultListeners()
- {
- return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Exclude Superclass Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeSuperclassListeners()
- * @see #getXmlEntity()
- * @generated
- */
- public EAttribute getXmlEntity_ExcludeSuperclassListeners()
- {
- return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(9);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getEntityListeners <em>Entity Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Entity Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getEntityListeners()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_EntityListeners()
- {
- return (EReference)xmlEntityEClass.getEStructuralFeatures().get(10);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener <em>Entity Listener</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Entity Listener</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListener
- * @generated
- */
- public EClass getEntityListener()
- {
- return entityListenerEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getClassName <em>Class Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Class Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListener#getClassName()
- * @see #getEntityListener()
- * @generated
- */
- public EAttribute getEntityListener_ClassName()
- {
- return (EAttribute)entityListenerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListeners <em>Entity Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Entity Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListeners
- * @generated
- */
- public EClass getEntityListeners()
- {
- return entityListenersEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListeners#getEntityListeners <em>Entity Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Entity Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListeners#getEntityListeners()
- * @see #getEntityListeners()
- * @generated
- */
- public EReference getEntityListeners_EntityListeners()
- {
- return (EReference)entityListenersEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings <em>Xml Entity Mappings</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Entity Mappings</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings
- * @generated
- */
- public EClass getXmlEntityMappings()
- {
- return xmlEntityMappingsEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getDescription()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EAttribute getXmlEntityMappings_Description()
- {
- return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata <em>Persistence Unit Metadata</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Persistence Unit Metadata</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_PersistenceUnitMetadata()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPackage <em>Package</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Package</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPackage()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EAttribute getXmlEntityMappings_Package()
- {
- return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSchema <em>Schema</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Schema</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSchema()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EAttribute getXmlEntityMappings_Schema()
- {
- return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getCatalog <em>Catalog</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Catalog</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getCatalog()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EAttribute getXmlEntityMappings_Catalog()
- {
- return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSequenceGenerators <em>Sequence Generators</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Sequence Generators</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSequenceGenerators()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_SequenceGenerators()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getTableGenerators <em>Table Generators</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Table Generators</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getTableGenerators()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_TableGenerators()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Sql Result Set Mappings</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSqlResultSetMappings()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_SqlResultSetMappings()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getMappedSuperclasses <em>Mapped Superclasses</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Mapped Superclasses</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getMappedSuperclasses()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_MappedSuperclasses()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getEntities <em>Entities</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Entities</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getEntities()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_Entities()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(9);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getEmbeddables <em>Embeddables</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Embeddables</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getEmbeddables()
- * @see #getXmlEntityMappings()
- * @generated
- */
- public EReference getXmlEntityMappings_Embeddables()
- {
- return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(10);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult <em>Entity Result</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Entity Result</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityResult
- * @generated
- */
- public EClass getEntityResult()
- {
- return entityResultEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getDiscriminatorColumn <em>Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Discriminator Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getDiscriminatorColumn()
- * @see #getEntityResult()
- * @generated
- */
- public EAttribute getEntityResult_DiscriminatorColumn()
- {
- return (EAttribute)entityResultEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getEntityClass <em>Entity Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Entity Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getEntityClass()
- * @see #getEntityResult()
- * @generated
- */
- public EAttribute getEntityResult_EntityClass()
- {
- return (EAttribute)entityResultEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getFieldResults <em>Field Results</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Field Results</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityResult#getFieldResults()
- * @see #getEntityResult()
- * @generated
- */
- public EReference getEntityResult_FieldResults()
- {
- return (EReference)entityResultEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod <em>Event Method</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Event Method</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EventMethod
- * @generated
- */
- public EClass getEventMethod()
- {
- return eventMethodEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod#getMethodName <em>Method Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Method Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EventMethod#getMethodName()
- * @see #getEventMethod()
- * @generated
- */
- public EAttribute getEventMethod_MethodName()
- {
- return (EAttribute)eventMethodEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer <em>Xml Event Method Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Event Method Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer
- * @generated
- */
- public EClass getXmlEventMethodContainer()
- {
- return xmlEventMethodContainerEClass;
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPrePersist <em>Pre Persist</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Pre Persist</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPrePersist()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PrePersist()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostPersist <em>Post Persist</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Post Persist</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostPersist()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PostPersist()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreRemove <em>Pre Remove</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Pre Remove</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreRemove()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PreRemove()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostRemove <em>Post Remove</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Post Remove</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostRemove()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PostRemove()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreUpdate <em>Pre Update</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Pre Update</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreUpdate()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PreUpdate()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostUpdate <em>Post Update</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Post Update</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostUpdate()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PostUpdate()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostLoad <em>Post Load</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Post Load</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostLoad()
- * @see #getXmlEventMethodContainer()
- * @generated
- */
- public EReference getXmlEventMethodContainer_PostLoad()
- {
- return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult <em>Field Result</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Field Result</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FieldResult
- * @generated
- */
- public EClass getFieldResult()
- {
- return fieldResultEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getName()
- * @see #getFieldResult()
- * @generated
- */
- public EAttribute getFieldResult_Name()
- {
- return (EAttribute)fieldResultEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getColumn <em>Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FieldResult#getColumn()
- * @see #getFieldResult()
- * @generated
- */
- public EAttribute getFieldResult_Column()
- {
- return (EAttribute)fieldResultEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue <em>Xml Generated Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Generated Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue
- * @generated
- */
- public EClass getXmlGeneratedValue()
- {
- return xmlGeneratedValueEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getGenerator <em>Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Generator</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getGenerator()
- * @see #getXmlGeneratedValue()
- * @generated
- */
- public EAttribute getXmlGeneratedValue_Generator()
- {
- return (EAttribute)xmlGeneratedValueEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getStrategy <em>Strategy</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Strategy</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getStrategy()
- * @see #getXmlGeneratedValue()
- * @generated
- */
- public EAttribute getXmlGeneratedValue_Strategy()
- {
- return (EAttribute)xmlGeneratedValueEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator <em>Xml Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Generator</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator
- * @generated
- */
- public EClass getXmlGenerator()
- {
- return xmlGeneratorEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getName()
- * @see #getXmlGenerator()
- * @generated
- */
- public EAttribute getXmlGenerator_Name()
- {
- return (EAttribute)xmlGeneratorEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getInitialValue <em>Initial Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Initial Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getInitialValue()
- * @see #getXmlGenerator()
- * @generated
- */
- public EAttribute getXmlGenerator_InitialValue()
- {
- return (EAttribute)xmlGeneratorEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getAllocationSize <em>Allocation Size</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Allocation Size</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getAllocationSize()
- * @see #getXmlGenerator()
- * @generated
- */
- public EAttribute getXmlGenerator_AllocationSize()
- {
- return (EAttribute)xmlGeneratorEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer <em>Xml Generator Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Generator Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer
- * @generated
- */
- public EClass getXmlGeneratorContainer()
- {
- return xmlGeneratorContainerEClass;
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator <em>Sequence Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Sequence Generator</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator()
- * @see #getXmlGeneratorContainer()
- * @generated
- */
- public EReference getXmlGeneratorContainer_SequenceGenerator()
- {
- return (EReference)xmlGeneratorContainerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getTableGenerator <em>Table Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Table Generator</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getTableGenerator()
- * @see #getXmlGeneratorContainer()
- * @generated
- */
- public EReference getXmlGeneratorContainer_TableGenerator()
- {
- return (EReference)xmlGeneratorContainerEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId <em>Xml Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Id</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlId
- * @generated
- */
- public EClass getXmlId()
- {
- return xmlIdEClass;
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getGeneratedValue <em>Generated Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Generated Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlId#getGeneratedValue()
- * @see #getXmlId()
- * @generated
- */
- public EReference getXmlId_GeneratedValue()
- {
- return (EReference)xmlIdEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer <em>Xml Id Class Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Id Class Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer
- * @generated
- */
- public EClass getXmlIdClassContainer()
- {
- return xmlIdClassContainerEClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer#getIdClass <em>Id Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Id Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer#getIdClass()
- * @see #getXmlIdClassContainer()
- * @generated
- */
- public EReference getXmlIdClassContainer_IdClass()
- {
- return (EReference)xmlIdClassContainerEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.Inheritance <em>Inheritance</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Inheritance</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Inheritance
- * @generated
- */
- public EClass getInheritance()
- {
- return inheritanceEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.Inheritance#getStrategy <em>Strategy</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Strategy</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Inheritance#getStrategy()
- * @see #getInheritance()
- * @generated
- */
- public EAttribute getInheritance_Strategy()
- {
- return (EAttribute)inheritanceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn <em>Xml Join Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Join Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn
- * @generated
- */
- public EClass getXmlJoinColumn()
- {
- return xmlJoinColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer <em>Xml Join Column Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Join Column Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer
- * @generated
- */
- public EClass getXmlJoinColumnContainer()
- {
- return xmlJoinColumnContainerEClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer#getJoinColumns <em>Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer#getJoinColumns()
- * @see #getXmlJoinColumnContainer()
- * @generated
- */
- public EReference getXmlJoinColumnContainer_JoinColumns()
- {
- return (EReference)xmlJoinColumnContainerEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable <em>Xml Join Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Join Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable
- * @generated
- */
- public EClass getXmlJoinTable()
- {
- return xmlJoinTableEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable#getInverseJoinColumns <em>Inverse Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Inverse Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable#getInverseJoinColumns()
- * @see #getXmlJoinTable()
- * @generated
- */
- public EReference getXmlJoinTable_InverseJoinColumns()
- {
- return (EReference)xmlJoinTableEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer <em>Xml Join Table Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Join Table Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer
- * @generated
- */
- public EClass getXmlJoinTableContainer()
- {
- return xmlJoinTableContainerEClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer#getJoinTable <em>Join Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Join Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer#getJoinTable()
- * @see #getXmlJoinTableContainer()
- * @generated
- */
- public EReference getXmlJoinTableContainer_JoinTable()
- {
- return (EReference)xmlJoinTableContainerEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.Lob <em>Lob</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Lob</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.Lob
- * @generated
- */
- public EClass getLob()
- {
- return lobEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany <em>Xml Many To Many</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Many To Many</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany
- * @generated
- */
- public EClass getXmlManyToMany()
- {
- return xmlManyToManyEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne <em>Xml Many To One</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Many To One</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne
- * @generated
- */
- public EClass getXmlManyToOne()
- {
- return xmlManyToOneEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.MapKey <em>Map Key</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Map Key</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.MapKey
- * @generated
- */
- public EClass getMapKey()
- {
- return mapKeyEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.MapKey#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.MapKey#getName()
- * @see #getMapKey()
- * @generated
- */
- public EAttribute getMapKey_Name()
- {
- return (EAttribute)mapKeyEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping <em>Xml Mapped By Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Mapped By Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping
- * @generated
- */
- public EClass getXmlMappedByMapping()
- {
- return xmlMappedByMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping#getMappedBy <em>Mapped By</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Mapped By</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping#getMappedBy()
- * @see #getXmlMappedByMapping()
- * @generated
- */
- public EAttribute getXmlMappedByMapping_MappedBy()
- {
- return (EAttribute)xmlMappedByMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass <em>Xml Mapped Superclass</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Mapped Superclass</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass
- * @generated
- */
- public EClass getXmlMappedSuperclass()
- {
- return xmlMappedSuperclassEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Exclude Default Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners()
- * @see #getXmlMappedSuperclass()
- * @generated
- */
- public EAttribute getXmlMappedSuperclass_ExcludeDefaultListeners()
- {
- return (EAttribute)xmlMappedSuperclassEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Exclude Superclass Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners()
- * @see #getXmlMappedSuperclass()
- * @generated
- */
- public EAttribute getXmlMappedSuperclass_ExcludeSuperclassListeners()
- {
- return (EAttribute)xmlMappedSuperclassEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#getEntityListeners <em>Entity Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Entity Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#getEntityListeners()
- * @see #getXmlMappedSuperclass()
- * @generated
- */
- public EReference getXmlMappedSuperclass_EntityListeners()
- {
- return (EReference)xmlMappedSuperclassEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery <em>Xml Named Native Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Named Native Query</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery
- * @generated
- */
- public EClass getXmlNamedNativeQuery()
- {
- return xmlNamedNativeQueryEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultClass <em>Result Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Result Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultClass()
- * @see #getXmlNamedNativeQuery()
- * @generated
- */
- public EAttribute getXmlNamedNativeQuery_ResultClass()
- {
- return (EAttribute)xmlNamedNativeQueryEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Result Set Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping()
- * @see #getXmlNamedNativeQuery()
- * @generated
- */
- public EAttribute getXmlNamedNativeQuery_ResultSetMapping()
- {
- return (EAttribute)xmlNamedNativeQueryEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery <em>Xml Named Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Named Query</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery
- * @generated
- */
- public EClass getXmlNamedQuery()
- {
- return xmlNamedQueryEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping <em>Xml Null Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Null Attribute Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping
- * @generated
- */
- public EClass getXmlNullAttributeMapping()
- {
- return xmlNullAttributeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany <em>Xml One To Many</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml One To Many</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany
- * @generated
- */
- public EClass getXmlOneToMany()
- {
- return xmlOneToManyEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne <em>Xml One To One</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml One To One</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne
- * @generated
- */
- public EClass getXmlOneToOne()
- {
- return xmlOneToOneEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn <em>Xml Order Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Order Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn
- * @generated
- */
- public EClass getXmlOrderColumn()
- {
- return xmlOrderColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOverride <em>Xml Override</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Override</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOverride
- * @generated
- */
- public EClass getXmlOverride()
- {
- return xmlOverrideEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOverride#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOverride#getName()
- * @see #getXmlOverride()
- * @generated
- */
- public EAttribute getXmlOverride_Name()
- {
- return (EAttribute)xmlOverrideEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults <em>Xml Persistence Unit Defaults</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence Unit Defaults</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults
- * @generated
- */
- public EClass getXmlPersistenceUnitDefaults()
- {
- return xmlPersistenceUnitDefaultsEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getSchema <em>Schema</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Schema</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getSchema()
- * @see #getXmlPersistenceUnitDefaults()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitDefaults_Schema()
- {
- return (EAttribute)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog <em>Catalog</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Catalog</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog()
- * @see #getXmlPersistenceUnitDefaults()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitDefaults_Catalog()
- {
- return (EAttribute)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist <em>Cascade Persist</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade Persist</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist()
- * @see #getXmlPersistenceUnitDefaults()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitDefaults_CascadePersist()
- {
- return (EAttribute)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners <em>Entity Listeners</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Entity Listeners</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners()
- * @see #getXmlPersistenceUnitDefaults()
- * @generated
- */
- public EReference getXmlPersistenceUnitDefaults_EntityListeners()
- {
- return (EReference)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata <em>Xml Persistence Unit Metadata</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence Unit Metadata</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata
- * @generated
- */
- public EClass getXmlPersistenceUnitMetadata()
- {
- return xmlPersistenceUnitMetadataEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Xml Mapping Metadata Complete</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete()
- * @see #getXmlPersistenceUnitMetadata()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete()
- {
- return (EAttribute)xmlPersistenceUnitMetadataEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults <em>Persistence Unit Defaults</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Persistence Unit Defaults</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults()
- * @see #getXmlPersistenceUnitMetadata()
- * @generated
- */
- public EReference getXmlPersistenceUnitMetadata_PersistenceUnitDefaults()
- {
- return (EReference)xmlPersistenceUnitMetadataEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable <em>Abstract Xml Reference Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Xml Reference Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable
- * @generated
- */
- public EClass getAbstractXmlReferenceTable()
- {
- return abstractXmlReferenceTableEClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable <em>Xml Reference Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Reference Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable
- * @generated
- */
- public EClass getXmlReferenceTable()
- {
- return xmlReferenceTableEClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable#getJoinColumns <em>Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable#getJoinColumns()
- * @see #getXmlReferenceTable()
- * @generated
- */
- public EReference getXmlReferenceTable_JoinColumns()
- {
- return (EReference)xmlReferenceTableEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PostLoad <em>Post Load</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Post Load</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostLoad
- * @generated
- */
- public EClass getPostLoad()
- {
- return postLoadEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PostPersist <em>Post Persist</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Post Persist</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostPersist
- * @generated
- */
- public EClass getPostPersist()
- {
- return postPersistEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PostRemove <em>Post Remove</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Post Remove</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostRemove
- * @generated
- */
- public EClass getPostRemove()
- {
- return postRemoveEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PostUpdate <em>Post Update</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Post Update</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostUpdate
- * @generated
- */
- public EClass getPostUpdate()
- {
- return postUpdateEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PrePersist <em>Pre Persist</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Pre Persist</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PrePersist
- * @generated
- */
- public EClass getPrePersist()
- {
- return prePersistEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PreRemove <em>Pre Remove</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Pre Remove</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PreRemove
- * @generated
- */
- public EClass getPreRemove()
- {
- return preRemoveEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.PreUpdate <em>Pre Update</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Pre Update</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.PreUpdate
- * @generated
- */
- public EClass getPreUpdate()
- {
- return preUpdateEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn <em>Xml Primary Key Join Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Primary Key Join Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn
- * @generated
- */
- public EClass getXmlPrimaryKeyJoinColumn()
- {
- return xmlPrimaryKeyJoinColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer <em>Xml Primary Key Join Column Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Primary Key Join Column Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer
- * @generated
- */
- public EClass getXmlPrimaryKeyJoinColumnContainer()
- {
- return xmlPrimaryKeyJoinColumnContainerEClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Primary Key Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer#getPrimaryKeyJoinColumns()
- * @see #getXmlPrimaryKeyJoinColumnContainer()
- * @generated
- */
- public EReference getXmlPrimaryKeyJoinColumnContainer_PrimaryKeyJoinColumns()
- {
- return (EReference)xmlPrimaryKeyJoinColumnContainerEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery <em>Xml Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Query</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQuery
- * @generated
- */
- public EClass getXmlQuery()
- {
- return xmlQueryEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getName()
- * @see #getXmlQuery()
- * @generated
- */
- public EAttribute getXmlQuery_Name()
- {
- return (EAttribute)xmlQueryEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getQuery <em>Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Query</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getQuery()
- * @see #getXmlQuery()
- * @generated
- */
- public EAttribute getXmlQuery_Query()
- {
- return (EAttribute)xmlQueryEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getHints <em>Hints</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Hints</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getHints()
- * @see #getXmlQuery()
- * @generated
- */
- public EReference getXmlQuery_Hints()
- {
- return (EReference)xmlQueryEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer <em>Xml Query Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Query Container</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer
- * @generated
- */
- public EClass getXmlQueryContainer()
- {
- return xmlQueryContainerEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer#getNamedQueries <em>Named Queries</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Named Queries</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer#getNamedQueries()
- * @see #getXmlQueryContainer()
- * @generated
- */
- public EReference getXmlQueryContainer_NamedQueries()
- {
- return (EReference)xmlQueryContainerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer#getNamedNativeQueries <em>Named Native Queries</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Named Native Queries</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer#getNamedNativeQueries()
- * @see #getXmlQueryContainer()
- * @generated
- */
- public EReference getXmlQueryContainer_NamedNativeQueries()
- {
- return (EReference)xmlQueryContainerEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint <em>Xml Query Hint</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Query Hint</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint
- * @generated
- */
- public EClass getXmlQueryHint()
- {
- return xmlQueryHintEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getName()
- * @see #getXmlQueryHint()
- * @generated
- */
- public EAttribute getXmlQueryHint_Name()
- {
- return (EAttribute)xmlQueryHintEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getValue <em>Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getValue()
- * @see #getXmlQueryHint()
- * @generated
- */
- public EAttribute getXmlQueryHint_Value()
- {
- return (EAttribute)xmlQueryHintEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Secondary Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable
- * @generated
- */
- public EClass getXmlSecondaryTable()
- {
- return xmlSecondaryTableEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Primary Key Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable#getPrimaryKeyJoinColumns()
- * @see #getXmlSecondaryTable()
- * @generated
- */
- public EReference getXmlSecondaryTable_PrimaryKeyJoinColumns()
- {
- return (EReference)xmlSecondaryTableEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator <em>Xml Sequence Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Sequence Generator</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator
- * @generated
- */
- public EClass getXmlSequenceGenerator()
- {
- return xmlSequenceGeneratorEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getSequenceName <em>Sequence Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sequence Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getSequenceName()
- * @see #getXmlSequenceGenerator()
- * @generated
- */
- public EAttribute getXmlSequenceGenerator_SequenceName()
- {
- return (EAttribute)xmlSequenceGeneratorEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping <em>Sql Result Set Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Sql Result Set Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping
- * @generated
- */
- public EClass getSqlResultSetMapping()
- {
- return sqlResultSetMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getName()
- * @see #getSqlResultSetMapping()
- * @generated
- */
- public EAttribute getSqlResultSetMapping_Name()
- {
- return (EAttribute)sqlResultSetMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getEntityResults <em>Entity Results</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Entity Results</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getEntityResults()
- * @see #getSqlResultSetMapping()
- * @generated
- */
- public EReference getSqlResultSetMapping_EntityResults()
- {
- return (EReference)sqlResultSetMappingEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getColumnResults <em>Column Results</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Column Results</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getColumnResults()
- * @see #getSqlResultSetMapping()
- * @generated
- */
- public EReference getSqlResultSetMapping_ColumnResults()
- {
- return (EReference)sqlResultSetMappingEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTable <em>Xml Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTable
- * @generated
- */
- public EClass getXmlTable()
- {
- return xmlTableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator <em>Xml Table Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Table Generator</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator
- * @generated
- */
- public EClass getXmlTableGenerator()
- {
- return xmlTableGeneratorEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getTable <em>Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getTable()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EAttribute getXmlTableGenerator_Table()
- {
- return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getCatalog <em>Catalog</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Catalog</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getCatalog()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EAttribute getXmlTableGenerator_Catalog()
- {
- return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getSchema <em>Schema</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Schema</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getSchema()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EAttribute getXmlTableGenerator_Schema()
- {
- return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnName <em>Pk Column Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Pk Column Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnName()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EAttribute getXmlTableGenerator_PkColumnName()
- {
- return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getValueColumnName <em>Value Column Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Value Column Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getValueColumnName()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EAttribute getXmlTableGenerator_ValueColumnName()
- {
- return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnValue <em>Pk Column Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Pk Column Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnValue()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EAttribute getXmlTableGenerator_PkColumnValue()
- {
- return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getUniqueConstraints <em>Unique Constraints</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Unique Constraints</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getUniqueConstraints()
- * @see #getXmlTableGenerator()
- * @generated
- */
- public EReference getXmlTableGenerator_UniqueConstraints()
- {
- return (EReference)xmlTableGeneratorEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTransient <em>Xml Transient</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Transient</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTransient
- * @generated
- */
- public EClass getXmlTransient()
- {
- return xmlTransientEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping <em>Xml Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Type Mapping</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping
- * @generated
- */
- public EClass getXmlTypeMapping()
- {
- return xmlTypeMappingEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getClassName <em>Class Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Class Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getClassName()
- * @see #getXmlTypeMapping()
- * @generated
- */
- public EAttribute getXmlTypeMapping_ClassName()
- {
- return (EAttribute)xmlTypeMappingEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Metadata Complete</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getMetadataComplete()
- * @see #getXmlTypeMapping()
- * @generated
- */
- public EAttribute getXmlTypeMapping_MetadataComplete()
- {
- return (EAttribute)xmlTypeMappingEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getDescription()
- * @see #getXmlTypeMapping()
- * @generated
- */
- public EAttribute getXmlTypeMapping_Description()
- {
- return (EAttribute)xmlTypeMappingEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getAttributes <em>Attributes</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Attributes</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getAttributes()
- * @see #getXmlTypeMapping()
- * @generated
- */
- public EReference getXmlTypeMapping_Attributes()
- {
- return (EReference)xmlTypeMappingEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint <em>Xml Unique Constraint</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Unique Constraint</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint
- * @generated
- */
- public EClass getXmlUniqueConstraint()
- {
- return xmlUniqueConstraintEClass;
- }
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint#getColumnNames <em>Column Names</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Column Names</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint#getColumnNames()
- * @see #getXmlUniqueConstraint()
- * @generated
- */
- public EAttribute getXmlUniqueConstraint_ColumnNames()
- {
- return (EAttribute)xmlUniqueConstraintEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion <em>Xml Version</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Version</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlVersion
- * @generated
- */
- public EClass getXmlVersion()
- {
- return xmlVersionEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable <em>Xml Orderable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Orderable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable
- * @generated
- */
- public EClass getXmlOrderable()
- {
- return xmlOrderableEClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable#getOrderBy <em>Order By</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Order By</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable#getOrderBy()
- * @see #getXmlOrderable()
- * @generated
- */
- public EAttribute getXmlOrderable_OrderBy()
- {
- return (EAttribute)xmlOrderableEClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType <em>Discriminator Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Discriminator Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @generated
- */
- public EEnum getDiscriminatorType()
- {
- return discriminatorTypeEEnum;
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.EnumType <em>Enum Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Enum Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @generated
- */
- public EEnum getEnumType()
- {
- return enumTypeEEnum;
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.FetchType <em>Fetch Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Fetch Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @generated
- */
- public EEnum getFetchType()
- {
- return fetchTypeEEnum;
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.GenerationType <em>Generation Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Generation Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.GenerationType
- * @generated
- */
- public EEnum getGenerationType()
- {
- return generationTypeEEnum;
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.InheritanceType <em>Inheritance Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Inheritance Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.InheritanceType
- * @generated
- */
- public EEnum getInheritanceType()
- {
- return inheritanceTypeEEnum;
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType <em>Temporal Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Temporal Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @generated
- */
- public EEnum getTemporalType()
- {
- return temporalTypeEEnum;
- }
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- public OrmFactory getOrmFactory()
- {
- return (OrmFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- abstractXmlAttributeMappingEClass = createEClass(ABSTRACT_XML_ATTRIBUTE_MAPPING);
-
- xmlBaseColumnEClass = createEClass(XML_BASE_COLUMN);
- createEAttribute(xmlBaseColumnEClass, XML_BASE_COLUMN__INSERTABLE);
- createEAttribute(xmlBaseColumnEClass, XML_BASE_COLUMN__NULLABLE);
- createEAttribute(xmlBaseColumnEClass, XML_BASE_COLUMN__TABLE);
- createEAttribute(xmlBaseColumnEClass, XML_BASE_COLUMN__UNIQUE);
- createEAttribute(xmlBaseColumnEClass, XML_BASE_COLUMN__UPDATABLE);
-
- abstractXmlBaseColumnEClass = createEClass(ABSTRACT_XML_BASE_COLUMN);
-
- abstractXmlBaseDiscriminatorColumnEClass = createEClass(ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN);
-
- abstractXmlEmbeddedEClass = createEClass(ABSTRACT_XML_EMBEDDED);
-
- abstractXmlMultiRelationshipMappingEClass = createEClass(ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING);
- createEReference(abstractXmlMultiRelationshipMappingEClass, ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY);
-
- xmlNamedColumnEClass = createEClass(XML_NAMED_COLUMN);
- createEAttribute(xmlNamedColumnEClass, XML_NAMED_COLUMN__COLUMN_DEFINITION);
- createEAttribute(xmlNamedColumnEClass, XML_NAMED_COLUMN__NAME);
-
- xmlBaseDiscriminatorColumnEClass = createEClass(XML_BASE_DISCRIMINATOR_COLUMN);
- createEAttribute(xmlBaseDiscriminatorColumnEClass, XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE);
- createEAttribute(xmlBaseDiscriminatorColumnEClass, XML_BASE_DISCRIMINATOR_COLUMN__LENGTH);
-
- xmlBaseJoinColumnEClass = createEClass(XML_BASE_JOIN_COLUMN);
- createEAttribute(xmlBaseJoinColumnEClass, XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
-
- abstractXmlNamedColumnEClass = createEClass(ABSTRACT_XML_NAMED_COLUMN);
-
- abstractXmlRelationshipMappingEClass = createEClass(ABSTRACT_XML_RELATIONSHIP_MAPPING);
- createEAttribute(abstractXmlRelationshipMappingEClass, ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY);
- createEAttribute(abstractXmlRelationshipMappingEClass, ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH);
- createEReference(abstractXmlRelationshipMappingEClass, ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE);
-
- abstractXmlSingleRelationshipMappingEClass = createEClass(ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING);
- createEAttribute(abstractXmlSingleRelationshipMappingEClass, ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL);
-
- abstractXmlReferenceTableEClass = createEClass(ABSTRACT_XML_REFERENCE_TABLE);
-
- abstractXmlTableEClass = createEClass(ABSTRACT_XML_TABLE);
- createEAttribute(abstractXmlTableEClass, ABSTRACT_XML_TABLE__NAME);
- createEAttribute(abstractXmlTableEClass, ABSTRACT_XML_TABLE__CATALOG);
- createEAttribute(abstractXmlTableEClass, ABSTRACT_XML_TABLE__SCHEMA);
- createEReference(abstractXmlTableEClass, ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS);
-
- abstractXmlTypeMappingEClass = createEClass(ABSTRACT_XML_TYPE_MAPPING);
-
- xmlAccessHolderEClass = createEClass(XML_ACCESS_HOLDER);
- createEAttribute(xmlAccessHolderEClass, XML_ACCESS_HOLDER__ACCESS);
-
- xmlAttributeMappingEClass = createEClass(XML_ATTRIBUTE_MAPPING);
- createEAttribute(xmlAttributeMappingEClass, XML_ATTRIBUTE_MAPPING__NAME);
-
- xmlAssociationOverrideEClass = createEClass(XML_ASSOCIATION_OVERRIDE);
-
- xmlAssociationOverrideContainerEClass = createEClass(XML_ASSOCIATION_OVERRIDE_CONTAINER);
- createEReference(xmlAssociationOverrideContainerEClass, XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES);
-
- xmlAttributeOverrideEClass = createEClass(XML_ATTRIBUTE_OVERRIDE);
- createEReference(xmlAttributeOverrideEClass, XML_ATTRIBUTE_OVERRIDE__COLUMN);
-
- xmlAttributeOverrideContainerEClass = createEClass(XML_ATTRIBUTE_OVERRIDE_CONTAINER);
- createEReference(xmlAttributeOverrideContainerEClass, XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES);
-
- attributesEClass = createEClass(ATTRIBUTES);
- createEReference(attributesEClass, ATTRIBUTES__IDS);
- createEReference(attributesEClass, ATTRIBUTES__EMBEDDED_IDS);
- createEReference(attributesEClass, ATTRIBUTES__BASICS);
- createEReference(attributesEClass, ATTRIBUTES__VERSIONS);
- createEReference(attributesEClass, ATTRIBUTES__MANY_TO_ONES);
- createEReference(attributesEClass, ATTRIBUTES__ONE_TO_MANYS);
- createEReference(attributesEClass, ATTRIBUTES__ONE_TO_ONES);
- createEReference(attributesEClass, ATTRIBUTES__MANY_TO_MANYS);
- createEReference(attributesEClass, ATTRIBUTES__EMBEDDEDS);
- createEReference(attributesEClass, ATTRIBUTES__TRANSIENTS);
-
- xmlBasicEClass = createEClass(XML_BASIC);
- createEAttribute(xmlBasicEClass, XML_BASIC__FETCH);
- createEAttribute(xmlBasicEClass, XML_BASIC__OPTIONAL);
-
- cascadeTypeEClass = createEClass(CASCADE_TYPE);
- createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_ALL);
- createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_PERSIST);
- createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_MERGE);
- createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_REMOVE);
- createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_REFRESH);
-
- xmlClassReferenceEClass = createEClass(XML_CLASS_REFERENCE);
- createEAttribute(xmlClassReferenceEClass, XML_CLASS_REFERENCE__CLASS_NAME);
-
- xmlCollectionTableEClass = createEClass(XML_COLLECTION_TABLE);
-
- xmlColumnEClass = createEClass(XML_COLUMN);
- createEAttribute(xmlColumnEClass, XML_COLUMN__LENGTH);
- createEAttribute(xmlColumnEClass, XML_COLUMN__PRECISION);
- createEAttribute(xmlColumnEClass, XML_COLUMN__SCALE);
-
- columnMappingEClass = createEClass(COLUMN_MAPPING);
- createEReference(columnMappingEClass, COLUMN_MAPPING__COLUMN);
-
- columnResultEClass = createEClass(COLUMN_RESULT);
- createEAttribute(columnResultEClass, COLUMN_RESULT__NAME);
-
- xmlConvertibleMappingEClass = createEClass(XML_CONVERTIBLE_MAPPING);
- createEAttribute(xmlConvertibleMappingEClass, XML_CONVERTIBLE_MAPPING__LOB);
- createEAttribute(xmlConvertibleMappingEClass, XML_CONVERTIBLE_MAPPING__TEMPORAL);
- createEAttribute(xmlConvertibleMappingEClass, XML_CONVERTIBLE_MAPPING__ENUMERATED);
-
- xmlDiscriminatorColumnEClass = createEClass(XML_DISCRIMINATOR_COLUMN);
-
- xmlElementCollectionEClass = createEClass(XML_ELEMENT_COLLECTION);
-
- xmlEmbeddableEClass = createEClass(XML_EMBEDDABLE);
-
- xmlEmbeddedEClass = createEClass(XML_EMBEDDED);
-
- xmlEmbeddedIdEClass = createEClass(XML_EMBEDDED_ID);
-
- xmlEntityEClass = createEClass(XML_ENTITY);
- createEAttribute(xmlEntityEClass, XML_ENTITY__NAME);
- createEReference(xmlEntityEClass, XML_ENTITY__TABLE);
- createEReference(xmlEntityEClass, XML_ENTITY__SECONDARY_TABLES);
- createEReference(xmlEntityEClass, XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS);
- createEReference(xmlEntityEClass, XML_ENTITY__INHERITANCE);
- createEAttribute(xmlEntityEClass, XML_ENTITY__DISCRIMINATOR_VALUE);
- createEReference(xmlEntityEClass, XML_ENTITY__DISCRIMINATOR_COLUMN);
- createEReference(xmlEntityEClass, XML_ENTITY__SQL_RESULT_SET_MAPPINGS);
- createEAttribute(xmlEntityEClass, XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS);
- createEAttribute(xmlEntityEClass, XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS);
- createEReference(xmlEntityEClass, XML_ENTITY__ENTITY_LISTENERS);
-
- entityListenerEClass = createEClass(ENTITY_LISTENER);
- createEAttribute(entityListenerEClass, ENTITY_LISTENER__CLASS_NAME);
-
- entityListenersEClass = createEClass(ENTITY_LISTENERS);
- createEReference(entityListenersEClass, ENTITY_LISTENERS__ENTITY_LISTENERS);
-
- xmlEntityMappingsEClass = createEClass(XML_ENTITY_MAPPINGS);
- createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__DESCRIPTION);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA);
- createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__PACKAGE);
- createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__SCHEMA);
- createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__CATALOG);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__TABLE_GENERATORS);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__ENTITIES);
- createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__EMBEDDABLES);
-
- entityResultEClass = createEClass(ENTITY_RESULT);
- createEAttribute(entityResultEClass, ENTITY_RESULT__DISCRIMINATOR_COLUMN);
- createEAttribute(entityResultEClass, ENTITY_RESULT__ENTITY_CLASS);
- createEReference(entityResultEClass, ENTITY_RESULT__FIELD_RESULTS);
-
- eventMethodEClass = createEClass(EVENT_METHOD);
- createEAttribute(eventMethodEClass, EVENT_METHOD__METHOD_NAME);
-
- xmlEventMethodContainerEClass = createEClass(XML_EVENT_METHOD_CONTAINER);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__PRE_PERSIST);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_PERSIST);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__PRE_REMOVE);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_REMOVE);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__PRE_UPDATE);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_UPDATE);
- createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_LOAD);
-
- fieldResultEClass = createEClass(FIELD_RESULT);
- createEAttribute(fieldResultEClass, FIELD_RESULT__NAME);
- createEAttribute(fieldResultEClass, FIELD_RESULT__COLUMN);
-
- xmlGeneratedValueEClass = createEClass(XML_GENERATED_VALUE);
- createEAttribute(xmlGeneratedValueEClass, XML_GENERATED_VALUE__GENERATOR);
- createEAttribute(xmlGeneratedValueEClass, XML_GENERATED_VALUE__STRATEGY);
-
- xmlGeneratorEClass = createEClass(XML_GENERATOR);
- createEAttribute(xmlGeneratorEClass, XML_GENERATOR__NAME);
- createEAttribute(xmlGeneratorEClass, XML_GENERATOR__INITIAL_VALUE);
- createEAttribute(xmlGeneratorEClass, XML_GENERATOR__ALLOCATION_SIZE);
-
- xmlGeneratorContainerEClass = createEClass(XML_GENERATOR_CONTAINER);
- createEReference(xmlGeneratorContainerEClass, XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR);
- createEReference(xmlGeneratorContainerEClass, XML_GENERATOR_CONTAINER__TABLE_GENERATOR);
-
- xmlIdEClass = createEClass(XML_ID);
- createEReference(xmlIdEClass, XML_ID__GENERATED_VALUE);
-
- xmlIdClassContainerEClass = createEClass(XML_ID_CLASS_CONTAINER);
- createEReference(xmlIdClassContainerEClass, XML_ID_CLASS_CONTAINER__ID_CLASS);
-
- inheritanceEClass = createEClass(INHERITANCE);
- createEAttribute(inheritanceEClass, INHERITANCE__STRATEGY);
-
- xmlJoinColumnEClass = createEClass(XML_JOIN_COLUMN);
-
- xmlJoinColumnContainerEClass = createEClass(XML_JOIN_COLUMN_CONTAINER);
- createEReference(xmlJoinColumnContainerEClass, XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS);
-
- xmlJoinTableEClass = createEClass(XML_JOIN_TABLE);
- createEReference(xmlJoinTableEClass, XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS);
-
- xmlJoinTableContainerEClass = createEClass(XML_JOIN_TABLE_CONTAINER);
- createEReference(xmlJoinTableContainerEClass, XML_JOIN_TABLE_CONTAINER__JOIN_TABLE);
-
- lobEClass = createEClass(LOB);
-
- xmlManyToManyEClass = createEClass(XML_MANY_TO_MANY);
-
- xmlManyToOneEClass = createEClass(XML_MANY_TO_ONE);
-
- mapKeyEClass = createEClass(MAP_KEY);
- createEAttribute(mapKeyEClass, MAP_KEY__NAME);
-
- xmlMappedByMappingEClass = createEClass(XML_MAPPED_BY_MAPPING);
- createEAttribute(xmlMappedByMappingEClass, XML_MAPPED_BY_MAPPING__MAPPED_BY);
-
- xmlMappedSuperclassEClass = createEClass(XML_MAPPED_SUPERCLASS);
- createEAttribute(xmlMappedSuperclassEClass, XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS);
- createEAttribute(xmlMappedSuperclassEClass, XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS);
- createEReference(xmlMappedSuperclassEClass, XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS);
-
- xmlNamedNativeQueryEClass = createEClass(XML_NAMED_NATIVE_QUERY);
- createEAttribute(xmlNamedNativeQueryEClass, XML_NAMED_NATIVE_QUERY__RESULT_CLASS);
- createEAttribute(xmlNamedNativeQueryEClass, XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING);
-
- xmlNamedQueryEClass = createEClass(XML_NAMED_QUERY);
-
- xmlNullAttributeMappingEClass = createEClass(XML_NULL_ATTRIBUTE_MAPPING);
-
- xmlOneToManyEClass = createEClass(XML_ONE_TO_MANY);
-
- xmlOneToOneEClass = createEClass(XML_ONE_TO_ONE);
-
- xmlOrderableEClass = createEClass(XML_ORDERABLE);
- createEAttribute(xmlOrderableEClass, XML_ORDERABLE__ORDER_BY);
-
- xmlOrderColumnEClass = createEClass(XML_ORDER_COLUMN);
-
- xmlOverrideEClass = createEClass(XML_OVERRIDE);
- createEAttribute(xmlOverrideEClass, XML_OVERRIDE__NAME);
-
- xmlPersistenceUnitDefaultsEClass = createEClass(XML_PERSISTENCE_UNIT_DEFAULTS);
- createEAttribute(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA);
- createEAttribute(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG);
- createEAttribute(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST);
- createEReference(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS);
-
- xmlPersistenceUnitMetadataEClass = createEClass(XML_PERSISTENCE_UNIT_METADATA);
- createEAttribute(xmlPersistenceUnitMetadataEClass, XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE);
- createEReference(xmlPersistenceUnitMetadataEClass, XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS);
-
- xmlReferenceTableEClass = createEClass(XML_REFERENCE_TABLE);
- createEReference(xmlReferenceTableEClass, XML_REFERENCE_TABLE__JOIN_COLUMNS);
-
- postLoadEClass = createEClass(POST_LOAD);
-
- postPersistEClass = createEClass(POST_PERSIST);
-
- postRemoveEClass = createEClass(POST_REMOVE);
-
- postUpdateEClass = createEClass(POST_UPDATE);
-
- prePersistEClass = createEClass(PRE_PERSIST);
-
- preRemoveEClass = createEClass(PRE_REMOVE);
-
- preUpdateEClass = createEClass(PRE_UPDATE);
-
- xmlPrimaryKeyJoinColumnEClass = createEClass(XML_PRIMARY_KEY_JOIN_COLUMN);
-
- xmlPrimaryKeyJoinColumnContainerEClass = createEClass(XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER);
- createEReference(xmlPrimaryKeyJoinColumnContainerEClass, XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER__PRIMARY_KEY_JOIN_COLUMNS);
-
- xmlQueryEClass = createEClass(XML_QUERY);
- createEAttribute(xmlQueryEClass, XML_QUERY__NAME);
- createEAttribute(xmlQueryEClass, XML_QUERY__QUERY);
- createEReference(xmlQueryEClass, XML_QUERY__HINTS);
-
- xmlQueryContainerEClass = createEClass(XML_QUERY_CONTAINER);
- createEReference(xmlQueryContainerEClass, XML_QUERY_CONTAINER__NAMED_QUERIES);
- createEReference(xmlQueryContainerEClass, XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES);
-
- xmlQueryHintEClass = createEClass(XML_QUERY_HINT);
- createEAttribute(xmlQueryHintEClass, XML_QUERY_HINT__NAME);
- createEAttribute(xmlQueryHintEClass, XML_QUERY_HINT__VALUE);
-
- xmlSecondaryTableEClass = createEClass(XML_SECONDARY_TABLE);
- createEReference(xmlSecondaryTableEClass, XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS);
-
- xmlSequenceGeneratorEClass = createEClass(XML_SEQUENCE_GENERATOR);
- createEAttribute(xmlSequenceGeneratorEClass, XML_SEQUENCE_GENERATOR__SEQUENCE_NAME);
-
- sqlResultSetMappingEClass = createEClass(SQL_RESULT_SET_MAPPING);
- createEAttribute(sqlResultSetMappingEClass, SQL_RESULT_SET_MAPPING__NAME);
- createEReference(sqlResultSetMappingEClass, SQL_RESULT_SET_MAPPING__ENTITY_RESULTS);
- createEReference(sqlResultSetMappingEClass, SQL_RESULT_SET_MAPPING__COLUMN_RESULTS);
-
- xmlTableEClass = createEClass(XML_TABLE);
-
- xmlTableGeneratorEClass = createEClass(XML_TABLE_GENERATOR);
- createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__TABLE);
- createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__CATALOG);
- createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__SCHEMA);
- createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__PK_COLUMN_NAME);
- createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__VALUE_COLUMN_NAME);
- createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__PK_COLUMN_VALUE);
- createEReference(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
-
- xmlTransientEClass = createEClass(XML_TRANSIENT);
-
- xmlTypeMappingEClass = createEClass(XML_TYPE_MAPPING);
- createEAttribute(xmlTypeMappingEClass, XML_TYPE_MAPPING__CLASS_NAME);
- createEAttribute(xmlTypeMappingEClass, XML_TYPE_MAPPING__METADATA_COMPLETE);
- createEAttribute(xmlTypeMappingEClass, XML_TYPE_MAPPING__DESCRIPTION);
- createEReference(xmlTypeMappingEClass, XML_TYPE_MAPPING__ATTRIBUTES);
-
- xmlUniqueConstraintEClass = createEClass(XML_UNIQUE_CONSTRAINT);
- createEAttribute(xmlUniqueConstraintEClass, XML_UNIQUE_CONSTRAINT__COLUMN_NAMES);
-
- xmlVersionEClass = createEClass(XML_VERSION);
-
- // Create enums
- discriminatorTypeEEnum = createEEnum(DISCRIMINATOR_TYPE);
- enumTypeEEnum = createEEnum(ENUM_TYPE);
- fetchTypeEEnum = createEEnum(FETCH_TYPE);
- generationTypeEEnum = createEEnum(GENERATION_TYPE);
- inheritanceTypeEEnum = createEEnum(INHERITANCE_TYPE);
- temporalTypeEEnum = createEEnum(TEMPORAL_TYPE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI);
- XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
- CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
-
- // Add subpackages
- getESubpackages().add(theOrmV2_0Package);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- abstractXmlAttributeMappingEClass.getESuperTypes().add(this.getXmlAttributeMapping());
- xmlBaseColumnEClass.getESuperTypes().add(this.getXmlNamedColumn());
- abstractXmlBaseColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
- abstractXmlBaseColumnEClass.getESuperTypes().add(this.getXmlBaseColumn());
- abstractXmlBaseDiscriminatorColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
- abstractXmlBaseDiscriminatorColumnEClass.getESuperTypes().add(this.getXmlBaseDiscriminatorColumn());
- abstractXmlEmbeddedEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- abstractXmlEmbeddedEClass.getESuperTypes().add(this.getXmlAttributeOverrideContainer());
- abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getAbstractXmlRelationshipMapping());
- abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getXmlMappedByMapping());
- abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getXmlJoinTableContainer());
- abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getXmlOrderable());
- abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlMultiRelationshipMapping_2_0());
- xmlBaseDiscriminatorColumnEClass.getESuperTypes().add(this.getXmlNamedColumn());
- xmlBaseJoinColumnEClass.getESuperTypes().add(this.getXmlNamedColumn());
- abstractXmlNamedColumnEClass.getESuperTypes().add(this.getXmlNamedColumn());
- abstractXmlRelationshipMappingEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(this.getAbstractXmlRelationshipMapping());
- abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(this.getXmlJoinTableContainer());
- abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(this.getXmlJoinColumnContainer());
- abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlSingleRelationshipMapping_2_0());
- abstractXmlReferenceTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
- abstractXmlReferenceTableEClass.getESuperTypes().add(this.getXmlReferenceTable());
- abstractXmlTypeMappingEClass.getESuperTypes().add(this.getXmlTypeMapping());
- xmlAttributeMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAttributeMapping_2_0());
- xmlAssociationOverrideEClass.getESuperTypes().add(this.getXmlOverride());
- xmlAssociationOverrideEClass.getESuperTypes().add(this.getXmlJoinColumnContainer());
- xmlAssociationOverrideEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAssociationOverride_2_0());
- xmlAttributeOverrideEClass.getESuperTypes().add(this.getXmlOverride());
- xmlAttributeOverrideEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAttributeOverride_2_0());
- attributesEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAttributes_2_0());
- xmlBasicEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- xmlBasicEClass.getESuperTypes().add(this.getColumnMapping());
- xmlBasicEClass.getESuperTypes().add(this.getXmlConvertibleMapping());
- cascadeTypeEClass.getESuperTypes().add(theOrmV2_0Package.getXmlCascadeType_2_0());
- xmlCollectionTableEClass.getESuperTypes().add(this.getAbstractXmlReferenceTable());
- xmlCollectionTableEClass.getESuperTypes().add(theOrmV2_0Package.getXmlCollectionTable_2_0());
- xmlColumnEClass.getESuperTypes().add(this.getAbstractXmlBaseColumn());
- xmlDiscriminatorColumnEClass.getESuperTypes().add(this.getAbstractXmlBaseDiscriminatorColumn());
- xmlElementCollectionEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- xmlElementCollectionEClass.getESuperTypes().add(theOrmV2_0Package.getXmlElementCollection_2_0());
- xmlEmbeddableEClass.getESuperTypes().add(this.getAbstractXmlTypeMapping());
- xmlEmbeddedEClass.getESuperTypes().add(this.getAbstractXmlEmbedded());
- xmlEmbeddedEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEmbedded_2_0());
- xmlEmbeddedIdEClass.getESuperTypes().add(this.getAbstractXmlEmbedded());
- xmlEntityEClass.getESuperTypes().add(this.getAbstractXmlTypeMapping());
- xmlEntityEClass.getESuperTypes().add(this.getXmlQueryContainer());
- xmlEntityEClass.getESuperTypes().add(this.getXmlGeneratorContainer());
- xmlEntityEClass.getESuperTypes().add(this.getXmlEventMethodContainer());
- xmlEntityEClass.getESuperTypes().add(this.getXmlAttributeOverrideContainer());
- xmlEntityEClass.getESuperTypes().add(this.getXmlAssociationOverrideContainer());
- xmlEntityEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEntity_2_0());
- xmlEntityEClass.getESuperTypes().add(this.getXmlIdClassContainer());
- entityListenerEClass.getESuperTypes().add(this.getXmlEventMethodContainer());
- entityListenerEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEntityListener_2_0());
- xmlEntityMappingsEClass.getESuperTypes().add(theCommonPackage.getAbstractJpaRootEObject());
- xmlEntityMappingsEClass.getESuperTypes().add(this.getXmlQueryContainer());
- xmlEntityMappingsEClass.getESuperTypes().add(this.getXmlAccessHolder());
- eventMethodEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEventMethod_2_0());
- xmlGeneratorEClass.getESuperTypes().add(theOrmV2_0Package.getXmlGenerator_2_0());
- xmlIdEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- xmlIdEClass.getESuperTypes().add(this.getColumnMapping());
- xmlIdEClass.getESuperTypes().add(this.getXmlConvertibleMapping());
- xmlIdEClass.getESuperTypes().add(this.getXmlGeneratorContainer());
- xmlJoinColumnEClass.getESuperTypes().add(this.getAbstractXmlBaseColumn());
- xmlJoinColumnEClass.getESuperTypes().add(this.getXmlBaseJoinColumn());
- xmlJoinTableEClass.getESuperTypes().add(this.getAbstractXmlReferenceTable());
- xmlManyToManyEClass.getESuperTypes().add(this.getAbstractXmlMultiRelationshipMapping());
- xmlManyToManyEClass.getESuperTypes().add(theOrmV2_0Package.getXmlManyToMany_2_0());
- xmlManyToOneEClass.getESuperTypes().add(this.getAbstractXmlSingleRelationshipMapping());
- xmlMappedSuperclassEClass.getESuperTypes().add(this.getAbstractXmlTypeMapping());
- xmlMappedSuperclassEClass.getESuperTypes().add(this.getXmlIdClassContainer());
- xmlNamedNativeQueryEClass.getESuperTypes().add(this.getXmlQuery());
- xmlNamedQueryEClass.getESuperTypes().add(this.getXmlQuery());
- xmlNamedQueryEClass.getESuperTypes().add(theOrmV2_0Package.getXmlNamedQuery_2_0());
- xmlNullAttributeMappingEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- xmlOneToManyEClass.getESuperTypes().add(this.getAbstractXmlMultiRelationshipMapping());
- xmlOneToManyEClass.getESuperTypes().add(this.getXmlJoinColumnContainer());
- xmlOneToManyEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOneToMany_2_0());
- xmlOneToOneEClass.getESuperTypes().add(this.getAbstractXmlSingleRelationshipMapping());
- xmlOneToOneEClass.getESuperTypes().add(this.getXmlMappedByMapping());
- xmlOneToOneEClass.getESuperTypes().add(this.getXmlPrimaryKeyJoinColumnContainer());
- xmlOneToOneEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOneToOne_2_0());
- xmlOrderableEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOrderable_2_0());
- xmlOrderColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
- xmlOrderColumnEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOrderColumn_2_0());
- xmlPersistenceUnitDefaultsEClass.getESuperTypes().add(this.getXmlAccessHolder());
- xmlPersistenceUnitDefaultsEClass.getESuperTypes().add(theOrmV2_0Package.getXmlPersistenceUnitDefaults_2_0());
- xmlPersistenceUnitMetadataEClass.getESuperTypes().add(theOrmV2_0Package.getXmlPersistenceUnitMetadata_2_0());
- postLoadEClass.getESuperTypes().add(this.getEventMethod());
- postPersistEClass.getESuperTypes().add(this.getEventMethod());
- postRemoveEClass.getESuperTypes().add(this.getEventMethod());
- postUpdateEClass.getESuperTypes().add(this.getEventMethod());
- prePersistEClass.getESuperTypes().add(this.getEventMethod());
- preRemoveEClass.getESuperTypes().add(this.getEventMethod());
- preUpdateEClass.getESuperTypes().add(this.getEventMethod());
- xmlPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
- xmlPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getXmlBaseJoinColumn());
- xmlQueryEClass.getESuperTypes().add(theOrmV2_0Package.getXmlQuery_2_0());
- xmlQueryHintEClass.getESuperTypes().add(theOrmV2_0Package.getXmlQueryHint_2_0());
- xmlSecondaryTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
- xmlSequenceGeneratorEClass.getESuperTypes().add(this.getXmlGenerator());
- xmlSequenceGeneratorEClass.getESuperTypes().add(theOrmV2_0Package.getXmlSequenceGenerator_2_0());
- sqlResultSetMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlSqlResultSetMapping_2_0());
- xmlTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
- xmlTableGeneratorEClass.getESuperTypes().add(this.getXmlGenerator());
- xmlTransientEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- xmlTypeMappingEClass.getESuperTypes().add(this.getXmlAccessHolder());
- xmlUniqueConstraintEClass.getESuperTypes().add(theOrmV2_0Package.getXmlUniqueConstraint_2_0());
- xmlVersionEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
- xmlVersionEClass.getESuperTypes().add(this.getColumnMapping());
- xmlVersionEClass.getESuperTypes().add(this.getXmlConvertibleMapping());
-
- // Initialize classes and features; add operations and parameters
- initEClass(abstractXmlAttributeMappingEClass, AbstractXmlAttributeMapping.class, "AbstractXmlAttributeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlBaseColumnEClass, XmlBaseColumn.class, "XmlBaseColumn", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlBaseColumn_Insertable(), theXMLTypePackage.getBooleanObject(), "insertable", null, 0, 1, XmlBaseColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlBaseColumn_Nullable(), theXMLTypePackage.getBooleanObject(), "nullable", null, 0, 1, XmlBaseColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlBaseColumn_Table(), theXMLTypePackage.getString(), "table", null, 0, 1, XmlBaseColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlBaseColumn_Unique(), theXMLTypePackage.getBooleanObject(), "unique", null, 0, 1, XmlBaseColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlBaseColumn_Updatable(), theXMLTypePackage.getBooleanObject(), "updatable", null, 0, 1, XmlBaseColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(abstractXmlBaseColumnEClass, AbstractXmlBaseColumn.class, "AbstractXmlBaseColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(abstractXmlBaseDiscriminatorColumnEClass, AbstractXmlBaseDiscriminatorColumn.class, "AbstractXmlBaseDiscriminatorColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(abstractXmlEmbeddedEClass, AbstractXmlEmbedded.class, "AbstractXmlEmbedded", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(abstractXmlMultiRelationshipMappingEClass, AbstractXmlMultiRelationshipMapping.class, "AbstractXmlMultiRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getAbstractXmlMultiRelationshipMapping_MapKey(), this.getMapKey(), null, "mapKey", null, 0, 1, AbstractXmlMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlNamedColumnEClass, XmlNamedColumn.class, "XmlNamedColumn", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlNamedColumn_ColumnDefinition(), theXMLTypePackage.getString(), "columnDefinition", null, 0, 1, XmlNamedColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlNamedColumn_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, XmlNamedColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlBaseDiscriminatorColumnEClass, XmlBaseDiscriminatorColumn.class, "XmlBaseDiscriminatorColumn", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlBaseDiscriminatorColumn_DiscriminatorType(), this.getDiscriminatorType(), "discriminatorType", "STRING", 0, 1, XmlBaseDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlBaseDiscriminatorColumn_Length(), theXMLTypePackage.getIntObject(), "length", null, 0, 1, XmlBaseDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlBaseJoinColumnEClass, XmlBaseJoinColumn.class, "XmlBaseJoinColumn", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlBaseJoinColumn_ReferencedColumnName(), theXMLTypePackage.getString(), "referencedColumnName", null, 0, 1, XmlBaseJoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(abstractXmlNamedColumnEClass, AbstractXmlNamedColumn.class, "AbstractXmlNamedColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(abstractXmlRelationshipMappingEClass, AbstractXmlRelationshipMapping.class, "AbstractXmlRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getAbstractXmlRelationshipMapping_TargetEntity(), theXMLTypePackage.getString(), "targetEntity", null, 0, 1, AbstractXmlRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getAbstractXmlRelationshipMapping_Fetch(), this.getFetchType(), "fetch", "LAZY", 0, 1, AbstractXmlRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAbstractXmlRelationshipMapping_Cascade(), this.getCascadeType(), null, "cascade", null, 0, 1, AbstractXmlRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(abstractXmlSingleRelationshipMappingEClass, AbstractXmlSingleRelationshipMapping.class, "AbstractXmlSingleRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getAbstractXmlSingleRelationshipMapping_Optional(), theXMLTypePackage.getBooleanObject(), "optional", null, 0, 1, AbstractXmlSingleRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(abstractXmlReferenceTableEClass, AbstractXmlReferenceTable.class, "AbstractXmlReferenceTable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(abstractXmlTableEClass, AbstractXmlTable.class, "AbstractXmlTable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getAbstractXmlTable_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getAbstractXmlTable_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getAbstractXmlTable_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAbstractXmlTable_UniqueConstraints(), this.getXmlUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(abstractXmlTypeMappingEClass, AbstractXmlTypeMapping.class, "AbstractXmlTypeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlAccessHolderEClass, XmlAccessHolder.class, "XmlAccessHolder", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlAccessHolder_Access(), theXMLTypePackage.getString(), "access", null, 0, 1, XmlAccessHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlAttributeMappingEClass, XmlAttributeMapping.class, "XmlAttributeMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlAttributeMapping_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlAttributeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlAssociationOverrideEClass, XmlAssociationOverride.class, "XmlAssociationOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlAssociationOverrideContainerEClass, XmlAssociationOverrideContainer.class, "XmlAssociationOverrideContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlAssociationOverrideContainer_AssociationOverrides(), this.getXmlAssociationOverride(), null, "associationOverrides", null, 0, -1, XmlAssociationOverrideContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlAttributeOverrideEClass, XmlAttributeOverride.class, "XmlAttributeOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlAttributeOverride_Column(), this.getXmlColumn(), null, "column", null, 1, 1, XmlAttributeOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlAttributeOverrideContainerEClass, XmlAttributeOverrideContainer.class, "XmlAttributeOverrideContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlAttributeOverrideContainer_AttributeOverrides(), this.getXmlAttributeOverride(), null, "attributeOverrides", null, 0, -1, XmlAttributeOverrideContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(attributesEClass, Attributes.class, "Attributes", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getAttributes_Ids(), this.getXmlId(), null, "ids", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_EmbeddedIds(), this.getXmlEmbeddedId(), null, "embeddedIds", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_Basics(), this.getXmlBasic(), null, "basics", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_Versions(), this.getXmlVersion(), null, "versions", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_ManyToOnes(), this.getXmlManyToOne(), null, "manyToOnes", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_OneToManys(), this.getXmlOneToMany(), null, "oneToManys", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_OneToOnes(), this.getXmlOneToOne(), null, "oneToOnes", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_ManyToManys(), this.getXmlManyToMany(), null, "manyToManys", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_Embeddeds(), this.getXmlEmbedded(), null, "embeddeds", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAttributes_Transients(), this.getXmlTransient(), null, "transients", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlBasicEClass, XmlBasic.class, "XmlBasic", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlBasic_Fetch(), this.getFetchType(), "fetch", "LAZY", 0, 1, XmlBasic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlBasic_Optional(), theXMLTypePackage.getBooleanObject(), "optional", null, 0, 1, XmlBasic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(cascadeTypeEClass, CascadeType.class, "CascadeType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getCascadeType_CascadeAll(), theXMLTypePackage.getBoolean(), "cascadeAll", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getCascadeType_CascadePersist(), theXMLTypePackage.getBoolean(), "cascadePersist", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getCascadeType_CascadeMerge(), theXMLTypePackage.getBoolean(), "cascadeMerge", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getCascadeType_CascadeRemove(), theXMLTypePackage.getBoolean(), "cascadeRemove", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getCascadeType_CascadeRefresh(), theXMLTypePackage.getBoolean(), "cascadeRefresh", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlClassReferenceEClass, XmlClassReference.class, "XmlClassReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlClassReference_ClassName(), theXMLTypePackage.getString(), "className", null, 1, 1, XmlClassReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlCollectionTableEClass, XmlCollectionTable.class, "XmlCollectionTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlColumnEClass, XmlColumn.class, "XmlColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlColumn_Length(), theXMLTypePackage.getIntObject(), "length", null, 0, 1, XmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlColumn_Precision(), theXMLTypePackage.getIntObject(), "precision", null, 0, 1, XmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlColumn_Scale(), theXMLTypePackage.getIntObject(), "scale", null, 0, 1, XmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(columnMappingEClass, ColumnMapping.class, "ColumnMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getColumnMapping_Column(), this.getXmlColumn(), null, "column", null, 0, 1, ColumnMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(columnResultEClass, ColumnResult.class, "ColumnResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getColumnResult_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, ColumnResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlConvertibleMappingEClass, XmlConvertibleMapping.class, "XmlConvertibleMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlConvertibleMapping_Lob(), theXMLTypePackage.getBoolean(), "lob", null, 0, 1, XmlConvertibleMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlConvertibleMapping_Temporal(), this.getTemporalType(), "temporal", null, 0, 1, XmlConvertibleMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlConvertibleMapping_Enumerated(), this.getEnumType(), "enumerated", null, 0, 1, XmlConvertibleMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlDiscriminatorColumnEClass, XmlDiscriminatorColumn.class, "XmlDiscriminatorColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlElementCollectionEClass, XmlElementCollection.class, "XmlElementCollection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlEmbeddableEClass, XmlEmbeddable.class, "XmlEmbeddable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlEmbeddedEClass, XmlEmbedded.class, "XmlEmbedded", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlEmbeddedIdEClass, XmlEmbeddedId.class, "XmlEmbeddedId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlEntityEClass, XmlEntity.class, "XmlEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlEntity_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_Table(), this.getXmlTable(), null, "table", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_SecondaryTables(), this.getXmlSecondaryTable(), null, "secondaryTables", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_PrimaryKeyJoinColumns(), this.getXmlPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_Inheritance(), this.getInheritance(), null, "inheritance", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlEntity_DiscriminatorValue(), theXMLTypePackage.getString(), "discriminatorValue", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_DiscriminatorColumn(), this.getXmlDiscriminatorColumn(), null, "discriminatorColumn", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_SqlResultSetMappings(), this.getSqlResultSetMapping(), null, "sqlResultSetMappings", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlEntity_ExcludeDefaultListeners(), theXMLTypePackage.getBoolean(), "excludeDefaultListeners", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlEntity_ExcludeSuperclassListeners(), theXMLTypePackage.getBoolean(), "excludeSuperclassListeners", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_EntityListeners(), this.getEntityListeners(), null, "entityListeners", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(entityListenerEClass, EntityListener.class, "EntityListener", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEntityListener_ClassName(), theXMLTypePackage.getString(), "className", null, 1, 1, EntityListener.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(entityListenersEClass, EntityListeners.class, "EntityListeners", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getEntityListeners_EntityListeners(), this.getEntityListener(), null, "entityListeners", null, 0, -1, EntityListeners.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlEntityMappingsEClass, XmlEntityMappings.class, "XmlEntityMappings", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlEntityMappings_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_PersistenceUnitMetadata(), this.getXmlPersistenceUnitMetadata(), null, "persistenceUnitMetadata", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlEntityMappings_Package(), theXMLTypePackage.getString(), "package", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlEntityMappings_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlEntityMappings_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_SequenceGenerators(), this.getXmlSequenceGenerator(), null, "sequenceGenerators", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_TableGenerators(), this.getXmlTableGenerator(), null, "tableGenerators", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_SqlResultSetMappings(), this.getSqlResultSetMapping(), null, "sqlResultSetMappings", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_MappedSuperclasses(), this.getXmlMappedSuperclass(), null, "mappedSuperclasses", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_Entities(), this.getXmlEntity(), null, "entities", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntityMappings_Embeddables(), this.getXmlEmbeddable(), null, "embeddables", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(entityResultEClass, EntityResult.class, "EntityResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEntityResult_DiscriminatorColumn(), theXMLTypePackage.getString(), "discriminatorColumn", null, 0, 1, EntityResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEntityResult_EntityClass(), theXMLTypePackage.getString(), "entityClass", null, 1, 1, EntityResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEntityResult_FieldResults(), this.getFieldResult(), null, "fieldResults", null, 0, -1, EntityResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(eventMethodEClass, EventMethod.class, "EventMethod", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEventMethod_MethodName(), theXMLTypePackage.getString(), "methodName", null, 1, 1, EventMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlEventMethodContainerEClass, XmlEventMethodContainer.class, "XmlEventMethodContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlEventMethodContainer_PrePersist(), this.getPrePersist(), null, "prePersist", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEventMethodContainer_PostPersist(), this.getPostPersist(), null, "postPersist", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEventMethodContainer_PreRemove(), this.getPreRemove(), null, "preRemove", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEventMethodContainer_PostRemove(), this.getPostRemove(), null, "postRemove", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEventMethodContainer_PreUpdate(), this.getPreUpdate(), null, "preUpdate", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEventMethodContainer_PostUpdate(), this.getPostUpdate(), null, "postUpdate", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEventMethodContainer_PostLoad(), this.getPostLoad(), null, "postLoad", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(fieldResultEClass, FieldResult.class, "FieldResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getFieldResult_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, FieldResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getFieldResult_Column(), theXMLTypePackage.getString(), "column", null, 1, 1, FieldResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlGeneratedValueEClass, XmlGeneratedValue.class, "XmlGeneratedValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlGeneratedValue_Generator(), theXMLTypePackage.getString(), "generator", null, 0, 1, XmlGeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlGeneratedValue_Strategy(), this.getGenerationType(), "strategy", "TABLE", 0, 1, XmlGeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlGeneratorEClass, XmlGenerator.class, "XmlGenerator", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlGenerator_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlGenerator_InitialValue(), theXMLTypePackage.getIntObject(), "initialValue", null, 0, 1, XmlGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlGenerator_AllocationSize(), theXMLTypePackage.getIntObject(), "allocationSize", null, 0, 1, XmlGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlGeneratorContainerEClass, XmlGeneratorContainer.class, "XmlGeneratorContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlGeneratorContainer_SequenceGenerator(), this.getXmlSequenceGenerator(), null, "sequenceGenerator", null, 0, 1, XmlGeneratorContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlGeneratorContainer_TableGenerator(), this.getXmlTableGenerator(), null, "tableGenerator", null, 0, 1, XmlGeneratorContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlIdEClass, XmlId.class, "XmlId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlId_GeneratedValue(), this.getXmlGeneratedValue(), null, "generatedValue", null, 0, 1, XmlId.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlIdClassContainerEClass, XmlIdClassContainer.class, "XmlIdClassContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlIdClassContainer_IdClass(), this.getXmlClassReference(), null, "idClass", null, 0, 1, XmlIdClassContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(inheritanceEClass, Inheritance.class, "Inheritance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getInheritance_Strategy(), this.getInheritanceType(), "strategy", "SINGLE_TABLE", 0, 1, Inheritance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlJoinColumnEClass, XmlJoinColumn.class, "XmlJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlJoinColumnContainerEClass, XmlJoinColumnContainer.class, "XmlJoinColumnContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlJoinColumnContainer_JoinColumns(), this.getXmlJoinColumn(), null, "joinColumns", null, 0, -1, XmlJoinColumnContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlJoinTableEClass, XmlJoinTable.class, "XmlJoinTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlJoinTable_InverseJoinColumns(), this.getXmlJoinColumn(), null, "inverseJoinColumns", null, 0, -1, XmlJoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlJoinTableContainerEClass, XmlJoinTableContainer.class, "XmlJoinTableContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlJoinTableContainer_JoinTable(), this.getXmlJoinTable(), null, "joinTable", null, 0, 1, XmlJoinTableContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(lobEClass, Lob.class, "Lob", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlManyToManyEClass, XmlManyToMany.class, "XmlManyToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlManyToOneEClass, XmlManyToOne.class, "XmlManyToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(mapKeyEClass, MapKey.class, "MapKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMapKey_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, MapKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlMappedByMappingEClass, XmlMappedByMapping.class, "XmlMappedByMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlMappedByMapping_MappedBy(), theXMLTypePackage.getString(), "mappedBy", null, 0, 1, XmlMappedByMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlMappedSuperclassEClass, XmlMappedSuperclass.class, "XmlMappedSuperclass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlMappedSuperclass_ExcludeDefaultListeners(), theXMLTypePackage.getBoolean(), "excludeDefaultListeners", null, 0, 1, XmlMappedSuperclass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlMappedSuperclass_ExcludeSuperclassListeners(), theXMLTypePackage.getBoolean(), "excludeSuperclassListeners", null, 0, 1, XmlMappedSuperclass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlMappedSuperclass_EntityListeners(), this.getEntityListeners(), null, "entityListeners", null, 0, 1, XmlMappedSuperclass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlNamedNativeQueryEClass, XmlNamedNativeQuery.class, "XmlNamedNativeQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlNamedNativeQuery_ResultClass(), theXMLTypePackage.getString(), "resultClass", null, 0, 1, XmlNamedNativeQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlNamedNativeQuery_ResultSetMapping(), theXMLTypePackage.getString(), "resultSetMapping", null, 0, 1, XmlNamedNativeQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlNamedQueryEClass, XmlNamedQuery.class, "XmlNamedQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlNullAttributeMappingEClass, XmlNullAttributeMapping.class, "XmlNullAttributeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlOneToManyEClass, XmlOneToMany.class, "XmlOneToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlOneToOneEClass, XmlOneToOne.class, "XmlOneToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlOrderableEClass, XmlOrderable.class, "XmlOrderable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlOrderable_OrderBy(), theXMLTypePackage.getString(), "orderBy", null, 0, 1, XmlOrderable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlOrderColumnEClass, XmlOrderColumn.class, "XmlOrderColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlOverrideEClass, XmlOverride.class, "XmlOverride", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlOverride_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPersistenceUnitDefaultsEClass, XmlPersistenceUnitDefaults.class, "XmlPersistenceUnitDefaults", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlPersistenceUnitDefaults_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnitDefaults_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnitDefaults_CascadePersist(), theXMLTypePackage.getBoolean(), "cascadePersist", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlPersistenceUnitDefaults_EntityListeners(), this.getEntityListeners(), null, "entityListeners", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPersistenceUnitMetadataEClass, XmlPersistenceUnitMetadata.class, "XmlPersistenceUnitMetadata", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete(), theXMLTypePackage.getBoolean(), "xmlMappingMetadataComplete", null, 0, 1, XmlPersistenceUnitMetadata.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlPersistenceUnitMetadata_PersistenceUnitDefaults(), this.getXmlPersistenceUnitDefaults(), null, "persistenceUnitDefaults", null, 0, 1, XmlPersistenceUnitMetadata.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlReferenceTableEClass, XmlReferenceTable.class, "XmlReferenceTable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlReferenceTable_JoinColumns(), this.getXmlJoinColumn(), null, "joinColumns", null, 0, -1, XmlReferenceTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(postLoadEClass, PostLoad.class, "PostLoad", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(postPersistEClass, PostPersist.class, "PostPersist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(postRemoveEClass, PostRemove.class, "PostRemove", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(postUpdateEClass, PostUpdate.class, "PostUpdate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(prePersistEClass, PrePersist.class, "PrePersist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(preRemoveEClass, PreRemove.class, "PreRemove", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(preUpdateEClass, PreUpdate.class, "PreUpdate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlPrimaryKeyJoinColumnEClass, XmlPrimaryKeyJoinColumn.class, "XmlPrimaryKeyJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlPrimaryKeyJoinColumnContainerEClass, XmlPrimaryKeyJoinColumnContainer.class, "XmlPrimaryKeyJoinColumnContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlPrimaryKeyJoinColumnContainer_PrimaryKeyJoinColumns(), this.getXmlPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, XmlPrimaryKeyJoinColumnContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlQueryEClass, XmlQuery.class, "XmlQuery", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlQuery_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlQuery_Query(), theXMLTypePackage.getString(), "query", null, 1, 1, XmlQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlQuery_Hints(), this.getXmlQueryHint(), null, "hints", null, 0, -1, XmlQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlQueryContainerEClass, XmlQueryContainer.class, "XmlQueryContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlQueryContainer_NamedQueries(), this.getXmlNamedQuery(), null, "namedQueries", null, 0, -1, XmlQueryContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlQueryContainer_NamedNativeQueries(), this.getXmlNamedNativeQuery(), null, "namedNativeQueries", null, 0, -1, XmlQueryContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlQueryHintEClass, XmlQueryHint.class, "XmlQueryHint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlQueryHint_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlQueryHint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlQueryHint_Value(), theXMLTypePackage.getString(), "value", null, 1, 1, XmlQueryHint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlSecondaryTableEClass, XmlSecondaryTable.class, "XmlSecondaryTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlSecondaryTable_PrimaryKeyJoinColumns(), this.getXmlPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, XmlSecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlSequenceGeneratorEClass, XmlSequenceGenerator.class, "XmlSequenceGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlSequenceGenerator_SequenceName(), theXMLTypePackage.getString(), "sequenceName", null, 0, 1, XmlSequenceGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(sqlResultSetMappingEClass, SqlResultSetMapping.class, "SqlResultSetMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSqlResultSetMapping_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, SqlResultSetMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getSqlResultSetMapping_EntityResults(), this.getEntityResult(), null, "entityResults", null, 0, -1, SqlResultSetMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getSqlResultSetMapping_ColumnResults(), this.getColumnResult(), null, "columnResults", null, 0, -1, SqlResultSetMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlTableEClass, XmlTable.class, "XmlTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlTableGeneratorEClass, XmlTableGenerator.class, "XmlTableGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlTableGenerator_Table(), theXMLTypePackage.getString(), "table", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTableGenerator_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTableGenerator_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTableGenerator_PkColumnName(), theXMLTypePackage.getString(), "pkColumnName", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTableGenerator_ValueColumnName(), theXMLTypePackage.getString(), "valueColumnName", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTableGenerator_PkColumnValue(), theXMLTypePackage.getString(), "pkColumnValue", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlTableGenerator_UniqueConstraints(), this.getXmlUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlTransientEClass, XmlTransient.class, "XmlTransient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlTypeMappingEClass, XmlTypeMapping.class, "XmlTypeMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlTypeMapping_ClassName(), theXMLTypePackage.getString(), "className", null, 1, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTypeMapping_MetadataComplete(), theXMLTypePackage.getBooleanObject(), "metadataComplete", null, 0, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlTypeMapping_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlTypeMapping_Attributes(), this.getAttributes(), null, "attributes", null, 0, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlUniqueConstraintEClass, XmlUniqueConstraint.class, "XmlUniqueConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlUniqueConstraint_ColumnNames(), theXMLTypePackage.getString(), "columnNames", null, 1, -1, XmlUniqueConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlVersionEClass, XmlVersion.class, "XmlVersion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- // Initialize enums and add enum literals
- initEEnum(discriminatorTypeEEnum, DiscriminatorType.class, "DiscriminatorType");
- addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.STRING);
- addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.CHAR);
- addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.INTEGER);
-
- initEEnum(enumTypeEEnum, EnumType.class, "EnumType");
- addEEnumLiteral(enumTypeEEnum, EnumType.ORDINAL);
- addEEnumLiteral(enumTypeEEnum, EnumType.STRING);
-
- initEEnum(fetchTypeEEnum, FetchType.class, "FetchType");
- addEEnumLiteral(fetchTypeEEnum, FetchType.LAZY);
- addEEnumLiteral(fetchTypeEEnum, FetchType.EAGER);
-
- initEEnum(generationTypeEEnum, GenerationType.class, "GenerationType");
- addEEnumLiteral(generationTypeEEnum, GenerationType.TABLE);
- addEEnumLiteral(generationTypeEEnum, GenerationType.SEQUENCE);
- addEEnumLiteral(generationTypeEEnum, GenerationType.IDENTITY);
- addEEnumLiteral(generationTypeEEnum, GenerationType.AUTO);
-
- initEEnum(inheritanceTypeEEnum, InheritanceType.class, "InheritanceType");
- addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.SINGLE_TABLE);
- addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.JOINED);
- addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.TABLE_PER_CLASS);
-
- initEEnum(temporalTypeEEnum, TemporalType.class, "TemporalType");
- addEEnumLiteral(temporalTypeEEnum, TemporalType.DATE);
- addEEnumLiteral(temporalTypeEEnum, TemporalType.TIME);
- addEEnumLiteral(temporalTypeEEnum, TemporalType.TIMESTAMP);
-
- // Create resource
- createResource(eNS_URI);
- }
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- public interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping <em>Abstract Xml Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlAttributeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlAttributeMapping()
- * @generated
- */
- public static final EClass ABSTRACT_XML_ATTRIBUTE_MAPPING = eINSTANCE.getAbstractXmlAttributeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn <em>Xml Base Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn()
- * @generated
- */
- public static final EClass XML_BASE_COLUMN = eINSTANCE.getXmlBaseColumn();
-
- /**
- * The meta object literal for the '<em><b>Insertable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_COLUMN__INSERTABLE = eINSTANCE.getXmlBaseColumn_Insertable();
-
- /**
- * The meta object literal for the '<em><b>Nullable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_COLUMN__NULLABLE = eINSTANCE.getXmlBaseColumn_Nullable();
-
- /**
- * The meta object literal for the '<em><b>Table</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_COLUMN__TABLE = eINSTANCE.getXmlBaseColumn_Table();
-
- /**
- * The meta object literal for the '<em><b>Unique</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_COLUMN__UNIQUE = eINSTANCE.getXmlBaseColumn_Unique();
-
- /**
- * The meta object literal for the '<em><b>Updatable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_COLUMN__UPDATABLE = eINSTANCE.getXmlBaseColumn_Updatable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn <em>Abstract Xml Base Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlBaseColumn()
- * @generated
- */
- public static final EClass ABSTRACT_XML_BASE_COLUMN = eINSTANCE.getAbstractXmlBaseColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn <em>Abstract Xml Base Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlBaseDiscriminatorColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlBaseDiscriminatorColumn()
- * @generated
- */
- public static final EClass ABSTRACT_XML_BASE_DISCRIMINATOR_COLUMN = eINSTANCE.getAbstractXmlBaseDiscriminatorColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded <em>Abstract Xml Embedded</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlEmbedded()
- * @generated
- */
- public static final EClass ABSTRACT_XML_EMBEDDED = eINSTANCE.getAbstractXmlEmbedded();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping <em>Abstract Xml Multi Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping()
- * @generated
- */
- public static final EClass ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING = eINSTANCE.getAbstractXmlMultiRelationshipMapping();
-
- /**
- * The meta object literal for the '<em><b>Map Key</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY = eINSTANCE.getAbstractXmlMultiRelationshipMapping_MapKey();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn <em>Xml Named Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn()
- * @generated
- */
- public static final EClass XML_NAMED_COLUMN = eINSTANCE.getXmlNamedColumn();
-
- /**
- * The meta object literal for the '<em><b>Column Definition</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_NAMED_COLUMN__COLUMN_DEFINITION = eINSTANCE.getXmlNamedColumn_ColumnDefinition();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_NAMED_COLUMN__NAME = eINSTANCE.getXmlNamedColumn_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn <em>Xml Base Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn()
- * @generated
- */
- public static final EClass XML_BASE_DISCRIMINATOR_COLUMN = eINSTANCE.getXmlBaseDiscriminatorColumn();
-
- /**
- * The meta object literal for the '<em><b>Discriminator Type</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = eINSTANCE.getXmlBaseDiscriminatorColumn_DiscriminatorType();
-
- /**
- * The meta object literal for the '<em><b>Length</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_DISCRIMINATOR_COLUMN__LENGTH = eINSTANCE.getXmlBaseDiscriminatorColumn_Length();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn <em>Xml Base Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseJoinColumn()
- * @generated
- */
- public static final EClass XML_BASE_JOIN_COLUMN = eINSTANCE.getXmlBaseJoinColumn();
-
- /**
- * The meta object literal for the '<em><b>Referenced Column Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME = eINSTANCE.getXmlBaseJoinColumn_ReferencedColumnName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn <em>Abstract Xml Named Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn()
- * @generated
- */
- public static final EClass ABSTRACT_XML_NAMED_COLUMN = eINSTANCE.getAbstractXmlNamedColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping <em>Abstract Xml Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping()
- * @generated
- */
- public static final EClass ABSTRACT_XML_RELATIONSHIP_MAPPING = eINSTANCE.getAbstractXmlRelationshipMapping();
-
- /**
- * The meta object literal for the '<em><b>Target Entity</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY = eINSTANCE.getAbstractXmlRelationshipMapping_TargetEntity();
-
- /**
- * The meta object literal for the '<em><b>Fetch</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH = eINSTANCE.getAbstractXmlRelationshipMapping_Fetch();
-
- /**
- * The meta object literal for the '<em><b>Cascade</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE = eINSTANCE.getAbstractXmlRelationshipMapping_Cascade();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping <em>Abstract Xml Single Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping()
- * @generated
- */
- public static final EClass ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING = eINSTANCE.getAbstractXmlSingleRelationshipMapping();
-
- /**
- * The meta object literal for the '<em><b>Optional</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL = eINSTANCE.getAbstractXmlSingleRelationshipMapping_Optional();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable <em>Abstract Xml Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTable()
- * @generated
- */
- public static final EClass ABSTRACT_XML_TABLE = eINSTANCE.getAbstractXmlTable();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ABSTRACT_XML_TABLE__NAME = eINSTANCE.getAbstractXmlTable_Name();
-
- /**
- * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ABSTRACT_XML_TABLE__CATALOG = eINSTANCE.getAbstractXmlTable_Catalog();
-
- /**
- * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ABSTRACT_XML_TABLE__SCHEMA = eINSTANCE.getAbstractXmlTable_Schema();
-
- /**
- * The meta object literal for the '<em><b>Unique Constraints</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS = eINSTANCE.getAbstractXmlTable_UniqueConstraints();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping <em>Abstract Xml Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTypeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlTypeMapping()
- * @generated
- */
- public static final EClass ABSTRACT_XML_TYPE_MAPPING = eINSTANCE.getAbstractXmlTypeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder <em>Xml Access Holder</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder()
- * @generated
- */
- public static final EClass XML_ACCESS_HOLDER = eINSTANCE.getXmlAccessHolder();
-
- /**
- * The meta object literal for the '<em><b>Access</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ACCESS_HOLDER__ACCESS = eINSTANCE.getXmlAccessHolder_Access();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping <em>Xml Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeMapping()
- * @generated
- */
- public static final EClass XML_ATTRIBUTE_MAPPING = eINSTANCE.getXmlAttributeMapping();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ATTRIBUTE_MAPPING__NAME = eINSTANCE.getXmlAttributeMapping_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride <em>Xml Association Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverride()
- * @generated
- */
- public static final EClass XML_ASSOCIATION_OVERRIDE = eINSTANCE.getXmlAssociationOverride();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer <em>Xml Association Override Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer()
- * @generated
- */
- public static final EClass XML_ASSOCIATION_OVERRIDE_CONTAINER = eINSTANCE.getXmlAssociationOverrideContainer();
-
- /**
- * The meta object literal for the '<em><b>Association Overrides</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES = eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride <em>Xml Attribute Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverride()
- * @generated
- */
- public static final EClass XML_ATTRIBUTE_OVERRIDE = eINSTANCE.getXmlAttributeOverride();
-
- /**
- * The meta object literal for the '<em><b>Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ATTRIBUTE_OVERRIDE__COLUMN = eINSTANCE.getXmlAttributeOverride_Column();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer <em>Xml Attribute Override Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer()
- * @generated
- */
- public static final EClass XML_ATTRIBUTE_OVERRIDE_CONTAINER = eINSTANCE.getXmlAttributeOverrideContainer();
-
- /**
- * The meta object literal for the '<em><b>Attribute Overrides</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES = eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.Attributes <em>Attributes</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.Attributes
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAttributes()
- * @generated
- */
- public static final EClass ATTRIBUTES = eINSTANCE.getAttributes();
-
- /**
- * The meta object literal for the '<em><b>Ids</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__IDS = eINSTANCE.getAttributes_Ids();
-
- /**
- * The meta object literal for the '<em><b>Embedded Ids</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__EMBEDDED_IDS = eINSTANCE.getAttributes_EmbeddedIds();
-
- /**
- * The meta object literal for the '<em><b>Basics</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__BASICS = eINSTANCE.getAttributes_Basics();
-
- /**
- * The meta object literal for the '<em><b>Versions</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__VERSIONS = eINSTANCE.getAttributes_Versions();
-
- /**
- * The meta object literal for the '<em><b>Many To Ones</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__MANY_TO_ONES = eINSTANCE.getAttributes_ManyToOnes();
-
- /**
- * The meta object literal for the '<em><b>One To Manys</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__ONE_TO_MANYS = eINSTANCE.getAttributes_OneToManys();
-
- /**
- * The meta object literal for the '<em><b>One To Ones</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__ONE_TO_ONES = eINSTANCE.getAttributes_OneToOnes();
-
- /**
- * The meta object literal for the '<em><b>Many To Manys</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__MANY_TO_MANYS = eINSTANCE.getAttributes_ManyToManys();
-
- /**
- * The meta object literal for the '<em><b>Embeddeds</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__EMBEDDEDS = eINSTANCE.getAttributes_Embeddeds();
-
- /**
- * The meta object literal for the '<em><b>Transients</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ATTRIBUTES__TRANSIENTS = eINSTANCE.getAttributes_Transients();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic <em>Xml Basic</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlBasic
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBasic()
- * @generated
- */
- public static final EClass XML_BASIC = eINSTANCE.getXmlBasic();
-
- /**
- * The meta object literal for the '<em><b>Fetch</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASIC__FETCH = eINSTANCE.getXmlBasic_Fetch();
-
- /**
- * The meta object literal for the '<em><b>Optional</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_BASIC__OPTIONAL = eINSTANCE.getXmlBasic_Optional();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.CascadeType <em>Cascade Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.CascadeType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getCascadeType()
- * @generated
- */
- public static final EClass CASCADE_TYPE = eINSTANCE.getCascadeType();
-
- /**
- * The meta object literal for the '<em><b>Cascade All</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute CASCADE_TYPE__CASCADE_ALL = eINSTANCE.getCascadeType_CascadeAll();
-
- /**
- * The meta object literal for the '<em><b>Cascade Persist</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute CASCADE_TYPE__CASCADE_PERSIST = eINSTANCE.getCascadeType_CascadePersist();
-
- /**
- * The meta object literal for the '<em><b>Cascade Merge</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute CASCADE_TYPE__CASCADE_MERGE = eINSTANCE.getCascadeType_CascadeMerge();
-
- /**
- * The meta object literal for the '<em><b>Cascade Remove</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute CASCADE_TYPE__CASCADE_REMOVE = eINSTANCE.getCascadeType_CascadeRemove();
-
- /**
- * The meta object literal for the '<em><b>Cascade Refresh</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute CASCADE_TYPE__CASCADE_REFRESH = eINSTANCE.getCascadeType_CascadeRefresh();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference <em>Xml Class Reference</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlClassReference()
- * @generated
- */
- public static final EClass XML_CLASS_REFERENCE = eINSTANCE.getXmlClassReference();
-
- /**
- * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_CLASS_REFERENCE__CLASS_NAME = eINSTANCE.getXmlClassReference_ClassName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable <em>Xml Collection Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlCollectionTable()
- * @generated
- */
- public static final EClass XML_COLLECTION_TABLE = eINSTANCE.getXmlCollectionTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn <em>Xml Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlColumn()
- * @generated
- */
- public static final EClass XML_COLUMN = eINSTANCE.getXmlColumn();
-
- /**
- * The meta object literal for the '<em><b>Length</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_COLUMN__LENGTH = eINSTANCE.getXmlColumn_Length();
-
- /**
- * The meta object literal for the '<em><b>Precision</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_COLUMN__PRECISION = eINSTANCE.getXmlColumn_Precision();
-
- /**
- * The meta object literal for the '<em><b>Scale</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_COLUMN__SCALE = eINSTANCE.getXmlColumn_Scale();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping <em>Column Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping()
- * @generated
- */
- public static final EClass COLUMN_MAPPING = eINSTANCE.getColumnMapping();
-
- /**
- * The meta object literal for the '<em><b>Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference COLUMN_MAPPING__COLUMN = eINSTANCE.getColumnMapping_Column();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult <em>Column Result</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.ColumnResult
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnResult()
- * @generated
- */
- public static final EClass COLUMN_RESULT = eINSTANCE.getColumnResult();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute COLUMN_RESULT__NAME = eINSTANCE.getColumnResult_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping <em>Xml Convertible Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping()
- * @generated
- */
- public static final EClass XML_CONVERTIBLE_MAPPING = eINSTANCE.getXmlConvertibleMapping();
-
- /**
- * The meta object literal for the '<em><b>Lob</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_CONVERTIBLE_MAPPING__LOB = eINSTANCE.getXmlConvertibleMapping_Lob();
-
- /**
- * The meta object literal for the '<em><b>Temporal</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_CONVERTIBLE_MAPPING__TEMPORAL = eINSTANCE.getXmlConvertibleMapping_Temporal();
-
- /**
- * The meta object literal for the '<em><b>Enumerated</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_CONVERTIBLE_MAPPING__ENUMERATED = eINSTANCE.getXmlConvertibleMapping_Enumerated();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn <em>Xml Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn()
- * @generated
- */
- public static final EClass XML_DISCRIMINATOR_COLUMN = eINSTANCE.getXmlDiscriminatorColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection <em>Xml Element Collection</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection()
- * @generated
- */
- public static final EClass XML_ELEMENT_COLLECTION = eINSTANCE.getXmlElementCollection();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable <em>Xml Embeddable</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbeddable()
- * @generated
- */
- public static final EClass XML_EMBEDDABLE = eINSTANCE.getXmlEmbeddable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded <em>Xml Embedded</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbedded()
- * @generated
- */
- public static final EClass XML_EMBEDDED = eINSTANCE.getXmlEmbedded();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId <em>Xml Embedded Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbeddedId()
- * @generated
- */
- public static final EClass XML_EMBEDDED_ID = eINSTANCE.getXmlEmbeddedId();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity <em>Xml Entity</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntity
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity()
- * @generated
- */
- public static final EClass XML_ENTITY = eINSTANCE.getXmlEntity();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY__NAME = eINSTANCE.getXmlEntity_Name();
-
- /**
- * The meta object literal for the '<em><b>Table</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__TABLE = eINSTANCE.getXmlEntity_Table();
-
- /**
- * The meta object literal for the '<em><b>Secondary Tables</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__SECONDARY_TABLES = eINSTANCE.getXmlEntity_SecondaryTables();
-
- /**
- * The meta object literal for the '<em><b>Primary Key Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS = eINSTANCE.getXmlEntity_PrimaryKeyJoinColumns();
-
- /**
- * The meta object literal for the '<em><b>Inheritance</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__INHERITANCE = eINSTANCE.getXmlEntity_Inheritance();
-
- /**
- * The meta object literal for the '<em><b>Discriminator Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY__DISCRIMINATOR_VALUE = eINSTANCE.getXmlEntity_DiscriminatorValue();
-
- /**
- * The meta object literal for the '<em><b>Discriminator Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__DISCRIMINATOR_COLUMN = eINSTANCE.getXmlEntity_DiscriminatorColumn();
-
- /**
- * The meta object literal for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__SQL_RESULT_SET_MAPPINGS = eINSTANCE.getXmlEntity_SqlResultSetMappings();
-
- /**
- * The meta object literal for the '<em><b>Exclude Default Listeners</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS = eINSTANCE.getXmlEntity_ExcludeDefaultListeners();
-
- /**
- * The meta object literal for the '<em><b>Exclude Superclass Listeners</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS = eINSTANCE.getXmlEntity_ExcludeSuperclassListeners();
-
- /**
- * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__ENTITY_LISTENERS = eINSTANCE.getXmlEntity_EntityListeners();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListener <em>Entity Listener</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListener
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListener()
- * @generated
- */
- public static final EClass ENTITY_LISTENER = eINSTANCE.getEntityListener();
-
- /**
- * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ENTITY_LISTENER__CLASS_NAME = eINSTANCE.getEntityListener_ClassName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityListeners <em>Entity Listeners</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityListeners
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityListeners()
- * @generated
- */
- public static final EClass ENTITY_LISTENERS = eINSTANCE.getEntityListeners();
-
- /**
- * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ENTITY_LISTENERS__ENTITY_LISTENERS = eINSTANCE.getEntityListeners_EntityListeners();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings <em>Xml Entity Mappings</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings()
- * @generated
- */
- public static final EClass XML_ENTITY_MAPPINGS = eINSTANCE.getXmlEntityMappings();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY_MAPPINGS__DESCRIPTION = eINSTANCE.getXmlEntityMappings_Description();
-
- /**
- * The meta object literal for the '<em><b>Persistence Unit Metadata</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA = eINSTANCE.getXmlEntityMappings_PersistenceUnitMetadata();
-
- /**
- * The meta object literal for the '<em><b>Package</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY_MAPPINGS__PACKAGE = eINSTANCE.getXmlEntityMappings_Package();
-
- /**
- * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY_MAPPINGS__SCHEMA = eINSTANCE.getXmlEntityMappings_Schema();
-
- /**
- * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY_MAPPINGS__CATALOG = eINSTANCE.getXmlEntityMappings_Catalog();
-
- /**
- * The meta object literal for the '<em><b>Sequence Generators</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS = eINSTANCE.getXmlEntityMappings_SequenceGenerators();
-
- /**
- * The meta object literal for the '<em><b>Table Generators</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__TABLE_GENERATORS = eINSTANCE.getXmlEntityMappings_TableGenerators();
-
- /**
- * The meta object literal for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS = eINSTANCE.getXmlEntityMappings_SqlResultSetMappings();
-
- /**
- * The meta object literal for the '<em><b>Mapped Superclasses</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES = eINSTANCE.getXmlEntityMappings_MappedSuperclasses();
-
- /**
- * The meta object literal for the '<em><b>Entities</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__ENTITIES = eINSTANCE.getXmlEntityMappings_Entities();
-
- /**
- * The meta object literal for the '<em><b>Embeddables</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY_MAPPINGS__EMBEDDABLES = eINSTANCE.getXmlEntityMappings_Embeddables();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult <em>Entity Result</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EntityResult
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEntityResult()
- * @generated
- */
- public static final EClass ENTITY_RESULT = eINSTANCE.getEntityResult();
-
- /**
- * The meta object literal for the '<em><b>Discriminator Column</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ENTITY_RESULT__DISCRIMINATOR_COLUMN = eINSTANCE.getEntityResult_DiscriminatorColumn();
-
- /**
- * The meta object literal for the '<em><b>Entity Class</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute ENTITY_RESULT__ENTITY_CLASS = eINSTANCE.getEntityResult_EntityClass();
-
- /**
- * The meta object literal for the '<em><b>Field Results</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference ENTITY_RESULT__FIELD_RESULTS = eINSTANCE.getEntityResult_FieldResults();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EventMethod <em>Event Method</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EventMethod
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEventMethod()
- * @generated
- */
- public static final EClass EVENT_METHOD = eINSTANCE.getEventMethod();
-
- /**
- * The meta object literal for the '<em><b>Method Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute EVENT_METHOD__METHOD_NAME = eINSTANCE.getEventMethod_MethodName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer <em>Xml Event Method Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer()
- * @generated
- */
- public static final EClass XML_EVENT_METHOD_CONTAINER = eINSTANCE.getXmlEventMethodContainer();
-
- /**
- * The meta object literal for the '<em><b>Pre Persist</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__PRE_PERSIST = eINSTANCE.getXmlEventMethodContainer_PrePersist();
-
- /**
- * The meta object literal for the '<em><b>Post Persist</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__POST_PERSIST = eINSTANCE.getXmlEventMethodContainer_PostPersist();
-
- /**
- * The meta object literal for the '<em><b>Pre Remove</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__PRE_REMOVE = eINSTANCE.getXmlEventMethodContainer_PreRemove();
-
- /**
- * The meta object literal for the '<em><b>Post Remove</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__POST_REMOVE = eINSTANCE.getXmlEventMethodContainer_PostRemove();
-
- /**
- * The meta object literal for the '<em><b>Pre Update</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__PRE_UPDATE = eINSTANCE.getXmlEventMethodContainer_PreUpdate();
-
- /**
- * The meta object literal for the '<em><b>Post Update</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__POST_UPDATE = eINSTANCE.getXmlEventMethodContainer_PostUpdate();
-
- /**
- * The meta object literal for the '<em><b>Post Load</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_EVENT_METHOD_CONTAINER__POST_LOAD = eINSTANCE.getXmlEventMethodContainer_PostLoad();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.FieldResult <em>Field Result</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.FieldResult
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFieldResult()
- * @generated
- */
- public static final EClass FIELD_RESULT = eINSTANCE.getFieldResult();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute FIELD_RESULT__NAME = eINSTANCE.getFieldResult_Name();
-
- /**
- * The meta object literal for the '<em><b>Column</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute FIELD_RESULT__COLUMN = eINSTANCE.getFieldResult_Column();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue <em>Xml Generated Value</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratedValue()
- * @generated
- */
- public static final EClass XML_GENERATED_VALUE = eINSTANCE.getXmlGeneratedValue();
-
- /**
- * The meta object literal for the '<em><b>Generator</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_GENERATED_VALUE__GENERATOR = eINSTANCE.getXmlGeneratedValue_Generator();
-
- /**
- * The meta object literal for the '<em><b>Strategy</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_GENERATED_VALUE__STRATEGY = eINSTANCE.getXmlGeneratedValue_Strategy();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator <em>Xml Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator()
- * @generated
- */
- public static final EClass XML_GENERATOR = eINSTANCE.getXmlGenerator();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_GENERATOR__NAME = eINSTANCE.getXmlGenerator_Name();
-
- /**
- * The meta object literal for the '<em><b>Initial Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_GENERATOR__INITIAL_VALUE = eINSTANCE.getXmlGenerator_InitialValue();
-
- /**
- * The meta object literal for the '<em><b>Allocation Size</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_GENERATOR__ALLOCATION_SIZE = eINSTANCE.getXmlGenerator_AllocationSize();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer <em>Xml Generator Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer()
- * @generated
- */
- public static final EClass XML_GENERATOR_CONTAINER = eINSTANCE.getXmlGeneratorContainer();
-
- /**
- * The meta object literal for the '<em><b>Sequence Generator</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR = eINSTANCE.getXmlGeneratorContainer_SequenceGenerator();
-
- /**
- * The meta object literal for the '<em><b>Table Generator</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_GENERATOR_CONTAINER__TABLE_GENERATOR = eINSTANCE.getXmlGeneratorContainer_TableGenerator();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId <em>Xml Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlId
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlId()
- * @generated
- */
- public static final EClass XML_ID = eINSTANCE.getXmlId();
-
- /**
- * The meta object literal for the '<em><b>Generated Value</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ID__GENERATED_VALUE = eINSTANCE.getXmlId_GeneratedValue();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer <em>Xml Id Class Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlIdClassContainer()
- * @generated
- */
- public static final EClass XML_ID_CLASS_CONTAINER = eINSTANCE.getXmlIdClassContainer();
-
- /**
- * The meta object literal for the '<em><b>Id Class</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ID_CLASS_CONTAINER__ID_CLASS = eINSTANCE.getXmlIdClassContainer_IdClass();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.Inheritance <em>Inheritance</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.Inheritance
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritance()
- * @generated
- */
- public static final EClass INHERITANCE = eINSTANCE.getInheritance();
-
- /**
- * The meta object literal for the '<em><b>Strategy</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute INHERITANCE__STRATEGY = eINSTANCE.getInheritance_Strategy();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn <em>Xml Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumn()
- * @generated
- */
- public static final EClass XML_JOIN_COLUMN = eINSTANCE.getXmlJoinColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer <em>Xml Join Column Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer()
- * @generated
- */
- public static final EClass XML_JOIN_COLUMN_CONTAINER = eINSTANCE.getXmlJoinColumnContainer();
-
- /**
- * The meta object literal for the '<em><b>Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS = eINSTANCE.getXmlJoinColumnContainer_JoinColumns();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable <em>Xml Join Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTable()
- * @generated
- */
- public static final EClass XML_JOIN_TABLE = eINSTANCE.getXmlJoinTable();
-
- /**
- * The meta object literal for the '<em><b>Inverse Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS = eINSTANCE.getXmlJoinTable_InverseJoinColumns();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer <em>Xml Join Table Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer()
- * @generated
- */
- public static final EClass XML_JOIN_TABLE_CONTAINER = eINSTANCE.getXmlJoinTableContainer();
-
- /**
- * The meta object literal for the '<em><b>Join Table</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_JOIN_TABLE_CONTAINER__JOIN_TABLE = eINSTANCE.getXmlJoinTableContainer_JoinTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.Lob <em>Lob</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.Lob
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getLob()
- * @generated
- */
- public static final EClass LOB = eINSTANCE.getLob();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany <em>Xml Many To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlManyToMany()
- * @generated
- */
- public static final EClass XML_MANY_TO_MANY = eINSTANCE.getXmlManyToMany();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne <em>Xml Many To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlManyToOne()
- * @generated
- */
- public static final EClass XML_MANY_TO_ONE = eINSTANCE.getXmlManyToOne();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.MapKey <em>Map Key</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.MapKey
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getMapKey()
- * @generated
- */
- public static final EClass MAP_KEY = eINSTANCE.getMapKey();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute MAP_KEY__NAME = eINSTANCE.getMapKey_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping <em>Xml Mapped By Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedByMapping()
- * @generated
- */
- public static final EClass XML_MAPPED_BY_MAPPING = eINSTANCE.getXmlMappedByMapping();
-
- /**
- * The meta object literal for the '<em><b>Mapped By</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAPPED_BY_MAPPING__MAPPED_BY = eINSTANCE.getXmlMappedByMapping_MappedBy();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass <em>Xml Mapped Superclass</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedSuperclass()
- * @generated
- */
- public static final EClass XML_MAPPED_SUPERCLASS = eINSTANCE.getXmlMappedSuperclass();
-
- /**
- * The meta object literal for the '<em><b>Exclude Default Listeners</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS = eINSTANCE.getXmlMappedSuperclass_ExcludeDefaultListeners();
-
- /**
- * The meta object literal for the '<em><b>Exclude Superclass Listeners</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS = eINSTANCE.getXmlMappedSuperclass_ExcludeSuperclassListeners();
-
- /**
- * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS = eINSTANCE.getXmlMappedSuperclass_EntityListeners();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery <em>Xml Named Native Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedNativeQuery()
- * @generated
- */
- public static final EClass XML_NAMED_NATIVE_QUERY = eINSTANCE.getXmlNamedNativeQuery();
-
- /**
- * The meta object literal for the '<em><b>Result Class</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_NAMED_NATIVE_QUERY__RESULT_CLASS = eINSTANCE.getXmlNamedNativeQuery_ResultClass();
-
- /**
- * The meta object literal for the '<em><b>Result Set Mapping</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = eINSTANCE.getXmlNamedNativeQuery_ResultSetMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery <em>Xml Named Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedQuery()
- * @generated
- */
- public static final EClass XML_NAMED_QUERY = eINSTANCE.getXmlNamedQuery();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping <em>Xml Null Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNullAttributeMapping()
- * @generated
- */
- public static final EClass XML_NULL_ATTRIBUTE_MAPPING = eINSTANCE.getXmlNullAttributeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany <em>Xml One To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOneToMany()
- * @generated
- */
- public static final EClass XML_ONE_TO_MANY = eINSTANCE.getXmlOneToMany();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne <em>Xml One To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOneToOne()
- * @generated
- */
- public static final EClass XML_ONE_TO_ONE = eINSTANCE.getXmlOneToOne();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn <em>Xml Order Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderColumn()
- * @generated
- */
- public static final EClass XML_ORDER_COLUMN = eINSTANCE.getXmlOrderColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOverride <em>Xml Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOverride
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOverride()
- * @generated
- */
- public static final EClass XML_OVERRIDE = eINSTANCE.getXmlOverride();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_OVERRIDE__NAME = eINSTANCE.getXmlOverride_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults <em>Xml Persistence Unit Defaults</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults()
- * @generated
- */
- public static final EClass XML_PERSISTENCE_UNIT_DEFAULTS = eINSTANCE.getXmlPersistenceUnitDefaults();
-
- /**
- * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA = eINSTANCE.getXmlPersistenceUnitDefaults_Schema();
-
- /**
- * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG = eINSTANCE.getXmlPersistenceUnitDefaults_Catalog();
-
- /**
- * The meta object literal for the '<em><b>Cascade Persist</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST = eINSTANCE.getXmlPersistenceUnitDefaults_CascadePersist();
-
- /**
- * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS = eINSTANCE.getXmlPersistenceUnitDefaults_EntityListeners();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata <em>Xml Persistence Unit Metadata</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata()
- * @generated
- */
- public static final EClass XML_PERSISTENCE_UNIT_METADATA = eINSTANCE.getXmlPersistenceUnitMetadata();
-
- /**
- * The meta object literal for the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE = eINSTANCE.getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete();
-
- /**
- * The meta object literal for the '<em><b>Persistence Unit Defaults</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS = eINSTANCE.getXmlPersistenceUnitMetadata_PersistenceUnitDefaults();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable <em>Abstract Xml Reference Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlReferenceTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getAbstractXmlReferenceTable()
- * @generated
- */
- public static final EClass ABSTRACT_XML_REFERENCE_TABLE = eINSTANCE.getAbstractXmlReferenceTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable <em>Xml Reference Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlReferenceTable()
- * @generated
- */
- public static final EClass XML_REFERENCE_TABLE = eINSTANCE.getXmlReferenceTable();
-
- /**
- * The meta object literal for the '<em><b>Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_REFERENCE_TABLE__JOIN_COLUMNS = eINSTANCE.getXmlReferenceTable_JoinColumns();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostLoad <em>Post Load</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostLoad
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostLoad()
- * @generated
- */
- public static final EClass POST_LOAD = eINSTANCE.getPostLoad();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostPersist <em>Post Persist</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostPersist
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostPersist()
- * @generated
- */
- public static final EClass POST_PERSIST = eINSTANCE.getPostPersist();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostRemove <em>Post Remove</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostRemove
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostRemove()
- * @generated
- */
- public static final EClass POST_REMOVE = eINSTANCE.getPostRemove();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PostUpdate <em>Post Update</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PostUpdate
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostUpdate()
- * @generated
- */
- public static final EClass POST_UPDATE = eINSTANCE.getPostUpdate();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PrePersist <em>Pre Persist</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PrePersist
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPrePersist()
- * @generated
- */
- public static final EClass PRE_PERSIST = eINSTANCE.getPrePersist();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PreRemove <em>Pre Remove</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PreRemove
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPreRemove()
- * @generated
- */
- public static final EClass PRE_REMOVE = eINSTANCE.getPreRemove();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.PreUpdate <em>Pre Update</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.PreUpdate
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPreUpdate()
- * @generated
- */
- public static final EClass PRE_UPDATE = eINSTANCE.getPreUpdate();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn <em>Xml Primary Key Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn()
- * @generated
- */
- public static final EClass XML_PRIMARY_KEY_JOIN_COLUMN = eINSTANCE.getXmlPrimaryKeyJoinColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer <em>Xml Primary Key Join Column Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumnContainer()
- * @generated
- */
- public static final EClass XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER = eINSTANCE.getXmlPrimaryKeyJoinColumnContainer();
-
- /**
- * The meta object literal for the '<em><b>Primary Key Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER__PRIMARY_KEY_JOIN_COLUMNS = eINSTANCE.getXmlPrimaryKeyJoinColumnContainer_PrimaryKeyJoinColumns();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery <em>Xml Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQuery
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery()
- * @generated
- */
- public static final EClass XML_QUERY = eINSTANCE.getXmlQuery();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_QUERY__NAME = eINSTANCE.getXmlQuery_Name();
-
- /**
- * The meta object literal for the '<em><b>Query</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_QUERY__QUERY = eINSTANCE.getXmlQuery_Query();
-
- /**
- * The meta object literal for the '<em><b>Hints</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_QUERY__HINTS = eINSTANCE.getXmlQuery_Hints();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer <em>Xml Query Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer()
- * @generated
- */
- public static final EClass XML_QUERY_CONTAINER = eINSTANCE.getXmlQueryContainer();
-
- /**
- * The meta object literal for the '<em><b>Named Queries</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_QUERY_CONTAINER__NAMED_QUERIES = eINSTANCE.getXmlQueryContainer_NamedQueries();
-
- /**
- * The meta object literal for the '<em><b>Named Native Queries</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES = eINSTANCE.getXmlQueryContainer_NamedNativeQueries();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint <em>Xml Query Hint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryHint()
- * @generated
- */
- public static final EClass XML_QUERY_HINT = eINSTANCE.getXmlQueryHint();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_QUERY_HINT__NAME = eINSTANCE.getXmlQueryHint_Name();
-
- /**
- * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_QUERY_HINT__VALUE = eINSTANCE.getXmlQueryHint_Value();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSecondaryTable()
- * @generated
- */
- public static final EClass XML_SECONDARY_TABLE = eINSTANCE.getXmlSecondaryTable();
-
- /**
- * The meta object literal for the '<em><b>Primary Key Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS = eINSTANCE.getXmlSecondaryTable_PrimaryKeyJoinColumns();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator <em>Xml Sequence Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSequenceGenerator()
- * @generated
- */
- public static final EClass XML_SEQUENCE_GENERATOR = eINSTANCE.getXmlSequenceGenerator();
-
- /**
- * The meta object literal for the '<em><b>Sequence Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_SEQUENCE_GENERATOR__SEQUENCE_NAME = eINSTANCE.getXmlSequenceGenerator_SequenceName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping <em>Sql Result Set Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getSqlResultSetMapping()
- * @generated
- */
- public static final EClass SQL_RESULT_SET_MAPPING = eINSTANCE.getSqlResultSetMapping();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute SQL_RESULT_SET_MAPPING__NAME = eINSTANCE.getSqlResultSetMapping_Name();
-
- /**
- * The meta object literal for the '<em><b>Entity Results</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference SQL_RESULT_SET_MAPPING__ENTITY_RESULTS = eINSTANCE.getSqlResultSetMapping_EntityResults();
-
- /**
- * The meta object literal for the '<em><b>Column Results</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference SQL_RESULT_SET_MAPPING__COLUMN_RESULTS = eINSTANCE.getSqlResultSetMapping_ColumnResults();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTable <em>Xml Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTable()
- * @generated
- */
- public static final EClass XML_TABLE = eINSTANCE.getXmlTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator <em>Xml Table Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator()
- * @generated
- */
- public static final EClass XML_TABLE_GENERATOR = eINSTANCE.getXmlTableGenerator();
-
- /**
- * The meta object literal for the '<em><b>Table</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TABLE_GENERATOR__TABLE = eINSTANCE.getXmlTableGenerator_Table();
-
- /**
- * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TABLE_GENERATOR__CATALOG = eINSTANCE.getXmlTableGenerator_Catalog();
-
- /**
- * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TABLE_GENERATOR__SCHEMA = eINSTANCE.getXmlTableGenerator_Schema();
-
- /**
- * The meta object literal for the '<em><b>Pk Column Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TABLE_GENERATOR__PK_COLUMN_NAME = eINSTANCE.getXmlTableGenerator_PkColumnName();
-
- /**
- * The meta object literal for the '<em><b>Value Column Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TABLE_GENERATOR__VALUE_COLUMN_NAME = eINSTANCE.getXmlTableGenerator_ValueColumnName();
-
- /**
- * The meta object literal for the '<em><b>Pk Column Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TABLE_GENERATOR__PK_COLUMN_VALUE = eINSTANCE.getXmlTableGenerator_PkColumnValue();
-
- /**
- * The meta object literal for the '<em><b>Unique Constraints</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS = eINSTANCE.getXmlTableGenerator_UniqueConstraints();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTransient <em>Xml Transient</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTransient
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTransient()
- * @generated
- */
- public static final EClass XML_TRANSIENT = eINSTANCE.getXmlTransient();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping <em>Xml Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping()
- * @generated
- */
- public static final EClass XML_TYPE_MAPPING = eINSTANCE.getXmlTypeMapping();
-
- /**
- * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TYPE_MAPPING__CLASS_NAME = eINSTANCE.getXmlTypeMapping_ClassName();
-
- /**
- * The meta object literal for the '<em><b>Metadata Complete</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TYPE_MAPPING__METADATA_COMPLETE = eINSTANCE.getXmlTypeMapping_MetadataComplete();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_TYPE_MAPPING__DESCRIPTION = eINSTANCE.getXmlTypeMapping_Description();
-
- /**
- * The meta object literal for the '<em><b>Attributes</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_TYPE_MAPPING__ATTRIBUTES = eINSTANCE.getXmlTypeMapping_Attributes();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint <em>Xml Unique Constraint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlUniqueConstraint()
- * @generated
- */
- public static final EClass XML_UNIQUE_CONSTRAINT = eINSTANCE.getXmlUniqueConstraint();
-
- /**
- * The meta object literal for the '<em><b>Column Names</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_UNIQUE_CONSTRAINT__COLUMN_NAMES = eINSTANCE.getXmlUniqueConstraint_ColumnNames();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion <em>Xml Version</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlVersion
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlVersion()
- * @generated
- */
- public static final EClass XML_VERSION = eINSTANCE.getXmlVersion();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable <em>Xml Orderable</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable()
- * @generated
- */
- public static final EClass XML_ORDERABLE = eINSTANCE.getXmlOrderable();
-
- /**
- * The meta object literal for the '<em><b>Order By</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ORDERABLE__ORDER_BY = eINSTANCE.getXmlOrderable_OrderBy();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType <em>Discriminator Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getDiscriminatorType()
- * @generated
- */
- public static final EEnum DISCRIMINATOR_TYPE = eINSTANCE.getDiscriminatorType();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.EnumType <em>Enum Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getEnumType()
- * @generated
- */
- public static final EEnum ENUM_TYPE = eINSTANCE.getEnumType();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.FetchType <em>Fetch Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getFetchType()
- * @generated
- */
- public static final EEnum FETCH_TYPE = eINSTANCE.getFetchType();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.GenerationType <em>Generation Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.GenerationType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getGenerationType()
- * @generated
- */
- public static final EEnum GENERATION_TYPE = eINSTANCE.getGenerationType();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.InheritanceType <em>Inheritance Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.InheritanceType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getInheritanceType()
- * @generated
- */
- public static final EEnum INHERITANCE_TYPE = eINSTANCE.getInheritanceType();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType <em>Temporal Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getTemporalType()
- * @generated
- */
- public static final EEnum TEMPORAL_TYPE = eINSTANCE.getTemporalType();
-
- }
-
-} //OrmPackage
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmXmlResourceFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmXmlResourceFactory.java
deleted file mode 100644
index 9703fbcae1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/OrmXmlResourceFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.wst.common.internal.emf.resource.Renderer;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;
-
-/**
- * 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.
- */
-public class OrmXmlResourceFactory
- extends TranslatorResourceFactory
-{
- public OrmXmlResourceFactory() {
- this(RendererFactory.getDefaultRendererFactory());
- }
-
- public OrmXmlResourceFactory(RendererFactory aRendererFactory) {
- super(aRendererFactory);
- }
-
- public OrmXmlResourceFactory(RendererFactory aRendererFactory, boolean listeningForUpdates) {
- super(aRendererFactory, listeningForUpdates);
- }
-
-
- @Override
- protected TranslatorResource createResource(URI uri, Renderer renderer) {
- return new JpaXmlResource(uri, renderer, JptJpaCorePlugin.ORM_XML_CONTENT_TYPE, XmlEntityMappings.getRootTranslator());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostLoad.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostLoad.java
deleted file mode 100644
index 9a5af1b685..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostLoad.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Post Load</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostLoad()
- * @model kind="class"
- * @generated
- */
-public class PostLoad extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PostLoad()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.POST_LOAD;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.POST_LOAD,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostLoad());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostPersist.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostPersist.java
deleted file mode 100644
index 5ce949ab65..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostPersist.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Post Persist</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostPersist()
- * @model kind="class"
- * @generated
- */
-public class PostPersist extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PostPersist()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.POST_PERSIST;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.POST_PERSIST,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostPersist());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostRemove.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostRemove.java
deleted file mode 100644
index f85d1507d6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostRemove.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Post Remove</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostRemove()
- * @model kind="class"
- * @generated
- */
-public class PostRemove extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PostRemove()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.POST_REMOVE;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.POST_REMOVE,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostRemove());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostUpdate.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostUpdate.java
deleted file mode 100644
index b6591cac9e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PostUpdate.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Post Update</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPostUpdate()
- * @model kind="class"
- * @generated
- */
-public class PostUpdate extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PostUpdate()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.POST_UPDATE;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.POST_UPDATE,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostUpdate());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PrePersist.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PrePersist.java
deleted file mode 100644
index b70cf6c4d7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PrePersist.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Pre Persist</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPrePersist()
- * @model kind="class"
- * @generated
- */
-public class PrePersist extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PrePersist()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.PRE_PERSIST;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.PRE_PERSIST,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PrePersist());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreRemove.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreRemove.java
deleted file mode 100644
index 9bf1e58790..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreRemove.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Pre Remove</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPreRemove()
- * @model kind="class"
- * @generated
- */
-public class PreRemove extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PreRemove()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.PRE_REMOVE;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.PRE_REMOVE,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PreRemove());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreUpdate.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreUpdate.java
deleted file mode 100644
index f3c5ff5dbe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/PreUpdate.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Pre Update</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getPreUpdate()
- * @model kind="class"
- * @generated
- */
-public class PreUpdate extends EventMethod
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PreUpdate()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.PRE_UPDATE;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- public static Translator buildTranslator() {
- return buildTranslator(
- JPA.PRE_UPDATE,
- OrmPackage.eINSTANCE.getXmlEventMethodContainer_PreUpdate());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/SqlResultSetMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/SqlResultSetMapping.java
deleted file mode 100644
index d9db475f64..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/SqlResultSetMapping.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Sql Result Set Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getEntityResults <em>Entity Results</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getColumnResults <em>Column Results</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getSqlResultSetMapping()
- * @model kind="class"
- * @generated
- */
-public class SqlResultSetMapping extends AbstractJpaEObject implements XmlSqlResultSetMapping_2_0
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getEntityResults() <em>Entity Results</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityResults()
- * @generated
- * @ordered
- */
- protected EList<EntityResult> entityResults;
-
- /**
- * The cached value of the '{@link #getColumnResults() <em>Column Results</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnResults()
- * @generated
- * @ordered
- */
- protected EList<ColumnResult> columnResults;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SqlResultSetMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.SQL_RESULT_SET_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSqlResultSetMapping_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getSqlResultSetMapping_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.SQL_RESULT_SET_MAPPING__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Entity Results</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.EntityResult}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Results</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entity Results</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getSqlResultSetMapping_EntityResults()
- * @model containment="true"
- * @generated
- */
- public EList<EntityResult> getEntityResults()
- {
- if (entityResults == null)
- {
- entityResults = new EObjectContainmentEList<EntityResult>(EntityResult.class, this, OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS);
- }
- return entityResults;
- }
-
- /**
- * Returns the value of the '<em><b>Column Results</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.ColumnResult}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Results</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Results</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getSqlResultSetMapping_ColumnResults()
- * @model containment="true"
- * @generated
- */
- public EList<ColumnResult> getColumnResults()
- {
- if (columnResults == null)
- {
- columnResults = new EObjectContainmentEList<ColumnResult>(ColumnResult.class, this, OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS);
- }
- return columnResults;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
- return ((InternalEList<?>)getEntityResults()).basicRemove(otherEnd, msgs);
- case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
- return ((InternalEList<?>)getColumnResults()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
- return getDescription();
- case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
- return getName();
- case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
- return getEntityResults();
- case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
- return getColumnResults();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
- getEntityResults().clear();
- getEntityResults().addAll((Collection<? extends EntityResult>)newValue);
- return;
- case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
- getColumnResults().clear();
- getColumnResults().addAll((Collection<? extends ColumnResult>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
- getEntityResults().clear();
- return;
- case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
- getColumnResults().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
- return entityResults != null && !entityResults.isEmpty();
- case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
- return columnResults != null && !columnResults.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildDescriptionTranslator(),
- buildEntityResultTranslator(),
- buildColumnResultTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getSqlResultSetMapping_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlSqlResultSetMapping_2_0_Description());
- }
-
- protected static Translator buildEntityResultTranslator() {
- return EntityResult.buildTranslator(JPA.ENTITY_RESULT, OrmPackage.eINSTANCE.getSqlResultSetMapping_EntityResults());
- }
-
- protected static Translator buildColumnResultTranslator() {
- return ColumnResult.buildTranslator(JPA.COLUMN_RESULT, OrmPackage.eINSTANCE.getSqlResultSetMapping_ColumnResults());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/TemporalType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/TemporalType.java
deleted file mode 100644
index cd0da47bed..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/TemporalType.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.core.resource.orm;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Temporal Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getTemporalType()
- * @model
- * @generated
- */
-public enum TemporalType implements Enumerator
-{
- /**
- * The '<em><b>DATE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #DATE_VALUE
- * @generated
- * @ordered
- */
- DATE(0, "DATE", "DATE"),
-
- /**
- * The '<em><b>TIME</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #TIME_VALUE
- * @generated
- * @ordered
- */
- TIME(1, "TIME", "TIME"),
-
- /**
- * The '<em><b>TIMESTAMP</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #TIMESTAMP_VALUE
- * @generated
- * @ordered
- */
- TIMESTAMP(2, "TIMESTAMP", "TIMESTAMP");
-
- /**
- * The '<em><b>DATE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>DATE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #DATE
- * @model
- * @generated
- * @ordered
- */
- public static final int DATE_VALUE = 0;
-
- /**
- * The '<em><b>TIME</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TIME</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #TIME
- * @model
- * @generated
- * @ordered
- */
- public static final int TIME_VALUE = 1;
-
- /**
- * The '<em><b>TIMESTAMP</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TIMESTAMP</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #TIMESTAMP
- * @model
- * @generated
- * @ordered
- */
- public static final int TIMESTAMP_VALUE = 2;
-
- /**
- * An array of all the '<em><b>Temporal Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final TemporalType[] VALUES_ARRAY =
- new TemporalType[]
- {
- DATE,
- TIME,
- TIMESTAMP,
- };
-
- /**
- * A public read-only list of all the '<em><b>Temporal Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<TemporalType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Temporal Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static TemporalType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- TemporalType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Temporal Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static TemporalType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- TemporalType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Temporal Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static TemporalType get(int value)
- {
- switch (value)
- {
- case DATE_VALUE: return DATE;
- case TIME_VALUE: return TIME;
- case TIMESTAMP_VALUE: return TIMESTAMP;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private TemporalType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //TemporalType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAccessHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAccessHolder.java
deleted file mode 100644
index 3a56a65a6f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAccessHolder.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Access Holder</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder#getAccess <em>Access</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlAccessHolder extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Access</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Access</em>' attribute.
- * @see #setAccess(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getAccess();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder#getAccess <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Access</em>' attribute.
- * @see #getAccess()
- * @generated
- */
- void setAccess(String value);
-
-} // XmlAccessHolder
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverride.java
deleted file mode 100644
index 3ac33d4e50..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverride.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Association Override Impl</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverride()
- * @model kind="class"
- * @generated
- */
-public class XmlAssociationOverride extends AbstractJpaEObject implements XmlOverride, XmlJoinColumnContainer, XmlAssociationOverride_2_0
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> joinColumns;
-
- /**
- * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinTable()
- * @generated
- * @ordered
- */
- protected XmlJoinTable joinTable;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlAssociationOverride()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ASSOCIATION_OVERRIDE;
- }
-
- /**
- * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer_JoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getJoinColumns()
- {
- if (joinColumns == null)
- {
- joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS);
- }
- return joinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverride_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Table</em>' containment reference.
- * @see #setJoinTable(XmlJoinTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer_JoinTable()
- * @model containment="true"
- * @generated
- */
- public XmlJoinTable getJoinTable()
- {
- return joinTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetJoinTable(XmlJoinTable newJoinTable, NotificationChain msgs)
- {
- XmlJoinTable oldJoinTable = joinTable;
- joinTable = newJoinTable;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, oldJoinTable, newJoinTable);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride#getJoinTable <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Join Table</em>' containment reference.
- * @see #getJoinTable()
- * @generated
- */
- public void setJoinTable(XmlJoinTable newJoinTable)
- {
- if (newJoinTable != joinTable)
- {
- NotificationChain msgs = null;
- if (joinTable != null)
- msgs = ((InternalEObject)joinTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, null, msgs);
- if (newJoinTable != null)
- msgs = ((InternalEObject)newJoinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, null, msgs);
- msgs = basicSetJoinTable(newJoinTable, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, newJoinTable, newJoinTable));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOverride_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
- return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
- return basicSetJoinTable(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
- return getName();
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
- return getJoinColumns();
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
- return getJoinTable();
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
- return getDescription();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
- getJoinColumns().clear();
- getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
- setJoinTable((XmlJoinTable)newValue);
- return;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
- setDescription((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
- getJoinColumns().clear();
- return;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
- setJoinTable((XmlJoinTable)null);
- return;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
- return joinColumns != null && !joinColumns.isEmpty();
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
- return joinTable != null;
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlJoinColumnContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS: return OrmPackage.XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlJoinTableContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE: return OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlAssociationOverride_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION: return OrmV2_0Package.XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlJoinColumnContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS: return OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlJoinTableContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE: return OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlAssociationOverride_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION: return OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildDescriptionTranslator(),
- buildJoinColumnTranslator(),
- buildJoinTableTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlOverride_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlAssociationOverride_2_0_Description());
- }
-
- protected static Translator buildJoinColumnTranslator() {
- return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinColumnContainer_JoinColumns());
- }
-
- protected static Translator buildJoinTableTranslator() {
- return XmlJoinTable.buildTranslator(JPA.JOIN_TABLE, OrmPackage.eINSTANCE.getXmlJoinTableContainer_JoinTable());
- }
-
- // ************ content assist ***********
- public TextRange getNameTextCodeAssistRange() {
- return getAttributeCodeAssistTextRange(JPA.NAME);
- }
-
- public boolean nameTouches(int pos) {
- TextRange textRange = this.getNameTextCodeAssistRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverrideContainer.java
deleted file mode 100644
index e708bd3f21..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAssociationOverrideContainer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Association Override Container</b></em>'.
- *
- * 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.
- *
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer#getAssociationOverrides <em>Association Overrides</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlAssociationOverrideContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Association Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
- * @model containment="true"
- * @generated
- */
- EList<XmlAssociationOverride> getAssociationOverrides();
-
-} // XmlAssociationOverrideContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeMapping.java
deleted file mode 100644
index a2afd84ad4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeMapping.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Attribute Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeMapping()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlAttributeMapping extends XmlAttributeMapping_2_0
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeMapping_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- TextRange getNameTextRange();
-
- //TODO unsure about this api, might change soon
- String getMappingKey();
-
- boolean nameTouches(int pos);
-} // XmlAttributeMapping
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverride.java
deleted file mode 100644
index 97110e39ee..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverride.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Attribute Override</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride#getColumn <em>Column</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverride()
- * @model kind="class"
- * @generated
- */
-public class XmlAttributeOverride extends AbstractJpaEObject implements XmlOverride, XmlAttributeOverride_2_0
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn column;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlAttributeOverride()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ATTRIBUTE_OVERRIDE;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverride_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverride_Column()
- * @model containment="true" required="true"
- * @generated
- */
- public XmlColumn getColumn()
- {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
- {
- XmlColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, oldColumn, newColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- public void setColumn(XmlColumn newColumn)
- {
- if (newColumn != column)
- {
- NotificationChain msgs = null;
- if (column != null)
- msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, null, msgs);
- if (newColumn != null)
- msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, null, msgs);
- msgs = basicSetColumn(newColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, newColumn, newColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOverride_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
- return basicSetColumn(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
- return getName();
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
- return getColumn();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
- setColumn((XmlColumn)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
- setColumn((XmlColumn)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
- return column != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlAttributeOverride_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION: return OrmV2_0Package.XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlAttributeOverride_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION: return OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildDescriptionTranslator(),
- buildColumnTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlOverride_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlAttributeOverride_2_0_Description());
- }
-
- protected static Translator buildColumnTranslator() {
- return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getXmlAttributeOverride_Column());
- }
-
- // ************* content assist ************
-
- public TextRange getNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.NAME);
- }
-
- public boolean nameTouches(int pos) {
- TextRange textRange = this.getNameTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverrideContainer.java
deleted file mode 100644
index db8605ea67..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlAttributeOverrideContainer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Attribute Override Container</b></em>'.
- *
- * 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.
- *
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer#getAttributeOverrides <em>Attribute Overrides</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlAttributeOverrideContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
- * @model containment="true"
- * @generated
- */
- EList<XmlAttributeOverride> getAttributeOverrides();
-
-} // XmlAttributeOverrideContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseColumn.java
deleted file mode 100644
index 7adb900ba3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseColumn.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Base Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getInsertable <em>Insertable</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getNullable <em>Nullable</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getTable <em>Table</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUnique <em>Unique</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUpdatable <em>Updatable</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlBaseColumn extends XmlNamedColumn
-{
- /**
- * Returns the value of the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Insertable</em>' attribute.
- * @see #setInsertable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Insertable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getInsertable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getInsertable <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Insertable</em>' attribute.
- * @see #getInsertable()
- * @generated
- */
- void setInsertable(Boolean value);
-
- /**
- * Returns the value of the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Nullable</em>' attribute.
- * @see #setNullable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Nullable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getNullable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getNullable <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Nullable</em>' attribute.
- * @see #getNullable()
- * @generated
- */
- void setNullable(Boolean value);
-
- /**
- * Returns the value of the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table</em>' attribute.
- * @see #setTable(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Table()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getTable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getTable <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table</em>' attribute.
- * @see #getTable()
- * @generated
- */
- void setTable(String value);
-
- /**
- * Returns the value of the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Unique</em>' attribute.
- * @see #setUnique(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Unique()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getUnique();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUnique <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Unique</em>' attribute.
- * @see #getUnique()
- * @generated
- */
- void setUnique(Boolean value);
-
- /**
- * Returns the value of the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Updatable</em>' attribute.
- * @see #setUpdatable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseColumn_Updatable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getUpdatable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn#getUpdatable <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Updatable</em>' attribute.
- * @see #getUpdatable()
- * @generated
- */
- void setUpdatable(Boolean value);
-
- TextRange getTableTextRange();
-
- boolean tableTouches(int pos);
-
-} // XmlBaseColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseDiscriminatorColumn.java
deleted file mode 100644
index 6be58a315e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseDiscriminatorColumn.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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.core.resource.orm;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Base Discriminator Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getLength <em>Length</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlBaseDiscriminatorColumn extends XmlNamedColumn
-{
- /**
- * Returns the value of the '<em><b>Discriminator Type</b></em>' attribute.
- * The default value is <code>"STRING"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Type</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @see #setDiscriminatorType(DiscriminatorType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn_DiscriminatorType()
- * @model default="STRING"
- * @generated
- */
- DiscriminatorType getDiscriminatorType();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Discriminator Type</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType
- * @see #getDiscriminatorType()
- * @generated
- */
- void setDiscriminatorType(DiscriminatorType value);
-
- /**
- * Returns the value of the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Length</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Length</em>' attribute.
- * @see #setLength(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseDiscriminatorColumn_Length()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- Integer getLength();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn#getLength <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Length</em>' attribute.
- * @see #getLength()
- * @generated
- */
- void setLength(Integer value);
-
-} // XmlBaseDiscriminatorColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseJoinColumn.java
deleted file mode 100644
index 36f57cc21e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBaseJoinColumn.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Base Join Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseJoinColumn()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlBaseJoinColumn extends XmlNamedColumn
-{
- /**
- * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Referenced Column Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Referenced Column Name</em>' attribute.
- * @see #setReferencedColumnName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseJoinColumn_ReferencedColumnName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getReferencedColumnName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBaseJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Referenced Column Name</em>' attribute.
- * @see #getReferencedColumnName()
- * @generated
- */
- void setReferencedColumnName(String value);
-
- TextRange getReferencedColumnNameTextRange();
-
-} // XmlBaseJoinColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBasic.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBasic.java
deleted file mode 100644
index 584e5a3915..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlBasic.java
+++ /dev/null
@@ -1,687 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.BooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Basic Impl</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getFetch <em>Fetch</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getOptional <em>Optional</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBasic()
- * @model kind="class"
- * @generated
- */
-public class XmlBasic extends AbstractXmlAttributeMapping implements ColumnMapping, XmlConvertibleMapping
-{
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn column;
-
- /**
- * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected static final boolean LOB_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected boolean lob = LOB_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final EnumType ENUMERATED_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType enumerated = ENUMERATED_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final FetchType FETCH_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected FetchType fetch = FETCH_EDEFAULT;
-
- /**
- * The default value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected static final Boolean OPTIONAL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected Boolean optional = OPTIONAL_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlBasic()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_BASIC;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping_Column()
- * @model containment="true"
- * @generated
- */
- public XmlColumn getColumn()
- {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
- {
- XmlColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__COLUMN, oldColumn, newColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- public void setColumn(XmlColumn newColumn)
- {
- if (newColumn != column)
- {
- NotificationChain msgs = null;
- if (column != null)
- msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_BASIC__COLUMN, null, msgs);
- if (newColumn != null)
- msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_BASIC__COLUMN, null, msgs);
- msgs = basicSetColumn(newColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__COLUMN, newColumn, newColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lob</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lob</em>' attribute.
- * @see #setLob(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isLob()
- {
- return lob;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#isLob <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lob</em>' attribute.
- * @see #isLob()
- * @generated
- */
- public void setLob(boolean newLob)
- {
- boolean oldLob = lob;
- lob = newLob;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__LOB, oldLob, lob));
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal()
- {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporal(TemporalType newTemporal)
- {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__TEMPORAL, oldTemporal, temporal));
- }
-
- /**
- * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
- * @model
- * @generated
- */
- public EnumType getEnumerated()
- {
- return enumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getEnumerated <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getEnumerated()
- * @generated
- */
- public void setEnumerated(EnumType newEnumerated)
- {
- EnumType oldEnumerated = enumerated;
- enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__ENUMERATED, oldEnumerated, enumerated));
- }
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The default value is <code>"LAZY"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.FetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #setFetch(FetchType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBasic_Fetch()
- * @model default="LAZY"
- * @generated
- */
- public FetchType getFetch()
- {
- return fetch;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #getFetch()
- * @generated
- */
- public void setFetch(FetchType newFetch)
- {
- FetchType oldFetch = fetch;
- fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__FETCH, oldFetch, fetch));
- }
-
- /**
- * Returns the value of the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Optional</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Optional</em>' attribute.
- * @see #setOptional(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBasic_Optional()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getOptional()
- {
- return optional;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlBasic#getOptional <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Optional</em>' attribute.
- * @see #getOptional()
- * @generated
- */
- public void setOptional(Boolean newOptional)
- {
- Boolean oldOptional = optional;
- optional = newOptional;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__OPTIONAL, oldOptional, optional));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_BASIC__COLUMN:
- return basicSetColumn(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_BASIC__COLUMN:
- return getColumn();
- case OrmPackage.XML_BASIC__LOB:
- return isLob();
- case OrmPackage.XML_BASIC__TEMPORAL:
- return getTemporal();
- case OrmPackage.XML_BASIC__ENUMERATED:
- return getEnumerated();
- case OrmPackage.XML_BASIC__FETCH:
- return getFetch();
- case OrmPackage.XML_BASIC__OPTIONAL:
- return getOptional();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_BASIC__COLUMN:
- setColumn((XmlColumn)newValue);
- return;
- case OrmPackage.XML_BASIC__LOB:
- setLob((Boolean)newValue);
- return;
- case OrmPackage.XML_BASIC__TEMPORAL:
- setTemporal((TemporalType)newValue);
- return;
- case OrmPackage.XML_BASIC__ENUMERATED:
- setEnumerated((EnumType)newValue);
- return;
- case OrmPackage.XML_BASIC__FETCH:
- setFetch((FetchType)newValue);
- return;
- case OrmPackage.XML_BASIC__OPTIONAL:
- setOptional((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_BASIC__COLUMN:
- setColumn((XmlColumn)null);
- return;
- case OrmPackage.XML_BASIC__LOB:
- setLob(LOB_EDEFAULT);
- return;
- case OrmPackage.XML_BASIC__TEMPORAL:
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- case OrmPackage.XML_BASIC__ENUMERATED:
- setEnumerated(ENUMERATED_EDEFAULT);
- return;
- case OrmPackage.XML_BASIC__FETCH:
- setFetch(FETCH_EDEFAULT);
- return;
- case OrmPackage.XML_BASIC__OPTIONAL:
- setOptional(OPTIONAL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_BASIC__COLUMN:
- return column != null;
- case OrmPackage.XML_BASIC__LOB:
- return lob != LOB_EDEFAULT;
- case OrmPackage.XML_BASIC__TEMPORAL:
- return temporal != TEMPORAL_EDEFAULT;
- case OrmPackage.XML_BASIC__ENUMERATED:
- return enumerated != ENUMERATED_EDEFAULT;
- case OrmPackage.XML_BASIC__FETCH:
- return fetch != FETCH_EDEFAULT;
- case OrmPackage.XML_BASIC__OPTIONAL:
- return OPTIONAL_EDEFAULT == null ? optional != null : !OPTIONAL_EDEFAULT.equals(optional);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == ColumnMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_BASIC__COLUMN: return OrmPackage.COLUMN_MAPPING__COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_BASIC__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
- case OrmPackage.XML_BASIC__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
- case OrmPackage.XML_BASIC__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == ColumnMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.COLUMN_MAPPING__COLUMN: return OrmPackage.XML_BASIC__COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_BASIC__LOB;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_BASIC__TEMPORAL;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_BASIC__ENUMERATED;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (lob: ");
- result.append(lob);
- result.append(", temporal: ");
- result.append(temporal);
- result.append(", enumerated: ");
- result.append(enumerated);
- result.append(", fetch: ");
- result.append(fetch);
- result.append(", optional: ");
- result.append(optional);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getEnumeratedTextRange() {
- return getAttributeTextRange(JPA.ENUMERATED);
- }
-
- public TextRange getLobTextRange() {
- return getAttributeTextRange(JPA.LOB);
- }
-
- public TextRange getTemporalTextRange() {
- return getAttributeTextRange(JPA.TEMPORAL);
- }
-
- public String getMappingKey() {
- return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildFetchTranslator(),
- buildOptionalTranslator(),
- buildAccessTranslator(),
- buildColumnTranslator(),
- buildLobTranslator(),
- buildTemporalTranslator(),
- buildEnumeratedTranslator()
- };
- }
-
- protected static Translator buildFetchTranslator() {
- return new Translator(JPA.FETCH, OrmPackage.eINSTANCE.getXmlBasic_Fetch(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildOptionalTranslator() {
- return new BooleanTranslator(JPA.OPTIONAL, OrmPackage.eINSTANCE.getXmlBasic_Optional(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildColumnTranslator() {
- return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getColumnMapping_Column());
- }
-
- protected static Translator buildLobTranslator() {
- return new EmptyTagBooleanTranslator(JPA.LOB, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Lob());
- }
-
- protected static Translator buildTemporalTranslator() {
- return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
- }
-
- protected static Translator buildEnumeratedTranslator() {
- return new Translator(JPA.ENUMERATED, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Enumerated());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlClassReference.java
deleted file mode 100644
index e27127c2a2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlClassReference.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Class Reference</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference#getClassName <em>Class Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlClassReference()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlClassReference extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClassName()
- * @generated
- * @ordered
- */
- protected static final String CLASS_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClassName()
- * @generated
- * @ordered
- */
- protected String className = CLASS_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlClassReference()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_CLASS_REFERENCE;
- }
-
- /**
- * Returns the value of the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Class Name</em>' attribute.
- * @see #setClassName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlClassReference_ClassName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getClassName()
- {
- return className;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference#getClassName <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Class Name</em>' attribute.
- * @see #getClassName()
- * @generated
- */
- public void setClassName(String newClassName)
- {
- String oldClassName = className;
- className = newClassName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME, oldClassName, className));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
- return getClassName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
- setClassName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
- setClassName(CLASS_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
- return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (className: ");
- result.append(className);
- result.append(')');
- return result.toString();
- }
-
-
- // **************** validation ********************************************
-
- public TextRange getClassNameTextRange() {
- return getAttributeTextRange(JPA.CLASS);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildClassTranslator()};
- }
-
- private static Translator buildClassTranslator() {
- return new Translator(JPA.CLASS, OrmPackage.eINSTANCE.getXmlClassReference_ClassName(), Translator.DOM_ATTRIBUTE);
- }
-
- public ReplaceEdit createRenameEdit(IType originalType, String newName) {
- String originalName = originalType.getTypeQualifiedName();
- int nameIndex = this.className.lastIndexOf(originalName);
-
- int offset = getAttributeNode(JPA.CLASS).getValueRegionStartOffset() + 1;
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenamePackageEdit(String newPackageName) {
- int packageLength = this.className.lastIndexOf('.');
- if (newPackageName == "") {//$NON-NLS-1$
- //moving to the default package, remove the '.'
- packageLength++;
- }
- if (packageLength == -1) {
- //moving from the default package or unspecified package
- packageLength = 0;
- newPackageName = newPackageName + '.';
- }
- int offset = getAttributeNode(JPA.CLASS).getValueRegionStartOffset() + 1; // +1 = opening double quote
- return new ReplaceEdit(offset, packageLength, newPackageName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlCollectionTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlCollectionTable.java
deleted file mode 100644
index 7326309a2a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlCollectionTable.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Collection Table</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlCollectionTable()
- * @model kind="class"
- * @generated
- */
-public class XmlCollectionTable extends AbstractXmlReferenceTable implements XmlCollectionTable_2_0
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlCollectionTable()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_COLLECTION_TABLE;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildCatalogTranslator(),
- buildSchemaTranslator(),
- buildJoinColumnTranslator(),
- buildUniqueConstraintTranslator()
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlColumn.java
deleted file mode 100644
index a02c9d52ef..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlColumn.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Column Impl</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getLength <em>Length</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getPrecision <em>Precision</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getScale <em>Scale</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlColumn()
- * @model kind="class"
- * @generated
- */
-public class XmlColumn extends AbstractXmlBaseColumn
-{
- /**
- * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected static final Integer LENGTH_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected Integer length = LENGTH_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPrecision() <em>Precision</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrecision()
- * @generated
- * @ordered
- */
- protected static final Integer PRECISION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPrecision() <em>Precision</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrecision()
- * @generated
- * @ordered
- */
- protected Integer precision = PRECISION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getScale() <em>Scale</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScale()
- * @generated
- * @ordered
- */
- protected static final Integer SCALE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getScale() <em>Scale</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScale()
- * @generated
- * @ordered
- */
- protected Integer scale = SCALE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Length</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Length</em>' attribute.
- * @see #setLength(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlColumn_Length()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getLength()
- {
- return length;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getLength <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Length</em>' attribute.
- * @see #getLength()
- * @generated
- */
- public void setLength(Integer newLength)
- {
- Integer oldLength = length;
- length = newLength;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_COLUMN__LENGTH, oldLength, length));
- }
-
- /**
- * Returns the value of the '<em><b>Precision</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Precision</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Precision</em>' attribute.
- * @see #setPrecision(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlColumn_Precision()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getPrecision()
- {
- return precision;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getPrecision <em>Precision</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Precision</em>' attribute.
- * @see #getPrecision()
- * @generated
- */
- public void setPrecision(Integer newPrecision)
- {
- Integer oldPrecision = precision;
- precision = newPrecision;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_COLUMN__PRECISION, oldPrecision, precision));
- }
-
- /**
- * Returns the value of the '<em><b>Scale</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Scale</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Scale</em>' attribute.
- * @see #setScale(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlColumn_Scale()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getScale()
- {
- return scale;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlColumn#getScale <em>Scale</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Scale</em>' attribute.
- * @see #getScale()
- * @generated
- */
- public void setScale(Integer newScale)
- {
- Integer oldScale = scale;
- scale = newScale;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_COLUMN__SCALE, oldScale, scale));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_COLUMN__LENGTH:
- return getLength();
- case OrmPackage.XML_COLUMN__PRECISION:
- return getPrecision();
- case OrmPackage.XML_COLUMN__SCALE:
- return getScale();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_COLUMN__LENGTH:
- setLength((Integer)newValue);
- return;
- case OrmPackage.XML_COLUMN__PRECISION:
- setPrecision((Integer)newValue);
- return;
- case OrmPackage.XML_COLUMN__SCALE:
- setScale((Integer)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_COLUMN__LENGTH:
- setLength(LENGTH_EDEFAULT);
- return;
- case OrmPackage.XML_COLUMN__PRECISION:
- setPrecision(PRECISION_EDEFAULT);
- return;
- case OrmPackage.XML_COLUMN__SCALE:
- setScale(SCALE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_COLUMN__LENGTH:
- return LENGTH_EDEFAULT == null ? length != null : !LENGTH_EDEFAULT.equals(length);
- case OrmPackage.XML_COLUMN__PRECISION:
- return PRECISION_EDEFAULT == null ? precision != null : !PRECISION_EDEFAULT.equals(precision);
- case OrmPackage.XML_COLUMN__SCALE:
- return SCALE_EDEFAULT == null ? scale != null : !SCALE_EDEFAULT.equals(scale);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (length: ");
- result.append(length);
- result.append(", precision: ");
- result.append(precision);
- result.append(", scale: ");
- result.append(scale);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildUniqueTranslator(),
- buildNullableTranslator(),
- buildInsertableTranslator(),
- buildUpdatableTranslator(),
- buildColumnDefinitionTranslator(),
- buildTableTranslator(),
- buildLengthTranslator(),
- buildPrecisionTranslator(),
- buildScaleTranslator(),
- };
- }
-
- protected static Translator buildLengthTranslator() {
- return new Translator(JPA.LENGTH, OrmPackage.eINSTANCE.getXmlColumn_Length(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildPrecisionTranslator() {
- return new Translator(JPA.PRECISION, OrmPackage.eINSTANCE.getXmlColumn_Precision(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildScaleTranslator() {
- return new Translator(JPA.SCALE, OrmPackage.eINSTANCE.getXmlColumn_Scale(), Translator.DOM_ATTRIBUTE);
- }
-} // ColumnImpl
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlConvertibleMapping.java
deleted file mode 100644
index c15adb817e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlConvertibleMapping.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Convertible Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#isLob <em>Lob</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getTemporal <em>Temporal</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getEnumerated <em>Enumerated</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlConvertibleMapping extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lob</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lob</em>' attribute.
- * @see #setLob(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- boolean isLob();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#isLob <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lob</em>' attribute.
- * @see #isLob()
- * @generated
- */
- void setLob(boolean value);
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
- * @model
- * @generated
- */
- TemporalType getTemporal();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getTemporal()
- * @generated
- */
- void setTemporal(TemporalType value);
-
- /**
- * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
- * @model
- * @generated
- */
- EnumType getEnumerated();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping#getEnumerated <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getEnumerated()
- * @generated
- */
- void setEnumerated(EnumType value);
-
- /**
- * Return the {@link TextRange} for the enumerated element. If the enumerated element
- * does not exist return the {@link TextRange} for the basic element.
- */
- TextRange getEnumeratedTextRange();
-
- /**
- * Return the {@link TextRange} for the temporal element. If the temporal element
- * does not exist return the {@link TextRange} for the basic element.
- */
- TextRange getTemporalTextRange();
-
- /**
- * Return the {@link TextRange} for the lob element. If the lob element
- * does not exist return the {@link TextRange} for the basic element.
- */
- TextRange getLobTextRange();
-
-} // ConvertableMapping
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlDiscriminatorColumn.java
deleted file mode 100644
index 38ee65ca06..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlDiscriminatorColumn.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Discriminator Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn()
- * @model kind="class"
- * @generated
- */
-public class XmlDiscriminatorColumn extends AbstractXmlBaseDiscriminatorColumn
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlDiscriminatorColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_DISCRIMINATOR_COLUMN;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildDiscriminatorTypeTranslator(),
- buildColumnDefinitionTranslator(),
- buildLengthTranslator()
- };
- }
-
-} // DiscriminatorColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlElementCollection.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlElementCollection.java
deleted file mode 100644
index ab7a99742f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlElementCollection.java
+++ /dev/null
@@ -1,1707 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.jpa2.MappingKeys2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Element Collection</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection()
- * @model kind="class"
- * @generated
- */
-public class XmlElementCollection extends AbstractXmlAttributeMapping implements XmlElementCollection_2_0
-{
- /**
- * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected static final boolean LOB_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected boolean lob = LOB_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final EnumType ENUMERATED_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType enumerated = ENUMERATED_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getOrderColumn() <em>Order Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderColumn()
- * @generated
- * @ordered
- */
- protected XmlOrderColumn orderColumn;
-
- /**
- * The default value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected static final String ORDER_BY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected String orderBy = ORDER_BY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getAttributeOverrides() <em>Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAttributeOverride> attributeOverrides;
-
- /**
- * The cached value of the '{@link #getAssociationOverrides() <em>Association Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAssociationOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAssociationOverride> associationOverrides;
-
- /**
- * The cached value of the '{@link #getMapKeyAttributeOverrides() <em>Map Key Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAttributeOverride> mapKeyAttributeOverrides;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final TemporalType MAP_KEY_TEMPORAL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getMapKeyTemporal() <em>Map Key Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType mapKeyTemporal = MAP_KEY_TEMPORAL_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final EnumType MAP_KEY_ENUMERATED_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getMapKeyEnumerated() <em>Map Key Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType mapKeyEnumerated = MAP_KEY_ENUMERATED_EDEFAULT;
-
- /**
- * The default value of the '{@link #getTargetClass() <em>Target Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTargetClass()
- * @generated
- * @ordered
- */
- protected static final String TARGET_CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTargetClass() <em>Target Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTargetClass()
- * @generated
- * @ordered
- */
- protected String targetClass = TARGET_CLASS_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final FetchType FETCH_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected FetchType fetch = FETCH_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getMapKey() <em>Map Key</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKey()
- * @generated
- * @ordered
- */
- protected MapKey mapKey;
-
- /**
- * The cached value of the '{@link #getMapKeyClass() <em>Map Key Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyClass()
- * @generated
- * @ordered
- */
- protected XmlClassReference mapKeyClass;
-
- /**
- * The cached value of the '{@link #getMapKeyColumn() <em>Map Key Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn mapKeyColumn;
-
- /**
- * The cached value of the '{@link #getMapKeyJoinColumns() <em>Map Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> mapKeyJoinColumns;
-
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn column;
-
- /**
- * The cached value of the '{@link #getCollectionTable() <em>Collection Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCollectionTable()
- * @generated
- * @ordered
- */
- protected XmlCollectionTable collectionTable;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlElementCollection()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ELEMENT_COLLECTION;
- }
-
- /**
- * Returns the value of the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lob</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lob</em>' attribute.
- * @see #setLob(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isLob()
- {
- return lob;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#isLob <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lob</em>' attribute.
- * @see #isLob()
- * @generated
- */
- public void setLob(boolean newLob)
- {
- boolean oldLob = lob;
- lob = newLob;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__LOB, oldLob, lob));
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal()
- {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporal(TemporalType newTemporal)
- {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL, oldTemporal, temporal));
- }
-
- /**
- * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
- * @model
- * @generated
- */
- public EnumType getEnumerated()
- {
- return enumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getEnumerated <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getEnumerated()
- * @generated
- */
- public void setEnumerated(EnumType newEnumerated)
- {
- EnumType oldEnumerated = enumerated;
- enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED, oldEnumerated, enumerated));
- }
-
- /**
- * Returns the value of the '<em><b>Target Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Target Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Target Class</em>' attribute.
- * @see #setTargetClass(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_TargetClass()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getTargetClass()
- {
- return targetClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getTargetClass <em>Target Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Target Class</em>' attribute.
- * @see #getTargetClass()
- * @generated
- */
- public void setTargetClass(String newTargetClass)
- {
- String oldTargetClass = targetClass;
- targetClass = newTargetClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS, oldTargetClass, targetClass));
- }
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.FetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #setFetch(FetchType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_Fetch()
- * @model
- * @generated
- */
- public FetchType getFetch()
- {
- return fetch;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #getFetch()
- * @generated
- */
- public void setFetch(FetchType newFetch)
- {
- FetchType oldFetch = fetch;
- fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__FETCH, oldFetch, fetch));
- }
-
- /**
- * Returns the value of the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order By</em>' attribute.
- * @see #setOrderBy(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable_OrderBy()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getOrderBy()
- {
- return orderBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getOrderBy <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order By</em>' attribute.
- * @see #getOrderBy()
- * @generated
- */
- public void setOrderBy(String newOrderBy)
- {
- String oldOrderBy = orderBy;
- orderBy = newOrderBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY, oldOrderBy, orderBy));
- }
-
- /**
- * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAttributeOverride> getAttributeOverrides()
- {
- if (attributeOverrides == null)
- {
- attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES);
- }
- return attributeOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Association Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAssociationOverride> getAssociationOverrides()
- {
- if (associationOverrides == null)
- {
- associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES);
- }
- return associationOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAttributeOverride> getMapKeyAttributeOverrides()
- {
- if (mapKeyAttributeOverrides == null)
- {
- mapKeyAttributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES);
- }
- return mapKeyAttributeOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order Column</em>' containment reference.
- * @see #setOrderColumn(XmlOrderColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable_2_0_OrderColumn()
- * @model containment="true"
- * @generated
- */
- public XmlOrderColumn getOrderColumn()
- {
- return orderColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetOrderColumn(XmlOrderColumn newOrderColumn, NotificationChain msgs)
- {
- XmlOrderColumn oldOrderColumn = orderColumn;
- orderColumn = newOrderColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, oldOrderColumn, newOrderColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getOrderColumn <em>Order Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order Column</em>' containment reference.
- * @see #getOrderColumn()
- * @generated
- */
- public void setOrderColumn(XmlOrderColumn newOrderColumn)
- {
- if (newOrderColumn != orderColumn)
- {
- NotificationChain msgs = null;
- if (orderColumn != null)
- msgs = ((InternalEObject)orderColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, null, msgs);
- if (newOrderColumn != null)
- msgs = ((InternalEObject)newOrderColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, null, msgs);
- msgs = basicSetOrderColumn(newOrderColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, newOrderColumn, newOrderColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key</em>' containment reference.
- * @see #setMapKey(MapKey)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKey()
- * @model containment="true"
- * @generated
- */
- public MapKey getMapKey()
- {
- return mapKey;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMapKey(MapKey newMapKey, NotificationChain msgs)
- {
- MapKey oldMapKey = mapKey;
- mapKey = newMapKey;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, oldMapKey, newMapKey);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getMapKey <em>Map Key</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key</em>' containment reference.
- * @see #getMapKey()
- * @generated
- */
- public void setMapKey(MapKey newMapKey)
- {
- if (newMapKey != mapKey)
- {
- NotificationChain msgs = null;
- if (mapKey != null)
- msgs = ((InternalEObject)mapKey).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, null, msgs);
- if (newMapKey != null)
- msgs = ((InternalEObject)newMapKey).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, null, msgs);
- msgs = basicSetMapKey(newMapKey, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, newMapKey, newMapKey));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Class</em>' containment reference.
- * @see #setMapKeyClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyClass()
- * @model containment="true"
- * @generated
- */
- public XmlClassReference getMapKeyClass()
- {
- return mapKeyClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMapKeyClass(XmlClassReference newMapKeyClass, NotificationChain msgs)
- {
- XmlClassReference oldMapKeyClass = mapKeyClass;
- mapKeyClass = newMapKeyClass;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, oldMapKeyClass, newMapKeyClass);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getMapKeyClass <em>Map Key Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Class</em>' containment reference.
- * @see #getMapKeyClass()
- * @generated
- */
- public void setMapKeyClass(XmlClassReference newMapKeyClass)
- {
- if (newMapKeyClass != mapKeyClass)
- {
- NotificationChain msgs = null;
- if (mapKeyClass != null)
- msgs = ((InternalEObject)mapKeyClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, null, msgs);
- if (newMapKeyClass != null)
- msgs = ((InternalEObject)newMapKeyClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, null, msgs);
- msgs = basicSetMapKeyClass(newMapKeyClass, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, newMapKeyClass, newMapKeyClass));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setMapKeyTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal()
- * @model
- * @generated
- */
- public TemporalType getMapKeyTemporal()
- {
- return mapKeyTemporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getMapKeyTemporal()
- * @generated
- */
- public void setMapKeyTemporal(TemporalType newMapKeyTemporal)
- {
- TemporalType oldMapKeyTemporal = mapKeyTemporal;
- mapKeyTemporal = newMapKeyTemporal == null ? MAP_KEY_TEMPORAL_EDEFAULT : newMapKeyTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL, oldMapKeyTemporal, mapKeyTemporal));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setMapKeyEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated()
- * @model
- * @generated
- */
- public EnumType getMapKeyEnumerated()
- {
- return mapKeyEnumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getMapKeyEnumerated()
- * @generated
- */
- public void setMapKeyEnumerated(EnumType newMapKeyEnumerated)
- {
- EnumType oldMapKeyEnumerated = mapKeyEnumerated;
- mapKeyEnumerated = newMapKeyEnumerated == null ? MAP_KEY_ENUMERATED_EDEFAULT : newMapKeyEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED, oldMapKeyEnumerated, mapKeyEnumerated));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Column</em>' containment reference.
- * @see #setMapKeyColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyColumn()
- * @model containment="true"
- * @generated
- */
- public XmlColumn getMapKeyColumn()
- {
- return mapKeyColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMapKeyColumn(XmlColumn newMapKeyColumn, NotificationChain msgs)
- {
- XmlColumn oldMapKeyColumn = mapKeyColumn;
- mapKeyColumn = newMapKeyColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, oldMapKeyColumn, newMapKeyColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Column</em>' containment reference.
- * @see #getMapKeyColumn()
- * @generated
- */
- public void setMapKeyColumn(XmlColumn newMapKeyColumn)
- {
- if (newMapKeyColumn != mapKeyColumn)
- {
- NotificationChain msgs = null;
- if (mapKeyColumn != null)
- msgs = ((InternalEObject)mapKeyColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, null, msgs);
- if (newMapKeyColumn != null)
- msgs = ((InternalEObject)newMapKeyColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, null, msgs);
- msgs = basicSetMapKeyColumn(newMapKeyColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, newMapKeyColumn, newMapKeyColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getMapKeyJoinColumns()
- {
- if (mapKeyJoinColumns == null)
- {
- mapKeyJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS);
- }
- return mapKeyJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_Column()
- * @model containment="true"
- * @generated
- */
- public XmlColumn getColumn()
- {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
- {
- XmlColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, oldColumn, newColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- public void setColumn(XmlColumn newColumn)
- {
- if (newColumn != column)
- {
- NotificationChain msgs = null;
- if (column != null)
- msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, null, msgs);
- if (newColumn != null)
- msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, null, msgs);
- msgs = basicSetColumn(newColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, newColumn, newColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Collection Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Collection Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Collection Table</em>' containment reference.
- * @see #setCollectionTable(XmlCollectionTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_CollectionTable()
- * @model containment="true"
- * @generated
- */
- public XmlCollectionTable getCollectionTable()
- {
- return collectionTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetCollectionTable(XmlCollectionTable newCollectionTable, NotificationChain msgs)
- {
- XmlCollectionTable oldCollectionTable = collectionTable;
- collectionTable = newCollectionTable;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, oldCollectionTable, newCollectionTable);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection#getCollectionTable <em>Collection Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Collection Table</em>' containment reference.
- * @see #getCollectionTable()
- * @generated
- */
- public void setCollectionTable(XmlCollectionTable newCollectionTable)
- {
- if (newCollectionTable != collectionTable)
- {
- NotificationChain msgs = null;
- if (collectionTable != null)
- msgs = ((InternalEObject)collectionTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, null, msgs);
- if (newCollectionTable != null)
- msgs = ((InternalEObject)newCollectionTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, null, msgs);
- msgs = basicSetCollectionTable(newCollectionTable, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, newCollectionTable, newCollectionTable));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
- return basicSetOrderColumn(null, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
- return ((InternalEList<?>)getAttributeOverrides()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
- return ((InternalEList<?>)getAssociationOverrides()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
- return ((InternalEList<?>)getMapKeyAttributeOverrides()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
- return basicSetMapKey(null, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
- return basicSetMapKeyClass(null, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
- return basicSetMapKeyColumn(null, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
- return ((InternalEList<?>)getMapKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
- return basicSetColumn(null, msgs);
- case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
- return basicSetCollectionTable(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
- return isLob();
- case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
- return getTemporal();
- case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
- return getEnumerated();
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
- return getOrderColumn();
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
- return getOrderBy();
- case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
- return getAttributeOverrides();
- case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
- return getAssociationOverrides();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
- return getMapKeyAttributeOverrides();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
- return getMapKeyTemporal();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
- return getMapKeyEnumerated();
- case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
- return getTargetClass();
- case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
- return getFetch();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
- return getMapKey();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
- return getMapKeyClass();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
- return getMapKeyColumn();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
- return getMapKeyJoinColumns();
- case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
- return getColumn();
- case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
- return getCollectionTable();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
- setLob((Boolean)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
- setTemporal((TemporalType)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
- setEnumerated((EnumType)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
- setOrderColumn((XmlOrderColumn)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
- setOrderBy((String)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
- getAttributeOverrides().clear();
- getAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
- getAssociationOverrides().clear();
- getAssociationOverrides().addAll((Collection<? extends XmlAssociationOverride>)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
- getMapKeyAttributeOverrides().clear();
- getMapKeyAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
- setMapKeyTemporal((TemporalType)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
- setMapKeyEnumerated((EnumType)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
- setTargetClass((String)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
- setFetch((FetchType)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
- setMapKey((MapKey)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
- setMapKeyClass((XmlClassReference)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
- setMapKeyColumn((XmlColumn)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
- getMapKeyJoinColumns().clear();
- getMapKeyJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
- setColumn((XmlColumn)newValue);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
- setCollectionTable((XmlCollectionTable)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
- setLob(LOB_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
- setEnumerated(ENUMERATED_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
- setOrderColumn((XmlOrderColumn)null);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
- setOrderBy(ORDER_BY_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
- getAttributeOverrides().clear();
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
- getAssociationOverrides().clear();
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
- getMapKeyAttributeOverrides().clear();
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
- setMapKeyTemporal(MAP_KEY_TEMPORAL_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
- setMapKeyEnumerated(MAP_KEY_ENUMERATED_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
- setTargetClass(TARGET_CLASS_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
- setFetch(FETCH_EDEFAULT);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
- setMapKey((MapKey)null);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
- setMapKeyClass((XmlClassReference)null);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
- setMapKeyColumn((XmlColumn)null);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
- getMapKeyJoinColumns().clear();
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
- setColumn((XmlColumn)null);
- return;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
- setCollectionTable((XmlCollectionTable)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
- return lob != LOB_EDEFAULT;
- case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
- return temporal != TEMPORAL_EDEFAULT;
- case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
- return enumerated != ENUMERATED_EDEFAULT;
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
- return orderColumn != null;
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
- return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
- case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
- return attributeOverrides != null && !attributeOverrides.isEmpty();
- case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
- return associationOverrides != null && !associationOverrides.isEmpty();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
- return mapKeyAttributeOverrides != null && !mapKeyAttributeOverrides.isEmpty();
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
- return mapKeyTemporal != MAP_KEY_TEMPORAL_EDEFAULT;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
- return mapKeyEnumerated != MAP_KEY_ENUMERATED_EDEFAULT;
- case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
- return TARGET_CLASS_EDEFAULT == null ? targetClass != null : !TARGET_CLASS_EDEFAULT.equals(targetClass);
- case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
- return fetch != FETCH_EDEFAULT;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
- return mapKey != null;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
- return mapKeyClass != null;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
- return mapKeyColumn != null;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
- return mapKeyJoinColumns != null && !mapKeyJoinColumns.isEmpty();
- case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
- return column != null;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
- return collectionTable != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
- case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
- case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN: return OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY: return OrmPackage.XML_ORDERABLE__ORDER_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlAttributeOverrideContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlAssociationOverrideContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyConvertibleMapping_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL: return OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED: return OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlElementCollection_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__TARGET_CLASS;
- case OrmPackage.XML_ELEMENT_COLLECTION__FETCH: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__FETCH;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN;
- case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLUMN;
- case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_ELEMENT_COLLECTION__LOB;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN: return OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlOrderable.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ORDERABLE__ORDER_BY: return OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlAttributeOverrideContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlAssociationOverrideContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlMapKeyConvertibleMapping_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL;
- case OrmV2_0Package.XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlElementCollection_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__TARGET_CLASS: return OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__FETCH: return OrmPackage.XML_ELEMENT_COLLECTION__FETCH;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLUMN: return OrmPackage.XML_ELEMENT_COLLECTION__COLUMN;
- case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE: return OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (lob: ");
- result.append(lob);
- result.append(", temporal: ");
- result.append(temporal);
- result.append(", enumerated: ");
- result.append(enumerated);
- result.append(", orderBy: ");
- result.append(orderBy);
- result.append(", mapKeyTemporal: ");
- result.append(mapKeyTemporal);
- result.append(", mapKeyEnumerated: ");
- result.append(mapKeyEnumerated);
- result.append(", targetClass: ");
- result.append(targetClass);
- result.append(", fetch: ");
- result.append(fetch);
- result.append(')');
- return result.toString();
- }
-
-
- // **************** XmlAttributeMapping impl ******************************
-
- public String getMappingKey() {
- return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
- }
-
-
- // **************** validation support ************************************
-
- public TextRange getEnumeratedTextRange() {
- return getAttributeTextRange(JPA2_0.ENUMERATED);
- }
-
- public TextRange getLobTextRange() {
- return getAttributeTextRange(JPA2_0.LOB);
- }
-
- public TextRange getTemporalTextRange() {
- return getAttributeTextRange(JPA2_0.TEMPORAL);
- }
-
- public TextRange getTargetClassTextRange() {
- return getAttributeTextRange(JPA2_0.TARGET_CLASS);
- }
-
- public TextRange getMapKeyEnumeratedTextRange() {
- return getAttributeTextRange(JPA2_0.MAP_KEY_ENUMERATED);
- }
-
- public TextRange getMapKeyTemporalTextRange() {
- return getAttributeTextRange(JPA2_0.MAP_KEY_TEMPORAL);
- }
-
- public TextRange getMapKeyClassTextRange() {
- return getElementTextRange(JPA2_0.MAP_KEY_CLASS);
- }
-
- // **************** translators *******************************************
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildTargetClassTranslator(),
- buildFetchTranslator(),
- buildAccessTranslator(),
- buildOrderByTranslator(),
- buildOrderColumnTranslator(),
- buildMapKeyTranslator(),
- buildMapKeyClassTranslator(),
- buildMapKeyTemporalTranslator(),
- buildMapKeyEnumeratedTranslator(),
- buildMapKeyAttributeOverrideTranslator(),
- XmlColumn.buildTranslator(JPA2_0.MAP_KEY_COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyColumn()),
- XmlJoinColumn.buildTranslator(JPA2_0.MAP_KEY_JOIN_COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyJoinColumns()),
- XmlColumn.buildTranslator(JPA.COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_Column()),
- buildTemporalTranslator(),
- buildEnumeratedTranslator(),
- buildLobTranslator(),
- buildAttributeOverrideTranslator(),
- buildAssociationOverrideTranslator(),
- XmlCollectionTable.buildTranslator(JPA2_0.COLLECTION_TABLE, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_CollectionTable())
- };
- }
-
- protected static Translator buildTargetClassTranslator() {
- return new Translator(JPA2_0.TARGET_CLASS, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_TargetClass(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildFetchTranslator() {
- return new Translator(JPA.FETCH, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_Fetch(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildOrderByTranslator() {
- return new Translator(JPA.ORDER_BY, OrmPackage.eINSTANCE.getXmlOrderable_OrderBy());
- }
-
- protected static Translator buildOrderColumnTranslator() {
- return XmlOrderColumn.buildTranslator(JPA2_0.ORDER_COLUMN, OrmV2_0Package.eINSTANCE.getXmlOrderable_2_0_OrderColumn());
- }
-
- protected static Translator buildColumnTranslator() {
- return XmlColumn.buildTranslator(JPA.COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_Column());
- }
-
- protected static Translator buildLobTranslator() {
- return new EmptyTagBooleanTranslator(JPA.LOB, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Lob());
- }
-
- protected static Translator buildTemporalTranslator() {
- return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
- }
-
- protected static Translator buildEnumeratedTranslator() {
- return new Translator(JPA.ENUMERATED, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Enumerated());
- }
-
- protected static Translator buildMapKeyTranslator() {
- return MapKey.buildTranslator(JPA.MAP_KEY, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKey());
- }
-
- protected static Translator buildMapKeyClassTranslator() {
- return XmlClassReference.buildTranslator(JPA2_0.MAP_KEY_CLASS, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyClass());
- }
-
- protected static Translator buildMapKeyTemporalTranslator() {
- return new Translator(JPA2_0.MAP_KEY_TEMPORAL, OrmV2_0Package.eINSTANCE.getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal());
- }
-
- protected static Translator buildMapKeyEnumeratedTranslator() {
- return new Translator(JPA2_0.MAP_KEY_ENUMERATED, OrmV2_0Package.eINSTANCE.getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated());
- }
-
- protected static Translator buildAttributeOverrideTranslator() {
- return XmlAttributeOverride.buildTranslator(JPA.ATTRIBUTE_OVERRIDE, OrmPackage.eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides());
- }
-
- protected static Translator buildAssociationOverrideTranslator() {
- return XmlAssociationOverride.buildTranslator(JPA.ASSOCIATION_OVERRIDE, OrmPackage.eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides());
- }
-
- protected static Translator buildMapKeyAttributeOverrideTranslator() {
- return XmlAttributeOverride.buildTranslator(JPA2_0.MAP_KEY_ATTRIBUTE_OVERRIDE, OrmV2_0Package.eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides());
- }
-
-
- // ********** refactoring **********
-
- public ReplaceEdit createRenameTargetClassEdit(IType originalType, String newName) {
- String originalName = originalType.getElementName();
- int nameIndex = this.targetClass.lastIndexOf(originalName);
- int offset = getAttributeNode(JPA2_0.TARGET_CLASS).getValueRegionStartOffset() + 1;
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenameMapKeyClassEdit(IType originalType, String newName) {
- return getMapKeyClass().createRenameEdit(originalType, newName);
- }
-
- public ReplaceEdit createRenameTargetClassPackageEdit(String newPackageName) {
- int packageLength = this.targetClass.lastIndexOf('.');
- if (newPackageName == "") {//$NON-NLS-1$
- //moving to the default package, remove the '.'
- packageLength++;
- }
- if (packageLength == -1) {
- //moving from the default package or unspecified package
- packageLength = 0;
- newPackageName = newPackageName + '.';
- }
- int offset = getAttributeNode(JPA2_0.TARGET_CLASS).getValueRegionStartOffset() + 1; // +1 = opening double quote
- return new ReplaceEdit(offset, packageLength, newPackageName);
- }
-
- public ReplaceEdit createRenameMapKeyClassPackageEdit(String newName) {
- return getMapKeyClass().createRenamePackageEdit(newName);
- }
-
- // ********** content assist ***************
-
- public TextRange getMapKeyNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.MAP_KEY);
- }
-
- public boolean mapKeyNameTouches(int pos) {
- TextRange textRange = this.getMapKeyNameCodeAssistTextRange();
- return (textRange != null) && textRange.touches(pos);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddable.java
deleted file mode 100644
index 08c7369358..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddable.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Embeddable</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbeddable()
- * @model kind="class"
- * @generated
- */
-public class XmlEmbeddable extends AbstractXmlTypeMapping
-{
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlEmbeddable()
- {
- super();
- }
-
- public String getMappingKey() {
- return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
- public XmlEntityMappings getEntityMappings() {
- return (XmlEntityMappings) eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_EMBEDDABLE;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildClassTranslator(),
- buildAccessTranslator(),
- buildMetadataCompleteTranslator(),
- buildDescriptionTranslator(),
- buildAttributesTranslator()
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbedded.java
deleted file mode 100644
index 486eb8e4a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbedded.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Embedded</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbedded()
- * @model kind="class"
- * @generated
- */
-public class XmlEmbedded extends AbstractXmlEmbedded implements XmlEmbedded_2_0
-{
- /**
- * The cached value of the '{@link #getAssociationOverrides() <em>Association Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAssociationOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAssociationOverride> associationOverrides;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlEmbedded()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_EMBEDDED;
- }
-
- /**
- * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Association Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAssociationOverride> getAssociationOverrides()
- {
- if (associationOverrides == null)
- {
- associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES);
- }
- return associationOverrides;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
- return ((InternalEList<?>)getAssociationOverrides()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
- return getAssociationOverrides();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
- getAssociationOverrides().clear();
- getAssociationOverrides().addAll((Collection<? extends XmlAssociationOverride>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
- getAssociationOverrides().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
- return associationOverrides != null && !associationOverrides.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlAssociationOverrideContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlEmbedded_2_0.class)
- {
- switch (derivedFeatureID)
- {
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlAssociationOverrideContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES: return OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlEmbedded_2_0.class)
- {
- switch (baseFeatureID)
- {
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- public String getMappingKey() {
- return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildAccessTranslator(),
- buildAttributeOverrideTranslator(),
- buildAssociationOverrideTranslator()
- };
- }
-
- protected static Translator buildAssociationOverrideTranslator() {
- return XmlAssociationOverride.buildTranslator(JPA.ASSOCIATION_OVERRIDE, OrmPackage.eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddedId.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddedId.java
deleted file mode 100644
index 865eea2dab..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEmbeddedId.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Embedded Id</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEmbeddedId()
- * @model kind="class"
- * @generated
- */
-public class XmlEmbeddedId extends AbstractXmlEmbedded
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlEmbeddedId()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_EMBEDDED_ID;
- }
-
- public String getMappingKey() {
- return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildAccessTranslator(),
- buildAttributeOverrideTranslator()
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntity.java
deleted file mode 100644
index 72f58c1394..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntity.java
+++ /dev/null
@@ -1,2308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Entity</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getTable <em>Table</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSecondaryTables <em>Secondary Tables</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getInheritance <em>Inheritance</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorValue <em>Discriminator Value</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorColumn <em>Discriminator Column</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getEntityListeners <em>Entity Listeners</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity()
- * @model kind="class"
- * @generated
- */
-public class XmlEntity extends AbstractXmlTypeMapping implements XmlQueryContainer, XmlGeneratorContainer, XmlEventMethodContainer, XmlAttributeOverrideContainer, XmlAssociationOverrideContainer, XmlEntity_2_0, XmlIdClassContainer
-{
-
- /**
- * The cached value of the '{@link #getNamedQueries() <em>Named Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNamedQueries()
- * @generated
- * @ordered
- */
- protected EList<XmlNamedQuery> namedQueries;
-
- /**
- * The cached value of the '{@link #getNamedNativeQueries() <em>Named Native Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNamedNativeQueries()
- * @generated
- * @ordered
- */
- protected EList<XmlNamedNativeQuery> namedNativeQueries;
-
- /**
- * The cached value of the '{@link #getSequenceGenerator() <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceGenerator()
- * @generated
- * @ordered
- */
- protected XmlSequenceGenerator sequenceGenerator;
-
- /**
- * The cached value of the '{@link #getTableGenerator() <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTableGenerator()
- * @generated
- * @ordered
- */
- protected XmlTableGenerator tableGenerator;
-
- /**
- * The cached value of the '{@link #getPrePersist() <em>Pre Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrePersist()
- * @generated
- * @ordered
- */
- protected PrePersist prePersist;
-
- /**
- * The cached value of the '{@link #getPostPersist() <em>Post Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostPersist()
- * @generated
- * @ordered
- */
- protected PostPersist postPersist;
-
- /**
- * The cached value of the '{@link #getPreRemove() <em>Pre Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPreRemove()
- * @generated
- * @ordered
- */
- protected PreRemove preRemove;
-
- /**
- * The cached value of the '{@link #getPostRemove() <em>Post Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostRemove()
- * @generated
- * @ordered
- */
- protected PostRemove postRemove;
-
- /**
- * The cached value of the '{@link #getPreUpdate() <em>Pre Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPreUpdate()
- * @generated
- * @ordered
- */
- protected PreUpdate preUpdate;
-
- /**
- * The cached value of the '{@link #getPostUpdate() <em>Post Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostUpdate()
- * @generated
- * @ordered
- */
- protected PostUpdate postUpdate;
-
- /**
- * The cached value of the '{@link #getPostLoad() <em>Post Load</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPostLoad()
- * @generated
- * @ordered
- */
- protected PostLoad postLoad;
-
- /**
- * The cached value of the '{@link #getAttributeOverrides() <em>Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAttributeOverride> attributeOverrides;
-
- /**
- * The cached value of the '{@link #getAssociationOverrides() <em>Association Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAssociationOverrides()
- * @generated
- * @ordered
- */
- protected EList<XmlAssociationOverride> associationOverrides;
-
- /**
- * The default value of the '{@link #getCacheable() <em>Cacheable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCacheable()
- * @generated
- * @ordered
- */
- protected static final Boolean CACHEABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCacheable() <em>Cacheable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCacheable()
- * @generated
- * @ordered
- */
- protected Boolean cacheable = CACHEABLE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getIdClass() <em>Id Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIdClass()
- * @generated
- * @ordered
- */
- protected XmlClassReference idClass;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getTable() <em>Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected XmlTable table;
-
- /**
- * The cached value of the '{@link #getSecondaryTables() <em>Secondary Tables</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSecondaryTables()
- * @generated
- * @ordered
- */
- protected EList<XmlSecondaryTable> secondaryTables;
-
- /**
- * The cached value of the '{@link #getPrimaryKeyJoinColumns() <em>Primary Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns;
-
- /**
- * The cached value of the '{@link #getInheritance() <em>Inheritance</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInheritance()
- * @generated
- * @ordered
- */
- protected Inheritance inheritance;
-
- /**
- * The default value of the '{@link #getDiscriminatorValue() <em>Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected static final String DISCRIMINATOR_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDiscriminatorValue() <em>Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected String discriminatorValue = DISCRIMINATOR_VALUE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorColumn()
- * @generated
- * @ordered
- */
- protected XmlDiscriminatorColumn discriminatorColumn;
-
- /**
- * The cached value of the '{@link #getSqlResultSetMappings() <em>Sql Result Set Mappings</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSqlResultSetMappings()
- * @generated
- * @ordered
- */
- protected EList<SqlResultSetMapping> sqlResultSetMappings;
-
- /**
- * The default value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeDefaultListeners()
- * @generated
- * @ordered
- */
- protected static final boolean EXCLUDE_DEFAULT_LISTENERS_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeDefaultListeners()
- * @generated
- * @ordered
- */
- protected boolean excludeDefaultListeners = EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
-
- /**
- * The default value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeSuperclassListeners()
- * @generated
- * @ordered
- */
- protected static final boolean EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeSuperclassListeners()
- * @generated
- * @ordered
- */
- protected boolean excludeSuperclassListeners = EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityListeners()
- * @generated
- * @ordered
- */
- protected EntityListeners entityListeners;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlEntity()
- {
- super();
- }
-
- public String getMappingKey() {
- return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
- public XmlEntityMappings entityMappings() {
- return (XmlEntityMappings) eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ENTITY;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table</em>' containment reference.
- * @see #setTable(XmlTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_Table()
- * @model containment="true"
- * @generated
- */
- public XmlTable getTable()
- {
- return table;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetTable(XmlTable newTable, NotificationChain msgs)
- {
- XmlTable oldTable = table;
- table = newTable;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE, oldTable, newTable);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getTable <em>Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table</em>' containment reference.
- * @see #getTable()
- * @generated
- */
- public void setTable(XmlTable newTable)
- {
- if (newTable != table)
- {
- NotificationChain msgs = null;
- if (table != null)
- msgs = ((InternalEObject)table).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE, null, msgs);
- if (newTable != null)
- msgs = ((InternalEObject)newTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE, null, msgs);
- msgs = basicSetTable(newTable, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE, newTable, newTable));
- }
-
- /**
- * Returns the value of the '<em><b>Secondary Tables</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Secondary Tables</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Secondary Tables</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_SecondaryTables()
- * @model containment="true"
- * @generated
- */
- public EList<XmlSecondaryTable> getSecondaryTables()
- {
- if (secondaryTables == null)
- {
- secondaryTables = new EObjectContainmentEList<XmlSecondaryTable>(XmlSecondaryTable.class, this, OrmPackage.XML_ENTITY__SECONDARY_TABLES);
- }
- return secondaryTables;
- }
-
- /**
- * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_PrimaryKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
- {
- if (primaryKeyJoinColumns == null)
- {
- primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS);
- }
- return primaryKeyJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Id Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id Class</em>' containment reference.
- * @see #setIdClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlIdClassContainer_IdClass()
- * @model containment="true"
- * @generated
- */
- public XmlClassReference getIdClass()
- {
- return idClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetIdClass(XmlClassReference newIdClass, NotificationChain msgs)
- {
- XmlClassReference oldIdClass = idClass;
- idClass = newIdClass;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ID_CLASS, oldIdClass, newIdClass);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getIdClass <em>Id Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id Class</em>' containment reference.
- * @see #getIdClass()
- * @generated
- */
- public void setIdClass(XmlClassReference newIdClass)
- {
- if (newIdClass != idClass)
- {
- NotificationChain msgs = null;
- if (idClass != null)
- msgs = ((InternalEObject)idClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ID_CLASS, null, msgs);
- if (newIdClass != null)
- msgs = ((InternalEObject)newIdClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ID_CLASS, null, msgs);
- msgs = basicSetIdClass(newIdClass, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ID_CLASS, newIdClass, newIdClass));
- }
-
- /**
- * Returns the value of the '<em><b>Inheritance</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Inheritance</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Inheritance</em>' containment reference.
- * @see #setInheritance(Inheritance)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_Inheritance()
- * @model containment="true"
- * @generated
- */
- public Inheritance getInheritance()
- {
- return inheritance;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetInheritance(Inheritance newInheritance, NotificationChain msgs)
- {
- Inheritance oldInheritance = inheritance;
- inheritance = newInheritance;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__INHERITANCE, oldInheritance, newInheritance);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getInheritance <em>Inheritance</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Inheritance</em>' containment reference.
- * @see #getInheritance()
- * @generated
- */
- public void setInheritance(Inheritance newInheritance)
- {
- if (newInheritance != inheritance)
- {
- NotificationChain msgs = null;
- if (inheritance != null)
- msgs = ((InternalEObject)inheritance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__INHERITANCE, null, msgs);
- if (newInheritance != null)
- msgs = ((InternalEObject)newInheritance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__INHERITANCE, null, msgs);
- msgs = basicSetInheritance(newInheritance, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__INHERITANCE, newInheritance, newInheritance));
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Value</em>' attribute.
- * @see #setDiscriminatorValue(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_DiscriminatorValue()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDiscriminatorValue()
- {
- return discriminatorValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorValue <em>Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Discriminator Value</em>' attribute.
- * @see #getDiscriminatorValue()
- * @generated
- */
- public void setDiscriminatorValue(String newDiscriminatorValue)
- {
- String oldDiscriminatorValue = discriminatorValue;
- discriminatorValue = newDiscriminatorValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE, oldDiscriminatorValue, discriminatorValue));
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Column</em>' containment reference.
- * @see #setDiscriminatorColumn(XmlDiscriminatorColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_DiscriminatorColumn()
- * @model containment="true"
- * @generated
- */
- public XmlDiscriminatorColumn getDiscriminatorColumn()
- {
- return discriminatorColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetDiscriminatorColumn(XmlDiscriminatorColumn newDiscriminatorColumn, NotificationChain msgs)
- {
- XmlDiscriminatorColumn oldDiscriminatorColumn = discriminatorColumn;
- discriminatorColumn = newDiscriminatorColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, oldDiscriminatorColumn, newDiscriminatorColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getDiscriminatorColumn <em>Discriminator Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Discriminator Column</em>' containment reference.
- * @see #getDiscriminatorColumn()
- * @generated
- */
- public void setDiscriminatorColumn(XmlDiscriminatorColumn newDiscriminatorColumn)
- {
- if (newDiscriminatorColumn != discriminatorColumn)
- {
- NotificationChain msgs = null;
- if (discriminatorColumn != null)
- msgs = ((InternalEObject)discriminatorColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, null, msgs);
- if (newDiscriminatorColumn != null)
- msgs = ((InternalEObject)newDiscriminatorColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, null, msgs);
- msgs = basicSetDiscriminatorColumn(newDiscriminatorColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, newDiscriminatorColumn, newDiscriminatorColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Generator</em>' containment reference.
- * @see #setSequenceGenerator(XmlSequenceGenerator)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer_SequenceGenerator()
- * @model containment="true"
- * @generated
- */
- public XmlSequenceGenerator getSequenceGenerator()
- {
- return sequenceGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSequenceGenerator(XmlSequenceGenerator newSequenceGenerator, NotificationChain msgs)
- {
- XmlSequenceGenerator oldSequenceGenerator = sequenceGenerator;
- sequenceGenerator = newSequenceGenerator;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, oldSequenceGenerator, newSequenceGenerator);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
- * @see #getSequenceGenerator()
- * @generated
- */
- public void setSequenceGenerator(XmlSequenceGenerator newSequenceGenerator)
- {
- if (newSequenceGenerator != sequenceGenerator)
- {
- NotificationChain msgs = null;
- if (sequenceGenerator != null)
- msgs = ((InternalEObject)sequenceGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, null, msgs);
- if (newSequenceGenerator != null)
- msgs = ((InternalEObject)newSequenceGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, null, msgs);
- msgs = basicSetSequenceGenerator(newSequenceGenerator, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, newSequenceGenerator, newSequenceGenerator));
- }
-
- /**
- * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table Generator</em>' containment reference.
- * @see #setTableGenerator(XmlTableGenerator)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer_TableGenerator()
- * @model containment="true"
- * @generated
- */
- public XmlTableGenerator getTableGenerator()
- {
- return tableGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetTableGenerator(XmlTableGenerator newTableGenerator, NotificationChain msgs)
- {
- XmlTableGenerator oldTableGenerator = tableGenerator;
- tableGenerator = newTableGenerator;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE_GENERATOR, oldTableGenerator, newTableGenerator);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getTableGenerator <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table Generator</em>' containment reference.
- * @see #getTableGenerator()
- * @generated
- */
- public void setTableGenerator(XmlTableGenerator newTableGenerator)
- {
- if (newTableGenerator != tableGenerator)
- {
- NotificationChain msgs = null;
- if (tableGenerator != null)
- msgs = ((InternalEObject)tableGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE_GENERATOR, null, msgs);
- if (newTableGenerator != null)
- msgs = ((InternalEObject)newTableGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE_GENERATOR, null, msgs);
- msgs = basicSetTableGenerator(newTableGenerator, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE_GENERATOR, newTableGenerator, newTableGenerator));
- }
-
- /**
- * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Queries</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Named Queries</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedQueries()
- * @model containment="true"
- * @generated
- */
- public EList<XmlNamedQuery> getNamedQueries()
- {
- if (namedQueries == null)
- {
- namedQueries = new EObjectContainmentEList<XmlNamedQuery>(XmlNamedQuery.class, this, OrmPackage.XML_ENTITY__NAMED_QUERIES);
- }
- return namedQueries;
- }
-
- /**
- * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Native Queries</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Named Native Queries</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedNativeQueries()
- * @model containment="true"
- * @generated
- */
- public EList<XmlNamedNativeQuery> getNamedNativeQueries()
- {
- if (namedNativeQueries == null)
- {
- namedNativeQueries = new EObjectContainmentEList<XmlNamedNativeQuery>(XmlNamedNativeQuery.class, this, OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES);
- }
- return namedNativeQueries;
- }
-
- /**
- * Returns the value of the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sql Result Set Mappings</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sql Result Set Mappings</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_SqlResultSetMappings()
- * @model containment="true"
- * @generated
- */
- public EList<SqlResultSetMapping> getSqlResultSetMappings()
- {
- if (sqlResultSetMappings == null)
- {
- sqlResultSetMappings = new EObjectContainmentEList<SqlResultSetMapping>(SqlResultSetMapping.class, this, OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS);
- }
- return sqlResultSetMappings;
- }
-
- /**
- * Returns the value of the '<em><b>Exclude Default Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Exclude Default Listeners</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Exclude Default Listeners</em>' attribute.
- * @see #setExcludeDefaultListeners(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_ExcludeDefaultListeners()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isExcludeDefaultListeners()
- {
- return excludeDefaultListeners;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Exclude Default Listeners</em>' attribute.
- * @see #isExcludeDefaultListeners()
- * @generated
- */
- public void setExcludeDefaultListeners(boolean newExcludeDefaultListeners)
- {
- boolean oldExcludeDefaultListeners = excludeDefaultListeners;
- excludeDefaultListeners = newExcludeDefaultListeners;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS, oldExcludeDefaultListeners, excludeDefaultListeners));
- }
-
- /**
- * Returns the value of the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Exclude Superclass Listeners</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Exclude Superclass Listeners</em>' attribute.
- * @see #setExcludeSuperclassListeners(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_ExcludeSuperclassListeners()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isExcludeSuperclassListeners()
- {
- return excludeSuperclassListeners;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Exclude Superclass Listeners</em>' attribute.
- * @see #isExcludeSuperclassListeners()
- * @generated
- */
- public void setExcludeSuperclassListeners(boolean newExcludeSuperclassListeners)
- {
- boolean oldExcludeSuperclassListeners = excludeSuperclassListeners;
- excludeSuperclassListeners = newExcludeSuperclassListeners;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS, oldExcludeSuperclassListeners, excludeSuperclassListeners));
- }
-
- /**
- * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Listeners</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entity Listeners</em>' containment reference.
- * @see #setEntityListeners(EntityListeners)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntity_EntityListeners()
- * @model containment="true"
- * @generated
- */
- public EntityListeners getEntityListeners()
- {
- return entityListeners;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEntityListeners(EntityListeners newEntityListeners, NotificationChain msgs)
- {
- EntityListeners oldEntityListeners = entityListeners;
- entityListeners = newEntityListeners;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ENTITY_LISTENERS, oldEntityListeners, newEntityListeners);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getEntityListeners <em>Entity Listeners</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Entity Listeners</em>' containment reference.
- * @see #getEntityListeners()
- * @generated
- */
- public void setEntityListeners(EntityListeners newEntityListeners)
- {
- if (newEntityListeners != entityListeners)
- {
- NotificationChain msgs = null;
- if (entityListeners != null)
- msgs = ((InternalEObject)entityListeners).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ENTITY_LISTENERS, null, msgs);
- if (newEntityListeners != null)
- msgs = ((InternalEObject)newEntityListeners).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ENTITY_LISTENERS, null, msgs);
- msgs = basicSetEntityListeners(newEntityListeners, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ENTITY_LISTENERS, newEntityListeners, newEntityListeners));
- }
-
- /**
- * Returns the value of the '<em><b>Pre Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Persist</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Persist</em>' containment reference.
- * @see #setPrePersist(PrePersist)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PrePersist()
- * @model containment="true"
- * @generated
- */
- public PrePersist getPrePersist()
- {
- return prePersist;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPrePersist(PrePersist newPrePersist, NotificationChain msgs)
- {
- PrePersist oldPrePersist = prePersist;
- prePersist = newPrePersist;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_PERSIST, oldPrePersist, newPrePersist);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPrePersist <em>Pre Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Persist</em>' containment reference.
- * @see #getPrePersist()
- * @generated
- */
- public void setPrePersist(PrePersist newPrePersist)
- {
- if (newPrePersist != prePersist)
- {
- NotificationChain msgs = null;
- if (prePersist != null)
- msgs = ((InternalEObject)prePersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_PERSIST, null, msgs);
- if (newPrePersist != null)
- msgs = ((InternalEObject)newPrePersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_PERSIST, null, msgs);
- msgs = basicSetPrePersist(newPrePersist, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_PERSIST, newPrePersist, newPrePersist));
- }
-
- /**
- * Returns the value of the '<em><b>Post Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Persist</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Persist</em>' containment reference.
- * @see #setPostPersist(PostPersist)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostPersist()
- * @model containment="true"
- * @generated
- */
- public PostPersist getPostPersist()
- {
- return postPersist;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostPersist(PostPersist newPostPersist, NotificationChain msgs)
- {
- PostPersist oldPostPersist = postPersist;
- postPersist = newPostPersist;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_PERSIST, oldPostPersist, newPostPersist);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPostPersist <em>Post Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Persist</em>' containment reference.
- * @see #getPostPersist()
- * @generated
- */
- public void setPostPersist(PostPersist newPostPersist)
- {
- if (newPostPersist != postPersist)
- {
- NotificationChain msgs = null;
- if (postPersist != null)
- msgs = ((InternalEObject)postPersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_PERSIST, null, msgs);
- if (newPostPersist != null)
- msgs = ((InternalEObject)newPostPersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_PERSIST, null, msgs);
- msgs = basicSetPostPersist(newPostPersist, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_PERSIST, newPostPersist, newPostPersist));
- }
-
- /**
- * Returns the value of the '<em><b>Pre Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Remove</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Remove</em>' containment reference.
- * @see #setPreRemove(PreRemove)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreRemove()
- * @model containment="true"
- * @generated
- */
- public PreRemove getPreRemove()
- {
- return preRemove;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPreRemove(PreRemove newPreRemove, NotificationChain msgs)
- {
- PreRemove oldPreRemove = preRemove;
- preRemove = newPreRemove;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_REMOVE, oldPreRemove, newPreRemove);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPreRemove <em>Pre Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Remove</em>' containment reference.
- * @see #getPreRemove()
- * @generated
- */
- public void setPreRemove(PreRemove newPreRemove)
- {
- if (newPreRemove != preRemove)
- {
- NotificationChain msgs = null;
- if (preRemove != null)
- msgs = ((InternalEObject)preRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_REMOVE, null, msgs);
- if (newPreRemove != null)
- msgs = ((InternalEObject)newPreRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_REMOVE, null, msgs);
- msgs = basicSetPreRemove(newPreRemove, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_REMOVE, newPreRemove, newPreRemove));
- }
-
- /**
- * Returns the value of the '<em><b>Post Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Remove</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Remove</em>' containment reference.
- * @see #setPostRemove(PostRemove)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostRemove()
- * @model containment="true"
- * @generated
- */
- public PostRemove getPostRemove()
- {
- return postRemove;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostRemove(PostRemove newPostRemove, NotificationChain msgs)
- {
- PostRemove oldPostRemove = postRemove;
- postRemove = newPostRemove;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_REMOVE, oldPostRemove, newPostRemove);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPostRemove <em>Post Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Remove</em>' containment reference.
- * @see #getPostRemove()
- * @generated
- */
- public void setPostRemove(PostRemove newPostRemove)
- {
- if (newPostRemove != postRemove)
- {
- NotificationChain msgs = null;
- if (postRemove != null)
- msgs = ((InternalEObject)postRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_REMOVE, null, msgs);
- if (newPostRemove != null)
- msgs = ((InternalEObject)newPostRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_REMOVE, null, msgs);
- msgs = basicSetPostRemove(newPostRemove, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_REMOVE, newPostRemove, newPostRemove));
- }
-
- /**
- * Returns the value of the '<em><b>Pre Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Update</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Update</em>' containment reference.
- * @see #setPreUpdate(PreUpdate)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreUpdate()
- * @model containment="true"
- * @generated
- */
- public PreUpdate getPreUpdate()
- {
- return preUpdate;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPreUpdate(PreUpdate newPreUpdate, NotificationChain msgs)
- {
- PreUpdate oldPreUpdate = preUpdate;
- preUpdate = newPreUpdate;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_UPDATE, oldPreUpdate, newPreUpdate);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPreUpdate <em>Pre Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Update</em>' containment reference.
- * @see #getPreUpdate()
- * @generated
- */
- public void setPreUpdate(PreUpdate newPreUpdate)
- {
- if (newPreUpdate != preUpdate)
- {
- NotificationChain msgs = null;
- if (preUpdate != null)
- msgs = ((InternalEObject)preUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_UPDATE, null, msgs);
- if (newPreUpdate != null)
- msgs = ((InternalEObject)newPreUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_UPDATE, null, msgs);
- msgs = basicSetPreUpdate(newPreUpdate, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_UPDATE, newPreUpdate, newPreUpdate));
- }
-
- /**
- * Returns the value of the '<em><b>Post Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Update</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Update</em>' containment reference.
- * @see #setPostUpdate(PostUpdate)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostUpdate()
- * @model containment="true"
- * @generated
- */
- public PostUpdate getPostUpdate()
- {
- return postUpdate;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostUpdate(PostUpdate newPostUpdate, NotificationChain msgs)
- {
- PostUpdate oldPostUpdate = postUpdate;
- postUpdate = newPostUpdate;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_UPDATE, oldPostUpdate, newPostUpdate);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPostUpdate <em>Post Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Update</em>' containment reference.
- * @see #getPostUpdate()
- * @generated
- */
- public void setPostUpdate(PostUpdate newPostUpdate)
- {
- if (newPostUpdate != postUpdate)
- {
- NotificationChain msgs = null;
- if (postUpdate != null)
- msgs = ((InternalEObject)postUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_UPDATE, null, msgs);
- if (newPostUpdate != null)
- msgs = ((InternalEObject)newPostUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_UPDATE, null, msgs);
- msgs = basicSetPostUpdate(newPostUpdate, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_UPDATE, newPostUpdate, newPostUpdate));
- }
-
- /**
- * Returns the value of the '<em><b>Post Load</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Load</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Load</em>' containment reference.
- * @see #setPostLoad(PostLoad)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostLoad()
- * @model containment="true"
- * @generated
- */
- public PostLoad getPostLoad()
- {
- return postLoad;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPostLoad(PostLoad newPostLoad, NotificationChain msgs)
- {
- PostLoad oldPostLoad = postLoad;
- postLoad = newPostLoad;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_LOAD, oldPostLoad, newPostLoad);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getPostLoad <em>Post Load</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Load</em>' containment reference.
- * @see #getPostLoad()
- * @generated
- */
- public void setPostLoad(PostLoad newPostLoad)
- {
- if (newPostLoad != postLoad)
- {
- NotificationChain msgs = null;
- if (postLoad != null)
- msgs = ((InternalEObject)postLoad).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_LOAD, null, msgs);
- if (newPostLoad != null)
- msgs = ((InternalEObject)newPostLoad).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_LOAD, null, msgs);
- msgs = basicSetPostLoad(newPostLoad, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_LOAD, newPostLoad, newPostLoad));
- }
-
- /**
- * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAttributeOverride> getAttributeOverrides()
- {
- if (attributeOverrides == null)
- {
- attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES);
- }
- return attributeOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Association Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
- * @model containment="true"
- * @generated
- */
- public EList<XmlAssociationOverride> getAssociationOverrides()
- {
- if (associationOverrides == null)
- {
- associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES);
- }
- return associationOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Cacheable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cacheable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cacheable</em>' attribute.
- * @see #setCacheable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlCacheable_2_0_Cacheable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getCacheable()
- {
- return cacheable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity#getCacheable <em>Cacheable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cacheable</em>' attribute.
- * @see #getCacheable()
- * @generated
- */
- public void setCacheable(Boolean newCacheable)
- {
- Boolean oldCacheable = cacheable;
- cacheable = newCacheable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__CACHEABLE, oldCacheable, cacheable));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY__NAMED_QUERIES:
- return ((InternalEList<?>)getNamedQueries()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
- return ((InternalEList<?>)getNamedNativeQueries()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
- return basicSetSequenceGenerator(null, msgs);
- case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
- return basicSetTableGenerator(null, msgs);
- case OrmPackage.XML_ENTITY__PRE_PERSIST:
- return basicSetPrePersist(null, msgs);
- case OrmPackage.XML_ENTITY__POST_PERSIST:
- return basicSetPostPersist(null, msgs);
- case OrmPackage.XML_ENTITY__PRE_REMOVE:
- return basicSetPreRemove(null, msgs);
- case OrmPackage.XML_ENTITY__POST_REMOVE:
- return basicSetPostRemove(null, msgs);
- case OrmPackage.XML_ENTITY__PRE_UPDATE:
- return basicSetPreUpdate(null, msgs);
- case OrmPackage.XML_ENTITY__POST_UPDATE:
- return basicSetPostUpdate(null, msgs);
- case OrmPackage.XML_ENTITY__POST_LOAD:
- return basicSetPostLoad(null, msgs);
- case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
- return ((InternalEList<?>)getAttributeOverrides()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
- return ((InternalEList<?>)getAssociationOverrides()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__ID_CLASS:
- return basicSetIdClass(null, msgs);
- case OrmPackage.XML_ENTITY__TABLE:
- return basicSetTable(null, msgs);
- case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
- return ((InternalEList<?>)getSecondaryTables()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
- return ((InternalEList<?>)getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__INHERITANCE:
- return basicSetInheritance(null, msgs);
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
- return basicSetDiscriminatorColumn(null, msgs);
- case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
- return ((InternalEList<?>)getSqlResultSetMappings()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
- return basicSetEntityListeners(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY__NAMED_QUERIES:
- return getNamedQueries();
- case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
- return getNamedNativeQueries();
- case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
- return getSequenceGenerator();
- case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
- return getTableGenerator();
- case OrmPackage.XML_ENTITY__PRE_PERSIST:
- return getPrePersist();
- case OrmPackage.XML_ENTITY__POST_PERSIST:
- return getPostPersist();
- case OrmPackage.XML_ENTITY__PRE_REMOVE:
- return getPreRemove();
- case OrmPackage.XML_ENTITY__POST_REMOVE:
- return getPostRemove();
- case OrmPackage.XML_ENTITY__PRE_UPDATE:
- return getPreUpdate();
- case OrmPackage.XML_ENTITY__POST_UPDATE:
- return getPostUpdate();
- case OrmPackage.XML_ENTITY__POST_LOAD:
- return getPostLoad();
- case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
- return getAttributeOverrides();
- case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
- return getAssociationOverrides();
- case OrmPackage.XML_ENTITY__CACHEABLE:
- return getCacheable();
- case OrmPackage.XML_ENTITY__ID_CLASS:
- return getIdClass();
- case OrmPackage.XML_ENTITY__NAME:
- return getName();
- case OrmPackage.XML_ENTITY__TABLE:
- return getTable();
- case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
- return getSecondaryTables();
- case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
- return getPrimaryKeyJoinColumns();
- case OrmPackage.XML_ENTITY__INHERITANCE:
- return getInheritance();
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
- return getDiscriminatorValue();
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
- return getDiscriminatorColumn();
- case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
- return getSqlResultSetMappings();
- case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
- return isExcludeDefaultListeners();
- case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
- return isExcludeSuperclassListeners();
- case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
- return getEntityListeners();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY__NAMED_QUERIES:
- getNamedQueries().clear();
- getNamedQueries().addAll((Collection<? extends XmlNamedQuery>)newValue);
- return;
- case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
- getNamedNativeQueries().clear();
- getNamedNativeQueries().addAll((Collection<? extends XmlNamedNativeQuery>)newValue);
- return;
- case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
- setSequenceGenerator((XmlSequenceGenerator)newValue);
- return;
- case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
- setTableGenerator((XmlTableGenerator)newValue);
- return;
- case OrmPackage.XML_ENTITY__PRE_PERSIST:
- setPrePersist((PrePersist)newValue);
- return;
- case OrmPackage.XML_ENTITY__POST_PERSIST:
- setPostPersist((PostPersist)newValue);
- return;
- case OrmPackage.XML_ENTITY__PRE_REMOVE:
- setPreRemove((PreRemove)newValue);
- return;
- case OrmPackage.XML_ENTITY__POST_REMOVE:
- setPostRemove((PostRemove)newValue);
- return;
- case OrmPackage.XML_ENTITY__PRE_UPDATE:
- setPreUpdate((PreUpdate)newValue);
- return;
- case OrmPackage.XML_ENTITY__POST_UPDATE:
- setPostUpdate((PostUpdate)newValue);
- return;
- case OrmPackage.XML_ENTITY__POST_LOAD:
- setPostLoad((PostLoad)newValue);
- return;
- case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
- getAttributeOverrides().clear();
- getAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
- return;
- case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
- getAssociationOverrides().clear();
- getAssociationOverrides().addAll((Collection<? extends XmlAssociationOverride>)newValue);
- return;
- case OrmPackage.XML_ENTITY__CACHEABLE:
- setCacheable((Boolean)newValue);
- return;
- case OrmPackage.XML_ENTITY__ID_CLASS:
- setIdClass((XmlClassReference)newValue);
- return;
- case OrmPackage.XML_ENTITY__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_ENTITY__TABLE:
- setTable((XmlTable)newValue);
- return;
- case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
- getSecondaryTables().clear();
- getSecondaryTables().addAll((Collection<? extends XmlSecondaryTable>)newValue);
- return;
- case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
- getPrimaryKeyJoinColumns().clear();
- getPrimaryKeyJoinColumns().addAll((Collection<? extends XmlPrimaryKeyJoinColumn>)newValue);
- return;
- case OrmPackage.XML_ENTITY__INHERITANCE:
- setInheritance((Inheritance)newValue);
- return;
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
- setDiscriminatorValue((String)newValue);
- return;
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
- setDiscriminatorColumn((XmlDiscriminatorColumn)newValue);
- return;
- case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
- getSqlResultSetMappings().clear();
- getSqlResultSetMappings().addAll((Collection<? extends SqlResultSetMapping>)newValue);
- return;
- case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
- setExcludeDefaultListeners((Boolean)newValue);
- return;
- case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
- setExcludeSuperclassListeners((Boolean)newValue);
- return;
- case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
- setEntityListeners((EntityListeners)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY__NAMED_QUERIES:
- getNamedQueries().clear();
- return;
- case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
- getNamedNativeQueries().clear();
- return;
- case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
- setSequenceGenerator((XmlSequenceGenerator)null);
- return;
- case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
- setTableGenerator((XmlTableGenerator)null);
- return;
- case OrmPackage.XML_ENTITY__PRE_PERSIST:
- setPrePersist((PrePersist)null);
- return;
- case OrmPackage.XML_ENTITY__POST_PERSIST:
- setPostPersist((PostPersist)null);
- return;
- case OrmPackage.XML_ENTITY__PRE_REMOVE:
- setPreRemove((PreRemove)null);
- return;
- case OrmPackage.XML_ENTITY__POST_REMOVE:
- setPostRemove((PostRemove)null);
- return;
- case OrmPackage.XML_ENTITY__PRE_UPDATE:
- setPreUpdate((PreUpdate)null);
- return;
- case OrmPackage.XML_ENTITY__POST_UPDATE:
- setPostUpdate((PostUpdate)null);
- return;
- case OrmPackage.XML_ENTITY__POST_LOAD:
- setPostLoad((PostLoad)null);
- return;
- case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
- getAttributeOverrides().clear();
- return;
- case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
- getAssociationOverrides().clear();
- return;
- case OrmPackage.XML_ENTITY__CACHEABLE:
- setCacheable(CACHEABLE_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY__ID_CLASS:
- setIdClass((XmlClassReference)null);
- return;
- case OrmPackage.XML_ENTITY__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY__TABLE:
- setTable((XmlTable)null);
- return;
- case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
- getSecondaryTables().clear();
- return;
- case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
- getPrimaryKeyJoinColumns().clear();
- return;
- case OrmPackage.XML_ENTITY__INHERITANCE:
- setInheritance((Inheritance)null);
- return;
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
- setDiscriminatorValue(DISCRIMINATOR_VALUE_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
- setDiscriminatorColumn((XmlDiscriminatorColumn)null);
- return;
- case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
- getSqlResultSetMappings().clear();
- return;
- case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
- setExcludeDefaultListeners(EXCLUDE_DEFAULT_LISTENERS_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
- setExcludeSuperclassListeners(EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
- setEntityListeners((EntityListeners)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY__NAMED_QUERIES:
- return namedQueries != null && !namedQueries.isEmpty();
- case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
- return namedNativeQueries != null && !namedNativeQueries.isEmpty();
- case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
- return sequenceGenerator != null;
- case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
- return tableGenerator != null;
- case OrmPackage.XML_ENTITY__PRE_PERSIST:
- return prePersist != null;
- case OrmPackage.XML_ENTITY__POST_PERSIST:
- return postPersist != null;
- case OrmPackage.XML_ENTITY__PRE_REMOVE:
- return preRemove != null;
- case OrmPackage.XML_ENTITY__POST_REMOVE:
- return postRemove != null;
- case OrmPackage.XML_ENTITY__PRE_UPDATE:
- return preUpdate != null;
- case OrmPackage.XML_ENTITY__POST_UPDATE:
- return postUpdate != null;
- case OrmPackage.XML_ENTITY__POST_LOAD:
- return postLoad != null;
- case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
- return attributeOverrides != null && !attributeOverrides.isEmpty();
- case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
- return associationOverrides != null && !associationOverrides.isEmpty();
- case OrmPackage.XML_ENTITY__CACHEABLE:
- return CACHEABLE_EDEFAULT == null ? cacheable != null : !CACHEABLE_EDEFAULT.equals(cacheable);
- case OrmPackage.XML_ENTITY__ID_CLASS:
- return idClass != null;
- case OrmPackage.XML_ENTITY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_ENTITY__TABLE:
- return table != null;
- case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
- return secondaryTables != null && !secondaryTables.isEmpty();
- case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
- return primaryKeyJoinColumns != null && !primaryKeyJoinColumns.isEmpty();
- case OrmPackage.XML_ENTITY__INHERITANCE:
- return inheritance != null;
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
- return DISCRIMINATOR_VALUE_EDEFAULT == null ? discriminatorValue != null : !DISCRIMINATOR_VALUE_EDEFAULT.equals(discriminatorValue);
- case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
- return discriminatorColumn != null;
- case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
- return sqlResultSetMappings != null && !sqlResultSetMappings.isEmpty();
- case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
- return excludeDefaultListeners != EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
- case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
- return excludeSuperclassListeners != EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
- case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
- return entityListeners != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlQueryContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__NAMED_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES;
- case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES;
- default: return -1;
- }
- }
- if (baseClass == XmlGeneratorContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR;
- case OrmPackage.XML_ENTITY__TABLE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR;
- default: return -1;
- }
- }
- if (baseClass == XmlEventMethodContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__PRE_PERSIST: return OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_PERSIST;
- case OrmPackage.XML_ENTITY__POST_PERSIST: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_PERSIST;
- case OrmPackage.XML_ENTITY__PRE_REMOVE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_REMOVE;
- case OrmPackage.XML_ENTITY__POST_REMOVE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_REMOVE;
- case OrmPackage.XML_ENTITY__PRE_UPDATE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_UPDATE;
- case OrmPackage.XML_ENTITY__POST_UPDATE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_UPDATE;
- case OrmPackage.XML_ENTITY__POST_LOAD: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_LOAD;
- default: return -1;
- }
- }
- if (baseClass == XmlAttributeOverrideContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlAssociationOverrideContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlCacheable_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__CACHEABLE: return OrmV2_0Package.XML_CACHEABLE_20__CACHEABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlEntity_2_0.class)
- {
- switch (derivedFeatureID)
- {
- default: return -1;
- }
- }
- if (baseClass == XmlIdClassContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY__ID_CLASS: return OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlQueryContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES: return OrmPackage.XML_ENTITY__NAMED_QUERIES;
- case OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES: return OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES;
- default: return -1;
- }
- }
- if (baseClass == XmlGeneratorContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR: return OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR;
- case OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR: return OrmPackage.XML_ENTITY__TABLE_GENERATOR;
- default: return -1;
- }
- }
- if (baseClass == XmlEventMethodContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_PERSIST: return OrmPackage.XML_ENTITY__PRE_PERSIST;
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_PERSIST: return OrmPackage.XML_ENTITY__POST_PERSIST;
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_REMOVE: return OrmPackage.XML_ENTITY__PRE_REMOVE;
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_REMOVE: return OrmPackage.XML_ENTITY__POST_REMOVE;
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_UPDATE: return OrmPackage.XML_ENTITY__PRE_UPDATE;
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_UPDATE: return OrmPackage.XML_ENTITY__POST_UPDATE;
- case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_LOAD: return OrmPackage.XML_ENTITY__POST_LOAD;
- default: return -1;
- }
- }
- if (baseClass == XmlAttributeOverrideContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlAssociationOverrideContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES;
- default: return -1;
- }
- }
- if (baseClass == XmlCacheable_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_CACHEABLE_20__CACHEABLE: return OrmPackage.XML_ENTITY__CACHEABLE;
- default: return -1;
- }
- }
- if (baseClass == XmlEntity_2_0.class)
- {
- switch (baseFeatureID)
- {
- default: return -1;
- }
- }
- if (baseClass == XmlIdClassContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS: return OrmPackage.XML_ENTITY__ID_CLASS;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (cacheable: ");
- result.append(cacheable);
- result.append(", name: ");
- result.append(name);
- result.append(", discriminatorValue: ");
- result.append(discriminatorValue);
- result.append(", excludeDefaultListeners: ");
- result.append(excludeDefaultListeners);
- result.append(", excludeSuperclassListeners: ");
- result.append(excludeSuperclassListeners);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getDiscriminatorValueTextRange() {
- return getElementTextRange(JPA.DISCRIMINATOR_VALUE);
- }
-
- public TextRange getInheritanceStrategyTextRange() {
- return getInheritance() != null ? getInheritance().getStrategyTextRange() : getValidationTextRange();
- }
-
- public TextRange getCacheableTextRange() {
- return getAttributeTextRange(JPA2_0.CACHEABLE);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildClassTranslator(),
- buildAccessTranslator(),
- buildCacheableTranslator(),
- buildMetadataCompleteTranslator(),
- buildDescriptionTranslator(),
- buildTableTranslator(),
- buildSecondaryTableTranslator(),
- buildPrimaryKeyJoinColumnTranslator(),
- buildIdClassTranslator(),
- buildInheritanceTranslator(),
- buildDiscriminatorValueTranslator(),
- buildDiscriminatorColumnTranslator(),
- buildSequenceGeneratorTranslator(),
- buildTableGeneratorTranslator(),
- buildNamedQueryTranslator(),
- buildNamedNativeQueryTranslator(),
- buildSqlResultSetMappingTranslator(),
- buildExcludeDefaultListenersTranslator(),
- buildExcludeSuperclassListenersTranslator(),
- buildEntityListenersTranslator(),
- PrePersist.buildTranslator(),
- PostPersist.buildTranslator(),
- PreRemove.buildTranslator(),
- PostRemove.buildTranslator(),
- PreUpdate.buildTranslator(),
- PostUpdate.buildTranslator(),
- PostLoad.buildTranslator(),
- buildAttributeOverrideTranslator(),
- buildAssociationOverrideTranslator(),
- Attributes.buildTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlEntity_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildCacheableTranslator() {
- return new Translator(JPA2_0.CACHEABLE, OrmV2_0Package.eINSTANCE.getXmlCacheable_2_0_Cacheable(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildTableTranslator() {
- return XmlTable.buildTranslator(JPA.TABLE, OrmPackage.eINSTANCE.getXmlEntity_Table());
- }
-
- protected static Translator buildSecondaryTableTranslator() {
- return XmlSecondaryTable.buildTranslator(JPA.SECONDARY_TABLE, OrmPackage.eINSTANCE.getXmlEntity_SecondaryTables());
- }
-
- protected static Translator buildPrimaryKeyJoinColumnTranslator() {
- return XmlPrimaryKeyJoinColumn.buildTranslator(JPA.PRIMARY_KEY_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlEntity_PrimaryKeyJoinColumns());
- }
-
- protected static Translator buildIdClassTranslator() {
- return XmlClassReference.buildTranslator(JPA.ID_CLASS, OrmPackage.eINSTANCE.getXmlIdClassContainer_IdClass());
- }
-
- protected static Translator buildInheritanceTranslator() {
- return Inheritance.buildTranslator(JPA.INHERITANCE, OrmPackage.eINSTANCE.getXmlEntity_Inheritance());
- }
-
- protected static Translator buildDiscriminatorValueTranslator() {
- return new Translator(JPA.DISCRIMINATOR_VALUE, OrmPackage.eINSTANCE.getXmlEntity_DiscriminatorValue());
- }
-
- protected static Translator buildDiscriminatorColumnTranslator() {
- return XmlDiscriminatorColumn.buildTranslator(JPA.DISCRIMINATOR_COLUMN, OrmPackage.eINSTANCE.getXmlEntity_DiscriminatorColumn());
- }
-
- protected static Translator buildSequenceGeneratorTranslator() {
- return XmlSequenceGenerator.buildTranslator(JPA.SEQUENCE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_SequenceGenerator());
- }
-
- protected static Translator buildTableGeneratorTranslator() {
- return XmlTableGenerator.buildTranslator(JPA.TABLE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_TableGenerator());
- }
-
- protected static Translator buildNamedQueryTranslator() {
- return XmlNamedQuery.buildTranslator(JPA.NAMED_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedQueries());
- }
-
- protected static Translator buildNamedNativeQueryTranslator() {
- return XmlNamedNativeQuery.buildTranslator(JPA.NAMED_NATIVE_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedNativeQueries());
- }
-
- protected static Translator buildSqlResultSetMappingTranslator() {
- return SqlResultSetMapping.buildTranslator(JPA.SQL_RESULT_SET_MAPPING, OrmPackage.eINSTANCE.getXmlEntity_SqlResultSetMappings());
- }
-
- protected static Translator buildExcludeDefaultListenersTranslator() {
- return new EmptyTagBooleanTranslator(JPA.EXCLUDE_DEFAULT_LISTENERS, OrmPackage.eINSTANCE.getXmlEntity_ExcludeDefaultListeners());
- }
-
- protected static Translator buildExcludeSuperclassListenersTranslator() {
- return new EmptyTagBooleanTranslator(JPA.EXCLUDE_SUPERCLASS_LISTENERS, OrmPackage.eINSTANCE.getXmlEntity_ExcludeSuperclassListeners());
- }
-
- protected static Translator buildEntityListenersTranslator() {
- return EntityListeners.buildTranslator(JPA.ENTITY_LISTENERS, OrmPackage.eINSTANCE.getXmlEntity_EntityListeners());
- }
-
- protected static Translator buildPrePersistTranslator() {
- return PrePersist.buildTranslator();
- }
-
- protected static Translator buildPostPersistTranslator() {
- return PostPersist.buildTranslator();
- }
-
- protected static Translator buildPreRemoveTranslator() {
- return PreRemove.buildTranslator();
- }
-
- protected static Translator buildPostRemoveTranslator() {
- return PostRemove.buildTranslator();
- }
-
- protected static Translator buildPreUpdateTranslator() {
- return PreUpdate.buildTranslator();
- }
-
- protected static Translator buildPostUpdateTranslator() {
- return PostUpdate.buildTranslator();
- }
-
- protected static Translator buildPostLoadTranslator() {
- return PostLoad.buildTranslator();
- }
-
- protected static Translator buildAttributeOverrideTranslator() {
- return XmlAttributeOverride.buildTranslator(JPA.ATTRIBUTE_OVERRIDE, OrmPackage.eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides());
- }
-
- protected static Translator buildAssociationOverrideTranslator() {
- return XmlAssociationOverride.buildTranslator(JPA.ASSOCIATION_OVERRIDE, OrmPackage.eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java
deleted file mode 100644
index 03dac0193b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java
+++ /dev/null
@@ -1,1137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleRootTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Entity Mappings</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata <em>Persistence Unit Metadata</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPackage <em>Package</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSchema <em>Schema</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getCatalog <em>Catalog</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSequenceGenerators <em>Sequence Generators</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getTableGenerators <em>Table Generators</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getMappedSuperclasses <em>Mapped Superclasses</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getEntities <em>Entities</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getEmbeddables <em>Embeddables</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings()
- * @model kind="class"
- * @generated
- */
-public class XmlEntityMappings extends AbstractJpaRootEObject implements XmlQueryContainer, XmlAccessHolder
-{
- /**
- * The cached value of the '{@link #getNamedQueries() <em>Named Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNamedQueries()
- * @generated
- * @ordered
- */
- protected EList<XmlNamedQuery> namedQueries;
-
- /**
- * The cached value of the '{@link #getNamedNativeQueries() <em>Named Native Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNamedNativeQueries()
- * @generated
- * @ordered
- */
- protected EList<XmlNamedNativeQuery> namedNativeQueries;
-
- /**
- * The default value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected static final String ACCESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected String access = ACCESS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getPersistenceUnitMetadata() <em>Persistence Unit Metadata</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPersistenceUnitMetadata()
- * @generated
- * @ordered
- */
- protected XmlPersistenceUnitMetadata persistenceUnitMetadata;
-
- /**
- * The default value of the '{@link #getPackage() <em>Package</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPackage()
- * @generated
- * @ordered
- */
- protected static final String PACKAGE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPackage() <em>Package</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPackage()
- * @generated
- * @ordered
- */
- protected String package_ = PACKAGE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected String schema = SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected String catalog = CATALOG_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getSequenceGenerators() <em>Sequence Generators</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceGenerators()
- * @generated
- * @ordered
- */
- protected EList<XmlSequenceGenerator> sequenceGenerators;
-
- /**
- * The cached value of the '{@link #getTableGenerators() <em>Table Generators</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTableGenerators()
- * @generated
- * @ordered
- */
- protected EList<XmlTableGenerator> tableGenerators;
-
- /**
- * The cached value of the '{@link #getSqlResultSetMappings() <em>Sql Result Set Mappings</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSqlResultSetMappings()
- * @generated
- * @ordered
- */
- protected EList<SqlResultSetMapping> sqlResultSetMappings;
-
- /**
- * The cached value of the '{@link #getMappedSuperclasses() <em>Mapped Superclasses</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedSuperclasses()
- * @generated
- * @ordered
- */
- protected EList<XmlMappedSuperclass> mappedSuperclasses;
-
- /**
- * The cached value of the '{@link #getEntities() <em>Entities</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntities()
- * @generated
- * @ordered
- */
- protected EList<XmlEntity> entities;
-
- /**
- * The cached value of the '{@link #getEmbeddables() <em>Embeddables</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEmbeddables()
- * @generated
- * @ordered
- */
- protected EList<XmlEmbeddable> embeddables;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlEntityMappings()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ENTITY_MAPPINGS;
- }
-
- /**
- * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Queries</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Named Queries</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedQueries()
- * @model containment="true"
- * @generated
- */
- public EList<XmlNamedQuery> getNamedQueries()
- {
- if (namedQueries == null)
- {
- namedQueries = new EObjectContainmentEList<XmlNamedQuery>(XmlNamedQuery.class, this, OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES);
- }
- return namedQueries;
- }
-
- /**
- * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Native Queries</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Named Native Queries</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedNativeQueries()
- * @model containment="true"
- * @generated
- */
- public EList<XmlNamedNativeQuery> getNamedNativeQueries()
- {
- if (namedNativeQueries == null)
- {
- namedNativeQueries = new EObjectContainmentEList<XmlNamedNativeQuery>(XmlNamedNativeQuery.class, this, OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES);
- }
- return namedNativeQueries;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Persistence Unit Metadata</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XmlPersistence Unit Metadata</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Persistence Unit Metadata</em>' containment reference.
- * @see #setPersistenceUnitMetadata(XmlPersistenceUnitMetadata)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_PersistenceUnitMetadata()
- * @model containment="true"
- * @generated
- */
- public XmlPersistenceUnitMetadata getPersistenceUnitMetadata()
- {
- return persistenceUnitMetadata;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPersistenceUnitMetadata(XmlPersistenceUnitMetadata newPersistenceUnitMetadata, NotificationChain msgs)
- {
- XmlPersistenceUnitMetadata oldPersistenceUnitMetadata = persistenceUnitMetadata;
- persistenceUnitMetadata = newPersistenceUnitMetadata;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, oldPersistenceUnitMetadata, newPersistenceUnitMetadata);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata <em>Persistence Unit Metadata</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Persistence Unit Metadata</em>' containment reference.
- * @see #getPersistenceUnitMetadata()
- * @generated
- */
- public void setPersistenceUnitMetadata(XmlPersistenceUnitMetadata newPersistenceUnitMetadata)
- {
- if (newPersistenceUnitMetadata != persistenceUnitMetadata)
- {
- NotificationChain msgs = null;
- if (persistenceUnitMetadata != null)
- msgs = ((InternalEObject)persistenceUnitMetadata).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, null, msgs);
- if (newPersistenceUnitMetadata != null)
- msgs = ((InternalEObject)newPersistenceUnitMetadata).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, null, msgs);
- msgs = basicSetPersistenceUnitMetadata(newPersistenceUnitMetadata, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, newPersistenceUnitMetadata, newPersistenceUnitMetadata));
- }
-
- /**
- * Returns the value of the '<em><b>Package</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Package</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Package</em>' attribute.
- * @see #setPackage(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_Package()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getPackage()
- {
- return package_;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getPackage <em>Package</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Package</em>' attribute.
- * @see #getPackage()
- * @generated
- */
- public void setPackage(String newPackage)
- {
- String oldPackage = package_;
- package_ = newPackage;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE, oldPackage, package_));
- }
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see #setSchema(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_Schema()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getSchema()
- {
- return schema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getSchema <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema</em>' attribute.
- * @see #getSchema()
- * @generated
- */
- public void setSchema(String newSchema)
- {
- String oldSchema = schema;
- schema = newSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA, oldSchema, schema));
- }
-
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see #setCatalog(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_Catalog()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getCatalog()
- {
- return catalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getCatalog <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Catalog</em>' attribute.
- * @see #getCatalog()
- * @generated
- */
- public void setCatalog(String newCatalog)
- {
- String oldCatalog = catalog;
- catalog = newCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__CATALOG, oldCatalog, catalog));
- }
-
- /**
- * Returns the value of the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Access</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Access</em>' attribute.
- * @see #setAccess(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getAccess()
- {
- return access;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings#getAccess <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Access</em>' attribute.
- * @see #getAccess()
- * @generated
- */
- public void setAccess(String newAccess)
- {
- String oldAccess = access;
- access = newAccess;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__ACCESS, oldAccess, access));
- }
-
- /**
- * Returns the value of the '<em><b>Sequence Generators</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Generators</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Generators</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_SequenceGenerators()
- * @model containment="true"
- * @generated
- */
- public EList<XmlSequenceGenerator> getSequenceGenerators()
- {
- if (sequenceGenerators == null)
- {
- sequenceGenerators = new EObjectContainmentEList<XmlSequenceGenerator>(XmlSequenceGenerator.class, this, OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS);
- }
- return sequenceGenerators;
- }
-
- /**
- * Returns the value of the '<em><b>Table Generators</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table Generators</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table Generators</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_TableGenerators()
- * @model containment="true"
- * @generated
- */
- public EList<XmlTableGenerator> getTableGenerators()
- {
- if (tableGenerators == null)
- {
- tableGenerators = new EObjectContainmentEList<XmlTableGenerator>(XmlTableGenerator.class, this, OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS);
- }
- return tableGenerators;
- }
-
- /**
- * Returns the value of the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.SqlResultSetMapping}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sql Result Set Mappings</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sql Result Set Mappings</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_SqlResultSetMappings()
- * @model containment="true"
- * @generated
- */
- public EList<SqlResultSetMapping> getSqlResultSetMappings()
- {
- if (sqlResultSetMappings == null)
- {
- sqlResultSetMappings = new EObjectContainmentEList<SqlResultSetMapping>(SqlResultSetMapping.class, this, OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS);
- }
- return sqlResultSetMappings;
- }
-
- /**
- * Returns the value of the '<em><b>Mapped Superclasses</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapped Superclasses</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapped Superclasses</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_MappedSuperclasses()
- * @model containment="true"
- * @generated
- */
- public EList<XmlMappedSuperclass> getMappedSuperclasses()
- {
- if (mappedSuperclasses == null)
- {
- mappedSuperclasses = new EObjectContainmentEList<XmlMappedSuperclass>(XmlMappedSuperclass.class, this, OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES);
- }
- return mappedSuperclasses;
- }
-
- /**
- * Returns the value of the '<em><b>Entities</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlEntity}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entities</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entities</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_Entities()
- * @model containment="true"
- * @generated
- */
- public EList<XmlEntity> getEntities()
- {
- if (entities == null)
- {
- entities = new EObjectContainmentEList<XmlEntity>(XmlEntity.class, this, OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES);
- }
- return entities;
- }
-
- /**
- * Returns the value of the '<em><b>Embeddables</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Embeddables</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Embeddables</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEntityMappings_Embeddables()
- * @model containment="true"
- * @generated
- */
- public EList<XmlEmbeddable> getEmbeddables()
- {
- if (embeddables == null)
- {
- embeddables = new EObjectContainmentEList<XmlEmbeddable>(XmlEmbeddable.class, this, OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES);
- }
- return embeddables;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
- return ((InternalEList<?>)getNamedQueries()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
- return ((InternalEList<?>)getNamedNativeQueries()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
- return basicSetPersistenceUnitMetadata(null, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
- return ((InternalEList<?>)getSequenceGenerators()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
- return ((InternalEList<?>)getTableGenerators()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
- return ((InternalEList<?>)getSqlResultSetMappings()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
- return ((InternalEList<?>)getMappedSuperclasses()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
- return ((InternalEList<?>)getEntities()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
- return ((InternalEList<?>)getEmbeddables()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
- return getNamedQueries();
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
- return getNamedNativeQueries();
- case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
- return getAccess();
- case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
- return getPersistenceUnitMetadata();
- case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
- return getPackage();
- case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
- return getSchema();
- case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
- return getCatalog();
- case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
- return getSequenceGenerators();
- case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
- return getTableGenerators();
- case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
- return getSqlResultSetMappings();
- case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
- return getMappedSuperclasses();
- case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
- return getEntities();
- case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
- return getEmbeddables();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
- getNamedQueries().clear();
- getNamedQueries().addAll((Collection<? extends XmlNamedQuery>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
- getNamedNativeQueries().clear();
- getNamedNativeQueries().addAll((Collection<? extends XmlNamedNativeQuery>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
- setAccess((String)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
- setPersistenceUnitMetadata((XmlPersistenceUnitMetadata)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
- setPackage((String)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
- setSchema((String)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
- setCatalog((String)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
- getSequenceGenerators().clear();
- getSequenceGenerators().addAll((Collection<? extends XmlSequenceGenerator>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
- getTableGenerators().clear();
- getTableGenerators().addAll((Collection<? extends XmlTableGenerator>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
- getSqlResultSetMappings().clear();
- getSqlResultSetMappings().addAll((Collection<? extends SqlResultSetMapping>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
- getMappedSuperclasses().clear();
- getMappedSuperclasses().addAll((Collection<? extends XmlMappedSuperclass>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
- getEntities().clear();
- getEntities().addAll((Collection<? extends XmlEntity>)newValue);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
- getEmbeddables().clear();
- getEmbeddables().addAll((Collection<? extends XmlEmbeddable>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
- getNamedQueries().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
- getNamedNativeQueries().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
- setAccess(ACCESS_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
- setPersistenceUnitMetadata((XmlPersistenceUnitMetadata)null);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
- setPackage(PACKAGE_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
- setSchema(SCHEMA_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
- setCatalog(CATALOG_EDEFAULT);
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
- getSequenceGenerators().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
- getTableGenerators().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
- getSqlResultSetMappings().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
- getMappedSuperclasses().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
- getEntities().clear();
- return;
- case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
- getEmbeddables().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
- return namedQueries != null && !namedQueries.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
- return namedNativeQueries != null && !namedNativeQueries.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
- return ACCESS_EDEFAULT == null ? access != null : !ACCESS_EDEFAULT.equals(access);
- case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
- return persistenceUnitMetadata != null;
- case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
- return PACKAGE_EDEFAULT == null ? package_ != null : !PACKAGE_EDEFAULT.equals(package_);
- case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
- return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
- case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
- return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
- case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
- return sequenceGenerators != null && !sequenceGenerators.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
- return tableGenerators != null && !tableGenerators.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
- return sqlResultSetMappings != null && !sqlResultSetMappings.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
- return mappedSuperclasses != null && !mappedSuperclasses.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
- return entities != null && !entities.isEmpty();
- case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
- return embeddables != null && !embeddables.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlQueryContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES;
- case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES;
- default: return -1;
- }
- }
- if (baseClass == XmlAccessHolder.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS: return OrmPackage.XML_ACCESS_HOLDER__ACCESS;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlQueryContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES: return OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES;
- case OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES: return OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES;
- default: return -1;
- }
- }
- if (baseClass == XmlAccessHolder.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ACCESS_HOLDER__ACCESS: return OrmPackage.XML_ENTITY_MAPPINGS__ACCESS;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- // **************** overrides **********************************************
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (access: ");
- result.append(access);
- result.append(", description: ");
- result.append(description);
- result.append(", package: ");
- result.append(package_);
- result.append(", schema: ");
- result.append(schema);
- result.append(", catalog: ");
- result.append(catalog);
- result.append(')');
- return result.toString();
- }
-
- public List<XmlTypeMapping> getTypeMappings() {
- // convert lists to arrays to avoid ConcurrentModificationException while adding to result list
- ArrayList<XmlTypeMapping> typeMappings = new ArrayList<XmlTypeMapping>();
- CollectionTools.addAll(typeMappings, this.getMappedSuperclasses().toArray(EMPTY_XML_TYPE_MAPPING_ARRAY));
- CollectionTools.addAll(typeMappings, this.getEntities().toArray(EMPTY_XML_TYPE_MAPPING_ARRAY));
- CollectionTools.addAll(typeMappings, this.getEmbeddables().toArray(EMPTY_XML_TYPE_MAPPING_ARRAY));
- return typeMappings;
- }
-
- private static final XmlTypeMapping[] EMPTY_XML_TYPE_MAPPING_ARRAY = new XmlTypeMapping[0];
-
-
- // **************** version -> schema location mapping ********************
-
- private static String namespace = JPA.SCHEMA_NAMESPACE;
-
- @Override
- protected String getNamespace() {
- return namespace;
- }
-
- private static Map<String, String> versionsToSchemaLocations = buildVersionsToSchemaLocations();
-
- private static Map<String, String> buildVersionsToSchemaLocations() {
- Map<String, String> map = new HashMap<String, String>();
- map.put(JPA.SCHEMA_VERSION, JPA.SCHEMA_LOCATION);
- map.put(JPA2_0.SCHEMA_VERSION, JPA2_0.SCHEMA_LOCATION);
- return map;
- }
-
- @Override
- protected String getSchemaLocationForVersion(String version) {
- return versionsToSchemaLocations.get(version);
- }
-
-
- // **************** translators *******************************************
-
- public static Translator getRootTranslator() {
- return ROOT_TRANSLATOR;
- }
-
- private static final Translator ROOT_TRANSLATOR = buildRootTranslator();
-
- private static Translator buildRootTranslator() {
- return new SimpleRootTranslator(
- JPA.ENTITY_MAPPINGS,
- OrmPackage.eINSTANCE.getXmlEntityMappings(),
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildVersionTranslator(versionsToSchemaLocations),
- buildNamespaceTranslator(namespace),
- buildSchemaNamespaceTranslator(),
- buildSchemaLocationTranslator(namespace, versionsToSchemaLocations),
- buildDescriptionTranslator(),
- XmlPersistenceUnitMetadata.buildTranslator(JPA.PERSISTENCE_UNIT_METADATA, OrmPackage.eINSTANCE.getXmlEntityMappings_PersistenceUnitMetadata()),
- buildPackageTranslator(),
- buildSchemaTranslator(),
- buildCatalogTranslator(),
- buildAccessTranslator(),
- XmlSequenceGenerator.buildTranslator(JPA.SEQUENCE_GENERATOR, OrmPackage.eINSTANCE.getXmlEntityMappings_SequenceGenerators()),
- XmlTableGenerator.buildTranslator(JPA.TABLE_GENERATOR, OrmPackage.eINSTANCE.getXmlEntityMappings_TableGenerators()),
- XmlNamedQuery.buildTranslator(JPA.NAMED_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedQueries()),
- XmlNamedNativeQuery.buildTranslator(JPA.NAMED_NATIVE_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedNativeQueries()),
- SqlResultSetMapping.buildTranslator(JPA.SQL_RESULT_SET_MAPPING, OrmPackage.eINSTANCE.getXmlEntityMappings_SqlResultSetMappings()),
- XmlMappedSuperclass.buildTranslator(JPA.MAPPED_SUPERCLASS, OrmPackage.eINSTANCE.getXmlEntityMappings_MappedSuperclasses()),
- XmlEntity.buildTranslator(JPA.ENTITY, OrmPackage.eINSTANCE.getXmlEntityMappings_Entities()),
- XmlEmbeddable.buildTranslator(JPA.EMBEDDABLE, OrmPackage.eINSTANCE.getXmlEntityMappings_Embeddables()),
- };
- }
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmPackage.eINSTANCE.getXmlEntityMappings_Description());
- }
-
- protected static Translator buildPackageTranslator() {
- return new Translator(JPA.PACKAGE, OrmPackage.eINSTANCE.getXmlEntityMappings_Package());
- }
-
- protected static Translator buildSchemaTranslator() {
- return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getXmlEntityMappings_Schema());
- }
-
- protected static Translator buildCatalogTranslator() {
- return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getXmlEntityMappings_Catalog());
- }
-
- protected static Translator buildAccessTranslator() {
- return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access());
- }
-
-
- // ********** refactorings **********
-
- public ReplaceEdit createRenamePackageEdit(String newName) {
- int offset = getElementNode(JPA.PACKAGE).getStartStructuredDocumentRegion().getEndOffset();
- return new ReplaceEdit(offset, this.package_.length(), newName);
- }
-
- // *********** content assist *********
-
- public boolean schemaTouches(int pos) {
- TextRange textRange = this.getElementCodeAssistTextRange(JPA.SCHEMA);
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean catalogTouches(int pos) {
- TextRange textRange = this.getElementCodeAssistTextRange(JPA.CATALOG);
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean packageTouches(int pos) {
- TextRange textRange = this.getElementCodeAssistTextRange(JPA.PACKAGE);
- return (textRange != null) && (textRange.touches(pos));
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEventMethodContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEventMethodContainer.java
deleted file mode 100644
index 9ecc87ac43..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEventMethodContainer.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c)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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Event Method Container</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPrePersist <em>Pre Persist</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostPersist <em>Post Persist</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreRemove <em>Pre Remove</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostRemove <em>Post Remove</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreUpdate <em>Pre Update</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostUpdate <em>Post Update</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostLoad <em>Post Load</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlEventMethodContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Pre Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Persist</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Persist</em>' containment reference.
- * @see #setPrePersist(PrePersist)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PrePersist()
- * @model containment="true"
- * @generated
- */
- PrePersist getPrePersist();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPrePersist <em>Pre Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Persist</em>' containment reference.
- * @see #getPrePersist()
- * @generated
- */
- void setPrePersist(PrePersist value);
-
- /**
- * Returns the value of the '<em><b>Post Persist</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Persist</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Persist</em>' containment reference.
- * @see #setPostPersist(PostPersist)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostPersist()
- * @model containment="true"
- * @generated
- */
- PostPersist getPostPersist();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostPersist <em>Post Persist</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Persist</em>' containment reference.
- * @see #getPostPersist()
- * @generated
- */
- void setPostPersist(PostPersist value);
-
- /**
- * Returns the value of the '<em><b>Pre Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Remove</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Remove</em>' containment reference.
- * @see #setPreRemove(PreRemove)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreRemove()
- * @model containment="true"
- * @generated
- */
- PreRemove getPreRemove();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreRemove <em>Pre Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Remove</em>' containment reference.
- * @see #getPreRemove()
- * @generated
- */
- void setPreRemove(PreRemove value);
-
- /**
- * Returns the value of the '<em><b>Post Remove</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Remove</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Remove</em>' containment reference.
- * @see #setPostRemove(PostRemove)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostRemove()
- * @model containment="true"
- * @generated
- */
- PostRemove getPostRemove();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostRemove <em>Post Remove</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Remove</em>' containment reference.
- * @see #getPostRemove()
- * @generated
- */
- void setPostRemove(PostRemove value);
-
- /**
- * Returns the value of the '<em><b>Pre Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pre Update</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pre Update</em>' containment reference.
- * @see #setPreUpdate(PreUpdate)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreUpdate()
- * @model containment="true"
- * @generated
- */
- PreUpdate getPreUpdate();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPreUpdate <em>Pre Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pre Update</em>' containment reference.
- * @see #getPreUpdate()
- * @generated
- */
- void setPreUpdate(PreUpdate value);
-
- /**
- * Returns the value of the '<em><b>Post Update</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Update</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Update</em>' containment reference.
- * @see #setPostUpdate(PostUpdate)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostUpdate()
- * @model containment="true"
- * @generated
- */
- PostUpdate getPostUpdate();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostUpdate <em>Post Update</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Update</em>' containment reference.
- * @see #getPostUpdate()
- * @generated
- */
- void setPostUpdate(PostUpdate value);
-
- /**
- * Returns the value of the '<em><b>Post Load</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Post Load</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Post Load</em>' containment reference.
- * @see #setPostLoad(PostLoad)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostLoad()
- * @model containment="true"
- * @generated
- */
- PostLoad getPostLoad();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlEventMethodContainer#getPostLoad <em>Post Load</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Post Load</em>' containment reference.
- * @see #getPostLoad()
- * @generated
- */
- void setPostLoad(PostLoad value);
-
-} // XmlEventMethodContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratedValue.java
deleted file mode 100644
index ba2ac38708..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratedValue.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Generated Value</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getGenerator <em>Generator</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getStrategy <em>Strategy</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratedValue()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlGeneratedValue extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getGenerator() <em>Generator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGenerator()
- * @generated
- * @ordered
- */
- protected static final String GENERATOR_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getGenerator() <em>Generator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGenerator()
- * @generated
- * @ordered
- */
- protected String generator = GENERATOR_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final GenerationType STRATEGY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStrategy()
- * @generated
- * @ordered
- */
- protected GenerationType strategy = STRATEGY_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlGeneratedValue()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_GENERATED_VALUE;
- }
-
- /**
- * Returns the value of the '<em><b>Generator</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Generator</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Generator</em>' attribute.
- * @see #setGenerator(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratedValue_Generator()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getGenerator()
- {
- return generator;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getGenerator <em>Generator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Generator</em>' attribute.
- * @see #getGenerator()
- * @generated
- */
- public void setGenerator(String newGenerator)
- {
- String oldGenerator = generator;
- generator = newGenerator;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_GENERATED_VALUE__GENERATOR, oldGenerator, generator));
- }
-
- /**
- * Returns the value of the '<em><b>Strategy</b></em>' attribute.
- * The default value is <code>"TABLE"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.GenerationType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Strategy</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Strategy</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.GenerationType
- * @see #setStrategy(GenerationType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratedValue_Strategy()
- * @model default="TABLE"
- * @generated
- */
- public GenerationType getStrategy()
- {
- return strategy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue#getStrategy <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Strategy</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.GenerationType
- * @see #getStrategy()
- * @generated
- */
- public void setStrategy(GenerationType newStrategy)
- {
- GenerationType oldStrategy = strategy;
- strategy = newStrategy == null ? STRATEGY_EDEFAULT : newStrategy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_GENERATED_VALUE__STRATEGY, oldStrategy, strategy));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
- return getGenerator();
- case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
- return getStrategy();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
- setGenerator((String)newValue);
- return;
- case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
- setStrategy((GenerationType)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
- setGenerator(GENERATOR_EDEFAULT);
- return;
- case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
- setStrategy(STRATEGY_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
- return GENERATOR_EDEFAULT == null ? generator != null : !GENERATOR_EDEFAULT.equals(generator);
- case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
- return strategy != STRATEGY_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (generator: ");
- result.append(generator);
- result.append(", strategy: ");
- result.append(strategy);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getGeneratorTextRange() {
- return getAttributeTextRange(JPA.GENERATOR);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildStrategyTranslator(),
- buildGeneratorTranslator()
- };
- }
-
- protected static Translator buildStrategyTranslator() {
- return new Translator(JPA.STRATEGY, OrmPackage.eINSTANCE.getXmlGeneratedValue_Strategy(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildGeneratorTranslator() {
- return new Translator(JPA.GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratedValue_Generator(), Translator.DOM_ATTRIBUTE);
- }
-
- // *********** content assist ************
-
- protected TextRange getGeneratorCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.GENERATOR);
- }
- public boolean generatorTouches(int pos) {
- TextRange textRange = this.getGeneratorCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-} // GeneratedValue
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGenerator.java
deleted file mode 100644
index c3a1fab13f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGenerator.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Generator</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getInitialValue <em>Initial Value</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getAllocationSize <em>Allocation Size</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlGenerator extends XmlGenerator_2_0
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Initial Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Initial Value</em>' attribute.
- * @see #setInitialValue(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_InitialValue()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- Integer getInitialValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getInitialValue <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Initial Value</em>' attribute.
- * @see #getInitialValue()
- * @generated
- */
- void setInitialValue(Integer value);
-
- /**
- * Returns the value of the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Allocation Size</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Allocation Size</em>' attribute.
- * @see #setAllocationSize(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_AllocationSize()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- Integer getAllocationSize();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator#getAllocationSize <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Allocation Size</em>' attribute.
- * @see #getAllocationSize()
- * @generated
- */
- void setAllocationSize(Integer value);
-
- TextRange getNameTextRange();
-
- TextRange getSchemaCodeAssistTextRange();
-
- TextRange getCatalogCodeAssistTextRange();
-
- boolean schemaTouches(int pos);
-
- boolean catalogTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratorContainer.java
deleted file mode 100644
index cea5412ca4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlGeneratorContainer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Generator Container</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator <em>Sequence Generator</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getTableGenerator <em>Table Generator</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlGeneratorContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Generator</em>' containment reference.
- * @see #setSequenceGenerator(XmlSequenceGenerator)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer_SequenceGenerator()
- * @model containment="true"
- * @generated
- */
- XmlSequenceGenerator getSequenceGenerator();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
- * @see #getSequenceGenerator()
- * @generated
- */
- void setSequenceGenerator(XmlSequenceGenerator value);
-
- /**
- * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table Generator</em>' containment reference.
- * @see #setTableGenerator(XmlTableGenerator)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer_TableGenerator()
- * @model containment="true"
- * @generated
- */
- XmlTableGenerator getTableGenerator();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer#getTableGenerator <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table Generator</em>' containment reference.
- * @see #getTableGenerator()
- * @generated
- */
- void setTableGenerator(XmlTableGenerator value);
-
-} // XmlGeneratorContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlId.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlId.java
deleted file mode 100644
index 7877c89fed..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlId.java
+++ /dev/null
@@ -1,801 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Id</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getGeneratedValue <em>Generated Value</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlId()
- * @model kind="class"
- * @generated
- */
-public class XmlId extends AbstractXmlAttributeMapping implements ColumnMapping, XmlConvertibleMapping, XmlGeneratorContainer
-{
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn column;
- /**
- * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected static final boolean LOB_EDEFAULT = false;
- /**
- * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected boolean lob = LOB_EDEFAULT;
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final EnumType ENUMERATED_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType enumerated = ENUMERATED_EDEFAULT;
- /**
- * The cached value of the '{@link #getSequenceGenerator() <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceGenerator()
- * @generated
- * @ordered
- */
- protected XmlSequenceGenerator sequenceGenerator;
- /**
- * The cached value of the '{@link #getTableGenerator() <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTableGenerator()
- * @generated
- * @ordered
- */
- protected XmlTableGenerator tableGenerator;
- /**
- * The cached value of the '{@link #getGeneratedValue() <em>Generated Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGeneratedValue()
- * @generated
- * @ordered
- */
- protected XmlGeneratedValue generatedValue;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlId()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ID;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping_Column()
- * @model containment="true"
- * @generated
- */
- public XmlColumn getColumn()
- {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
- {
- XmlColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__COLUMN, oldColumn, newColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- public void setColumn(XmlColumn newColumn)
- {
- if (newColumn != column)
- {
- NotificationChain msgs = null;
- if (column != null)
- msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__COLUMN, null, msgs);
- if (newColumn != null)
- msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__COLUMN, null, msgs);
- msgs = basicSetColumn(newColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__COLUMN, newColumn, newColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lob</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lob</em>' attribute.
- * @see #setLob(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isLob()
- {
- return lob;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#isLob <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lob</em>' attribute.
- * @see #isLob()
- * @generated
- */
- public void setLob(boolean newLob)
- {
- boolean oldLob = lob;
- lob = newLob;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__LOB, oldLob, lob));
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal()
- {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporal(TemporalType newTemporal)
- {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__TEMPORAL, oldTemporal, temporal));
- }
-
- /**
- * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
- * @model
- * @generated
- */
- public EnumType getEnumerated()
- {
- return enumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getEnumerated <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getEnumerated()
- * @generated
- */
- public void setEnumerated(EnumType newEnumerated)
- {
- EnumType oldEnumerated = enumerated;
- enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__ENUMERATED, oldEnumerated, enumerated));
- }
-
- /**
- * Returns the value of the '<em><b>Generated Value</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Generated Value</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Generated Value</em>' containment reference.
- * @see #setGeneratedValue(XmlGeneratedValue)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlId_GeneratedValue()
- * @model containment="true"
- * @generated
- */
- public XmlGeneratedValue getGeneratedValue()
- {
- return generatedValue;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetGeneratedValue(XmlGeneratedValue newGeneratedValue, NotificationChain msgs)
- {
- XmlGeneratedValue oldGeneratedValue = generatedValue;
- generatedValue = newGeneratedValue;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__GENERATED_VALUE, oldGeneratedValue, newGeneratedValue);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getGeneratedValue <em>Generated Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Generated Value</em>' containment reference.
- * @see #getGeneratedValue()
- * @generated
- */
- public void setGeneratedValue(XmlGeneratedValue newGeneratedValue)
- {
- if (newGeneratedValue != generatedValue)
- {
- NotificationChain msgs = null;
- if (generatedValue != null)
- msgs = ((InternalEObject)generatedValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__GENERATED_VALUE, null, msgs);
- if (newGeneratedValue != null)
- msgs = ((InternalEObject)newGeneratedValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__GENERATED_VALUE, null, msgs);
- msgs = basicSetGeneratedValue(newGeneratedValue, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__GENERATED_VALUE, newGeneratedValue, newGeneratedValue));
- }
-
- /**
- * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table Generator</em>' containment reference.
- * @see #setTableGenerator(XmlTableGenerator)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer_TableGenerator()
- * @model containment="true"
- * @generated
- */
- public XmlTableGenerator getTableGenerator()
- {
- return tableGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetTableGenerator(XmlTableGenerator newTableGenerator, NotificationChain msgs)
- {
- XmlTableGenerator oldTableGenerator = tableGenerator;
- tableGenerator = newTableGenerator;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__TABLE_GENERATOR, oldTableGenerator, newTableGenerator);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getTableGenerator <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table Generator</em>' containment reference.
- * @see #getTableGenerator()
- * @generated
- */
- public void setTableGenerator(XmlTableGenerator newTableGenerator)
- {
- if (newTableGenerator != tableGenerator)
- {
- NotificationChain msgs = null;
- if (tableGenerator != null)
- msgs = ((InternalEObject)tableGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__TABLE_GENERATOR, null, msgs);
- if (newTableGenerator != null)
- msgs = ((InternalEObject)newTableGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__TABLE_GENERATOR, null, msgs);
- msgs = basicSetTableGenerator(newTableGenerator, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__TABLE_GENERATOR, newTableGenerator, newTableGenerator));
- }
-
- /**
- * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Generator</em>' containment reference.
- * @see #setSequenceGenerator(XmlSequenceGenerator)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGeneratorContainer_SequenceGenerator()
- * @model containment="true"
- * @generated
- */
- public XmlSequenceGenerator getSequenceGenerator()
- {
- return sequenceGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSequenceGenerator(XmlSequenceGenerator newSequenceGenerator, NotificationChain msgs)
- {
- XmlSequenceGenerator oldSequenceGenerator = sequenceGenerator;
- sequenceGenerator = newSequenceGenerator;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__SEQUENCE_GENERATOR, oldSequenceGenerator, newSequenceGenerator);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlId#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
- * @see #getSequenceGenerator()
- * @generated
- */
- public void setSequenceGenerator(XmlSequenceGenerator newSequenceGenerator)
- {
- if (newSequenceGenerator != sequenceGenerator)
- {
- NotificationChain msgs = null;
- if (sequenceGenerator != null)
- msgs = ((InternalEObject)sequenceGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__SEQUENCE_GENERATOR, null, msgs);
- if (newSequenceGenerator != null)
- msgs = ((InternalEObject)newSequenceGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__SEQUENCE_GENERATOR, null, msgs);
- msgs = basicSetSequenceGenerator(newSequenceGenerator, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__SEQUENCE_GENERATOR, newSequenceGenerator, newSequenceGenerator));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ID__COLUMN:
- return basicSetColumn(null, msgs);
- case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
- return basicSetSequenceGenerator(null, msgs);
- case OrmPackage.XML_ID__TABLE_GENERATOR:
- return basicSetTableGenerator(null, msgs);
- case OrmPackage.XML_ID__GENERATED_VALUE:
- return basicSetGeneratedValue(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ID__COLUMN:
- return getColumn();
- case OrmPackage.XML_ID__LOB:
- return isLob();
- case OrmPackage.XML_ID__TEMPORAL:
- return getTemporal();
- case OrmPackage.XML_ID__ENUMERATED:
- return getEnumerated();
- case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
- return getSequenceGenerator();
- case OrmPackage.XML_ID__TABLE_GENERATOR:
- return getTableGenerator();
- case OrmPackage.XML_ID__GENERATED_VALUE:
- return getGeneratedValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ID__COLUMN:
- setColumn((XmlColumn)newValue);
- return;
- case OrmPackage.XML_ID__LOB:
- setLob((Boolean)newValue);
- return;
- case OrmPackage.XML_ID__TEMPORAL:
- setTemporal((TemporalType)newValue);
- return;
- case OrmPackage.XML_ID__ENUMERATED:
- setEnumerated((EnumType)newValue);
- return;
- case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
- setSequenceGenerator((XmlSequenceGenerator)newValue);
- return;
- case OrmPackage.XML_ID__TABLE_GENERATOR:
- setTableGenerator((XmlTableGenerator)newValue);
- return;
- case OrmPackage.XML_ID__GENERATED_VALUE:
- setGeneratedValue((XmlGeneratedValue)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ID__COLUMN:
- setColumn((XmlColumn)null);
- return;
- case OrmPackage.XML_ID__LOB:
- setLob(LOB_EDEFAULT);
- return;
- case OrmPackage.XML_ID__TEMPORAL:
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- case OrmPackage.XML_ID__ENUMERATED:
- setEnumerated(ENUMERATED_EDEFAULT);
- return;
- case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
- setSequenceGenerator((XmlSequenceGenerator)null);
- return;
- case OrmPackage.XML_ID__TABLE_GENERATOR:
- setTableGenerator((XmlTableGenerator)null);
- return;
- case OrmPackage.XML_ID__GENERATED_VALUE:
- setGeneratedValue((XmlGeneratedValue)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ID__COLUMN:
- return column != null;
- case OrmPackage.XML_ID__LOB:
- return lob != LOB_EDEFAULT;
- case OrmPackage.XML_ID__TEMPORAL:
- return temporal != TEMPORAL_EDEFAULT;
- case OrmPackage.XML_ID__ENUMERATED:
- return enumerated != ENUMERATED_EDEFAULT;
- case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
- return sequenceGenerator != null;
- case OrmPackage.XML_ID__TABLE_GENERATOR:
- return tableGenerator != null;
- case OrmPackage.XML_ID__GENERATED_VALUE:
- return generatedValue != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == ColumnMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ID__COLUMN: return OrmPackage.COLUMN_MAPPING__COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ID__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
- case OrmPackage.XML_ID__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
- case OrmPackage.XML_ID__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlGeneratorContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ID__SEQUENCE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR;
- case OrmPackage.XML_ID__TABLE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == ColumnMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.COLUMN_MAPPING__COLUMN: return OrmPackage.XML_ID__COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_ID__LOB;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_ID__TEMPORAL;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_ID__ENUMERATED;
- default: return -1;
- }
- }
- if (baseClass == XmlGeneratorContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR: return OrmPackage.XML_ID__SEQUENCE_GENERATOR;
- case OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR: return OrmPackage.XML_ID__TABLE_GENERATOR;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (lob: ");
- result.append(lob);
- result.append(", temporal: ");
- result.append(temporal);
- result.append(", enumerated: ");
- result.append(enumerated);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getEnumeratedTextRange() {
- throw new UnsupportedOperationException("enumerated not supported by id mappings");
- }
-
- public TextRange getLobTextRange() {
- throw new UnsupportedOperationException("lob not supported by id mappings");
- }
-
- public TextRange getTemporalTextRange() {
- return getAttributeTextRange(JPA.TEMPORAL);
- }
-
- public String getMappingKey() {
- return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildAccessTranslator(),
- buildColumnTranslator(),
- buildGeneratedValueTranslator(),
- buildTemporalTranslator(),
- buildTableGeneratorTranslator(),
- buildSequenceGeneratorTranslator()
- };
- }
-
- protected static Translator buildColumnTranslator() {
- return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getColumnMapping_Column());
- }
-
- protected static Translator buildGeneratedValueTranslator() {
- return XmlGeneratedValue.buildTranslator(JPA.GENERATED_VALUE, OrmPackage.eINSTANCE.getXmlId_GeneratedValue());
- }
-
- protected static Translator buildTemporalTranslator() {
- return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
- }
-
- protected static Translator buildTableGeneratorTranslator() {
- return XmlTableGenerator.buildTranslator(JPA.TABLE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_TableGenerator());
- }
-
- protected static Translator buildSequenceGeneratorTranslator() {
- return XmlSequenceGenerator.buildTranslator(JPA.SEQUENCE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_SequenceGenerator());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlIdClassContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlIdClassContainer.java
deleted file mode 100644
index 9d50cfc687..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlIdClassContainer.java
+++ /dev/null
@@ -1,61 +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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Id Class Container</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer#getIdClass <em>Id Class</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlIdClassContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlIdClassContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Id Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id Class</em>' containment reference.
- * @see #setIdClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlIdClassContainer_IdClass()
- * @model containment="true"
- * @generated
- */
- XmlClassReference getIdClass();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer#getIdClass <em>Id Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id Class</em>' containment reference.
- * @see #getIdClass()
- * @generated
- */
- void setIdClass(XmlClassReference value);
-
-} // XmlIdClassContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumn.java
deleted file mode 100644
index 3cf2d975f0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumn.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Join Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumn()
- * @model kind="class"
- * @generated
- */
-public class XmlJoinColumn extends AbstractXmlBaseColumn implements XmlBaseJoinColumn
-{
- /**
- * The default value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReferencedColumnName()
- * @generated
- * @ordered
- */
- protected String referencedColumnName = REFERENCED_COLUMN_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlJoinColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_JOIN_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Referenced Column Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Referenced Column Name</em>' attribute.
- * @see #setReferencedColumnName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseJoinColumn_ReferencedColumnName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getReferencedColumnName()
- {
- return referencedColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Referenced Column Name</em>' attribute.
- * @see #getReferencedColumnName()
- * @generated
- */
- public void setReferencedColumnName(String newReferencedColumnName)
- {
- String oldReferencedColumnName = referencedColumnName;
- referencedColumnName = newReferencedColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME, oldReferencedColumnName, referencedColumnName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- return getReferencedColumnName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- setReferencedColumnName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- setReferencedColumnName(REFERENCED_COLUMN_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- return REFERENCED_COLUMN_NAME_EDEFAULT == null ? referencedColumnName != null : !REFERENCED_COLUMN_NAME_EDEFAULT.equals(referencedColumnName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseJoinColumn.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME: return OrmPackage.XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseJoinColumn.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME: return OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (referencedColumnName: ");
- result.append(referencedColumnName);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return getAttributeTextRange(JPA.REFERENCED_COLUMN_NAME);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildReferencedColumnNameTranslator(),
- buildUniqueTranslator(),
- buildNullableTranslator(),
- buildInsertableTranslator(),
- buildUpdatableTranslator(),
- buildColumnDefinitionTranslator(),
- buildTableTranslator(),
- };
- }
-
- protected static Translator buildReferencedColumnNameTranslator() {
- return new Translator(JPA.REFERENCED_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlBaseJoinColumn_ReferencedColumnName(), Translator.DOM_ATTRIBUTE);
- }
-
- // ************ content assist **************
-
- public TextRange getReferencedColumnNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.REFERENCED_COLUMN_NAME);
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- TextRange textRange = this.getReferencedColumnNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-} // JoinColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumnContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumnContainer.java
deleted file mode 100644
index 811b99e9c7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinColumnContainer.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Join Column Container</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer#getJoinColumns <em>Join Columns</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlJoinColumnContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer_JoinColumns()
- * @model containment="true"
- * @generated
- */
- EList<XmlJoinColumn> getJoinColumns();
-
-} // XmlJoinColumnContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTable.java
deleted file mode 100644
index 894c525703..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTable.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Join Table</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable#getInverseJoinColumns <em>Inverse Join Columns</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTable()
- * @model kind="class"
- * @generated
- */
-public class XmlJoinTable extends AbstractXmlReferenceTable
-{
- /**
- * The cached value of the '{@link #getInverseJoinColumns() <em>Inverse Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInverseJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> inverseJoinColumns;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlJoinTable()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_JOIN_TABLE;
- }
-
- /**
- * Returns the value of the '<em><b>Inverse Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Inverse Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Inverse Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTable_InverseJoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getInverseJoinColumns()
- {
- if (inverseJoinColumns == null)
- {
- inverseJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS);
- }
- return inverseJoinColumns;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
- return ((InternalEList<?>)getInverseJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
- return getInverseJoinColumns();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
- getInverseJoinColumns().clear();
- getInverseJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
- getInverseJoinColumns().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
- return inverseJoinColumns != null && !inverseJoinColumns.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- public boolean isSpecified() {
- return true;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildCatalogTranslator(),
- buildSchemaTranslator(),
- buildJoinColumnTranslator(),
- buildInverseJoinColumnTranslator(),
- buildUniqueConstraintTranslator()
- };
- }
-
- protected static Translator buildInverseJoinColumnTranslator() {
- return XmlJoinColumn.buildTranslator(JPA.INVERSE_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinTable_InverseJoinColumns());
- }
-
-} // JoinTable
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTableContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTableContainer.java
deleted file mode 100644
index 3199364e79..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlJoinTableContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Join Table Container</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer#getJoinTable <em>Join Table</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlJoinTableContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Table</em>' containment reference.
- * @see #setJoinTable(XmlJoinTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinTableContainer_JoinTable()
- * @model containment="true"
- * @generated
- */
- XmlJoinTable getJoinTable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer#getJoinTable <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Join Table</em>' containment reference.
- * @see #getJoinTable()
- * @generated
- */
- void setJoinTable(XmlJoinTable value);
-
-} // XmlJoinTableContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToMany.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToMany.java
deleted file mode 100644
index b3012927bc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToMany.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Many To Many</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlManyToMany()
- * @model kind="class"
- * @generated
- */
-public class XmlManyToMany extends AbstractXmlMultiRelationshipMapping implements XmlManyToMany_2_0
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlManyToMany()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_MANY_TO_MANY;
- }
-
- public String getMappingKey() {
- return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildTargetEntityTranslator(),
- buildFetchTranslator(),
- buildAccessTranslator(),
- buildMappedByTranslator(),
- buildOrderByTranslator(),
- buildOrderColumnTranslator(),
- buildMapKeyTranslator(),
- buildMapKeyClassTranslator(),
- buildMapKeyTemporalTranslator(),
- buildMapKeyEnumeratedTranslator(),
- buildMapKeyAttributeOverrideTranslator(),
- buildMapKeyColumnTranslator(),
- buildMapKeyJoinColumnTranslator(),
- buildJoinTableTranslator(),
- buildCascadeTranslator()
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToOne.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToOne.java
deleted file mode 100644
index 002ed41f75..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlManyToOne.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Many To One</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlManyToOne()
- * @model kind="class"
- * @generated
- */
-public class XmlManyToOne extends AbstractXmlSingleRelationshipMapping
-{
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlManyToOne()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_MANY_TO_ONE;
- }
-
- // **************** XmlAttributeMapping impl ******************************
-
- public String getMappingKey() {
- return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
-
- // **************** translators *******************************************
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildTargetEntityTranslator(),
- buildFetchTranslator(),
- buildOptionalTranslator(),
- buildAccessTranslator(),
- buildMapsIdTranslator(),
- buildIdTranslator(),
- buildJoinColumnTranslator(),
- buildJoinTableTranslator(),
- buildCascadeTranslator()
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedByMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedByMapping.java
deleted file mode 100644
index f1cb8c0d9f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedByMapping.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Ownable Relationship Mapping</b></em>'.
- * <p>
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping#getMappedBy <em>Mapped By</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedByMapping()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlMappedByMapping extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapped By</em>' attribute.
- * @see #setMappedBy(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedByMapping_MappedBy()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getMappedBy();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping#getMappedBy <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Mapped By</em>' attribute.
- * @see #getMappedBy()
- * @generated
- */
- void setMappedBy(String value);
-
- TextRange getMappedByTextRange();
-
- boolean mappedByTouches(int pos);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedSuperclass.java
deleted file mode 100644
index 466e872cab..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlMappedSuperclass.java
+++ /dev/null
@@ -1,570 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Mapped Superclass</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#getEntityListeners <em>Entity Listeners</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedSuperclass()
- * @model kind="class"
- * @generated
- */
-public class XmlMappedSuperclass extends AbstractXmlTypeMapping implements XmlIdClassContainer
-{
-
- /**
- * The cached value of the '{@link #getIdClass() <em>Id Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIdClass()
- * @generated
- * @ordered
- */
- protected XmlClassReference idClass;
-
- /**
- * The default value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeDefaultListeners()
- * @generated
- * @ordered
- */
- protected static final boolean EXCLUDE_DEFAULT_LISTENERS_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeDefaultListeners()
- * @generated
- * @ordered
- */
- protected boolean excludeDefaultListeners = EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
-
- /**
- * The default value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeSuperclassListeners()
- * @generated
- * @ordered
- */
- protected static final boolean EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExcludeSuperclassListeners()
- * @generated
- * @ordered
- */
- protected boolean excludeSuperclassListeners = EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityListeners()
- * @generated
- * @ordered
- */
- protected EntityListeners entityListeners;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlMappedSuperclass()
- {
- super();
- }
-
- public String getMappingKey() {
- return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
- public XmlEntityMappings entityMappings() {
- return (XmlEntityMappings) eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_MAPPED_SUPERCLASS;
- }
-
- /**
- * Returns the value of the '<em><b>Id Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id Class</em>' containment reference.
- * @see #setIdClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlIdClassContainer_IdClass()
- * @model containment="true"
- * @generated
- */
- public XmlClassReference getIdClass()
- {
- return idClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetIdClass(XmlClassReference newIdClass, NotificationChain msgs)
- {
- XmlClassReference oldIdClass = idClass;
- idClass = newIdClass;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, oldIdClass, newIdClass);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#getIdClass <em>Id Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id Class</em>' containment reference.
- * @see #getIdClass()
- * @generated
- */
- public void setIdClass(XmlClassReference newIdClass)
- {
- if (newIdClass != idClass)
- {
- NotificationChain msgs = null;
- if (idClass != null)
- msgs = ((InternalEObject)idClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, null, msgs);
- if (newIdClass != null)
- msgs = ((InternalEObject)newIdClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, null, msgs);
- msgs = basicSetIdClass(newIdClass, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, newIdClass, newIdClass));
- }
-
- /**
- * Returns the value of the '<em><b>Exclude Default Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Exclude Default Listeners</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Exclude Default Listeners</em>' attribute.
- * @see #setExcludeDefaultListeners(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedSuperclass_ExcludeDefaultListeners()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isExcludeDefaultListeners()
- {
- return excludeDefaultListeners;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Exclude Default Listeners</em>' attribute.
- * @see #isExcludeDefaultListeners()
- * @generated
- */
- public void setExcludeDefaultListeners(boolean newExcludeDefaultListeners)
- {
- boolean oldExcludeDefaultListeners = excludeDefaultListeners;
- excludeDefaultListeners = newExcludeDefaultListeners;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS, oldExcludeDefaultListeners, excludeDefaultListeners));
- }
-
- /**
- * Returns the value of the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Exclude Superclass Listeners</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Exclude Superclass Listeners</em>' attribute.
- * @see #setExcludeSuperclassListeners(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedSuperclass_ExcludeSuperclassListeners()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isExcludeSuperclassListeners()
- {
- return excludeSuperclassListeners;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Exclude Superclass Listeners</em>' attribute.
- * @see #isExcludeSuperclassListeners()
- * @generated
- */
- public void setExcludeSuperclassListeners(boolean newExcludeSuperclassListeners)
- {
- boolean oldExcludeSuperclassListeners = excludeSuperclassListeners;
- excludeSuperclassListeners = newExcludeSuperclassListeners;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS, oldExcludeSuperclassListeners, excludeSuperclassListeners));
- }
-
- /**
- * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Listeners</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entity Listeners</em>' containment reference.
- * @see #setEntityListeners(EntityListeners)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedSuperclass_EntityListeners()
- * @model containment="true"
- * @generated
- */
- public EntityListeners getEntityListeners()
- {
- return entityListeners;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEntityListeners(EntityListeners newEntityListeners, NotificationChain msgs)
- {
- EntityListeners oldEntityListeners = entityListeners;
- entityListeners = newEntityListeners;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, oldEntityListeners, newEntityListeners);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass#getEntityListeners <em>Entity Listeners</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Entity Listeners</em>' containment reference.
- * @see #getEntityListeners()
- * @generated
- */
- public void setEntityListeners(EntityListeners newEntityListeners)
- {
- if (newEntityListeners != entityListeners)
- {
- NotificationChain msgs = null;
- if (entityListeners != null)
- msgs = ((InternalEObject)entityListeners).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, null, msgs);
- if (newEntityListeners != null)
- msgs = ((InternalEObject)newEntityListeners).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, null, msgs);
- msgs = basicSetEntityListeners(newEntityListeners, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, newEntityListeners, newEntityListeners));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
- return basicSetIdClass(null, msgs);
- case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
- return basicSetEntityListeners(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
- return getIdClass();
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
- return isExcludeDefaultListeners();
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
- return isExcludeSuperclassListeners();
- case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
- return getEntityListeners();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
- setIdClass((XmlClassReference)newValue);
- return;
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
- setExcludeDefaultListeners((Boolean)newValue);
- return;
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
- setExcludeSuperclassListeners((Boolean)newValue);
- return;
- case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
- setEntityListeners((EntityListeners)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
- setIdClass((XmlClassReference)null);
- return;
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
- setExcludeDefaultListeners(EXCLUDE_DEFAULT_LISTENERS_EDEFAULT);
- return;
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
- setExcludeSuperclassListeners(EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT);
- return;
- case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
- setEntityListeners((EntityListeners)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
- return idClass != null;
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
- return excludeDefaultListeners != EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
- case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
- return excludeSuperclassListeners != EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
- case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
- return entityListeners != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlIdClassContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS: return OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlIdClassContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS: return OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (excludeDefaultListeners: ");
- result.append(excludeDefaultListeners);
- result.append(", excludeSuperclassListeners: ");
- result.append(excludeSuperclassListeners);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildClassTranslator(),
- buildAccessTranslator(),
- buildMetadataCompleteTranslator(),
- buildDescriptionTranslator(),
- buildIdClassTranslator(),
- buildExcludeDefaultListenersTranslator(),
- buildExcludeSuperclassListenersTranslator(),
- buildEntityListenersTranslator(),
- PrePersist.buildTranslator(),
- PostPersist.buildTranslator(),
- PreRemove.buildTranslator(),
- PostRemove.buildTranslator(),
- PreUpdate.buildTranslator(),
- PostUpdate.buildTranslator(),
- PostLoad.buildTranslator(),
- Attributes.buildTranslator()
- };
- }
-
- protected static Translator buildIdClassTranslator() {
- return XmlClassReference.buildTranslator(JPA.ID_CLASS, OrmPackage.eINSTANCE.getXmlIdClassContainer_IdClass());
- }
-
- protected static Translator buildExcludeDefaultListenersTranslator() {
- return new EmptyTagBooleanTranslator(JPA.EXCLUDE_DEFAULT_LISTENERS, OrmPackage.eINSTANCE.getXmlMappedSuperclass_ExcludeDefaultListeners());
- }
-
- protected static Translator buildExcludeSuperclassListenersTranslator() {
- return new EmptyTagBooleanTranslator(JPA.EXCLUDE_SUPERCLASS_LISTENERS, OrmPackage.eINSTANCE.getXmlMappedSuperclass_ExcludeSuperclassListeners());
- }
-
- protected static Translator buildEntityListenersTranslator() {
- return EntityListeners.buildTranslator(JPA.ENTITY_LISTENERS, OrmPackage.eINSTANCE.getXmlMappedSuperclass_EntityListeners());
- }
-
- protected static Translator buildPrePersistTranslator() {
- return PrePersist.buildTranslator();
- }
-
- protected static Translator buildPostPersistTranslator() {
- return PostPersist.buildTranslator();
- }
-
- protected static Translator buildPreRemoveTranslator() {
- return PreRemove.buildTranslator();
- }
-
- protected static Translator buildPostRemoveTranslator() {
- return PostRemove.buildTranslator();
- }
-
- protected static Translator buildPreUpdateTranslator() {
- return PreUpdate.buildTranslator();
- }
-
- protected static Translator buildPostUpdateTranslator() {
- return PostUpdate.buildTranslator();
- }
-
- protected static Translator buildPostLoadTranslator() {
- return PostLoad.buildTranslator();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedColumn.java
deleted file mode 100644
index ae411ae785..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedColumn.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Named Column</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getColumnDefinition <em>Column Definition</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlNamedColumn extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Definition</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Definition</em>' attribute.
- * @see #setColumnDefinition(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn_ColumnDefinition()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getColumnDefinition();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getColumnDefinition <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column Definition</em>' attribute.
- * @see #getColumnDefinition()
- * @generated
- */
- void setColumnDefinition(String value);
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedColumn_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- TextRange getNameTextRange();
-
- boolean columnNameTouches(int pos);
-
-} // XmlNamedColumn
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedNativeQuery.java
deleted file mode 100644
index fae596a306..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedNativeQuery.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Named Native Query</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultClass <em>Result Class</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedNativeQuery()
- * @model kind="class"
- * @generated
- */
-public class XmlNamedNativeQuery extends AbstractJpaEObject implements XmlQuery
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuery()
- * @generated
- * @ordered
- */
- protected static final String QUERY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuery()
- * @generated
- * @ordered
- */
- protected String query = QUERY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getHints() <em>Hints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHints()
- * @generated
- * @ordered
- */
- protected EList<XmlQueryHint> hints;
-
- /**
- * The default value of the '{@link #getResultClass() <em>Result Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultClass()
- * @generated
- * @ordered
- */
- protected static final String RESULT_CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getResultClass() <em>Result Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultClass()
- * @generated
- * @ordered
- */
- protected String resultClass = RESULT_CLASS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getResultSetMapping() <em>Result Set Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultSetMapping()
- * @generated
- * @ordered
- */
- protected static final String RESULT_SET_MAPPING_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getResultSetMapping() <em>Result Set Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultSetMapping()
- * @generated
- * @ordered
- */
- protected String resultSetMapping = RESULT_SET_MAPPING_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlNamedNativeQuery()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_NAMED_NATIVE_QUERY;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Result Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Result Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Result Class</em>' attribute.
- * @see #setResultClass(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedNativeQuery_ResultClass()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getResultClass()
- {
- return resultClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultClass <em>Result Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Result Class</em>' attribute.
- * @see #getResultClass()
- * @generated
- */
- public void setResultClass(String newResultClass)
- {
- String oldResultClass = resultClass;
- resultClass = newResultClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS, oldResultClass, resultClass));
- }
-
- /**
- * Returns the value of the '<em><b>Result Set Mapping</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Result Set Mapping</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Result Set Mapping</em>' attribute.
- * @see #setResultSetMapping(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedNativeQuery_ResultSetMapping()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getResultSetMapping()
- {
- return resultSetMapping;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Result Set Mapping</em>' attribute.
- * @see #getResultSetMapping()
- * @generated
- */
- public void setResultSetMapping(String newResultSetMapping)
- {
- String oldResultSetMapping = resultSetMapping;
- resultSetMapping = newResultSetMapping;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING, oldResultSetMapping, resultSetMapping));
- }
-
- /**
- * Returns the value of the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Query</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Query</em>' attribute.
- * @see #setQuery(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Query()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getQuery()
- {
- return query;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery#getQuery <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Query</em>' attribute.
- * @see #getQuery()
- * @generated
- */
- public void setQuery(String newQuery)
- {
- String oldQuery = query;
- query = newQuery;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY, oldQuery, query));
- }
-
- /**
- * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Hints</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Hints</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Hints()
- * @model containment="true"
- * @generated
- */
- public EList<XmlQueryHint> getHints()
- {
- if (hints == null)
- {
- hints = new EObjectContainmentEList<XmlQueryHint>(XmlQueryHint.class, this, OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS);
- }
- return hints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
- return ((InternalEList<?>)getHints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
- return getName();
- case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
- return getQuery();
- case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
- return getHints();
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
- return getResultClass();
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
- return getResultSetMapping();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
- setQuery((String)newValue);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
- getHints().clear();
- getHints().addAll((Collection<? extends XmlQueryHint>)newValue);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
- setResultClass((String)newValue);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
- setResultSetMapping((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
- setQuery(QUERY_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
- getHints().clear();
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
- setResultClass(RESULT_CLASS_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
- setResultSetMapping(RESULT_SET_MAPPING_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
- return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
- case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
- return hints != null && !hints.isEmpty();
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
- return RESULT_CLASS_EDEFAULT == null ? resultClass != null : !RESULT_CLASS_EDEFAULT.equals(resultClass);
- case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
- return RESULT_SET_MAPPING_EDEFAULT == null ? resultSetMapping != null : !RESULT_SET_MAPPING_EDEFAULT.equals(resultSetMapping);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(", query: ");
- result.append(query);
- result.append(", resultClass: ");
- result.append(resultClass);
- result.append(", resultSetMapping: ");
- result.append(resultSetMapping);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
- public TextRange getQueryTextRange() {
- return getAttributeTextRange(JPA.QUERY);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildResultClassTranslator(),
- buildResultSetMappingTranslator(),
- buildDescriptionTranslator(),
- buildQueryTranslator(),
- buildHintTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlQuery_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildResultClassTranslator() {
- return new Translator(JPA.RESULT_CLASS, OrmPackage.eINSTANCE.getXmlNamedNativeQuery_ResultClass(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildResultSetMappingTranslator() {
- return new Translator(JPA.RESULT_SET_MAPPING, OrmPackage.eINSTANCE.getXmlNamedNativeQuery_ResultSetMapping(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlQuery_2_0_Description());
- }
-
- protected static Translator buildQueryTranslator() {
- return new Translator(JPA.QUERY, OrmPackage.eINSTANCE.getXmlQuery_Query());
- }
-
- protected static Translator buildHintTranslator() {
- return XmlQueryHint.buildTranslator(JPA.HINT, OrmPackage.eINSTANCE.getXmlQuery_Hints());
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedQuery.java
deleted file mode 100644
index 61d0a7bd10..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNamedQuery.java
+++ /dev/null
@@ -1,564 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.SimpleTextRange;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Named Query</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedQuery()
- * @model kind="class"
- * @generated
- */
-public class XmlNamedQuery extends AbstractJpaEObject implements XmlQuery, XmlNamedQuery_2_0
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuery()
- * @generated
- * @ordered
- */
- protected static final String QUERY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuery()
- * @generated
- * @ordered
- */
- protected String query = QUERY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getHints() <em>Hints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHints()
- * @generated
- * @ordered
- */
- protected EList<XmlQueryHint> hints;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final LockModeType_2_0 LOCK_MODE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getLockMode() <em>Lock Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLockMode()
- * @generated
- * @ordered
- */
- protected LockModeType_2_0 lockMode = LOCK_MODE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlNamedQuery()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_NAMED_QUERY;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Query</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Query</em>' attribute.
- * @see #setQuery(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Query()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getQuery()
- {
- return query;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery#getQuery <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Query</em>' attribute.
- * @see #getQuery()
- * @generated
- */
- public void setQuery(String newQuery)
- {
- String oldQuery = query;
- query = newQuery;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__QUERY, oldQuery, query));
- }
-
- /**
- * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Hints</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Hints</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Hints()
- * @model containment="true"
- * @generated
- */
- public EList<XmlQueryHint> getHints()
- {
- if (hints == null)
- {
- hints = new EObjectContainmentEList<XmlQueryHint>(XmlQueryHint.class, this, OrmPackage.XML_NAMED_QUERY__HINTS);
- }
- return hints;
- }
-
- /**
- * Returns the value of the '<em><b>Lock Mode</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lock Mode</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lock Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @see #setLockMode(LockModeType_2_0)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNamedQuery_2_0_LockMode()
- * @model
- * @generated
- */
- public LockModeType_2_0 getLockMode()
- {
- return lockMode;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery#getLockMode <em>Lock Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lock Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @see #getLockMode()
- * @generated
- */
- public void setLockMode(LockModeType_2_0 newLockMode)
- {
- LockModeType_2_0 oldLockMode = lockMode;
- lockMode = newLockMode == null ? LOCK_MODE_EDEFAULT : newLockMode;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__LOCK_MODE, oldLockMode, lockMode));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_QUERY__HINTS:
- return ((InternalEList<?>)getHints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_NAMED_QUERY__NAME:
- return getName();
- case OrmPackage.XML_NAMED_QUERY__QUERY:
- return getQuery();
- case OrmPackage.XML_NAMED_QUERY__HINTS:
- return getHints();
- case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
- return getLockMode();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_NAMED_QUERY__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_NAMED_QUERY__QUERY:
- setQuery((String)newValue);
- return;
- case OrmPackage.XML_NAMED_QUERY__HINTS:
- getHints().clear();
- getHints().addAll((Collection<? extends XmlQueryHint>)newValue);
- return;
- case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
- setLockMode((LockModeType_2_0)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_QUERY__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_QUERY__QUERY:
- setQuery(QUERY_EDEFAULT);
- return;
- case OrmPackage.XML_NAMED_QUERY__HINTS:
- getHints().clear();
- return;
- case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
- setLockMode(LOCK_MODE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_NAMED_QUERY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_NAMED_QUERY__QUERY:
- return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
- case OrmPackage.XML_NAMED_QUERY__HINTS:
- return hints != null && !hints.isEmpty();
- case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
- return lockMode != LOCK_MODE_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlNamedQuery_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_NAMED_QUERY__LOCK_MODE: return OrmV2_0Package.XML_NAMED_QUERY_20__LOCK_MODE;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlNamedQuery_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_NAMED_QUERY_20__LOCK_MODE: return OrmPackage.XML_NAMED_QUERY__LOCK_MODE;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(", query: ");
- result.append(query);
- result.append(", lockMode: ");
- result.append(lockMode);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
- public TextRange getQueryTextRange() {
- // <named-query>
- IDOMNode node = getElementNode(JPA.QUERY);
- if (node != null) {
- // The query element has text
- if (node.hasChildNodes()) {
- return buildTextRange((IDOMNode) node.getFirstChild());
- }
- // The query element does not have text
- TextRange textRange = buildTextRange(node);
- return new SimpleTextRange(
- node.getEndStructuredDocumentRegion().getStartOffset(),
- 0,
- textRange.getLineNumber()
- );
- }
-
- return this.getValidationTextRange();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildDescriptionTranslator(),
- buildQueryTranslator(),
- buildLockModeTranslator(),
- XmlQueryHint.buildTranslator(JPA2_0.HINT, OrmPackage.eINSTANCE.getXmlQuery_Hints()),
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlQuery_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlQuery_2_0_Description());
- }
-
- protected static Translator buildQueryTranslator() {
- return new Translator(JPA.QUERY, OrmPackage.eINSTANCE.getXmlQuery_Query());
- }
-
- protected static Translator buildLockModeTranslator() {
- return new Translator(JPA2_0.NAMED_QUERY__LOCK_MODE, OrmV2_0Package.eINSTANCE.getXmlNamedQuery_2_0_LockMode());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNullAttributeMapping.java
deleted file mode 100644
index d6e607828a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlNullAttributeMapping.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Null Attribute Mapping</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlNullAttributeMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class XmlNullAttributeMapping extends AbstractXmlAttributeMapping
-{
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlNullAttributeMapping()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_NULL_ATTRIBUTE_MAPPING;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToMany.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToMany.java
deleted file mode 100644
index 456385128b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToMany.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>One To Many</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOneToMany()
- * @model kind="class"
- * @generated
- */
-public class XmlOneToMany extends AbstractXmlMultiRelationshipMapping implements XmlJoinColumnContainer, XmlOneToMany_2_0
-{
-
- /**
- * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlJoinColumn> joinColumns;
-
- /**
- * The default value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrphanRemoval()
- * @generated
- * @ordered
- */
- protected static final Boolean ORPHAN_REMOVAL_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrphanRemoval()
- * @generated
- * @ordered
- */
- protected Boolean orphanRemoval = ORPHAN_REMOVAL_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlOneToMany()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ONE_TO_MANY;
- }
-
- /**
- * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlJoinColumnContainer_JoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJoinColumn> getJoinColumns()
- {
- if (joinColumns == null)
- {
- joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS);
- }
- return joinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Orphan Removal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Orphan Removal</em>' attribute.
- * @see #setOrphanRemoval(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrphanRemovable_2_0_OrphanRemoval()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getOrphanRemoval()
- {
- return orphanRemoval;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany#getOrphanRemoval <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Orphan Removal</em>' attribute.
- * @see #getOrphanRemoval()
- * @generated
- */
- public void setOrphanRemoval(Boolean newOrphanRemoval)
- {
- Boolean oldOrphanRemoval = orphanRemoval;
- orphanRemoval = newOrphanRemoval;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL, oldOrphanRemoval, orphanRemoval));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
- return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
- return getJoinColumns();
- case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
- return getOrphanRemoval();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
- getJoinColumns().clear();
- getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
- return;
- case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
- setOrphanRemoval((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
- getJoinColumns().clear();
- return;
- case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
- setOrphanRemoval(ORPHAN_REMOVAL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
- return joinColumns != null && !joinColumns.isEmpty();
- case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
- return ORPHAN_REMOVAL_EDEFAULT == null ? orphanRemoval != null : !ORPHAN_REMOVAL_EDEFAULT.equals(orphanRemoval);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlJoinColumnContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS: return OrmPackage.XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlOrphanRemovable_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL: return OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL;
- default: return -1;
- }
- }
- if (baseClass == XmlOneToMany_2_0.class)
- {
- switch (derivedFeatureID)
- {
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlJoinColumnContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_JOIN_COLUMN_CONTAINER__JOIN_COLUMNS: return OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlOrphanRemovable_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL: return OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL;
- default: return -1;
- }
- }
- if (baseClass == XmlOneToMany_2_0.class)
- {
- switch (baseFeatureID)
- {
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (orphanRemoval: ");
- result.append(orphanRemoval);
- result.append(')');
- return result.toString();
- }
-
- public String getMappingKey() {
- return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildTargetEntityTranslator(),
- buildFetchTranslator(),
- buildAccessTranslator(),
- buildMappedByTranslator(),
- buildOrphanRemovalTranslator(),
- buildOrderByTranslator(),
- buildOrderColumnTranslator(),
- buildMapKeyTranslator(),
- buildMapKeyClassTranslator(),
- buildMapKeyTemporalTranslator(),
- buildMapKeyEnumeratedTranslator(),
- buildMapKeyAttributeOverrideTranslator(),
- buildMapKeyColumnTranslator(),
- buildMapKeyJoinColumnTranslator(),
- buildJoinTableTranslator(),
- buildJoinColumnTranslator(),
- buildCascadeTranslator()
- };
- }
-
- protected static Translator buildOrphanRemovalTranslator() {
- return new Translator(JPA2_0.ORPHAN_REMOVAL, OrmV2_0Package.eINSTANCE.getXmlOrphanRemovable_2_0_OrphanRemoval(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildJoinColumnTranslator() {
- return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinColumnContainer_JoinColumns());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToOne.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToOne.java
deleted file mode 100644
index e11fe0f5cd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOneToOne.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>One To One</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOneToOne()
- * @model kind="class"
- * @generated
- */
-public class XmlOneToOne extends AbstractXmlSingleRelationshipMapping implements XmlMappedByMapping, XmlPrimaryKeyJoinColumnContainer, XmlOneToOne_2_0
-{
-
- /**
- * The default value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected static final String MAPPED_BY_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected String mappedBy = MAPPED_BY_EDEFAULT;
- /**
- * The cached value of the '{@link #getPrimaryKeyJoinColumns() <em>Primary Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns;
- /**
- * The default value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrphanRemoval()
- * @generated
- * @ordered
- */
- protected static final Boolean ORPHAN_REMOVAL_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrphanRemoval()
- * @generated
- * @ordered
- */
- protected Boolean orphanRemoval = ORPHAN_REMOVAL_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlOneToOne()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ONE_TO_ONE;
- }
-
- /**
- * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapped By</em>' attribute.
- * @see #setMappedBy(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlMappedByMapping_MappedBy()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getMappedBy()
- {
- return mappedBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne#getMappedBy <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Mapped By</em>' attribute.
- * @see #getMappedBy()
- * @generated
- */
- public void setMappedBy(String newMappedBy)
- {
- String oldMappedBy = mappedBy;
- mappedBy = newMappedBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ONE_TO_ONE__MAPPED_BY, oldMappedBy, mappedBy));
- }
-
- /**
- * Returns the value of the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Orphan Removal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Orphan Removal</em>' attribute.
- * @see #setOrphanRemoval(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrphanRemovable_2_0_OrphanRemoval()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getOrphanRemoval()
- {
- return orphanRemoval;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne#getOrphanRemoval <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Orphan Removal</em>' attribute.
- * @see #getOrphanRemoval()
- * @generated
- */
- public void setOrphanRemoval(Boolean newOrphanRemoval)
- {
- Boolean oldOrphanRemoval = orphanRemoval;
- orphanRemoval = newOrphanRemoval;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL, oldOrphanRemoval, orphanRemoval));
- }
-
- /**
- * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumnContainer_PrimaryKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
- {
- if (primaryKeyJoinColumns == null)
- {
- primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS);
- }
- return primaryKeyJoinColumns;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
- return ((InternalEList<?>)getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
- return getMappedBy();
- case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
- return getPrimaryKeyJoinColumns();
- case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
- return getOrphanRemoval();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
- setMappedBy((String)newValue);
- return;
- case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
- getPrimaryKeyJoinColumns().clear();
- getPrimaryKeyJoinColumns().addAll((Collection<? extends XmlPrimaryKeyJoinColumn>)newValue);
- return;
- case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
- setOrphanRemoval((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
- setMappedBy(MAPPED_BY_EDEFAULT);
- return;
- case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
- getPrimaryKeyJoinColumns().clear();
- return;
- case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
- setOrphanRemoval(ORPHAN_REMOVAL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
- return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
- case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
- return primaryKeyJoinColumns != null && !primaryKeyJoinColumns.isEmpty();
- case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
- return ORPHAN_REMOVAL_EDEFAULT == null ? orphanRemoval != null : !ORPHAN_REMOVAL_EDEFAULT.equals(orphanRemoval);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlMappedByMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY: return OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlPrimaryKeyJoinColumnContainer.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS: return OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER__PRIMARY_KEY_JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlOrphanRemovable_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL: return OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL;
- default: return -1;
- }
- }
- if (baseClass == XmlOneToOne_2_0.class)
- {
- switch (derivedFeatureID)
- {
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlMappedByMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY: return OrmPackage.XML_ONE_TO_ONE__MAPPED_BY;
- default: return -1;
- }
- }
- if (baseClass == XmlPrimaryKeyJoinColumnContainer.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN_CONTAINER__PRIMARY_KEY_JOIN_COLUMNS: return OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS;
- default: return -1;
- }
- }
- if (baseClass == XmlOrphanRemovable_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL: return OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL;
- default: return -1;
- }
- }
- if (baseClass == XmlOneToOne_2_0.class)
- {
- switch (baseFeatureID)
- {
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (mappedBy: ");
- result.append(mappedBy);
- result.append(", orphanRemoval: ");
- result.append(orphanRemoval);
- result.append(')');
- return result.toString();
- }
-
-
- // **************** XmlAttributeMapping impl ******************************
-
- public String getMappingKey() {
- return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
-
- // **************** validation support ************************************
-
- public TextRange getMappedByTextRange() {
- return getAttributeTextRange(JPA.MAPPED_BY);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildTargetEntityTranslator(),
- buildFetchTranslator(),
- buildOptionalTranslator(),
- buildAccessTranslator(),
- buildMappedByTranslator(),
- buildOrphanRemovalTranslator(),
- buildMapsIdTranslator(),
- buildIdTranslator(),
- buildPrimaryKeyJoinColumnTranslator(),
- buildJoinColumnTranslator(),
- buildJoinTableTranslator(),
- buildCascadeTranslator()
- };
- }
-
- protected static Translator buildMappedByTranslator() {
- return new Translator(JPA.MAPPED_BY, OrmPackage.eINSTANCE.getXmlMappedByMapping_MappedBy(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildOrphanRemovalTranslator() {
- return new Translator(JPA2_0.ORPHAN_REMOVAL, OrmV2_0Package.eINSTANCE.getXmlOrphanRemovable_2_0_OrphanRemoval(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildPrimaryKeyJoinColumnTranslator() {
- return XmlPrimaryKeyJoinColumn.buildTranslator(JPA.PRIMARY_KEY_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlPrimaryKeyJoinColumnContainer_PrimaryKeyJoinColumns());
- }
-
- // ********** content assist ***************
-
- public TextRange getMappedByCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.MAPPED_BY);
- }
-
- public boolean mappedByTouches(int pos) {
- TextRange textRange = this.getMappedByCodeAssistTextRange();
- return (textRange!= null) && textRange.touches(pos);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderColumn.java
deleted file mode 100644
index 73ad09cf47..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderColumn.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.BooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Order Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderColumn()
- * @model kind="class"
- * @generated
- */
-public class XmlOrderColumn extends AbstractXmlNamedColumn implements XmlOrderColumn_2_0
-{
- /**
- * The default value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNullable()
- * @generated
- * @ordered
- */
- protected static final Boolean NULLABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNullable()
- * @generated
- * @ordered
- */
- protected Boolean nullable = NULLABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInsertable()
- * @generated
- * @ordered
- */
- protected static final Boolean INSERTABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInsertable()
- * @generated
- * @ordered
- */
- protected Boolean insertable = INSERTABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUpdatable()
- * @generated
- * @ordered
- */
- protected static final Boolean UPDATABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUpdatable()
- * @generated
- * @ordered
- */
- protected Boolean updatable = UPDATABLE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlOrderColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_ORDER_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Nullable</em>' attribute.
- * @see #setNullable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderColumn_2_0_Nullable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getNullable()
- {
- return nullable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn#getNullable <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Nullable</em>' attribute.
- * @see #getNullable()
- * @generated
- */
- public void setNullable(Boolean newNullable)
- {
- Boolean oldNullable = nullable;
- nullable = newNullable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_COLUMN__NULLABLE, oldNullable, nullable));
- }
-
- /**
- * Returns the value of the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Insertable</em>' attribute.
- * @see #setInsertable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderColumn_2_0_Insertable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getInsertable()
- {
- return insertable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn#getInsertable <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Insertable</em>' attribute.
- * @see #getInsertable()
- * @generated
- */
- public void setInsertable(Boolean newInsertable)
- {
- Boolean oldInsertable = insertable;
- insertable = newInsertable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_COLUMN__INSERTABLE, oldInsertable, insertable));
- }
-
- /**
- * Returns the value of the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Updatable</em>' attribute.
- * @see #setUpdatable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderColumn_2_0_Updatable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getUpdatable()
- {
- return updatable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn#getUpdatable <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Updatable</em>' attribute.
- * @see #getUpdatable()
- * @generated
- */
- public void setUpdatable(Boolean newUpdatable)
- {
- Boolean oldUpdatable = updatable;
- updatable = newUpdatable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_COLUMN__UPDATABLE, oldUpdatable, updatable));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
- return getNullable();
- case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
- return getInsertable();
- case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
- return getUpdatable();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
- setNullable((Boolean)newValue);
- return;
- case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
- setInsertable((Boolean)newValue);
- return;
- case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
- setUpdatable((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
- setNullable(NULLABLE_EDEFAULT);
- return;
- case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
- setInsertable(INSERTABLE_EDEFAULT);
- return;
- case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
- setUpdatable(UPDATABLE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
- return NULLABLE_EDEFAULT == null ? nullable != null : !NULLABLE_EDEFAULT.equals(nullable);
- case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
- return INSERTABLE_EDEFAULT == null ? insertable != null : !INSERTABLE_EDEFAULT.equals(insertable);
- case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
- return UPDATABLE_EDEFAULT == null ? updatable != null : !UPDATABLE_EDEFAULT.equals(updatable);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlOrderColumn_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_ORDER_COLUMN__NULLABLE: return OrmV2_0Package.XML_ORDER_COLUMN_20__NULLABLE;
- case OrmPackage.XML_ORDER_COLUMN__INSERTABLE: return OrmV2_0Package.XML_ORDER_COLUMN_20__INSERTABLE;
- case OrmPackage.XML_ORDER_COLUMN__UPDATABLE: return OrmV2_0Package.XML_ORDER_COLUMN_20__UPDATABLE;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlOrderColumn_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_ORDER_COLUMN_20__NULLABLE: return OrmPackage.XML_ORDER_COLUMN__NULLABLE;
- case OrmV2_0Package.XML_ORDER_COLUMN_20__INSERTABLE: return OrmPackage.XML_ORDER_COLUMN__INSERTABLE;
- case OrmV2_0Package.XML_ORDER_COLUMN_20__UPDATABLE: return OrmPackage.XML_ORDER_COLUMN__UPDATABLE;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (nullable: ");
- result.append(nullable);
- result.append(", insertable: ");
- result.append(insertable);
- result.append(", updatable: ");
- result.append(updatable);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildNullableTranslator(),
- buildInsertableTranslator(),
- buildUpdatableTranslator(),
- buildColumnDefinitionTranslator(),
- };
- }
-
- protected static Translator buildNullableTranslator() {
- return new BooleanTranslator(JPA.NULLABLE, OrmV2_0Package.eINSTANCE.getXmlOrderColumn_2_0_Nullable(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildInsertableTranslator() {
- return new BooleanTranslator(JPA.INSERTABLE, OrmV2_0Package.eINSTANCE.getXmlOrderColumn_2_0_Insertable(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildUpdatableTranslator() {
- return new BooleanTranslator(JPA.UPDATABLE, OrmV2_0Package.eINSTANCE.getXmlOrderColumn_2_0_Updatable(), Translator.DOM_ATTRIBUTE);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderable.java
deleted file mode 100644
index d7d50139d2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOrderable.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Orderable</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable#getOrderBy <em>Order By</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlOrderable extends XmlOrderable_2_0
-{
- /**
- * Returns the value of the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order By</em>' attribute.
- * @see #setOrderBy(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOrderable_OrderBy()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getOrderBy();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable#getOrderBy <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order By</em>' attribute.
- * @see #getOrderBy()
- * @generated
- */
- void setOrderBy(String value);
-
-} // XmlOrderable
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOverride.java
deleted file mode 100644
index 2879591072..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlOverride.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.core.resource.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Override</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOverride#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOverride()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlOverride extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlOverride_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlOverride#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- TextRange getNameTextRange();
-
- boolean nameTouches(int pos);
-} // XmlOverride
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitDefaults.java
deleted file mode 100644
index ba54ef728f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitDefaults.java
+++ /dev/null
@@ -1,742 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>XmlPersistence Unit Defaults</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getSchema <em>Schema</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog <em>Catalog</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist <em>Cascade Persist</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners <em>Entity Listeners</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults()
- * @model kind="class"
- * @generated
- */
-public class XmlPersistenceUnitDefaults extends AbstractJpaEObject implements XmlAccessHolder, XmlPersistenceUnitDefaults_2_0
-{
-
- /**
- * The default value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected static final String ACCESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccess()
- * @generated
- * @ordered
- */
- protected String access = ACCESS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #isDelimitedIdentifiers() <em>Delimited Identifiers</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isDelimitedIdentifiers()
- * @generated
- * @ordered
- */
- protected static final boolean DELIMITED_IDENTIFIERS_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isDelimitedIdentifiers() <em>Delimited Identifiers</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isDelimitedIdentifiers()
- * @generated
- * @ordered
- */
- protected boolean delimitedIdentifiers = DELIMITED_IDENTIFIERS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected String schema = SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected String catalog = CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadePersist()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_PERSIST_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadePersist()
- * @generated
- * @ordered
- */
- protected boolean cascadePersist = CASCADE_PERSIST_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEntityListeners()
- * @generated
- * @ordered
- */
- protected EntityListeners entityListeners;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlPersistenceUnitDefaults()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_PERSISTENCE_UNIT_DEFAULTS;
- }
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see #setSchema(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_Schema()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getSchema()
- {
- return schema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getSchema <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema</em>' attribute.
- * @see #getSchema()
- * @generated
- */
- public void setSchema(String newSchema)
- {
- String oldSchema = schema;
- schema = newSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA, oldSchema, schema));
- }
-
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see #setCatalog(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_Catalog()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getCatalog()
- {
- return catalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Catalog</em>' attribute.
- * @see #getCatalog()
- * @generated
- */
- public void setCatalog(String newCatalog)
- {
- String oldCatalog = catalog;
- catalog = newCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG, oldCatalog, catalog));
- }
-
- /**
- * Returns the value of the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Access</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Access</em>' attribute.
- * @see #setAccess(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getAccess()
- {
- return access;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getAccess <em>Access</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Access</em>' attribute.
- * @see #getAccess()
- * @generated
- */
- public void setAccess(String newAccess)
- {
- String oldAccess = access;
- access = newAccess;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS, oldAccess, access));
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Delimited Identifiers</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Delimited Identifiers</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Delimited Identifiers</em>' attribute.
- * @see #setDelimitedIdentifiers(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isDelimitedIdentifiers()
- {
- return delimitedIdentifiers;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#isDelimitedIdentifiers <em>Delimited Identifiers</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Delimited Identifiers</em>' attribute.
- * @see #isDelimitedIdentifiers()
- * @generated
- */
- public void setDelimitedIdentifiers(boolean newDelimitedIdentifiers)
- {
- boolean oldDelimitedIdentifiers = delimitedIdentifiers;
- delimitedIdentifiers = newDelimitedIdentifiers;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS, oldDelimitedIdentifiers, delimitedIdentifiers));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade Persist</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Persist</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Persist</em>' attribute.
- * @see #setCascadePersist(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_CascadePersist()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isCascadePersist()
- {
- return cascadePersist;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist <em>Cascade Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Persist</em>' attribute.
- * @see #isCascadePersist()
- * @generated
- */
- public void setCascadePersist(boolean newCascadePersist)
- {
- boolean oldCascadePersist = cascadePersist;
- cascadePersist = newCascadePersist;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST, oldCascadePersist, cascadePersist));
- }
-
- /**
- * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Listeners</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Entity Listeners</em>' containment reference.
- * @see #setEntityListeners(EntityListeners)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_EntityListeners()
- * @model containment="true"
- * @generated
- */
- public EntityListeners getEntityListeners()
- {
- return entityListeners;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEntityListeners(EntityListeners newEntityListeners, NotificationChain msgs)
- {
- EntityListeners oldEntityListeners = entityListeners;
- entityListeners = newEntityListeners;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, oldEntityListeners, newEntityListeners);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners <em>Entity Listeners</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Entity Listeners</em>' containment reference.
- * @see #getEntityListeners()
- * @generated
- */
- public void setEntityListeners(EntityListeners newEntityListeners)
- {
- if (newEntityListeners != entityListeners)
- {
- NotificationChain msgs = null;
- if (entityListeners != null)
- msgs = ((InternalEObject)entityListeners).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, null, msgs);
- if (newEntityListeners != null)
- msgs = ((InternalEObject)newEntityListeners).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, null, msgs);
- msgs = basicSetEntityListeners(newEntityListeners, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, newEntityListeners, newEntityListeners));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
- return basicSetEntityListeners(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
- return getAccess();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
- return isDelimitedIdentifiers();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
- return getSchema();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
- return getCatalog();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
- return isCascadePersist();
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
- return getEntityListeners();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
- setAccess((String)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
- setDelimitedIdentifiers((Boolean)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
- setSchema((String)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
- setCatalog((String)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
- setCascadePersist((Boolean)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
- setEntityListeners((EntityListeners)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
- setAccess(ACCESS_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
- setDelimitedIdentifiers(DELIMITED_IDENTIFIERS_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
- setSchema(SCHEMA_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
- setCatalog(CATALOG_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
- setCascadePersist(CASCADE_PERSIST_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
- setEntityListeners((EntityListeners)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
- return ACCESS_EDEFAULT == null ? access != null : !ACCESS_EDEFAULT.equals(access);
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
- return delimitedIdentifiers != DELIMITED_IDENTIFIERS_EDEFAULT;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
- return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
- return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
- return cascadePersist != CASCADE_PERSIST_EDEFAULT;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
- return entityListeners != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlPersistenceUnitDefaults_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION: return OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION;
- case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS: return OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlPersistenceUnitDefaults_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION: return OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION;
- case OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS: return OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (access: ");
- result.append(access);
- result.append(", description: ");
- result.append(description);
- result.append(", delimitedIdentifiers: ");
- result.append(delimitedIdentifiers);
- result.append(", schema: ");
- result.append(schema);
- result.append(", catalog: ");
- result.append(catalog);
- result.append(", cascadePersist: ");
- result.append(cascadePersist);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildDescriptionTranslator(),
- buildSchemaTranslator(),
- buildCatalogTranslator(),
- buildDelimitedIdentifiersTranslator(),
- buildAccessTranslator(),
- buildCascadePersistTranslator(),
- buildEntityListenersTranslator()
- };
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlPersistenceUnitDefaults_2_0_Description());
- }
-
- protected static Translator buildSchemaTranslator() {
- return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_Schema());
- }
-
- protected static Translator buildCatalogTranslator() {
- return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_Catalog());
- }
-
- protected static Translator buildDelimitedIdentifiersTranslator() {
- return new EmptyTagBooleanTranslator(JPA2_0.DELIMITIED_IDENTIFIERS, OrmV2_0Package.eINSTANCE.getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers());
- }
-
- protected static Translator buildAccessTranslator() {
- return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access());
- }
-
- protected static Translator buildCascadePersistTranslator() {
- return new EmptyTagBooleanTranslator(JPA.CASCADE_PERSIST, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_CascadePersist());
- }
-
- protected static Translator buildEntityListenersTranslator() {
- return EntityListeners.buildTranslator(JPA.ENTITY_LISTENERS, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_EntityListeners());
- }
-
- // *********** content assist *********
-
- public boolean schemaTouches(int pos) {
- TextRange textRange = this.getElementCodeAssistTextRange(JPA.SCHEMA);
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean catalogTouches(int pos) {
- TextRange textRange = this.getElementCodeAssistTextRange(JPA.CATALOG);
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitMetadata.java
deleted file mode 100644
index b2617324dd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPersistenceUnitMetadata.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.EmptyTagBooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>XmlPersistence Unit Metadata</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults <em>Persistence Unit Defaults</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata()
- * @model kind="class"
- * @generated
- */
-public class XmlPersistenceUnitMetadata extends AbstractJpaEObject implements XmlPersistenceUnitMetadata_2_0
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #isXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isXmlMappingMetadataComplete()
- * @generated
- * @ordered
- */
- protected static final boolean XML_MAPPING_METADATA_COMPLETE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isXmlMappingMetadataComplete()
- * @generated
- * @ordered
- */
- protected boolean xmlMappingMetadataComplete = XML_MAPPING_METADATA_COMPLETE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getPersistenceUnitDefaults() <em>Persistence Unit Defaults</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPersistenceUnitDefaults()
- * @generated
- * @ordered
- */
- protected XmlPersistenceUnitDefaults persistenceUnitDefaults;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlPersistenceUnitMetadata()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_PERSISTENCE_UNIT_METADATA;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Xml Mapping Metadata Complete</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Xml Mapping Metadata Complete</em>' attribute.
- * @see #setXmlMappingMetadataComplete(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isXmlMappingMetadataComplete()
- {
- return xmlMappingMetadataComplete;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Xml Mapping Metadata Complete</em>' attribute.
- * @see #isXmlMappingMetadataComplete()
- * @generated
- */
- public void setXmlMappingMetadataComplete(boolean newXmlMappingMetadataComplete)
- {
- boolean oldXmlMappingMetadataComplete = xmlMappingMetadataComplete;
- xmlMappingMetadataComplete = newXmlMappingMetadataComplete;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE, oldXmlMappingMetadataComplete, xmlMappingMetadataComplete));
- }
-
- /**
- * Returns the value of the '<em><b>Persistence Unit Defaults</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XmlPersistence Unit Defaults</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Persistence Unit Defaults</em>' containment reference.
- * @see #setPersistenceUnitDefaults(XmlPersistenceUnitDefaults)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata_PersistenceUnitDefaults()
- * @model containment="true"
- * @generated
- */
- public XmlPersistenceUnitDefaults getPersistenceUnitDefaults()
- {
- return persistenceUnitDefaults;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetPersistenceUnitDefaults(XmlPersistenceUnitDefaults newPersistenceUnitDefaults, NotificationChain msgs)
- {
- XmlPersistenceUnitDefaults oldPersistenceUnitDefaults = persistenceUnitDefaults;
- persistenceUnitDefaults = newPersistenceUnitDefaults;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, oldPersistenceUnitDefaults, newPersistenceUnitDefaults);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults <em>Persistence Unit Defaults</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Persistence Unit Defaults</em>' containment reference.
- * @see #getPersistenceUnitDefaults()
- * @generated
- */
- public void setPersistenceUnitDefaults(XmlPersistenceUnitDefaults newPersistenceUnitDefaults)
- {
- if (newPersistenceUnitDefaults != persistenceUnitDefaults)
- {
- NotificationChain msgs = null;
- if (persistenceUnitDefaults != null)
- msgs = ((InternalEObject)persistenceUnitDefaults).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, null, msgs);
- if (newPersistenceUnitDefaults != null)
- msgs = ((InternalEObject)newPersistenceUnitDefaults).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, null, msgs);
- msgs = basicSetPersistenceUnitDefaults(newPersistenceUnitDefaults, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, newPersistenceUnitDefaults, newPersistenceUnitDefaults));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
- return basicSetPersistenceUnitDefaults(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
- return isXmlMappingMetadataComplete();
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
- return getPersistenceUnitDefaults();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
- setXmlMappingMetadataComplete((Boolean)newValue);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
- setPersistenceUnitDefaults((XmlPersistenceUnitDefaults)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
- setXmlMappingMetadataComplete(XML_MAPPING_METADATA_COMPLETE_EDEFAULT);
- return;
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
- setPersistenceUnitDefaults((XmlPersistenceUnitDefaults)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
- return xmlMappingMetadataComplete != XML_MAPPING_METADATA_COMPLETE_EDEFAULT;
- case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
- return persistenceUnitDefaults != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", xmlMappingMetadataComplete: ");
- result.append(xmlMappingMetadataComplete);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildDescriptionTranslator(),
- buildXmlMappingMetadataCompleteTranslator(),
- XmlPersistenceUnitDefaults.buildTranslator(JPA.PERSISTENCE_UNIT_DEFAULTS, OrmPackage.eINSTANCE.getXmlPersistenceUnitMetadata_PersistenceUnitDefaults())
- };
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlPersistenceUnitMetadata_2_0_Description());
- }
-
- protected static Translator buildXmlMappingMetadataCompleteTranslator() {
- return new EmptyTagBooleanTranslator(JPA.XML_MAPPING_METADATA_COMPLETE, OrmPackage.eINSTANCE.getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumn.java
deleted file mode 100644
index dcaa86b651..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Primary Key Join Column Impl</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn()
- * @model kind="class"
- * @generated
- */
-public class XmlPrimaryKeyJoinColumn extends AbstractXmlNamedColumn implements XmlBaseJoinColumn
-{
- /**
- * The default value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReferencedColumnName()
- * @generated
- * @ordered
- */
- protected String referencedColumnName = REFERENCED_COLUMN_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlPrimaryKeyJoinColumn()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_PRIMARY_KEY_JOIN_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Referenced Column Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Referenced Column Name</em>' attribute.
- * @see #setReferencedColumnName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlBaseJoinColumn_ReferencedColumnName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getReferencedColumnName()
- {
- return referencedColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Referenced Column Name</em>' attribute.
- * @see #getReferencedColumnName()
- * @generated
- */
- public void setReferencedColumnName(String newReferencedColumnName)
- {
- String oldReferencedColumnName = referencedColumnName;
- referencedColumnName = newReferencedColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME, oldReferencedColumnName, referencedColumnName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- return getReferencedColumnName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- setReferencedColumnName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- setReferencedColumnName(REFERENCED_COLUMN_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
- return REFERENCED_COLUMN_NAME_EDEFAULT == null ? referencedColumnName != null : !REFERENCED_COLUMN_NAME_EDEFAULT.equals(referencedColumnName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseJoinColumn.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME: return OrmPackage.XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlBaseJoinColumn.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_BASE_JOIN_COLUMN__REFERENCED_COLUMN_NAME: return OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (referencedColumnName: ");
- result.append(referencedColumnName);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return getAttributeTextRange(JPA.REFERENCED_COLUMN_NAME);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildReferencedColumnNameTranslator(),
- buildColumnDefinitionTranslator(),
- };
- }
-
- protected static Translator buildReferencedColumnNameTranslator() {
- return new Translator(JPA.REFERENCED_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlBaseJoinColumn_ReferencedColumnName(), Translator.DOM_ATTRIBUTE);
- }
-
- // *********** content assist ***********
-
- public TextRange getReferencedColumnNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.REFERENCED_COLUMN_NAME);
- }
-
- public boolean referencedColumnNameTouches(int pos) {
- TextRange textRange = this.getReferencedColumnNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
-} // XmlPrimaryKeyJoinColumnImpl
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumnContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumnContainer.java
deleted file mode 100644
index 9f23754f8c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlPrimaryKeyJoinColumnContainer.java
+++ /dev/null
@@ -1,51 +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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Primary Key Join Column Container</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumnContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlPrimaryKeyJoinColumnContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumnContainer_PrimaryKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns();
-
-} // XmlPrimaryKeyJoinColumnContainer
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQuery.java
deleted file mode 100644
index df6fded487..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQuery.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Query</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getQuery <em>Query</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getHints <em>Hints</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlQuery extends XmlQuery_2_0
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Query</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Query</em>' attribute.
- * @see #setQuery(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Query()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getQuery();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQuery#getQuery <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Query</em>' attribute.
- * @see #getQuery()
- * @generated
- */
- void setQuery(String value);
-
- /**
- * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Hints</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Hints</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQuery_Hints()
- * @model containment="true"
- * @generated
- */
- EList<XmlQueryHint> getHints();
-
- TextRange getNameTextRange();
-
- TextRange getQueryTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryContainer.java
deleted file mode 100644
index 12f9387dba..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryContainer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Queries Holder</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer#getNamedQueries <em>Named Queries</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer#getNamedNativeQueries <em>Named Native Queries</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlQueryContainer extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Queries</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Named Queries</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedQueries()
- * @model containment="true"
- * @generated
- */
- EList<XmlNamedQuery> getNamedQueries();
-
- /**
- * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Native Queries</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Named Native Queries</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedNativeQueries()
- * @model containment="true"
- * @generated
- */
- EList<XmlNamedNativeQuery> getNamedNativeQueries();
-
-} // XmlQueriesHolder
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryHint.java
deleted file mode 100644
index a798b5aa55..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlQueryHint.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Query Hint</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getValue <em>Value</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryHint()
- * @model kind="class"
- * @generated
- */
-public class XmlQueryHint extends AbstractJpaEObject implements XmlQueryHint_2_0
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlQueryHint()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_QUERY_HINT;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryHint_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_QUERY_HINT__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryHint_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_QUERY_HINT__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlQueryHint_Value()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getValue()
- {
- return value;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint#getValue <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- public void setValue(String newValue)
- {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_QUERY_HINT__VALUE, oldValue, value));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_QUERY_HINT__NAME:
- return getName();
- case OrmPackage.XML_QUERY_HINT__VALUE:
- return getValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_QUERY_HINT__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_QUERY_HINT__VALUE:
- setValue((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_QUERY_HINT__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_QUERY_HINT__VALUE:
- setValue(VALUE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_QUERY_HINT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_QUERY_HINT__VALUE:
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(", value: ");
- result.append(value);
- result.append(')');
- return result.toString();
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildValueTranslator(),
- buildDescriptionTranslator()
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlQueryHint_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildValueTranslator() {
- return new Translator(JPA.VALUE, OrmPackage.eINSTANCE.getXmlQueryHint_Value(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlQueryHint_2_0_Description());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlReferenceTable.java
deleted file mode 100644
index 5e739e65bd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlReferenceTable.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Reference Table</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable#getJoinColumns <em>Join Columns</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlReferenceTable()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlReferenceTable extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlReferenceTable_JoinColumns()
- * @model containment="true"
- * @generated
- */
- EList<XmlJoinColumn> getJoinColumns();
-
-} // XmlReferenceTable
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSecondaryTable.java
deleted file mode 100644
index 6571012254..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSecondaryTable.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Secondary Table Impl</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSecondaryTable()
- * @model kind="class"
- * @generated
- */
-public class XmlSecondaryTable extends AbstractXmlTable
-{
- /**
- * The cached value of the '{@link #getPrimaryKeyJoinColumns() <em>Primary Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlSecondaryTable()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_SECONDARY_TABLE;
- }
-
- /**
- * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSecondaryTable_PrimaryKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
- {
- if (primaryKeyJoinColumns == null)
- {
- primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS);
- }
- return primaryKeyJoinColumns;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
- return ((InternalEList<?>)getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
- return getPrimaryKeyJoinColumns();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
- getPrimaryKeyJoinColumns().clear();
- getPrimaryKeyJoinColumns().addAll((Collection<? extends XmlPrimaryKeyJoinColumn>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
- getPrimaryKeyJoinColumns().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
- return primaryKeyJoinColumns != null && !primaryKeyJoinColumns.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildCatalogTranslator(),
- buildSchemaTranslator(),
- buildPrimaryKeyJoinColumnsTranslator(),
- buildUniqueConstraintTranslator()
- };
- }
-
- protected static Translator buildPrimaryKeyJoinColumnsTranslator() {
- return XmlPrimaryKeyJoinColumn.buildTranslator(JPA.PRIMARY_KEY_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlSecondaryTable_PrimaryKeyJoinColumns());
- }
-
-} // XmlSecondaryTableImpl
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSequenceGenerator.java
deleted file mode 100644
index 7d605837a6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlSequenceGenerator.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Sequence Generator</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getSequenceName <em>Sequence Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSequenceGenerator()
- * @model kind="class"
- * @generated
- */
-public class XmlSequenceGenerator extends AbstractJpaEObject implements XmlGenerator, XmlSequenceGenerator_2_0
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInitialValue()
- * @generated
- * @ordered
- */
- protected static final Integer INITIAL_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInitialValue()
- * @generated
- * @ordered
- */
- protected Integer initialValue = INITIAL_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAllocationSize()
- * @generated
- * @ordered
- */
- protected static final Integer ALLOCATION_SIZE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAllocationSize()
- * @generated
- * @ordered
- */
- protected Integer allocationSize = ALLOCATION_SIZE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected String catalog = CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected String schema = SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSequenceName() <em>Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceName()
- * @generated
- * @ordered
- */
- protected static final String SEQUENCE_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSequenceName() <em>Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceName()
- * @generated
- * @ordered
- */
- protected String sequenceName = SEQUENCE_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlSequenceGenerator()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_SEQUENCE_GENERATOR;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Name</em>' attribute.
- * @see #setSequenceName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSequenceGenerator_SequenceName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getSequenceName()
- {
- return sequenceName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getSequenceName <em>Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sequence Name</em>' attribute.
- * @see #getSequenceName()
- * @generated
- */
- public void setSequenceName(String newSequenceName)
- {
- String oldSequenceName = sequenceName;
- sequenceName = newSequenceName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME, oldSequenceName, sequenceName));
- }
-
- /**
- * Returns the value of the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Initial Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Initial Value</em>' attribute.
- * @see #setInitialValue(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_InitialValue()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getInitialValue()
- {
- return initialValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getInitialValue <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Initial Value</em>' attribute.
- * @see #getInitialValue()
- * @generated
- */
- public void setInitialValue(Integer newInitialValue)
- {
- Integer oldInitialValue = initialValue;
- initialValue = newInitialValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE, oldInitialValue, initialValue));
- }
-
- /**
- * Returns the value of the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Allocation Size</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Allocation Size</em>' attribute.
- * @see #setAllocationSize(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_AllocationSize()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getAllocationSize()
- {
- return allocationSize;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getAllocationSize <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Allocation Size</em>' attribute.
- * @see #getAllocationSize()
- * @generated
- */
- public void setAllocationSize(Integer newAllocationSize)
- {
- Integer oldAllocationSize = allocationSize;
- allocationSize = newAllocationSize;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE, oldAllocationSize, allocationSize));
- }
-
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see #setCatalog(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSequenceGenerator_2_0_Catalog()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getCatalog()
- {
- return catalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getCatalog <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Catalog</em>' attribute.
- * @see #getCatalog()
- * @generated
- */
- public void setCatalog(String newCatalog)
- {
- String oldCatalog = catalog;
- catalog = newCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG, oldCatalog, catalog));
- }
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see #setSchema(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlSequenceGenerator_2_0_Schema()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getSchema()
- {
- return schema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator#getSchema <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema</em>' attribute.
- * @see #getSchema()
- * @generated
- */
- public void setSchema(String newSchema)
- {
- String oldSchema = schema;
- schema = newSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA, oldSchema, schema));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
- return getName();
- case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
- return getInitialValue();
- case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
- return getAllocationSize();
- case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
- return getCatalog();
- case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
- return getSchema();
- case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
- return getSequenceName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
- setInitialValue((Integer)newValue);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
- setAllocationSize((Integer)newValue);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
- setCatalog((String)newValue);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
- setSchema((String)newValue);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
- setSequenceName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
- setInitialValue(INITIAL_VALUE_EDEFAULT);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
- setAllocationSize(ALLOCATION_SIZE_EDEFAULT);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
- setCatalog(CATALOG_EDEFAULT);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
- setSchema(SCHEMA_EDEFAULT);
- return;
- case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
- setSequenceName(SEQUENCE_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
- return INITIAL_VALUE_EDEFAULT == null ? initialValue != null : !INITIAL_VALUE_EDEFAULT.equals(initialValue);
- case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
- return ALLOCATION_SIZE_EDEFAULT == null ? allocationSize != null : !ALLOCATION_SIZE_EDEFAULT.equals(allocationSize);
- case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
- return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
- case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
- return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
- case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
- return SEQUENCE_NAME_EDEFAULT == null ? sequenceName != null : !SEQUENCE_NAME_EDEFAULT.equals(sequenceName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlSequenceGenerator_2_0.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG: return OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__CATALOG;
- case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA: return OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__SCHEMA;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == XmlSequenceGenerator_2_0.class)
- {
- switch (baseFeatureID)
- {
- case OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__CATALOG: return OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG;
- case OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__SCHEMA: return OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(", initialValue: ");
- result.append(initialValue);
- result.append(", allocationSize: ");
- result.append(allocationSize);
- result.append(", catalog: ");
- result.append(catalog);
- result.append(", schema: ");
- result.append(schema);
- result.append(", sequenceName: ");
- result.append(sequenceName);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildSequenceNameTranslator(),
- buildInitialValueTranslator(),
- buildAllocationSizeTranslator(),
- buildCatalogTranslator(),
- buildSchemaTranslator(),
- buildDescriptionTranslator(),
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlGenerator_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildSequenceNameTranslator() {
- return new Translator(JPA.SEQUENCE_NAME, OrmPackage.eINSTANCE.getXmlSequenceGenerator_SequenceName(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildInitialValueTranslator() {
- return new Translator(JPA.INITIAL_VALUE, OrmPackage.eINSTANCE.getXmlGenerator_InitialValue(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildAllocationSizeTranslator() {
- return new Translator(JPA.ALLOCATION_SIZE, OrmPackage.eINSTANCE.getXmlGenerator_AllocationSize(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlGenerator_2_0_Description());
- }
-
- protected static Translator buildCatalogTranslator() {
- return new Translator(JPA.CATALOG, OrmV2_0Package.eINSTANCE.getXmlSequenceGenerator_2_0_Catalog(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildSchemaTranslator() {
- return new Translator(JPA.SCHEMA, OrmV2_0Package.eINSTANCE.getXmlSequenceGenerator_2_0_Schema(), Translator.DOM_ATTRIBUTE);
- }
-
- // *********** content assist ****************
-
- public TextRange getSequenceNameCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.SEQUENCE_NAME);
- }
-
- public TextRange getSchemaCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.SCHEMA);
- }
-
- public TextRange getCatalogCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.CATALOG);
- }
-
- public boolean sequenceNameTouches(int pos) {
- TextRange textRange = this.getSequenceNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean schemaTouches(int pos) {
- TextRange textRange = this.getSchemaCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean catalogTouches(int pos) {
- TextRange textRange = this.getCatalogCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTable.java
deleted file mode 100644
index 76c9db8b4f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTable.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Table</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTable()
- * @model kind="class"
- * @generated
- */
-public class XmlTable extends AbstractXmlTable
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlTable()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_TABLE;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildCatalogTranslator(),
- buildSchemaTranslator(),
- buildUniqueConstraintTranslator()
- };
- }
-
-} // Table
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTableGenerator.java
deleted file mode 100644
index abcd7fe1fe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTableGenerator.java
+++ /dev/null
@@ -1,994 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Table Generator</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getTable <em>Table</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getCatalog <em>Catalog</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getSchema <em>Schema</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnName <em>Pk Column Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getValueColumnName <em>Value Column Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnValue <em>Pk Column Value</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getUniqueConstraints <em>Unique Constraints</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator()
- * @model kind="class"
- * @generated
- */
-public class XmlTableGenerator extends AbstractJpaEObject implements XmlGenerator
-{
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInitialValue()
- * @generated
- * @ordered
- */
- protected static final Integer INITIAL_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInitialValue()
- * @generated
- * @ordered
- */
- protected Integer initialValue = INITIAL_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAllocationSize()
- * @generated
- * @ordered
- */
- protected static final Integer ALLOCATION_SIZE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAllocationSize()
- * @generated
- * @ordered
- */
- protected Integer allocationSize = ALLOCATION_SIZE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getTable() <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected static final String TABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTable() <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected String table = TABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected String catalog = CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected String schema = SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPkColumnName() <em>Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPkColumnName()
- * @generated
- * @ordered
- */
- protected static final String PK_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPkColumnName() <em>Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPkColumnName()
- * @generated
- * @ordered
- */
- protected String pkColumnName = PK_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getValueColumnName() <em>Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValueColumnName()
- * @generated
- * @ordered
- */
- protected static final String VALUE_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValueColumnName() <em>Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValueColumnName()
- * @generated
- * @ordered
- */
- protected String valueColumnName = VALUE_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPkColumnValue() <em>Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPkColumnValue()
- * @generated
- * @ordered
- */
- protected static final String PK_COLUMN_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPkColumnValue() <em>Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPkColumnValue()
- * @generated
- * @ordered
- */
- protected String pkColumnValue = PK_COLUMN_VALUE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getUniqueConstraints() <em>Unique Constraints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUniqueConstraints()
- * @generated
- * @ordered
- */
- protected EList<XmlUniqueConstraint> uniqueConstraints;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlTableGenerator()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_TABLE_GENERATOR;
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table</em>' attribute.
- * @see #setTable(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_Table()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getTable()
- {
- return table;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getTable <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table</em>' attribute.
- * @see #getTable()
- * @generated
- */
- public void setTable(String newTable)
- {
- String oldTable = table;
- table = newTable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__TABLE, oldTable, table));
- }
-
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see #setCatalog(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_Catalog()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getCatalog()
- {
- return catalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getCatalog <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Catalog</em>' attribute.
- * @see #getCatalog()
- * @generated
- */
- public void setCatalog(String newCatalog)
- {
- String oldCatalog = catalog;
- catalog = newCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__CATALOG, oldCatalog, catalog));
- }
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see #setSchema(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_Schema()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getSchema()
- {
- return schema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getSchema <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema</em>' attribute.
- * @see #getSchema()
- * @generated
- */
- public void setSchema(String newSchema)
- {
- String oldSchema = schema;
- schema = newSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__SCHEMA, oldSchema, schema));
- }
-
- /**
- * Returns the value of the '<em><b>Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pk Column Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pk Column Name</em>' attribute.
- * @see #setPkColumnName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_PkColumnName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getPkColumnName()
- {
- return pkColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnName <em>Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pk Column Name</em>' attribute.
- * @see #getPkColumnName()
- * @generated
- */
- public void setPkColumnName(String newPkColumnName)
- {
- String oldPkColumnName = pkColumnName;
- pkColumnName = newPkColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME, oldPkColumnName, pkColumnName));
- }
-
- /**
- * Returns the value of the '<em><b>Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value Column Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value Column Name</em>' attribute.
- * @see #setValueColumnName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_ValueColumnName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getValueColumnName()
- {
- return valueColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getValueColumnName <em>Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value Column Name</em>' attribute.
- * @see #getValueColumnName()
- * @generated
- */
- public void setValueColumnName(String newValueColumnName)
- {
- String oldValueColumnName = valueColumnName;
- valueColumnName = newValueColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME, oldValueColumnName, valueColumnName));
- }
-
- /**
- * Returns the value of the '<em><b>Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pk Column Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pk Column Value</em>' attribute.
- * @see #setPkColumnValue(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_PkColumnValue()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getPkColumnValue()
- {
- return pkColumnValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getPkColumnValue <em>Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pk Column Value</em>' attribute.
- * @see #getPkColumnValue()
- * @generated
- */
- public void setPkColumnValue(String newPkColumnValue)
- {
- String oldPkColumnValue = pkColumnValue;
- pkColumnValue = newPkColumnValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE, oldPkColumnValue, pkColumnValue));
- }
-
- /**
- * Returns the value of the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Initial Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Initial Value</em>' attribute.
- * @see #setInitialValue(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_InitialValue()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getInitialValue()
- {
- return initialValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getInitialValue <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Initial Value</em>' attribute.
- * @see #getInitialValue()
- * @generated
- */
- public void setInitialValue(Integer newInitialValue)
- {
- Integer oldInitialValue = initialValue;
- initialValue = newInitialValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE, oldInitialValue, initialValue));
- }
-
- /**
- * Returns the value of the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Allocation Size</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Allocation Size</em>' attribute.
- * @see #setAllocationSize(Integer)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlGenerator_AllocationSize()
- * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
- * @generated
- */
- public Integer getAllocationSize()
- {
- return allocationSize;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator#getAllocationSize <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Allocation Size</em>' attribute.
- * @see #getAllocationSize()
- * @generated
- */
- public void setAllocationSize(Integer newAllocationSize)
- {
- Integer oldAllocationSize = allocationSize;
- allocationSize = newAllocationSize;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE, oldAllocationSize, allocationSize));
- }
-
- /**
- * Returns the value of the '<em><b>Unique Constraints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique Constraints</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Unique Constraints</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTableGenerator_UniqueConstraints()
- * @model containment="true"
- * @generated
- */
- public EList<XmlUniqueConstraint> getUniqueConstraints()
- {
- if (uniqueConstraints == null)
- {
- uniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
- }
- return uniqueConstraints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
- return ((InternalEList<?>)getUniqueConstraints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
- return getDescription();
- case OrmPackage.XML_TABLE_GENERATOR__NAME:
- return getName();
- case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
- return getInitialValue();
- case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
- return getAllocationSize();
- case OrmPackage.XML_TABLE_GENERATOR__TABLE:
- return getTable();
- case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
- return getCatalog();
- case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
- return getSchema();
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
- return getPkColumnName();
- case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
- return getValueColumnName();
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
- return getPkColumnValue();
- case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
- return getUniqueConstraints();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
- setInitialValue((Integer)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
- setAllocationSize((Integer)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__TABLE:
- setTable((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
- setCatalog((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
- setSchema((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
- setPkColumnName((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
- setValueColumnName((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
- setPkColumnValue((String)newValue);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
- getUniqueConstraints().clear();
- getUniqueConstraints().addAll((Collection<? extends XmlUniqueConstraint>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
- setInitialValue(INITIAL_VALUE_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
- setAllocationSize(ALLOCATION_SIZE_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__TABLE:
- setTable(TABLE_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
- setCatalog(CATALOG_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
- setSchema(SCHEMA_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
- setPkColumnName(PK_COLUMN_NAME_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
- setValueColumnName(VALUE_COLUMN_NAME_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
- setPkColumnValue(PK_COLUMN_VALUE_EDEFAULT);
- return;
- case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
- getUniqueConstraints().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case OrmPackage.XML_TABLE_GENERATOR__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
- return INITIAL_VALUE_EDEFAULT == null ? initialValue != null : !INITIAL_VALUE_EDEFAULT.equals(initialValue);
- case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
- return ALLOCATION_SIZE_EDEFAULT == null ? allocationSize != null : !ALLOCATION_SIZE_EDEFAULT.equals(allocationSize);
- case OrmPackage.XML_TABLE_GENERATOR__TABLE:
- return TABLE_EDEFAULT == null ? table != null : !TABLE_EDEFAULT.equals(table);
- case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
- return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
- case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
- return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
- return PK_COLUMN_NAME_EDEFAULT == null ? pkColumnName != null : !PK_COLUMN_NAME_EDEFAULT.equals(pkColumnName);
- case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
- return VALUE_COLUMN_NAME_EDEFAULT == null ? valueColumnName != null : !VALUE_COLUMN_NAME_EDEFAULT.equals(valueColumnName);
- case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
- return PK_COLUMN_VALUE_EDEFAULT == null ? pkColumnValue != null : !PK_COLUMN_VALUE_EDEFAULT.equals(pkColumnValue);
- case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
- return uniqueConstraints != null && !uniqueConstraints.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(", initialValue: ");
- result.append(initialValue);
- result.append(", allocationSize: ");
- result.append(allocationSize);
- result.append(", table: ");
- result.append(table);
- result.append(", catalog: ");
- result.append(catalog);
- result.append(", schema: ");
- result.append(schema);
- result.append(", pkColumnName: ");
- result.append(pkColumnName);
- result.append(", valueColumnName: ");
- result.append(valueColumnName);
- result.append(", pkColumnValue: ");
- result.append(pkColumnValue);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getNameTextRange() {
- return getAttributeTextRange(JPA.NAME);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildTableTranslator(),
- buildCatalogTranslator(),
- buildSchemaTranslator(),
- buildPkColumnNameTranslator(),
- buildValueColumnNameTranslator(),
- buildPkColumnValueTranslator(),
- buildInitialValueTranslator(),
- buildAllocationSizeTranslator(),
- buildDescriptionTranslator(),
- XmlUniqueConstraint.buildTranslator(JPA.UNIQUE_CONSTRAINT, OrmPackage.eINSTANCE.getXmlTableGenerator_UniqueConstraints())
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlGenerator_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildTableTranslator() {
- return new Translator(JPA.TABLE, OrmPackage.eINSTANCE.getXmlTableGenerator_Table(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildCatalogTranslator() {
- return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getXmlTableGenerator_Catalog(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildSchemaTranslator() {
- return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getXmlTableGenerator_Schema(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildPkColumnNameTranslator() {
- return new Translator(JPA.PK_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlTableGenerator_PkColumnName(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildValueColumnNameTranslator() {
- return new Translator(JPA.VALUE_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlTableGenerator_ValueColumnName(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildPkColumnValueTranslator() {
- return new Translator(JPA.PK_COLUMN_VALUE, OrmPackage.eINSTANCE.getXmlTableGenerator_PkColumnValue(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildInitialValueTranslator() {
- return new Translator(JPA.INITIAL_VALUE, OrmPackage.eINSTANCE.getXmlGenerator_InitialValue(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildAllocationSizeTranslator() {
- return new Translator(JPA.ALLOCATION_SIZE, OrmPackage.eINSTANCE.getXmlGenerator_AllocationSize(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlGenerator_2_0_Description());
- }
-
- // ************* content assist ***************
-
- public TextRange getTableCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.TABLE);
- }
-
- public TextRange getSchemaCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.SCHEMA);
- }
-
- public TextRange getCatalogCodeAssistTextRange() {
- return getAttributeCodeAssistTextRange(JPA.CATALOG);
- }
-
- public TextRange getPKColumnNameTextRange() {
- return getAttributeCodeAssistTextRange(JPA.PK_COLUMN_NAME);
- }
-
- public TextRange getValueColumnNameTextRange() {
- return getAttributeCodeAssistTextRange(JPA.VALUE_COLUMN_NAME);
- }
-
- public boolean tableTouches(int pos) {
- TextRange textRange = this.getTableCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean schemaTouches(int pos) {
- TextRange textRange = this.getSchemaCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean catalogTouches(int pos) {
- TextRange textRange = this.getCatalogCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean pkColumnNameTouches(int pos) {
- TextRange textRange = this.getPKColumnNameTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-
- public boolean valueColumnNameTouches(int pos) {
- TextRange textRange = this.getValueColumnNameTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTransient.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTransient.java
deleted file mode 100644
index b51d6e800d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTransient.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Transient</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTransient()
- * @model kind="class"
- * @generated
- */
-public class XmlTransient extends AbstractXmlAttributeMapping
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlTransient()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_TRANSIENT;
- }
-
- public String getMappingKey() {
- return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator()
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTypeMapping.java
deleted file mode 100644
index 79c3414c8d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlTypeMapping.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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.core.resource.orm;
-
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.text.edits.ReplaceEdit;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Type Mapping</b></em>'.
- *
- * 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.
- *
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getClassName <em>Class Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getAttributes <em>Attributes</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlTypeMapping extends XmlAccessHolder
-{
- /**
- * Returns the value of the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Class Name</em>' attribute.
- * @see #setClassName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_ClassName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClassName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getClassName <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Class Name</em>' attribute.
- * @see #getClassName()
- * @generated
- */
- void setClassName(String value);
-
- /**
- * Returns the value of the '<em><b>Metadata Complete</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Metadata Complete</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Metadata Complete</em>' attribute.
- * @see #setMetadataComplete(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_MetadataComplete()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getMetadataComplete();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Metadata Complete</em>' attribute.
- * @see #getMetadataComplete()
- * @generated
- */
- void setMetadataComplete(Boolean value);
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
- /**
- * Returns the value of the '<em><b>Attributes</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attributes</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attributes</em>' containment reference.
- * @see #setAttributes(Attributes)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlTypeMapping_Attributes()
- * @model containment="true"
- * @generated
- */
- Attributes getAttributes();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping#getAttributes <em>Attributes</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Attributes</em>' containment reference.
- * @see #getAttributes()
- * @generated
- */
- void setAttributes(Attributes value);
-
- TextRange getClassTextRange();
-
- TextRange getAttributesTextRange();
-
- TextRange getNameTextRange();
-
- //TODO not happy with this, or the corresponding one in XmlAttributeMapping
- String getMappingKey();
-
-
- // ********** refactoring **********
-
- ReplaceEdit createRenameTypeEdit(IType originalType, String newName);
-
- ReplaceEdit createRenamePackageEdit(String newName);
-
- // ********** content assist *********
-
- boolean classNameTouches(int pos);
-} // XmlTypeMapping
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlUniqueConstraint.java
deleted file mode 100644
index e0c0106e7f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlUniqueConstraint.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.orm;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EDataTypeEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Unique Constraint</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint#getColumnNames <em>Column Names</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlUniqueConstraint()
- * @model kind="class"
- * @generated
- */
-public class XmlUniqueConstraint extends AbstractJpaEObject implements XmlUniqueConstraint_2_0
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
- /**
- * The cached value of the '{@link #getColumnNames() <em>Column Names</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnNames()
- * @generated
- * @ordered
- */
- protected EList<String> columnNames;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlUniqueConstraint()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_UNIQUE_CONSTRAINT;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlUniqueConstraint_2_0_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_UNIQUE_CONSTRAINT__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Column Names</b></em>' attribute list.
- * The list contents are of type {@link java.lang.String}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Names</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Names</em>' attribute list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlUniqueConstraint_ColumnNames()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public EList<String> getColumnNames()
- {
- if (columnNames == null)
- {
- columnNames = new EDataTypeEList<String>(String.class, this, OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES);
- }
- return columnNames;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
- return getName();
- case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
- return getColumnNames();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
- setName((String)newValue);
- return;
- case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
- getColumnNames().clear();
- getColumnNames().addAll((Collection<? extends String>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
- setName(NAME_EDEFAULT);
- return;
- case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
- getColumnNames().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
- return columnNames != null && !columnNames.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", columnNames: ");
- result.append(columnNames);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildColumnNameTranslator(),
- };
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(JPA.NAME, OrmV2_0Package.eINSTANCE.getXmlUniqueConstraint_2_0_Name(), Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildColumnNameTranslator() {
- return new Translator(JPA.COLUMN_NAME, OrmPackage.eINSTANCE.getXmlUniqueConstraint_ColumnNames());
- }
-
- // ************ content assist **********
-
- protected TextRange getColumnNameCodeAssistTextRange() {
- return this.getElementCodeAssistTextRange(JPA.COLUMN_NAME);
- }
-
- public boolean columnNamesTouches(int pos) {
- TextRange textRange = getColumnNameCodeAssistTextRange();
- return (textRange != null) && (textRange.touches(pos));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlVersion.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlVersion.java
deleted file mode 100644
index d4b466b7f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/XmlVersion.java
+++ /dev/null
@@ -1,523 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.MappingKeys;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Version</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlVersion()
- * @model kind="class"
- * @generated
- */
-public class XmlVersion extends AbstractXmlAttributeMapping implements ColumnMapping, XmlConvertibleMapping
-{
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected XmlColumn column;
- /**
- * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected static final boolean LOB_EDEFAULT = false;
- /**
- * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected boolean lob = LOB_EDEFAULT;
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
- /**
- * The default value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected static final EnumType ENUMERATED_EDEFAULT = EnumType.ORDINAL;
- /**
- * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType enumerated = ENUMERATED_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlVersion()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return OrmPackage.Literals.XML_VERSION;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getColumnMapping_Column()
- * @model containment="true"
- * @generated
- */
- public XmlColumn getColumn()
- {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
- {
- XmlColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__COLUMN, oldColumn, newColumn);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- public void setColumn(XmlColumn newColumn)
- {
- if (newColumn != column)
- {
- NotificationChain msgs = null;
- if (column != null)
- msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_VERSION__COLUMN, null, msgs);
- if (newColumn != null)
- msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_VERSION__COLUMN, null, msgs);
- msgs = basicSetColumn(newColumn, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__COLUMN, newColumn, newColumn));
- }
-
- /**
- * Returns the value of the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lob</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lob</em>' attribute.
- * @see #setLob(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- public boolean isLob()
- {
- return lob;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion#isLob <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lob</em>' attribute.
- * @see #isLob()
- * @generated
- */
- public void setLob(boolean newLob)
- {
- boolean oldLob = lob;
- lob = newLob;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__LOB, oldLob, lob));
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal()
- {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporal(TemporalType newTemporal)
- {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__TEMPORAL, oldTemporal, temporal));
- }
-
- /**
- * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
- * @model
- * @generated
- */
- public EnumType getEnumerated()
- {
- return enumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlVersion#getEnumerated <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getEnumerated()
- * @generated
- */
- public void setEnumerated(EnumType newEnumerated)
- {
- EnumType oldEnumerated = enumerated;
- enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__ENUMERATED, oldEnumerated, enumerated));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case OrmPackage.XML_VERSION__COLUMN:
- return basicSetColumn(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case OrmPackage.XML_VERSION__COLUMN:
- return getColumn();
- case OrmPackage.XML_VERSION__LOB:
- return isLob();
- case OrmPackage.XML_VERSION__TEMPORAL:
- return getTemporal();
- case OrmPackage.XML_VERSION__ENUMERATED:
- return getEnumerated();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case OrmPackage.XML_VERSION__COLUMN:
- setColumn((XmlColumn)newValue);
- return;
- case OrmPackage.XML_VERSION__LOB:
- setLob((Boolean)newValue);
- return;
- case OrmPackage.XML_VERSION__TEMPORAL:
- setTemporal((TemporalType)newValue);
- return;
- case OrmPackage.XML_VERSION__ENUMERATED:
- setEnumerated((EnumType)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_VERSION__COLUMN:
- setColumn((XmlColumn)null);
- return;
- case OrmPackage.XML_VERSION__LOB:
- setLob(LOB_EDEFAULT);
- return;
- case OrmPackage.XML_VERSION__TEMPORAL:
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- case OrmPackage.XML_VERSION__ENUMERATED:
- setEnumerated(ENUMERATED_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case OrmPackage.XML_VERSION__COLUMN:
- return column != null;
- case OrmPackage.XML_VERSION__LOB:
- return lob != LOB_EDEFAULT;
- case OrmPackage.XML_VERSION__TEMPORAL:
- return temporal != TEMPORAL_EDEFAULT;
- case OrmPackage.XML_VERSION__ENUMERATED:
- return enumerated != ENUMERATED_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
- {
- if (baseClass == ColumnMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_VERSION__COLUMN: return OrmPackage.COLUMN_MAPPING__COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (derivedFeatureID)
- {
- case OrmPackage.XML_VERSION__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
- case OrmPackage.XML_VERSION__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
- case OrmPackage.XML_VERSION__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
- {
- if (baseClass == ColumnMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.COLUMN_MAPPING__COLUMN: return OrmPackage.XML_VERSION__COLUMN;
- default: return -1;
- }
- }
- if (baseClass == XmlConvertibleMapping.class)
- {
- switch (baseFeatureID)
- {
- case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_VERSION__LOB;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_VERSION__TEMPORAL;
- case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_VERSION__ENUMERATED;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (lob: ");
- result.append(lob);
- result.append(", temporal: ");
- result.append(temporal);
- result.append(", enumerated: ");
- result.append(enumerated);
- result.append(')');
- return result.toString();
- }
-
- public TextRange getEnumeratedTextRange() {
- throw new UnsupportedOperationException("enumerated not supported by version mappings");
- }
-
- public TextRange getLobTextRange() {
- throw new UnsupportedOperationException("lob not supported by version mappings");
- }
-
- public TextRange getTemporalTextRange() {
- return getAttributeTextRange(JPA.TEMPORAL);
- }
-
- public String getMappingKey() {
- return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildAccessTranslator(),
- buildColumnTranslator(),
- buildTemporalTranslator(),
- };
- }
-
- protected static Translator buildColumnTranslator() {
- return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getColumnMapping_Column());
- }
-
- protected static Translator buildTemporalTranslator() {
- return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/JPA2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/JPA2_0.java
deleted file mode 100644
index 8b58b67f87..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/JPA2_0.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.orm.JPA;
-
-/**
- * JPA 2.0 orm.xml-related stuff (elements, attributes etc.)
- *
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-@SuppressWarnings("nls")
-public interface JPA2_0
- extends JPA
-{
- String SCHEMA_NAMESPACE = JPA.SCHEMA_NAMESPACE;
- String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/orm_2_0.xsd";
- String SCHEMA_VERSION = "2.0";
-
- // JPA 2.0 specific nodes
-
- String CACHEABLE = "cacheable";
- String COLLECTION_TABLE = "collection-table";
- String DELIMITIED_IDENTIFIERS = "delimited-identifiers";
- String ELEMENT_COLLECTION = "element-collection";
- String MAP_KEY_ATTRIBUTE_OVERRIDE = "map-key-attribute-override";
- String MAP_KEY_CLASS = "map-key-class";
- String MAP_KEY_COLUMN = "map-key-column";
- String MAP_KEY_CONVERT = "map-key-convert";
- String MAP_KEY_ENUMERATED = "map-key-enumerated";
- String MAP_KEY_JOIN_COLUMN = "map-key-join-column";
- String MAPS_ID = "maps-id";
- String NAMED_QUERY__LOCK_MODE = "lock-mode";
- String ORDER_COLUMN = "order-column";
- String ORPHAN_REMOVAL = "orphan-removal";
- String TARGET_CLASS = "target-class";
- String MAP_KEY_TEMPORAL = "map-key-temporal";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/LockModeType_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/LockModeType_2_0.java
deleted file mode 100644
index e589259108..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/LockModeType_2_0.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Lock Mode Type 20</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getLockModeType_2_0()
- * @model
- * @generated
- */
-public enum LockModeType_2_0 implements Enumerator
-{
- /**
- * The '<em><b>NONE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #NONE_VALUE
- * @generated
- * @ordered
- */
- NONE(0, "NONE", "NONE"), /**
- * The '<em><b>READ</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #READ_VALUE
- * @generated
- * @ordered
- */
- READ(1, "READ", "READ"),
-
- /**
- * The '<em><b>WRITE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #WRITE_VALUE
- * @generated
- * @ordered
- */
- WRITE(2, "WRITE", "WRITE"),
-
- /**
- * The '<em><b>OPTIMISTIC</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #OPTIMISTIC_VALUE
- * @generated
- * @ordered
- */
- OPTIMISTIC(3, "OPTIMISTIC", "OPTIMISTIC"),
-
- /**
- * The '<em><b>OPTIMISTIC FORCE INCREMENT</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #OPTIMISTIC_FORCE_INCREMENT_VALUE
- * @generated
- * @ordered
- */
- OPTIMISTIC_FORCE_INCREMENT(4, "OPTIMISTIC_FORCE_INCREMENT", "OPTIMISTIC_FORCE_INCREMENT"),
-
- /**
- * The '<em><b>PESSIMISTIC READ</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #PESSIMISTIC_READ_VALUE
- * @generated
- * @ordered
- */
- PESSIMISTIC_READ(5, "PESSIMISTIC_READ", "PESSIMISTIC_READ"),
-
- /**
- * The '<em><b>PESSIMISTIC WRITE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #PESSIMISTIC_WRITE_VALUE
- * @generated
- * @ordered
- */
- PESSIMISTIC_WRITE(6, "PESSIMISTIC_WRITE", "PESSIMISTIC_WRITE"),
-
- /**
- * The '<em><b>PESSIMISTIC FORCE INCREMENT</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #PESSIMISTIC_FORCE_INCREMENT_VALUE
- * @generated
- * @ordered
- */
- PESSIMISTIC_FORCE_INCREMENT(7, "PESSIMISTIC_FORCE_INCREMENT", "PESSIMISTIC_FORCE_INCREMENT");
-
- /**
- * The '<em><b>NONE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #NONE
- * @model
- * @generated
- * @ordered
- */
- public static final int NONE_VALUE = 0;
-
- /**
- * The '<em><b>READ</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>READ</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #READ
- * @model
- * @generated
- * @ordered
- */
- public static final int READ_VALUE = 1;
-
- /**
- * The '<em><b>WRITE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>WRITE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #WRITE
- * @model
- * @generated
- * @ordered
- */
- public static final int WRITE_VALUE = 2;
-
- /**
- * The '<em><b>OPTIMISTIC</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>OPTIMISTIC</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #OPTIMISTIC
- * @model
- * @generated
- * @ordered
- */
- public static final int OPTIMISTIC_VALUE = 3;
-
- /**
- * The '<em><b>OPTIMISTIC FORCE INCREMENT</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>OPTIMISTIC FORCE INCREMENT</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #OPTIMISTIC_FORCE_INCREMENT
- * @model
- * @generated
- * @ordered
- */
- public static final int OPTIMISTIC_FORCE_INCREMENT_VALUE = 4;
-
- /**
- * The '<em><b>PESSIMISTIC READ</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>PESSIMISTIC READ</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #PESSIMISTIC_READ
- * @model
- * @generated
- * @ordered
- */
- public static final int PESSIMISTIC_READ_VALUE = 5;
-
- /**
- * The '<em><b>PESSIMISTIC WRITE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>PESSIMISTIC WRITE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #PESSIMISTIC_WRITE
- * @model
- * @generated
- * @ordered
- */
- public static final int PESSIMISTIC_WRITE_VALUE = 6;
-
- /**
- * The '<em><b>PESSIMISTIC FORCE INCREMENT</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>PESSIMISTIC FORCE INCREMENT</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #PESSIMISTIC_FORCE_INCREMENT
- * @model
- * @generated
- * @ordered
- */
- public static final int PESSIMISTIC_FORCE_INCREMENT_VALUE = 7;
-
- /**
- * An array of all the '<em><b>Lock Mode Type 20</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final LockModeType_2_0[] VALUES_ARRAY =
- new LockModeType_2_0[]
- {
- NONE,
- READ,
- WRITE,
- OPTIMISTIC,
- OPTIMISTIC_FORCE_INCREMENT,
- PESSIMISTIC_READ,
- PESSIMISTIC_WRITE,
- PESSIMISTIC_FORCE_INCREMENT,
- };
-
- /**
- * A public read-only list of all the '<em><b>Lock Mode Type 20</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<LockModeType_2_0> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Lock Mode Type 20</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LockModeType_2_0 get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- LockModeType_2_0 result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Lock Mode Type 20</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LockModeType_2_0 getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- LockModeType_2_0 result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Lock Mode Type 20</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LockModeType_2_0 get(int value)
- {
- switch (value)
- {
- case NONE_VALUE: return NONE;
- case READ_VALUE: return READ;
- case WRITE_VALUE: return WRITE;
- case OPTIMISTIC_VALUE: return OPTIMISTIC;
- case OPTIMISTIC_FORCE_INCREMENT_VALUE: return OPTIMISTIC_FORCE_INCREMENT;
- case PESSIMISTIC_READ_VALUE: return PESSIMISTIC_READ;
- case PESSIMISTIC_WRITE_VALUE: return PESSIMISTIC_WRITE;
- case PESSIMISTIC_FORCE_INCREMENT_VALUE: return PESSIMISTIC_FORCE_INCREMENT;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private LockModeType_2_0(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //LockModeType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Factory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Factory.java
deleted file mode 100644
index 0e9e84a0b6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Factory.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package
- * @generated
- */
-public class OrmV2_0Factory extends EFactoryImpl
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final OrmV2_0Factory eINSTANCE = init();
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static OrmV2_0Factory init()
- {
- try
- {
- OrmV2_0Factory theOrmV2_0Factory = (OrmV2_0Factory)EPackage.Registry.INSTANCE.getEFactory("jpt.orm.v2_0.xmi");
- if (theOrmV2_0Factory != null)
- {
- return theOrmV2_0Factory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new OrmV2_0Factory();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OrmV2_0Factory()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- case OrmV2_0Package.LOCK_MODE_TYPE_20:
- return createLockModeType_2_0FromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- case OrmV2_0Package.LOCK_MODE_TYPE_20:
- return convertLockModeType_2_0ToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LockModeType_2_0 createLockModeType_2_0FromString(EDataType eDataType, String initialValue)
- {
- LockModeType_2_0 result = LockModeType_2_0.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertLockModeType_2_0ToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OrmV2_0Package getOrmV2_0Package()
- {
- return (OrmV2_0Package)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static OrmV2_0Package getPackage()
- {
- return OrmV2_0Package.eINSTANCE;
- }
-
-} //OrmV2_0Factory
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Package.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Package.java
deleted file mode 100644
index 73829aed1a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/OrmV2_0Package.java
+++ /dev/null
@@ -1,3808 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.resource.orm.v2_0;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.xml.CommonPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Factory
- * @model kind="package"
- * @generated
- */
-public class OrmV2_0Package extends EPackageImpl
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNAME = "v2_0";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_URI = "jpt.orm.v2_0.xmi";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_PREFIX = "org.eclipse.jpt.jpa.core.resource.orm.v2_0";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final OrmV2_0Package eINSTANCE = org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0 <em>Xml Attribute Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeMapping_2_0()
- * @generated
- */
- public static final int XML_ATTRIBUTE_MAPPING_20 = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0 <em>Xml Association Override 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0()
- * @generated
- */
- public static final int XML_ASSOCIATION_OVERRIDE_20 = 0;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE_20__JOIN_TABLE = OrmPackage.XML_JOIN_TABLE_CONTAINER__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION = OrmPackage.XML_JOIN_TABLE_CONTAINER_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Association Override 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ASSOCIATION_OVERRIDE_20_FEATURE_COUNT = OrmPackage.XML_JOIN_TABLE_CONTAINER_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Access</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_MAPPING_20__ACCESS = OrmPackage.XML_ACCESS_HOLDER__ACCESS;
-
- /**
- * The number of structural features of the '<em>Xml Attribute Mapping 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_MAPPING_20_FEATURE_COUNT = OrmPackage.XML_ACCESS_HOLDER_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0 <em>Xml Attribute Override 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0()
- * @generated
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_20 = 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Attribute Override 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTE_OVERRIDE_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0 <em>Xml Attributes 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0()
- * @generated
- */
- public static final int XML_ATTRIBUTES_20 = 3;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTES_20__DESCRIPTION = 0;
-
- /**
- * The feature id for the '<em><b>Element Collections</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS = 1;
-
- /**
- * The number of structural features of the '<em>Xml Attributes 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ATTRIBUTES_20_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0 <em>Xml Collection Table 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCollectionTable_2_0()
- * @generated
- */
- public static final int XML_COLLECTION_TABLE_20 = 6;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0 <em>Xml Derived Id 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0()
- * @generated
- */
- public static final int XML_DERIVED_ID_20 = 7;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0 <em>Xml Element Collection 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0()
- * @generated
- */
- public static final int XML_ELEMENT_COLLECTION_20 = 8;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0 <em>Xml Embedded 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEmbedded_2_0()
- * @generated
- */
- public static final int XML_EMBEDDED_20 = 9;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0 <em>Xml Cacheable 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0()
- * @generated
- */
- public static final int XML_CACHEABLE_20 = 4;
-
- /**
- * The feature id for the '<em><b>Cacheable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CACHEABLE_20__CACHEABLE = 0;
-
- /**
- * The number of structural features of the '<em>Xml Cacheable 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CACHEABLE_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0 <em>Xml Cascade Type 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0()
- * @generated
- */
- public static final int XML_CASCADE_TYPE_20 = 5;
-
- /**
- * The feature id for the '<em><b>Cascade Detach</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CASCADE_TYPE_20__CASCADE_DETACH = 0;
-
- /**
- * The number of structural features of the '<em>Xml Cascade Type 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_CASCADE_TYPE_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE_20__JOIN_COLUMNS = OrmPackage.XML_REFERENCE_TABLE__JOIN_COLUMNS;
-
- /**
- * The number of structural features of the '<em>Xml Collection Table 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_COLLECTION_TABLE_20_FEATURE_COUNT = OrmPackage.XML_REFERENCE_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DERIVED_ID_20__ID = 0;
-
- /**
- * The number of structural features of the '<em>Xml Derived Id 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_DERIVED_ID_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__LOB = OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__TEMPORAL = OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__ENUMERATED = OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__ORDER_COLUMN = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__ORDER_BY = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__ATTRIBUTE_OVERRIDES = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__ASSOCIATION_OVERRIDES = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_ATTRIBUTE_OVERRIDES = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_TEMPORAL = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_ENUMERATED = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Target Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__TARGET_CLASS = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__FETCH = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 11;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 12;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__COLUMN = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 13;
-
- /**
- * The feature id for the '<em><b>Collection Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 14;
-
- /**
- * The number of structural features of the '<em>Xml Element Collection 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ELEMENT_COLLECTION_20_FEATURE_COUNT = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 15;
-
- /**
- * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_20__ASSOCIATION_OVERRIDES = OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
-
- /**
- * The number of structural features of the '<em>Xml Embedded 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EMBEDDED_20_FEATURE_COUNT = OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0 <em>Xml Entity 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntity_2_0()
- * @generated
- */
- public static final int XML_ENTITY_20 = 10;
-
- /**
- * The feature id for the '<em><b>Cacheable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_20__CACHEABLE = XML_CACHEABLE_20__CACHEABLE;
-
- /**
- * The number of structural features of the '<em>Xml Entity 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_20_FEATURE_COUNT = XML_CACHEABLE_20_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0 <em>Xml Entity Listener 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0()
- * @generated
- */
- public static final int XML_ENTITY_LISTENER_20 = 11;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_LISTENER_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Entity Listener 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_LISTENER_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0 <em>Xml Event Method 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0()
- * @generated
- */
- public static final int XML_EVENT_METHOD_20 = 12;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Event Method 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_EVENT_METHOD_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0 <em>Xml Generator 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0()
- * @generated
- */
- public static final int XML_GENERATOR_20 = 13;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Generator 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_GENERATOR_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0 <em>Xml Orderable 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0()
- * @generated
- */
- public static final int XML_ORDERABLE_20 = 22;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDERABLE_20__ORDER_COLUMN = 0;
-
- /**
- * The number of structural features of the '<em>Xml Orderable 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDERABLE_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0 <em>Xml Multi Relationship Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0()
- * @generated
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20 = 18;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__ORDER_COLUMN = XML_ORDERABLE_20__ORDER_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ATTRIBUTE_OVERRIDES = XML_ORDERABLE_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL = XML_ORDERABLE_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED = XML_ORDERABLE_20_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS = XML_ORDERABLE_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN = XML_ORDERABLE_20_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS = XML_ORDERABLE_20_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Xml Multi Relationship Mapping 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT = XML_ORDERABLE_20_FEATURE_COUNT + 6;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0 <em>Xml Many To Many 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlManyToMany_2_0()
- * @generated
- */
- public static final int XML_MANY_TO_MANY_20 = 14;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__ORDER_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__ORDER_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__MAP_KEY_ATTRIBUTE_OVERRIDES = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__MAP_KEY_TEMPORAL = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__MAP_KEY_ENUMERATED = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__MAP_KEY_CLASS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__MAP_KEY_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20__MAP_KEY_JOIN_COLUMNS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS;
-
- /**
- * The number of structural features of the '<em>Xml Many To Many 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY_20_FEATURE_COUNT = XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0 <em>Xml Map Key Attribute Override Container 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0()
- * @generated
- */
- public static final int XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20 = 15;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES = 0;
-
- /**
- * The number of structural features of the '<em>Xml Map Key Attribute Override Container 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0 <em>Xml Map Key Convertible Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyConvertibleMapping_2_0()
- * @generated
- */
- public static final int XML_MAP_KEY_CONVERTIBLE_MAPPING_20 = 16;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL = 0;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED = 1;
-
- /**
- * The number of structural features of the '<em>Xml Map Key Convertible Mapping 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAP_KEY_CONVERTIBLE_MAPPING_20_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0 <em>Xml Maps Id 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0()
- * @generated
- */
- public static final int XML_MAPS_ID_20 = 17;
-
- /**
- * The feature id for the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPS_ID_20__MAPS_ID = 0;
-
- /**
- * The number of structural features of the '<em>Xml Maps Id 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPS_ID_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0 <em>Xml Named Query 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0()
- * @generated
- */
- public static final int XML_NAMED_QUERY_20 = 19;
-
- /**
- * The feature id for the '<em><b>Lock Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY_20__LOCK_MODE = 0;
-
- /**
- * The number of structural features of the '<em>Xml Named Query 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_NAMED_QUERY_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0 <em>Xml Orphan Removable 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0()
- * @generated
- */
- public static final int XML_ORPHAN_REMOVABLE_20 = 24;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0 <em>Xml One To Many 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToMany_2_0()
- * @generated
- */
- public static final int XML_ONE_TO_MANY_20 = 20;
-
- /**
- * The feature id for the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__ORDER_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__ORDER_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__MAP_KEY_ATTRIBUTE_OVERRIDES = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
-
- /**
- * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__MAP_KEY_TEMPORAL = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL;
-
- /**
- * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__MAP_KEY_ENUMERATED = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED;
-
- /**
- * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__MAP_KEY_CLASS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS;
-
- /**
- * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__MAP_KEY_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN;
-
- /**
- * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__MAP_KEY_JOIN_COLUMNS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20__ORPHAN_REMOVAL = XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml One To Many 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY_20_FEATURE_COUNT = XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0 <em>Xml Single Relationship Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSingleRelationshipMapping_2_0()
- * @generated
- */
- public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20 = 30;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20__ID = XML_DERIVED_ID_20__ID;
-
- /**
- * The feature id for the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20__MAPS_ID = XML_DERIVED_ID_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Single Relationship Mapping 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20_FEATURE_COUNT = XML_DERIVED_ID_20_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0 <em>Xml One To One 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToOne_2_0()
- * @generated
- */
- public static final int XML_ONE_TO_ONE_20 = 21;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE_20__ID = XML_SINGLE_RELATIONSHIP_MAPPING_20__ID;
-
- /**
- * The feature id for the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE_20__MAPS_ID = XML_SINGLE_RELATIONSHIP_MAPPING_20__MAPS_ID;
-
- /**
- * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE_20__ORPHAN_REMOVAL = XML_SINGLE_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml One To One 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_ONE_20_FEATURE_COUNT = XML_SINGLE_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0 <em>Xml Order Column 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0()
- * @generated
- */
- public static final int XML_ORDER_COLUMN_20 = 23;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN_20__NULLABLE = 0;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN_20__INSERTABLE = 1;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN_20__UPDATABLE = 2;
-
- /**
- * The number of structural features of the '<em>Xml Order Column 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_COLUMN_20_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0 <em>Xml Persistence Unit Defaults 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20 = 25;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0 <em>Xml Persistence Unit Metadata 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA_20 = 26;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0 <em>Xml Query 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0()
- * @generated
- */
- public static final int XML_QUERY_20 = 27;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0 <em>Xml Query Hint 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0()
- * @generated
- */
- public static final int XML_QUERY_HINT_20 = 28;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0 <em>Xml Sequence Generator 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0()
- * @generated
- */
- public static final int XML_SEQUENCE_GENERATOR_20 = 29;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0 <em>Xml Sql Result Set Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0()
- * @generated
- */
- public static final int XML_SQL_RESULT_SET_MAPPING_20 = 31;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0 <em>Xml Unique Constraint 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0()
- * @generated
- */
- public static final int XML_UNIQUE_CONSTRAINT_20 = 32;
-
- /**
- * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL = 0;
-
- /**
- * The number of structural features of the '<em>Xml Orphan Removable 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ORPHAN_REMOVABLE_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION = 0;
-
- /**
- * The feature id for the '<em><b>Delimited Identifiers</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS = 1;
-
- /**
- * The number of structural features of the '<em>Xml Persistence Unit Defaults 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Persistence Unit Metadata 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Query 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_HINT_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Query Hint 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_QUERY_HINT_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR_20__CATALOG = 0;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR_20__SCHEMA = 1;
-
- /**
- * The number of structural features of the '<em>Xml Sequence Generator 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SEQUENCE_GENERATOR_20_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION = 0;
-
- /**
- * The number of structural features of the '<em>Xml Sql Result Set Mapping 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_UNIQUE_CONSTRAINT_20__NAME = 0;
-
- /**
- * The number of structural features of the '<em>Xml Unique Constraint 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_UNIQUE_CONSTRAINT_20_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 <em>Lock Mode Type 20</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getLockModeType_2_0()
- * @generated
- */
- public static final int LOCK_MODE_TYPE_20 = 33;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAttributeMapping_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAssociationOverride_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAttributeOverride_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlAttributes_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlCollectionTable_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlDerivedId_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlElementCollection_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEmbedded_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEntity_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEntityListener_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlEventMethod_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlGenerator_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlManyToMany_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMapKeyAttributeOverrideContainer_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMapKeyConvertibleMapping_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMapsId_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMultiRelationshipMapping_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlNamedQuery_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOneToMany_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOneToOne_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOrderColumn_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceUnitDefaults_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceUnitMetadata_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlQuery_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlQueryHint_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlSequenceGenerator_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlSingleRelationshipMapping_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlSqlResultSetMapping_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlUniqueConstraint_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlCacheable_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlCascadeType_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOrphanRemovable_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlOrderable_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum lockModeType_2_0EEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#eNS_URI
- * @see #init()
- * @generated
- */
- private OrmV2_0Package()
- {
- super(eNS_URI, OrmV2_0Factory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link OrmV2_0Package#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static OrmV2_0Package init()
- {
- if (isInited) return (OrmV2_0Package)EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI);
-
- // Obtain or create and register package
- OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.get(eNS_URI) : new OrmV2_0Package());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
- XMLTypePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
- OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
- PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
- PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
-
- // Create package meta-data objects
- theOrmV2_0Package.createPackageContents();
- theCommonPackage.createPackageContents();
- theOrmPackage.createPackageContents();
- thePersistencePackage.createPackageContents();
- thePersistenceV2_0Package.createPackageContents();
-
- // Initialize created meta-data
- theOrmV2_0Package.initializePackageContents();
- theCommonPackage.initializePackageContents();
- theOrmPackage.initializePackageContents();
- thePersistencePackage.initializePackageContents();
- thePersistenceV2_0Package.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theOrmV2_0Package.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(OrmV2_0Package.eNS_URI, theOrmV2_0Package);
- return theOrmV2_0Package;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0 <em>Xml Attribute Mapping 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Attribute Mapping 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0
- * @generated
- */
- public EClass getXmlAttributeMapping_2_0()
- {
- return xmlAttributeMapping_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0 <em>Xml Association Override 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Association Override 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0
- * @generated
- */
- public EClass getXmlAssociationOverride_2_0()
- {
- return xmlAssociationOverride_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription()
- * @see #getXmlAssociationOverride_2_0()
- * @generated
- */
- public EAttribute getXmlAssociationOverride_2_0_Description()
- {
- return (EAttribute)xmlAssociationOverride_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0 <em>Xml Attribute Override 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Attribute Override 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0
- * @generated
- */
- public EClass getXmlAttributeOverride_2_0()
- {
- return xmlAttributeOverride_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription()
- * @see #getXmlAttributeOverride_2_0()
- * @generated
- */
- public EAttribute getXmlAttributeOverride_2_0_Description()
- {
- return (EAttribute)xmlAttributeOverride_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0 <em>Xml Attributes 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Attributes 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0
- * @generated
- */
- public EClass getXmlAttributes_2_0()
- {
- return xmlAttributes_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription()
- * @see #getXmlAttributes_2_0()
- * @generated
- */
- public EAttribute getXmlAttributes_2_0_Description()
- {
- return (EAttribute)xmlAttributes_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getElementCollections <em>Element Collections</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Element Collections</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getElementCollections()
- * @see #getXmlAttributes_2_0()
- * @generated
- */
- public EReference getXmlAttributes_2_0_ElementCollections()
- {
- return (EReference)xmlAttributes_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0 <em>Xml Collection Table 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Collection Table 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0
- * @generated
- */
- public EClass getXmlCollectionTable_2_0()
- {
- return xmlCollectionTable_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0 <em>Xml Derived Id 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Derived Id 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0
- * @generated
- */
- public EClass getXmlDerivedId_2_0()
- {
- return xmlDerivedId_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0#getId <em>Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Id</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0#getId()
- * @see #getXmlDerivedId_2_0()
- * @generated
- */
- public EAttribute getXmlDerivedId_2_0_Id()
- {
- return (EAttribute)xmlDerivedId_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0 <em>Xml Element Collection 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Element Collection 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0
- * @generated
- */
- public EClass getXmlElementCollection_2_0()
- {
- return xmlElementCollection_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass <em>Target Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Target Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EAttribute getXmlElementCollection_2_0_TargetClass()
- {
- return (EAttribute)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch <em>Fetch</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Fetch</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EAttribute getXmlElementCollection_2_0_Fetch()
- {
- return (EAttribute)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey <em>Map Key</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Map Key</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EReference getXmlElementCollection_2_0_MapKey()
- {
- return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(2);
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass <em>Map Key Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Map Key Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EReference getXmlElementCollection_2_0_MapKeyClass()
- {
- return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(3);
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn <em>Map Key Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Map Key Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EReference getXmlElementCollection_2_0_MapKeyColumn()
- {
- return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(4);
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Map Key Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyJoinColumns()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EReference getXmlElementCollection_2_0_MapKeyJoinColumns()
- {
- return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(5);
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn <em>Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EReference getXmlElementCollection_2_0_Column()
- {
- return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(6);
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable <em>Collection Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Collection Table</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable()
- * @see #getXmlElementCollection_2_0()
- * @generated
- */
- public EReference getXmlElementCollection_2_0_CollectionTable()
- {
- return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(7);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0 <em>Xml Embedded 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Embedded 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0
- * @generated
- */
- public EClass getXmlEmbedded_2_0()
- {
- return xmlEmbedded_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0 <em>Xml Entity 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Entity 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0
- * @generated
- */
- public EClass getXmlEntity_2_0()
- {
- return xmlEntity_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0 <em>Xml Entity Listener 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Entity Listener 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0
- * @generated
- */
- public EClass getXmlEntityListener_2_0()
- {
- return xmlEntityListener_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription()
- * @see #getXmlEntityListener_2_0()
- * @generated
- */
- public EAttribute getXmlEntityListener_2_0_Description()
- {
- return (EAttribute)xmlEntityListener_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0 <em>Xml Event Method 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Event Method 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0
- * @generated
- */
- public EClass getXmlEventMethod_2_0()
- {
- return xmlEventMethod_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription()
- * @see #getXmlEventMethod_2_0()
- * @generated
- */
- public EAttribute getXmlEventMethod_2_0_Description()
- {
- return (EAttribute)xmlEventMethod_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0 <em>Xml Generator 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Generator 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0
- * @generated
- */
- public EClass getXmlGenerator_2_0()
- {
- return xmlGenerator_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription()
- * @see #getXmlGenerator_2_0()
- * @generated
- */
- public EAttribute getXmlGenerator_2_0_Description()
- {
- return (EAttribute)xmlGenerator_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0 <em>Xml Many To Many 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Many To Many 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0
- * @generated
- */
- public EClass getXmlManyToMany_2_0()
- {
- return xmlManyToMany_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0 <em>Xml Map Key Attribute Override Container 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Map Key Attribute Override Container 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0
- * @generated
- */
- public EClass getXmlMapKeyAttributeOverrideContainer_2_0()
- {
- return xmlMapKeyAttributeOverrideContainer_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0#getMapKeyAttributeOverrides <em>Map Key Attribute Overrides</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Map Key Attribute Overrides</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0#getMapKeyAttributeOverrides()
- * @see #getXmlMapKeyAttributeOverrideContainer_2_0()
- * @generated
- */
- public EReference getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
- {
- return (EReference)xmlMapKeyAttributeOverrideContainer_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0 <em>Xml Map Key Convertible Mapping 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Map Key Convertible Mapping 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0
- * @generated
- */
- public EClass getXmlMapKeyConvertibleMapping_2_0()
- {
- return xmlMapKeyConvertibleMapping_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Map Key Temporal</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyTemporal()
- * @see #getXmlMapKeyConvertibleMapping_2_0()
- * @generated
- */
- public EAttribute getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal()
- {
- return (EAttribute)xmlMapKeyConvertibleMapping_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Map Key Enumerated</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyEnumerated()
- * @see #getXmlMapKeyConvertibleMapping_2_0()
- * @generated
- */
- public EAttribute getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated()
- {
- return (EAttribute)xmlMapKeyConvertibleMapping_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0 <em>Xml Maps Id 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Maps Id 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0
- * @generated
- */
- public EClass getXmlMapsId_2_0()
- {
- return xmlMapsId_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId <em>Maps Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Maps Id</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId()
- * @see #getXmlMapsId_2_0()
- * @generated
- */
- public EAttribute getXmlMapsId_2_0_MapsId()
- {
- return (EAttribute)xmlMapsId_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0 <em>Xml Multi Relationship Mapping 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Multi Relationship Mapping 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0
- * @generated
- */
- public EClass getXmlMultiRelationshipMapping_2_0()
- {
- return xmlMultiRelationshipMapping_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass <em>Map Key Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Map Key Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass()
- * @see #getXmlMultiRelationshipMapping_2_0()
- * @generated
- */
- public EReference getXmlMultiRelationshipMapping_2_0_MapKeyClass()
- {
- return (EReference)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn <em>Map Key Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Map Key Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn()
- * @see #getXmlMultiRelationshipMapping_2_0()
- * @generated
- */
- public EReference getXmlMultiRelationshipMapping_2_0_MapKeyColumn()
- {
- return (EReference)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Map Key Join Columns</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyJoinColumns()
- * @see #getXmlMultiRelationshipMapping_2_0()
- * @generated
- */
- public EReference getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns()
- {
- return (EReference)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(2);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0 <em>Xml Named Query 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Named Query 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0
- * @generated
- */
- public EClass getXmlNamedQuery_2_0()
- {
- return xmlNamedQuery_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode <em>Lock Mode</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Lock Mode</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode()
- * @see #getXmlNamedQuery_2_0()
- * @generated
- */
- public EAttribute getXmlNamedQuery_2_0_LockMode()
- {
- return (EAttribute)xmlNamedQuery_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0 <em>Xml One To Many 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml One To Many 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0
- * @generated
- */
- public EClass getXmlOneToMany_2_0()
- {
- return xmlOneToMany_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0 <em>Xml One To One 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml One To One 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0
- * @generated
- */
- public EClass getXmlOneToOne_2_0()
- {
- return xmlOneToOne_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0 <em>Xml Order Column 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Order Column 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0
- * @generated
- */
- public EClass getXmlOrderColumn_2_0()
- {
- return xmlOrderColumn_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable <em>Nullable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Nullable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable()
- * @see #getXmlOrderColumn_2_0()
- * @generated
- */
- public EAttribute getXmlOrderColumn_2_0_Nullable()
- {
- return (EAttribute)xmlOrderColumn_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable <em>Insertable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Insertable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable()
- * @see #getXmlOrderColumn_2_0()
- * @generated
- */
- public EAttribute getXmlOrderColumn_2_0_Insertable()
- {
- return (EAttribute)xmlOrderColumn_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable <em>Updatable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Updatable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable()
- * @see #getXmlOrderColumn_2_0()
- * @generated
- */
- public EAttribute getXmlOrderColumn_2_0_Updatable()
- {
- return (EAttribute)xmlOrderColumn_2_0EClass.getEStructuralFeatures().get(2);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0 <em>Xml Persistence Unit Defaults 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence Unit Defaults 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0
- * @generated
- */
- public EClass getXmlPersistenceUnitDefaults_2_0()
- {
- return xmlPersistenceUnitDefaults_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription()
- * @see #getXmlPersistenceUnitDefaults_2_0()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitDefaults_2_0_Description()
- {
- return (EAttribute)xmlPersistenceUnitDefaults_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers <em>Delimited Identifiers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Delimited Identifiers</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers()
- * @see #getXmlPersistenceUnitDefaults_2_0()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers()
- {
- return (EAttribute)xmlPersistenceUnitDefaults_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0 <em>Xml Persistence Unit Metadata 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence Unit Metadata 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0
- * @generated
- */
- public EClass getXmlPersistenceUnitMetadata_2_0()
- {
- return xmlPersistenceUnitMetadata_2_0EClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription()
- * @see #getXmlPersistenceUnitMetadata_2_0()
- * @generated
- */
- public EAttribute getXmlPersistenceUnitMetadata_2_0_Description()
- {
- return (EAttribute)xmlPersistenceUnitMetadata_2_0EClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0 <em>Xml Query 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Query 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0
- * @generated
- */
- public EClass getXmlQuery_2_0()
- {
- return xmlQuery_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0#getDescription()
- * @see #getXmlQuery_2_0()
- * @generated
- */
- public EAttribute getXmlQuery_2_0_Description()
- {
- return (EAttribute)xmlQuery_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0 <em>Xml Query Hint 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Query Hint 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0
- * @generated
- */
- public EClass getXmlQueryHint_2_0()
- {
- return xmlQueryHint_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription()
- * @see #getXmlQueryHint_2_0()
- * @generated
- */
- public EAttribute getXmlQueryHint_2_0_Description()
- {
- return (EAttribute)xmlQueryHint_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0 <em>Xml Sequence Generator 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Sequence Generator 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0
- * @generated
- */
- public EClass getXmlSequenceGenerator_2_0()
- {
- return xmlSequenceGenerator_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog <em>Catalog</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Catalog</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog()
- * @see #getXmlSequenceGenerator_2_0()
- * @generated
- */
- public EAttribute getXmlSequenceGenerator_2_0_Catalog()
- {
- return (EAttribute)xmlSequenceGenerator_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema <em>Schema</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Schema</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema()
- * @see #getXmlSequenceGenerator_2_0()
- * @generated
- */
- public EAttribute getXmlSequenceGenerator_2_0_Schema()
- {
- return (EAttribute)xmlSequenceGenerator_2_0EClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0 <em>Xml Single Relationship Mapping 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Single Relationship Mapping 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0
- * @generated
- */
- public EClass getXmlSingleRelationshipMapping_2_0()
- {
- return xmlSingleRelationshipMapping_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0 <em>Xml Sql Result Set Mapping 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Sql Result Set Mapping 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0
- * @generated
- */
- public EClass getXmlSqlResultSetMapping_2_0()
- {
- return xmlSqlResultSetMapping_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription()
- * @see #getXmlSqlResultSetMapping_2_0()
- * @generated
- */
- public EAttribute getXmlSqlResultSetMapping_2_0_Description()
- {
- return (EAttribute)xmlSqlResultSetMapping_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0 <em>Xml Unique Constraint 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Unique Constraint 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0
- * @generated
- */
- public EClass getXmlUniqueConstraint_2_0()
- {
- return xmlUniqueConstraint_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName()
- * @see #getXmlUniqueConstraint_2_0()
- * @generated
- */
- public EAttribute getXmlUniqueConstraint_2_0_Name()
- {
- return (EAttribute)xmlUniqueConstraint_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0 <em>Xml Cacheable 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Cacheable 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0
- * @generated
- */
- public EClass getXmlCacheable_2_0()
- {
- return xmlCacheable_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable <em>Cacheable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cacheable</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable()
- * @see #getXmlCacheable_2_0()
- * @generated
- */
- public EAttribute getXmlCacheable_2_0_Cacheable()
- {
- return (EAttribute)xmlCacheable_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0 <em>Xml Cascade Type 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Cascade Type 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0
- * @generated
- */
- public EClass getXmlCascadeType_2_0()
- {
- return xmlCascadeType_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach <em>Cascade Detach</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Cascade Detach</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach()
- * @see #getXmlCascadeType_2_0()
- * @generated
- */
- public EAttribute getXmlCascadeType_2_0_CascadeDetach()
- {
- return (EAttribute)xmlCascadeType_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0 <em>Xml Orphan Removable 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Orphan Removable 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0
- * @generated
- */
- public EClass getXmlOrphanRemovable_2_0()
- {
- return xmlOrphanRemovable_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval <em>Orphan Removal</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Orphan Removal</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval()
- * @see #getXmlOrphanRemovable_2_0()
- * @generated
- */
- public EAttribute getXmlOrphanRemovable_2_0_OrphanRemoval()
- {
- return (EAttribute)xmlOrphanRemovable_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0 <em>Xml Orderable 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Orderable 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0
- * @generated
- */
- public EClass getXmlOrderable_2_0()
- {
- return xmlOrderable_2_0EClass;
- }
-
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn <em>Order Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Order Column</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn()
- * @see #getXmlOrderable_2_0()
- * @generated
- */
- public EReference getXmlOrderable_2_0_OrderColumn()
- {
- return (EReference)xmlOrderable_2_0EClass.getEStructuralFeatures().get(0);
- }
-
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 <em>Lock Mode Type 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Lock Mode Type 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @generated
- */
- public EEnum getLockModeType_2_0()
- {
- return lockModeType_2_0EEnum;
- }
-
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- public OrmV2_0Factory getOrmV2_0Factory()
- {
- return (OrmV2_0Factory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- xmlAssociationOverride_2_0EClass = createEClass(XML_ASSOCIATION_OVERRIDE_20);
- createEAttribute(xmlAssociationOverride_2_0EClass, XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION);
-
- xmlAttributeMapping_2_0EClass = createEClass(XML_ATTRIBUTE_MAPPING_20);
-
- xmlAttributeOverride_2_0EClass = createEClass(XML_ATTRIBUTE_OVERRIDE_20);
- createEAttribute(xmlAttributeOverride_2_0EClass, XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION);
-
- xmlAttributes_2_0EClass = createEClass(XML_ATTRIBUTES_20);
- createEAttribute(xmlAttributes_2_0EClass, XML_ATTRIBUTES_20__DESCRIPTION);
- createEReference(xmlAttributes_2_0EClass, XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS);
-
- xmlCacheable_2_0EClass = createEClass(XML_CACHEABLE_20);
- createEAttribute(xmlCacheable_2_0EClass, XML_CACHEABLE_20__CACHEABLE);
-
- xmlCascadeType_2_0EClass = createEClass(XML_CASCADE_TYPE_20);
- createEAttribute(xmlCascadeType_2_0EClass, XML_CASCADE_TYPE_20__CASCADE_DETACH);
-
- xmlCollectionTable_2_0EClass = createEClass(XML_COLLECTION_TABLE_20);
-
- xmlDerivedId_2_0EClass = createEClass(XML_DERIVED_ID_20);
- createEAttribute(xmlDerivedId_2_0EClass, XML_DERIVED_ID_20__ID);
-
- xmlElementCollection_2_0EClass = createEClass(XML_ELEMENT_COLLECTION_20);
- createEAttribute(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__TARGET_CLASS);
- createEAttribute(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__FETCH);
- createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY);
- createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS);
- createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN);
- createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS);
- createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__COLUMN);
- createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE);
-
- xmlEmbedded_2_0EClass = createEClass(XML_EMBEDDED_20);
-
- xmlEntity_2_0EClass = createEClass(XML_ENTITY_20);
-
- xmlEntityListener_2_0EClass = createEClass(XML_ENTITY_LISTENER_20);
- createEAttribute(xmlEntityListener_2_0EClass, XML_ENTITY_LISTENER_20__DESCRIPTION);
-
- xmlEventMethod_2_0EClass = createEClass(XML_EVENT_METHOD_20);
- createEAttribute(xmlEventMethod_2_0EClass, XML_EVENT_METHOD_20__DESCRIPTION);
-
- xmlGenerator_2_0EClass = createEClass(XML_GENERATOR_20);
- createEAttribute(xmlGenerator_2_0EClass, XML_GENERATOR_20__DESCRIPTION);
-
- xmlManyToMany_2_0EClass = createEClass(XML_MANY_TO_MANY_20);
-
- xmlMapKeyAttributeOverrideContainer_2_0EClass = createEClass(XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20);
- createEReference(xmlMapKeyAttributeOverrideContainer_2_0EClass, XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES);
-
- xmlMapKeyConvertibleMapping_2_0EClass = createEClass(XML_MAP_KEY_CONVERTIBLE_MAPPING_20);
- createEAttribute(xmlMapKeyConvertibleMapping_2_0EClass, XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL);
- createEAttribute(xmlMapKeyConvertibleMapping_2_0EClass, XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED);
-
- xmlMapsId_2_0EClass = createEClass(XML_MAPS_ID_20);
- createEAttribute(xmlMapsId_2_0EClass, XML_MAPS_ID_20__MAPS_ID);
-
- xmlMultiRelationshipMapping_2_0EClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING_20);
- createEReference(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS);
- createEReference(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN);
- createEReference(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS);
-
- xmlNamedQuery_2_0EClass = createEClass(XML_NAMED_QUERY_20);
- createEAttribute(xmlNamedQuery_2_0EClass, XML_NAMED_QUERY_20__LOCK_MODE);
-
- xmlOneToMany_2_0EClass = createEClass(XML_ONE_TO_MANY_20);
-
- xmlOneToOne_2_0EClass = createEClass(XML_ONE_TO_ONE_20);
-
- xmlOrderable_2_0EClass = createEClass(XML_ORDERABLE_20);
- createEReference(xmlOrderable_2_0EClass, XML_ORDERABLE_20__ORDER_COLUMN);
-
- xmlOrderColumn_2_0EClass = createEClass(XML_ORDER_COLUMN_20);
- createEAttribute(xmlOrderColumn_2_0EClass, XML_ORDER_COLUMN_20__NULLABLE);
- createEAttribute(xmlOrderColumn_2_0EClass, XML_ORDER_COLUMN_20__INSERTABLE);
- createEAttribute(xmlOrderColumn_2_0EClass, XML_ORDER_COLUMN_20__UPDATABLE);
-
- xmlOrphanRemovable_2_0EClass = createEClass(XML_ORPHAN_REMOVABLE_20);
- createEAttribute(xmlOrphanRemovable_2_0EClass, XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL);
-
- xmlPersistenceUnitDefaults_2_0EClass = createEClass(XML_PERSISTENCE_UNIT_DEFAULTS_20);
- createEAttribute(xmlPersistenceUnitDefaults_2_0EClass, XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION);
- createEAttribute(xmlPersistenceUnitDefaults_2_0EClass, XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS);
-
- xmlPersistenceUnitMetadata_2_0EClass = createEClass(XML_PERSISTENCE_UNIT_METADATA_20);
- createEAttribute(xmlPersistenceUnitMetadata_2_0EClass, XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION);
-
- xmlQuery_2_0EClass = createEClass(XML_QUERY_20);
- createEAttribute(xmlQuery_2_0EClass, XML_QUERY_20__DESCRIPTION);
-
- xmlQueryHint_2_0EClass = createEClass(XML_QUERY_HINT_20);
- createEAttribute(xmlQueryHint_2_0EClass, XML_QUERY_HINT_20__DESCRIPTION);
-
- xmlSequenceGenerator_2_0EClass = createEClass(XML_SEQUENCE_GENERATOR_20);
- createEAttribute(xmlSequenceGenerator_2_0EClass, XML_SEQUENCE_GENERATOR_20__CATALOG);
- createEAttribute(xmlSequenceGenerator_2_0EClass, XML_SEQUENCE_GENERATOR_20__SCHEMA);
-
- xmlSingleRelationshipMapping_2_0EClass = createEClass(XML_SINGLE_RELATIONSHIP_MAPPING_20);
-
- xmlSqlResultSetMapping_2_0EClass = createEClass(XML_SQL_RESULT_SET_MAPPING_20);
- createEAttribute(xmlSqlResultSetMapping_2_0EClass, XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION);
-
- xmlUniqueConstraint_2_0EClass = createEClass(XML_UNIQUE_CONSTRAINT_20);
- createEAttribute(xmlUniqueConstraint_2_0EClass, XML_UNIQUE_CONSTRAINT_20__NAME);
-
- // Create enums
- lockModeType_2_0EEnum = createEEnum(LOCK_MODE_TYPE_20);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- OrmPackage theOrmPackage = (OrmPackage)EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI);
- XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- xmlAssociationOverride_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlJoinTableContainer());
- xmlAttributeMapping_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAccessHolder());
- xmlCollectionTable_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlReferenceTable());
- xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlConvertibleMapping());
- xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlOrderable());
- xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAttributeOverrideContainer());
- xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAssociationOverrideContainer());
- xmlElementCollection_2_0EClass.getESuperTypes().add(this.getXmlMapKeyAttributeOverrideContainer_2_0());
- xmlElementCollection_2_0EClass.getESuperTypes().add(this.getXmlMapKeyConvertibleMapping_2_0());
- xmlEmbedded_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAssociationOverrideContainer());
- xmlEntity_2_0EClass.getESuperTypes().add(this.getXmlCacheable_2_0());
- xmlManyToMany_2_0EClass.getESuperTypes().add(this.getXmlMultiRelationshipMapping_2_0());
- xmlMultiRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlOrderable_2_0());
- xmlMultiRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlMapKeyAttributeOverrideContainer_2_0());
- xmlMultiRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlMapKeyConvertibleMapping_2_0());
- xmlOneToMany_2_0EClass.getESuperTypes().add(this.getXmlMultiRelationshipMapping_2_0());
- xmlOneToMany_2_0EClass.getESuperTypes().add(this.getXmlOrphanRemovable_2_0());
- xmlOneToOne_2_0EClass.getESuperTypes().add(this.getXmlSingleRelationshipMapping_2_0());
- xmlOneToOne_2_0EClass.getESuperTypes().add(this.getXmlOrphanRemovable_2_0());
- xmlSingleRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlDerivedId_2_0());
- xmlSingleRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlMapsId_2_0());
-
- // Initialize classes and features; add operations and parameters
- initEClass(xmlAssociationOverride_2_0EClass, XmlAssociationOverride_2_0.class, "XmlAssociationOverride_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlAssociationOverride_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlAssociationOverride_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlAttributeMapping_2_0EClass, XmlAttributeMapping_2_0.class, "XmlAttributeMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlAttributeOverride_2_0EClass, XmlAttributeOverride_2_0.class, "XmlAttributeOverride_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlAttributeOverride_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlAttributeOverride_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlAttributes_2_0EClass, XmlAttributes_2_0.class, "XmlAttributes_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlAttributes_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlAttributes_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlAttributes_2_0_ElementCollections(), theOrmPackage.getXmlElementCollection(), null, "elementCollections", null, 0, -1, XmlAttributes_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlCacheable_2_0EClass, XmlCacheable_2_0.class, "XmlCacheable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlCacheable_2_0_Cacheable(), theXMLTypePackage.getBooleanObject(), "cacheable", null, 0, 1, XmlCacheable_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlCascadeType_2_0EClass, XmlCascadeType_2_0.class, "XmlCascadeType_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlCascadeType_2_0_CascadeDetach(), theXMLTypePackage.getBoolean(), "cascadeDetach", null, 0, 1, XmlCascadeType_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlCollectionTable_2_0EClass, XmlCollectionTable_2_0.class, "XmlCollectionTable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlDerivedId_2_0EClass, XmlDerivedId_2_0.class, "XmlDerivedId_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlDerivedId_2_0_Id(), theXMLTypePackage.getBooleanObject(), "id", null, 0, 1, XmlDerivedId_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlElementCollection_2_0EClass, XmlElementCollection_2_0.class, "XmlElementCollection_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlElementCollection_2_0_TargetClass(), theXMLTypePackage.getString(), "targetClass", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlElementCollection_2_0_Fetch(), theOrmPackage.getFetchType(), "fetch", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlElementCollection_2_0_MapKey(), theOrmPackage.getMapKey(), null, "mapKey", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlElementCollection_2_0_MapKeyClass(), theOrmPackage.getXmlClassReference(), null, "mapKeyClass", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlElementCollection_2_0_MapKeyColumn(), theOrmPackage.getXmlColumn(), null, "mapKeyColumn", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlElementCollection_2_0_MapKeyJoinColumns(), theOrmPackage.getXmlJoinColumn(), null, "mapKeyJoinColumns", null, 0, -1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlElementCollection_2_0_Column(), theOrmPackage.getXmlColumn(), null, "column", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlElementCollection_2_0_CollectionTable(), theOrmPackage.getXmlCollectionTable(), null, "collectionTable", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlEmbedded_2_0EClass, XmlEmbedded_2_0.class, "XmlEmbedded_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlEntity_2_0EClass, XmlEntity_2_0.class, "XmlEntity_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlEntityListener_2_0EClass, XmlEntityListener_2_0.class, "XmlEntityListener_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlEntityListener_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlEntityListener_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlEventMethod_2_0EClass, XmlEventMethod_2_0.class, "XmlEventMethod_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlEventMethod_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlEventMethod_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlGenerator_2_0EClass, XmlGenerator_2_0.class, "XmlGenerator_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlGenerator_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlGenerator_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlManyToMany_2_0EClass, XmlManyToMany_2_0.class, "XmlManyToMany_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlMapKeyAttributeOverrideContainer_2_0EClass, XmlMapKeyAttributeOverrideContainer_2_0.class, "XmlMapKeyAttributeOverrideContainer_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides(), theOrmPackage.getXmlAttributeOverride(), null, "mapKeyAttributeOverrides", null, 0, -1, XmlMapKeyAttributeOverrideContainer_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlMapKeyConvertibleMapping_2_0EClass, XmlMapKeyConvertibleMapping_2_0.class, "XmlMapKeyConvertibleMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal(), theOrmPackage.getTemporalType(), "mapKeyTemporal", null, 0, 1, XmlMapKeyConvertibleMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated(), theOrmPackage.getEnumType(), "mapKeyEnumerated", null, 0, 1, XmlMapKeyConvertibleMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlMapsId_2_0EClass, XmlMapsId_2_0.class, "XmlMapsId_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlMapsId_2_0_MapsId(), theXMLTypePackage.getString(), "mapsId", null, 0, 1, XmlMapsId_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlMultiRelationshipMapping_2_0EClass, XmlMultiRelationshipMapping_2_0.class, "XmlMultiRelationshipMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlMultiRelationshipMapping_2_0_MapKeyClass(), theOrmPackage.getXmlClassReference(), null, "mapKeyClass", null, 0, 1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlMultiRelationshipMapping_2_0_MapKeyColumn(), theOrmPackage.getXmlColumn(), null, "mapKeyColumn", null, 0, 1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns(), theOrmPackage.getXmlJoinColumn(), null, "mapKeyJoinColumns", null, 0, -1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlNamedQuery_2_0EClass, XmlNamedQuery_2_0.class, "XmlNamedQuery_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlNamedQuery_2_0_LockMode(), this.getLockModeType_2_0(), "lockMode", null, 0, 1, XmlNamedQuery_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlOneToMany_2_0EClass, XmlOneToMany_2_0.class, "XmlOneToMany_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlOneToOne_2_0EClass, XmlOneToOne_2_0.class, "XmlOneToOne_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlOrderable_2_0EClass, XmlOrderable_2_0.class, "XmlOrderable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlOrderable_2_0_OrderColumn(), theOrmPackage.getXmlOrderColumn(), null, "orderColumn", null, 0, 1, XmlOrderable_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlOrderColumn_2_0EClass, XmlOrderColumn_2_0.class, "XmlOrderColumn_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlOrderColumn_2_0_Nullable(), theXMLTypePackage.getBooleanObject(), "nullable", null, 0, 1, XmlOrderColumn_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlOrderColumn_2_0_Insertable(), theXMLTypePackage.getBooleanObject(), "insertable", null, 0, 1, XmlOrderColumn_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlOrderColumn_2_0_Updatable(), theXMLTypePackage.getBooleanObject(), "updatable", null, 0, 1, XmlOrderColumn_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlOrphanRemovable_2_0EClass, XmlOrphanRemovable_2_0.class, "XmlOrphanRemovable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlOrphanRemovable_2_0_OrphanRemoval(), theXMLTypePackage.getBooleanObject(), "orphanRemoval", null, 0, 1, XmlOrphanRemovable_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPersistenceUnitDefaults_2_0EClass, XmlPersistenceUnitDefaults_2_0.class, "XmlPersistenceUnitDefaults_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlPersistenceUnitDefaults_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlPersistenceUnitDefaults_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers(), theXMLTypePackage.getBoolean(), "delimitedIdentifiers", null, 0, 1, XmlPersistenceUnitDefaults_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPersistenceUnitMetadata_2_0EClass, XmlPersistenceUnitMetadata_2_0.class, "XmlPersistenceUnitMetadata_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlPersistenceUnitMetadata_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlPersistenceUnitMetadata_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlQuery_2_0EClass, XmlQuery_2_0.class, "XmlQuery_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlQuery_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlQuery_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlQueryHint_2_0EClass, XmlQueryHint_2_0.class, "XmlQueryHint_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlQueryHint_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlQueryHint_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlSequenceGenerator_2_0EClass, XmlSequenceGenerator_2_0.class, "XmlSequenceGenerator_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlSequenceGenerator_2_0_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlSequenceGenerator_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlSequenceGenerator_2_0_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlSequenceGenerator_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlSingleRelationshipMapping_2_0EClass, XmlSingleRelationshipMapping_2_0.class, "XmlSingleRelationshipMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xmlSqlResultSetMapping_2_0EClass, XmlSqlResultSetMapping_2_0.class, "XmlSqlResultSetMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlSqlResultSetMapping_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlSqlResultSetMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlUniqueConstraint_2_0EClass, XmlUniqueConstraint_2_0.class, "XmlUniqueConstraint_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlUniqueConstraint_2_0_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, XmlUniqueConstraint_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(lockModeType_2_0EEnum, LockModeType_2_0.class, "LockModeType_2_0");
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.NONE);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.READ);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.WRITE);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.OPTIMISTIC);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.OPTIMISTIC_FORCE_INCREMENT);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.PESSIMISTIC_READ);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.PESSIMISTIC_WRITE);
- addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.PESSIMISTIC_FORCE_INCREMENT);
- }
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- public interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0 <em>Xml Attribute Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeMapping_2_0()
- * @generated
- */
- public static final EClass XML_ATTRIBUTE_MAPPING_20 = eINSTANCE.getXmlAttributeMapping_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0 <em>Xml Association Override 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0()
- * @generated
- */
- public static final EClass XML_ASSOCIATION_OVERRIDE_20 = eINSTANCE.getXmlAssociationOverride_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION = eINSTANCE.getXmlAssociationOverride_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0 <em>Xml Attribute Override 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0()
- * @generated
- */
- public static final EClass XML_ATTRIBUTE_OVERRIDE_20 = eINSTANCE.getXmlAttributeOverride_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION = eINSTANCE.getXmlAttributeOverride_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0 <em>Xml Attributes 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0()
- * @generated
- */
- public static final EClass XML_ATTRIBUTES_20 = eINSTANCE.getXmlAttributes_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ATTRIBUTES_20__DESCRIPTION = eINSTANCE.getXmlAttributes_2_0_Description();
-
- /**
- * The meta object literal for the '<em><b>Element Collections</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS = eINSTANCE.getXmlAttributes_2_0_ElementCollections();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0 <em>Xml Collection Table 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCollectionTable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCollectionTable_2_0()
- * @generated
- */
- public static final EClass XML_COLLECTION_TABLE_20 = eINSTANCE.getXmlCollectionTable_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0 <em>Xml Derived Id 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0()
- * @generated
- */
- public static final EClass XML_DERIVED_ID_20 = eINSTANCE.getXmlDerivedId_2_0();
-
- /**
- * The meta object literal for the '<em><b>Id</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_DERIVED_ID_20__ID = eINSTANCE.getXmlDerivedId_2_0_Id();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0 <em>Xml Element Collection 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0()
- * @generated
- */
- public static final EClass XML_ELEMENT_COLLECTION_20 = eINSTANCE.getXmlElementCollection_2_0();
-
- /**
- * The meta object literal for the '<em><b>Target Class</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ELEMENT_COLLECTION_20__TARGET_CLASS = eINSTANCE.getXmlElementCollection_2_0_TargetClass();
-
- /**
- * The meta object literal for the '<em><b>Fetch</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ELEMENT_COLLECTION_20__FETCH = eINSTANCE.getXmlElementCollection_2_0_Fetch();
-
- /**
- * The meta object literal for the '<em><b>Map Key</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY = eINSTANCE.getXmlElementCollection_2_0_MapKey();
-
- /**
- * The meta object literal for the '<em><b>Map Key Class</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS = eINSTANCE.getXmlElementCollection_2_0_MapKeyClass();
-
- /**
- * The meta object literal for the '<em><b>Map Key Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN = eINSTANCE.getXmlElementCollection_2_0_MapKeyColumn();
-
- /**
- * The meta object literal for the '<em><b>Map Key Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS = eINSTANCE.getXmlElementCollection_2_0_MapKeyJoinColumns();
-
- /**
- * The meta object literal for the '<em><b>Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ELEMENT_COLLECTION_20__COLUMN = eINSTANCE.getXmlElementCollection_2_0_Column();
-
- /**
- * The meta object literal for the '<em><b>Collection Table</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE = eINSTANCE.getXmlElementCollection_2_0_CollectionTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0 <em>Xml Embedded 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEmbedded_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEmbedded_2_0()
- * @generated
- */
- public static final EClass XML_EMBEDDED_20 = eINSTANCE.getXmlEmbedded_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0 <em>Xml Entity 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntity_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntity_2_0()
- * @generated
- */
- public static final EClass XML_ENTITY_20 = eINSTANCE.getXmlEntity_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0 <em>Xml Entity Listener 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0()
- * @generated
- */
- public static final EClass XML_ENTITY_LISTENER_20 = eINSTANCE.getXmlEntityListener_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ENTITY_LISTENER_20__DESCRIPTION = eINSTANCE.getXmlEntityListener_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0 <em>Xml Event Method 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0()
- * @generated
- */
- public static final EClass XML_EVENT_METHOD_20 = eINSTANCE.getXmlEventMethod_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_EVENT_METHOD_20__DESCRIPTION = eINSTANCE.getXmlEventMethod_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0 <em>Xml Generator 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0()
- * @generated
- */
- public static final EClass XML_GENERATOR_20 = eINSTANCE.getXmlGenerator_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_GENERATOR_20__DESCRIPTION = eINSTANCE.getXmlGenerator_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0 <em>Xml Many To Many 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlManyToMany_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlManyToMany_2_0()
- * @generated
- */
- public static final EClass XML_MANY_TO_MANY_20 = eINSTANCE.getXmlManyToMany_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0 <em>Xml Map Key Attribute Override Container 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0()
- * @generated
- */
- public static final EClass XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20 = eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0();
-
- /**
- * The meta object literal for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES = eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0 <em>Xml Map Key Convertible Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyConvertibleMapping_2_0()
- * @generated
- */
- public static final EClass XML_MAP_KEY_CONVERTIBLE_MAPPING_20 = eINSTANCE.getXmlMapKeyConvertibleMapping_2_0();
-
- /**
- * The meta object literal for the '<em><b>Map Key Temporal</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_TEMPORAL = eINSTANCE.getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal();
-
- /**
- * The meta object literal for the '<em><b>Map Key Enumerated</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAP_KEY_CONVERTIBLE_MAPPING_20__MAP_KEY_ENUMERATED = eINSTANCE.getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0 <em>Xml Maps Id 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0()
- * @generated
- */
- public static final EClass XML_MAPS_ID_20 = eINSTANCE.getXmlMapsId_2_0();
-
- /**
- * The meta object literal for the '<em><b>Maps Id</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAPS_ID_20__MAPS_ID = eINSTANCE.getXmlMapsId_2_0_MapsId();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0 <em>Xml Multi Relationship Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0()
- * @generated
- */
- public static final EClass XML_MULTI_RELATIONSHIP_MAPPING_20 = eINSTANCE.getXmlMultiRelationshipMapping_2_0();
-
- /**
- * The meta object literal for the '<em><b>Map Key Class</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyClass();
-
- /**
- * The meta object literal for the '<em><b>Map Key Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyColumn();
-
- /**
- * The meta object literal for the '<em><b>Map Key Join Columns</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0 <em>Xml Named Query 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0()
- * @generated
- */
- public static final EClass XML_NAMED_QUERY_20 = eINSTANCE.getXmlNamedQuery_2_0();
-
- /**
- * The meta object literal for the '<em><b>Lock Mode</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_NAMED_QUERY_20__LOCK_MODE = eINSTANCE.getXmlNamedQuery_2_0_LockMode();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0 <em>Xml One To Many 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToMany_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToMany_2_0()
- * @generated
- */
- public static final EClass XML_ONE_TO_MANY_20 = eINSTANCE.getXmlOneToMany_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0 <em>Xml One To One 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOneToOne_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToOne_2_0()
- * @generated
- */
- public static final EClass XML_ONE_TO_ONE_20 = eINSTANCE.getXmlOneToOne_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0 <em>Xml Order Column 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0()
- * @generated
- */
- public static final EClass XML_ORDER_COLUMN_20 = eINSTANCE.getXmlOrderColumn_2_0();
-
- /**
- * The meta object literal for the '<em><b>Nullable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ORDER_COLUMN_20__NULLABLE = eINSTANCE.getXmlOrderColumn_2_0_Nullable();
-
- /**
- * The meta object literal for the '<em><b>Insertable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ORDER_COLUMN_20__INSERTABLE = eINSTANCE.getXmlOrderColumn_2_0_Insertable();
-
- /**
- * The meta object literal for the '<em><b>Updatable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ORDER_COLUMN_20__UPDATABLE = eINSTANCE.getXmlOrderColumn_2_0_Updatable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0 <em>Xml Persistence Unit Defaults 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0()
- * @generated
- */
- public static final EClass XML_PERSISTENCE_UNIT_DEFAULTS_20 = eINSTANCE.getXmlPersistenceUnitDefaults_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION = eINSTANCE.getXmlPersistenceUnitDefaults_2_0_Description();
-
- /**
- * The meta object literal for the '<em><b>Delimited Identifiers</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS = eINSTANCE.getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0 <em>Xml Persistence Unit Metadata 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0()
- * @generated
- */
- public static final EClass XML_PERSISTENCE_UNIT_METADATA_20 = eINSTANCE.getXmlPersistenceUnitMetadata_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION = eINSTANCE.getXmlPersistenceUnitMetadata_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0 <em>Xml Query 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0()
- * @generated
- */
- public static final EClass XML_QUERY_20 = eINSTANCE.getXmlQuery_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_QUERY_20__DESCRIPTION = eINSTANCE.getXmlQuery_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0 <em>Xml Query Hint 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0()
- * @generated
- */
- public static final EClass XML_QUERY_HINT_20 = eINSTANCE.getXmlQueryHint_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_QUERY_HINT_20__DESCRIPTION = eINSTANCE.getXmlQueryHint_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0 <em>Xml Sequence Generator 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0()
- * @generated
- */
- public static final EClass XML_SEQUENCE_GENERATOR_20 = eINSTANCE.getXmlSequenceGenerator_2_0();
-
- /**
- * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_SEQUENCE_GENERATOR_20__CATALOG = eINSTANCE.getXmlSequenceGenerator_2_0_Catalog();
-
- /**
- * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_SEQUENCE_GENERATOR_20__SCHEMA = eINSTANCE.getXmlSequenceGenerator_2_0_Schema();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0 <em>Xml Single Relationship Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSingleRelationshipMapping_2_0()
- * @generated
- */
- public static final EClass XML_SINGLE_RELATIONSHIP_MAPPING_20 = eINSTANCE.getXmlSingleRelationshipMapping_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0 <em>Xml Sql Result Set Mapping 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0()
- * @generated
- */
- public static final EClass XML_SQL_RESULT_SET_MAPPING_20 = eINSTANCE.getXmlSqlResultSetMapping_2_0();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION = eINSTANCE.getXmlSqlResultSetMapping_2_0_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0 <em>Xml Unique Constraint 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0()
- * @generated
- */
- public static final EClass XML_UNIQUE_CONSTRAINT_20 = eINSTANCE.getXmlUniqueConstraint_2_0();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_UNIQUE_CONSTRAINT_20__NAME = eINSTANCE.getXmlUniqueConstraint_2_0_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0 <em>Xml Cacheable 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0()
- * @generated
- */
- public static final EClass XML_CACHEABLE_20 = eINSTANCE.getXmlCacheable_2_0();
-
- /**
- * The meta object literal for the '<em><b>Cacheable</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_CACHEABLE_20__CACHEABLE = eINSTANCE.getXmlCacheable_2_0_Cacheable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0 <em>Xml Cascade Type 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0()
- * @generated
- */
- public static final EClass XML_CASCADE_TYPE_20 = eINSTANCE.getXmlCascadeType_2_0();
-
- /**
- * The meta object literal for the '<em><b>Cascade Detach</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_CASCADE_TYPE_20__CASCADE_DETACH = eINSTANCE.getXmlCascadeType_2_0_CascadeDetach();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0 <em>Xml Orphan Removable 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0()
- * @generated
- */
- public static final EClass XML_ORPHAN_REMOVABLE_20 = eINSTANCE.getXmlOrphanRemovable_2_0();
-
- /**
- * The meta object literal for the '<em><b>Orphan Removal</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL = eINSTANCE.getXmlOrphanRemovable_2_0_OrphanRemoval();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0 <em>Xml Orderable 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0()
- * @generated
- */
- public static final EClass XML_ORDERABLE_20 = eINSTANCE.getXmlOrderable_2_0();
-
- /**
- * The meta object literal for the '<em><b>Order Column</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ORDERABLE_20__ORDER_COLUMN = eINSTANCE.getXmlOrderable_2_0_OrderColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0 <em>Lock Mode Type 20</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getLockModeType_2_0()
- * @generated
- */
- public static final EEnum LOCK_MODE_TYPE_20 = eINSTANCE.getLockModeType_2_0();
-
- }
-
-} //OrmV2_0Package
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java
deleted file mode 100644
index 00718558fc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Association Override 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlAssociationOverride_2_0 extends XmlJoinTableContainer
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlAssociationOverride_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java
deleted file mode 100644
index 08094ff11a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAccessHolder;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Attribute Mapping 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeMapping_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlAttributeMapping_2_0 extends XmlAccessHolder
-{
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java
deleted file mode 100644
index 7c618f794a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Attribute Override 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlAttributeOverride_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlAttributeOverride_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributes_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributes_2_0.java
deleted file mode 100644
index 068f755bca..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlAttributes_2_0.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Attributes 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getElementCollections <em>Element Collections</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlAttributes_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
- /**
- * Returns the value of the '<em><b>Element Collections</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlElementCollection}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Element Collections</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Element Collections</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0_ElementCollections()
- * @model containment="true"
- * @generated
- */
- EList<XmlElementCollection> getElementCollections();
-
-} // XmlAttributes_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCacheable_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCacheable_2_0.java
deleted file mode 100644
index 6bac56d8a0..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCacheable_2_0.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Cacheable2 0</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable <em>Cacheable</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlCacheable_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Cacheable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cacheable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cacheable</em>' attribute.
- * @see #setCacheable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0_Cacheable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getCacheable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable <em>Cacheable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cacheable</em>' attribute.
- * @see #getCacheable()
- * @generated
- */
- void setCacheable(Boolean value);
-
- /**
- * Return the {@link TextRange} for the cacheable annotation
- */
- TextRange getCacheableTextRange();
-} // XmlCacheable2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCascadeType_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCascadeType_2_0.java
deleted file mode 100644
index 6ebb968679..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCascadeType_2_0.java
+++ /dev/null
@@ -1,61 +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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Cascade Type 20</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach <em>Cascade Detach</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlCascadeType_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Cascade Detach</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade Detach</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade Detach</em>' attribute.
- * @see #setCascadeDetach(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0_CascadeDetach()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- boolean isCascadeDetach();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach <em>Cascade Detach</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade Detach</em>' attribute.
- * @see #isCascadeDetach()
- * @generated
- */
- void setCascadeDetach(boolean value);
-
-} // XmlCascadeType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCollectionTable_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCollectionTable_2_0.java
deleted file mode 100644
index 298a2311a1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlCollectionTable_2_0.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.orm.XmlReferenceTable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Collection Table 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlCollectionTable_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlCollectionTable_2_0 extends XmlReferenceTable
-{
-
-} // XmlCollectionTable_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlDerivedId_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlDerivedId_2_0.java
deleted file mode 100644
index b70d585770..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlDerivedId_2_0.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Derived Id 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0#getId <em>Id</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlDerivedId_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0_Id()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- void setId(Boolean value);
-
- /**
- * Return the text range of the derived id part of the XML document
- */
- TextRange getIdTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlElementCollection_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlElementCollection_2_0.java
deleted file mode 100644
index 75b619398a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlElementCollection_2_0.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.core.resource.orm.v2_0;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.FetchType;
-import org.eclipse.jpt.jpa.core.resource.orm.MapKey;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverrideContainer;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlCollectionTable;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOrderable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Element Collection 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass <em>Target Class</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch <em>Fetch</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey <em>Map Key</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass <em>Map Key Class</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn <em>Map Key Column</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn <em>Column</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable <em>Collection Table</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlElementCollection_2_0 extends XmlConvertibleMapping, XmlOrderable, XmlAttributeOverrideContainer, XmlAssociationOverrideContainer, XmlMapKeyAttributeOverrideContainer_2_0, XmlMapKeyConvertibleMapping_2_0
-{
- /**
- * Returns the value of the '<em><b>Target Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Target Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Target Class</em>' attribute.
- * @see #setTargetClass(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_TargetClass()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getTargetClass();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass <em>Target Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Target Class</em>' attribute.
- * @see #getTargetClass()
- * @generated
- */
- void setTargetClass(String value);
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.FetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #setFetch(FetchType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_Fetch()
- * @model
- * @generated
- */
- FetchType getFetch();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.FetchType
- * @see #getFetch()
- * @generated
- */
- void setFetch(FetchType value);
-
- /**
- * Returns the value of the '<em><b>Map Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key</em>' containment reference.
- * @see #setMapKey(MapKey)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKey()
- * @model containment="true"
- * @generated
- */
- MapKey getMapKey();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey <em>Map Key</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key</em>' containment reference.
- * @see #getMapKey()
- * @generated
- */
- void setMapKey(MapKey value);
-
- /**
- * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Class</em>' containment reference.
- * @see #setMapKeyClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyClass()
- * @model containment="true"
- * @generated
- */
- XmlClassReference getMapKeyClass();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass <em>Map Key Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Class</em>' containment reference.
- * @see #getMapKeyClass()
- * @generated
- */
- void setMapKeyClass(XmlClassReference value);
-
- /**
- * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Column</em>' containment reference.
- * @see #setMapKeyColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyColumn()
- * @model containment="true"
- * @generated
- */
- XmlColumn getMapKeyColumn();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Column</em>' containment reference.
- * @see #getMapKeyColumn()
- * @generated
- */
- void setMapKeyColumn(XmlColumn value);
-
- /**
- * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- EList<XmlJoinColumn> getMapKeyJoinColumns();
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see #setColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_Column()
- * @model containment="true"
- * @generated
- */
- XmlColumn getColumn();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column</em>' containment reference.
- * @see #getColumn()
- * @generated
- */
- void setColumn(XmlColumn value);
-
- /**
- * Returns the value of the '<em><b>Collection Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Collection Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Collection Table</em>' containment reference.
- * @see #setCollectionTable(XmlCollectionTable)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_CollectionTable()
- * @model containment="true"
- * @generated
- */
- XmlCollectionTable getCollectionTable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable <em>Collection Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Collection Table</em>' containment reference.
- * @see #getCollectionTable()
- * @generated
- */
- void setCollectionTable(XmlCollectionTable value);
-
- /**
- * Return the {@link TextRange} for the target-class attribute.
- */
- TextRange getTargetClassTextRange();
-
- /**
- * Return the {@link TextRange} for the map-key-class attribute.
- */
- TextRange getMapKeyClassTextRange();
-
-} // XmlElementCollection_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEmbedded_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEmbedded_2_0.java
deleted file mode 100644
index 31728d2e2f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEmbedded_2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverrideContainer;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Embedded 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEmbedded_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlEmbedded_2_0 extends XmlAssociationOverrideContainer
-{
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntityListener_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntityListener_2_0.java
deleted file mode 100644
index 55e1f2d449..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntityListener_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Entity Listener 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlEntityListener_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlEntityListener_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntity_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntity_2_0.java
deleted file mode 100644
index c569622e9d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEntity_2_0.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Entity 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntity_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlEntity_2_0 extends XmlCacheable_2_0
-{
-
-} // XmlEntity_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEventMethod_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEventMethod_2_0.java
deleted file mode 100644
index a4659e0532..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlEventMethod_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Event Method 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlEventMethod_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlEventMethod_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlGenerator_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlGenerator_2_0.java
deleted file mode 100644
index 5eea431c28..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlGenerator_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Generator 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlGenerator_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlGenerator_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlManyToMany_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlManyToMany_2_0.java
deleted file mode 100644
index 52ab5e52a5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlManyToMany_2_0.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.orm.v2_0;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Many To Many 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlManyToMany_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlManyToMany_2_0 extends XmlMultiRelationshipMapping_2_0
-{
-
-} // XmlManyToMany_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java
deleted file mode 100644
index e0a206e520..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java
+++ /dev/null
@@ -1,60 +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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.emf.common.util.EList;
-
-
-import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Map Key Attribute Override Container2 0</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0#getMapKeyAttributeOverrides <em>Map Key Attribute Overrides</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlMapKeyAttributeOverrideContainer_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Attribute Overrides</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
- * @model containment="true"
- * @generated
- */
- EList<XmlAttributeOverride> getMapKeyAttributeOverrides();
-
-} // XmlMapKeyAttributeOverrideContainer2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java
deleted file mode 100644
index d9b7b95f82..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Map Key Class 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyClass_2_0#getClassName <em>Class Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyClass_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlMapKeyClass_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Class Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Class Name</em>' attribute.
- * @see #setClassName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyClass_2_0_ClassName()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClassName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyClass_2_0#getClassName <em>Class Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Class Name</em>' attribute.
- * @see #getClassName()
- * @generated
- */
- void setClassName(String value);
-
-} // XmlMapKeyClass_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyConvertibleMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyConvertibleMapping_2_0.java
deleted file mode 100644
index d0fe51b6ad..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapKeyConvertibleMapping_2_0.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
-import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Map Key Convertible Mapping 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyConvertibleMapping_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlMapKeyConvertibleMapping_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #setMapKeyTemporal(TemporalType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyConvertibleMapping_2_0_MapKeyTemporal()
- * @model
- * @generated
- */
- TemporalType getMapKeyTemporal();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.TemporalType
- * @see #getMapKeyTemporal()
- * @generated
- */
- void setMapKeyTemporal(TemporalType value);
-
- /**
- * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #setMapKeyEnumerated(EnumType)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyConvertibleMapping_2_0_MapKeyEnumerated()
- * @model
- * @generated
- */
- EnumType getMapKeyEnumerated();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.EnumType
- * @see #getMapKeyEnumerated()
- * @generated
- */
- void setMapKeyEnumerated(EnumType value);
-
- /**
- * Return the {@link TextRange} for the enumerated element. If the enumerated element
- * does not exist return the {@link TextRange} for the basic element.
- */
- TextRange getMapKeyEnumeratedTextRange();
-
- /**
- * Return the {@link TextRange} for the temporal element. If the temporal element
- * does not exist return the {@link TextRange} for the basic element.
- */
- TextRange getMapKeyTemporalTextRange();
-
-} // XmlMapKeyConvertibleMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapsId_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapsId_2_0.java
deleted file mode 100644
index 1c0ea5d737..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMapsId_2_0.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Maps Id 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId <em>Maps Id</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlMapsId_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Maps Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Maps Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Maps Id</em>' attribute.
- * @see #setMapsId(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0_MapsId()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getMapsId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId <em>Maps Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Maps Id</em>' attribute.
- * @see #getMapsId()
- * @generated
- */
- void setMapsId(String value);
-
- /**
- * Return the text range of the "maps-id" part of the XML document
- */
- TextRange getMapsIdTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java
deleted file mode 100644
index cc1b46c49d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.resource.orm.v2_0;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
-import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Multi Relationship Mapping 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass <em>Map Key Class</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn <em>Map Key Column</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlMultiRelationshipMapping_2_0 extends XmlOrderable_2_0, XmlMapKeyAttributeOverrideContainer_2_0, XmlMapKeyConvertibleMapping_2_0
-{
- /**
- * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Class</em>' containment reference.
- * @see #setMapKeyClass(XmlClassReference)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyClass()
- * @model containment="true"
- * @generated
- */
- XmlClassReference getMapKeyClass();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass <em>Map Key Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Class</em>' containment reference.
- * @see #getMapKeyClass()
- * @generated
- */
- void setMapKeyClass(XmlClassReference value);
-
- /**
- * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Column</em>' containment reference.
- * @see #setMapKeyColumn(XmlColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyColumn()
- * @model containment="true"
- * @generated
- */
- XmlColumn getMapKeyColumn();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key Column</em>' containment reference.
- * @see #getMapKeyColumn()
- * @generated
- */
- void setMapKeyColumn(XmlColumn value);
-
- /**
- * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns()
- * @model containment="true"
- * @generated
- */
- EList<XmlJoinColumn> getMapKeyJoinColumns();
-
- /**
- * Return the {@link TextRange} for the map-key-class attribute.
- */
- TextRange getMapKeyClassTextRange();
-} // XmlMultiRelationshipMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlNamedQuery_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlNamedQuery_2_0.java
deleted file mode 100644
index dc0f6344be..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlNamedQuery_2_0.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Named Query 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode <em>Lock Mode</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlNamedQuery_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Lock Mode</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lock Mode</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lock Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @see #setLockMode(LockModeType_2_0)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0_LockMode()
- * @model
- * @generated
- */
- LockModeType_2_0 getLockMode();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode <em>Lock Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lock Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.LockModeType_2_0
- * @see #getLockMode()
- * @generated
- */
- void setLockMode(LockModeType_2_0 value);
-
-} // XmlNamedQuery_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToMany_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToMany_2_0.java
deleted file mode 100644
index a2792c9c84..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToMany_2_0.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.orm.v2_0;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml One To Many 20</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToMany_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlOneToMany_2_0 extends XmlMultiRelationshipMapping_2_0, XmlOrphanRemovable_2_0
-{
-
-} // XmlOneToMany_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToOne_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToOne_2_0.java
deleted file mode 100644
index 6a9a7c5071..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOneToOne_2_0.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml One To One 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToOne_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlOneToOne_2_0 extends XmlSingleRelationshipMapping_2_0, XmlOrphanRemovable_2_0
-{
-
-} // XmlOneToOne_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderColumn_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderColumn_2_0.java
deleted file mode 100644
index 6cdaf0c7b1..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderColumn_2_0.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Order Column 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable <em>Nullable</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable <em>Insertable</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable <em>Updatable</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlOrderColumn_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Nullable</em>' attribute.
- * @see #setNullable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0_Nullable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getNullable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Nullable</em>' attribute.
- * @see #getNullable()
- * @generated
- */
- void setNullable(Boolean value);
-
- /**
- * Returns the value of the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Insertable</em>' attribute.
- * @see #setInsertable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0_Insertable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getInsertable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Insertable</em>' attribute.
- * @see #getInsertable()
- * @generated
- */
- void setInsertable(Boolean value);
-
- /**
- * Returns the value of the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Updatable</em>' attribute.
- * @see #setUpdatable(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0_Updatable()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getUpdatable();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Updatable</em>' attribute.
- * @see #getUpdatable()
- * @generated
- */
- void setUpdatable(Boolean value);
-
-} // XmlOrderColumn_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderable_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderable_2_0.java
deleted file mode 100644
index abd661bac4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrderable_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-
-import org.eclipse.jpt.jpa.core.resource.orm.XmlOrderColumn;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Orderable 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn <em>Order Column</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlOrderable_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Order Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order Column</em>' containment reference.
- * @see #setOrderColumn(XmlOrderColumn)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0_OrderColumn()
- * @model containment="true"
- * @generated
- */
- XmlOrderColumn getOrderColumn();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn <em>Order Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order Column</em>' containment reference.
- * @see #getOrderColumn()
- * @generated
- */
- void setOrderColumn(XmlOrderColumn value);
-
-} // XmlOrderable_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java
deleted file mode 100644
index 36a8546714..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Orphan Removable2 0</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval <em>Orphan Removal</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlOrphanRemovable_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Orphan Removal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Orphan Removal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Orphan Removal</em>' attribute.
- * @see #setOrphanRemoval(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0_OrphanRemoval()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- Boolean getOrphanRemoval();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval <em>Orphan Removal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Orphan Removal</em>' attribute.
- * @see #getOrphanRemoval()
- * @generated
- */
- void setOrphanRemoval(Boolean value);
-
-} // XmlOrphanRemovable2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java
deleted file mode 100644
index 2e05bf1fb4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Persistence Unit Defaults 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers <em>Delimited Identifiers</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlPersistenceUnitDefaults_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
- /**
- * Returns the value of the '<em><b>Delimited Identifiers</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Delimited Identifiers</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Delimited Identifiers</em>' attribute.
- * @see #setDelimitedIdentifiers(boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- boolean isDelimitedIdentifiers();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers <em>Delimited Identifiers</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Delimited Identifiers</em>' attribute.
- * @see #isDelimitedIdentifiers()
- * @generated
- */
- void setDelimitedIdentifiers(boolean value);
-
-} // XmlPersistenceUnitDefaults_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java
deleted file mode 100644
index 2ac9ece061..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Persistence Unit Metadata 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlPersistenceUnitMetadata_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlPersistenceUnitMetadata_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQueryHint_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQueryHint_2_0.java
deleted file mode 100644
index e4e68d2f8c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQueryHint_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Query Hint 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlQueryHint_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlQueryHint_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQuery_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQuery_2_0.java
deleted file mode 100644
index 3baa46238a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlQuery_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Query 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlQuery_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlQuery_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlQuery_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java
deleted file mode 100644
index b8549701a9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Sequence Generator 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog <em>Catalog</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema <em>Schema</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlSequenceGenerator_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see #setCatalog(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0_Catalog()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getCatalog();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Catalog</em>' attribute.
- * @see #getCatalog()
- * @generated
- */
- void setCatalog(String value);
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see #setSchema(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0_Schema()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getSchema();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema</em>' attribute.
- * @see #getSchema()
- * @generated
- */
- void setSchema(String value);
-
-} // XmlSequenceGenerator_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java
deleted file mode 100644
index 5b087d37b7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Single Relationship Mapping 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSingleRelationshipMapping_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface XmlSingleRelationshipMapping_2_0 extends XmlDerivedId_2_0, XmlMapsId_2_0
-{
-} // XmlSingleRelationshipMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java
deleted file mode 100644
index b104b9b73d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Sql Result Set Mapping 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlSqlResultSetMapping_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0_Description()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // XmlSqlResultSetMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java
deleted file mode 100644
index 6146069012..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.orm.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Unique Constraint 20</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlUniqueConstraint_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // XmlUniqueConstraint_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/JPA.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/JPA.java
deleted file mode 100644
index 38176c8faa..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/JPA.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence;
-
-/**
- * JPA persistence.xml-related stuff (elements, attributes etc.)
- *
- * 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.
- */
-@SuppressWarnings("nls")
-public interface JPA
-{
- String SCHEMA_NAMESPACE = "http://java.sun.com/xml/ns/persistence";
- String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
- String SCHEMA_VERSION = "1.0";
-
- String CLASS = "class";
-
- String DESCRIPTION = "description";
-
- String EXCLUDE_UNLISTED_CLASSES = "exclude-unlisted-classes";
-
- String JAR_FILE = "jar-file";
-
- String JTA_DATA_SOURCE = "jta-data-source";
-
- String MAPPING_FILE = "mapping-file";
-
- String NON_JTA_DATA_SOURCE = "non-jta-data-source";
-
- String PERSISTENCE = "persistence";
-
- String PERSISTENCE_UNIT = "persistence-unit";
- String PERSISTENCE_UNIT__NAME = "name";
- String PERSISTENCE_UNIT__TRANSACTION_TYPE = "transaction-type";
-
- String PROPERTIES = "properties";
-
- String PROPERTY = "property";
- String PROPERTY__NAME = "name";
- String PROPERTY__VALUE = "value";
-
- String PROVIDER = "provider";
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceFactory.java
deleted file mode 100644
index 8df8130a4b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceFactory.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage
- * @generated
- */
-public class PersistenceFactory extends EFactoryImpl
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final PersistenceFactory eINSTANCE = init();
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static PersistenceFactory init()
- {
- try
- {
- PersistenceFactory thePersistenceFactory = (PersistenceFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.persistence.xmi");
- if (thePersistenceFactory != null)
- {
- return thePersistenceFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new PersistenceFactory();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PersistenceFactory()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- case PersistencePackage.XML_JAVA_CLASS_REF: return (EObject)createXmlJavaClassRef();
- case PersistencePackage.XML_JAR_FILE_REF: return (EObject)createXmlJarFileRef();
- case PersistencePackage.XML_MAPPING_FILE_REF: return (EObject)createXmlMappingFileRef();
- case PersistencePackage.XML_PERSISTENCE: return (EObject)createXmlPersistence();
- case PersistencePackage.XML_PERSISTENCE_UNIT: return (EObject)createXmlPersistenceUnit();
- case PersistencePackage.XML_PROPERTIES: return (EObject)createXmlProperties();
- case PersistencePackage.XML_PROPERTY: return (EObject)createXmlProperty();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT_TRANSACTION_TYPE:
- return createXmlPersistenceUnitTransactionTypeFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT_TRANSACTION_TYPE:
- return convertXmlPersistenceUnitTransactionTypeToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlJavaClassRef createXmlJavaClassRef()
- {
- XmlJavaClassRef xmlJavaClassRef = new XmlJavaClassRef();
- return xmlJavaClassRef;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlJarFileRef createXmlJarFileRef()
- {
- XmlJarFileRef xmlJarFileRef = new XmlJarFileRef();
- return xmlJarFileRef;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlMappingFileRef createXmlMappingFileRef()
- {
- XmlMappingFileRef xmlMappingFileRef = new XmlMappingFileRef();
- return xmlMappingFileRef;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistence createXmlPersistence()
- {
- XmlPersistence xmlPersistence = new XmlPersistence();
- return xmlPersistence;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistenceUnit createXmlPersistenceUnit()
- {
- XmlPersistenceUnit xmlPersistenceUnit = new XmlPersistenceUnit();
- return xmlPersistenceUnit;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlProperties createXmlProperties()
- {
- XmlProperties xmlProperties = new XmlProperties();
- return xmlProperties;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlProperty createXmlProperty()
- {
- XmlProperty xmlProperty = new XmlProperty();
- return xmlProperty;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistenceUnitTransactionType createXmlPersistenceUnitTransactionTypeFromString(EDataType eDataType, String initialValue)
- {
- XmlPersistenceUnitTransactionType result = XmlPersistenceUnitTransactionType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertXmlPersistenceUnitTransactionTypeToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PersistencePackage getPersistencePackage()
- {
- return (PersistencePackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static PersistencePackage getPackage()
- {
- return PersistencePackage.eINSTANCE;
- }
-
-} //PersistenceFactory
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistencePackage.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistencePackage.java
deleted file mode 100644
index d11527a508..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistencePackage.java
+++ /dev/null
@@ -1,1302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.xml.CommonPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory
- * @model kind="package"
- * @generated
- */
-public class PersistencePackage extends EPackageImpl
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNAME = "persistence";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_URI = "jpt.persistence.xmi";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_PREFIX = "org.eclipse.jpt.jpa.core.resource.persistence";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final PersistencePackage eINSTANCE = org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef <em>Xml Java Class Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJavaClassRef()
- * @generated
- */
- public static final int XML_JAVA_CLASS_REF = 0;
-
- /**
- * The feature id for the '<em><b>Java Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JAVA_CLASS_REF__JAVA_CLASS = 0;
-
- /**
- * The number of structural features of the '<em>Xml Java Class Ref</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JAVA_CLASS_REF_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef <em>Xml Jar File Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJarFileRef()
- * @generated
- */
- public static final int XML_JAR_FILE_REF = 1;
-
- /**
- * The feature id for the '<em><b>File Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JAR_FILE_REF__FILE_NAME = 0;
-
- /**
- * The number of structural features of the '<em>Xml Jar File Ref</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_JAR_FILE_REF_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef <em>Xml Mapping File Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlMappingFileRef()
- * @generated
- */
- public static final int XML_MAPPING_FILE_REF = 2;
-
- /**
- * The feature id for the '<em><b>File Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPING_FILE_REF__FILE_NAME = 0;
-
- /**
- * The number of structural features of the '<em>Xml Mapping File Ref</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_MAPPING_FILE_REF_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence <em>Xml Persistence</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistence()
- * @generated
- */
- public static final int XML_PERSISTENCE = 3;
-
- /**
- * The feature id for the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE__VERSION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION;
-
- /**
- * The feature id for the '<em><b>Schema Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE__SCHEMA_LOCATION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION;
-
- /**
- * The feature id for the '<em><b>Persistence Units</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE__PERSISTENCE_UNITS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Xml Persistence</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_FEATURE_COUNT = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit <em>Xml Persistence Unit</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT = 4;
-
- /**
- * The feature id for the '<em><b>Shared Cache Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE;
-
- /**
- * The feature id for the '<em><b>Validation Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__VALIDATION_MODE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20__VALIDATION_MODE;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__DESCRIPTION = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Provider</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__PROVIDER = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Jta Data Source</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Non Jta Data Source</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Mapping Files</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__MAPPING_FILES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Jar Files</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__JAR_FILES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Classes</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__CLASSES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Exclude Unlisted Classes</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Properties</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__PROPERTIES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__NAME = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Transaction Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT__TRANSACTION_TYPE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 10;
-
- /**
- * The number of structural features of the '<em>Xml Persistence Unit</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_FEATURE_COUNT = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 11;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties <em>Xml Properties</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperties()
- * @generated
- */
- public static final int XML_PROPERTIES = 5;
-
- /**
- * The feature id for the '<em><b>Properties</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PROPERTIES__PROPERTIES = 0;
-
- /**
- * The number of structural features of the '<em>Xml Properties</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PROPERTIES_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty <em>Xml Property</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperty()
- * @generated
- */
- public static final int XML_PROPERTY = 6;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PROPERTY__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PROPERTY__VALUE = 1;
-
- /**
- * The number of structural features of the '<em>Xml Property</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PROPERTY_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType <em>Xml Persistence Unit Transaction Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnitTransactionType()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_TRANSACTION_TYPE = 7;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlJavaClassRefEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlJarFileRefEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlMappingFileRefEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceUnitEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPropertiesEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPropertyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum xmlPersistenceUnitTransactionTypeEEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#eNS_URI
- * @see #init()
- * @generated
- */
- private PersistencePackage()
- {
- super(eNS_URI, PersistenceFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link PersistencePackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static PersistencePackage init()
- {
- if (isInited) return (PersistencePackage)EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI);
-
- // Obtain or create and register package
- PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PersistencePackage());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
- XMLTypePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
- OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
- OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
- PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
-
- // Create package meta-data objects
- thePersistencePackage.createPackageContents();
- theCommonPackage.createPackageContents();
- theOrmPackage.createPackageContents();
- theOrmV2_0Package.createPackageContents();
- thePersistenceV2_0Package.createPackageContents();
-
- // Initialize created meta-data
- thePersistencePackage.initializePackageContents();
- theCommonPackage.initializePackageContents();
- theOrmPackage.initializePackageContents();
- theOrmV2_0Package.initializePackageContents();
- thePersistenceV2_0Package.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- thePersistencePackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(PersistencePackage.eNS_URI, thePersistencePackage);
- return thePersistencePackage;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef <em>Xml Java Class Ref</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Java Class Ref</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef
- * @generated
- */
- public EClass getXmlJavaClassRef()
- {
- return xmlJavaClassRefEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef#getJavaClass <em>Java Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Java Class</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef#getJavaClass()
- * @see #getXmlJavaClassRef()
- * @generated
- */
- public EAttribute getXmlJavaClassRef_JavaClass()
- {
- return (EAttribute)xmlJavaClassRefEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef <em>Xml Jar File Ref</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Jar File Ref</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef
- * @generated
- */
- public EClass getXmlJarFileRef()
- {
- return xmlJarFileRefEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef#getFileName <em>File Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>File Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef#getFileName()
- * @see #getXmlJarFileRef()
- * @generated
- */
- public EAttribute getXmlJarFileRef_FileName()
- {
- return (EAttribute)xmlJarFileRefEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef <em>Xml Mapping File Ref</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Mapping File Ref</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef
- * @generated
- */
- public EClass getXmlMappingFileRef()
- {
- return xmlMappingFileRefEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef#getFileName <em>File Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>File Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef#getFileName()
- * @see #getXmlMappingFileRef()
- * @generated
- */
- public EAttribute getXmlMappingFileRef_FileName()
- {
- return (EAttribute)xmlMappingFileRefEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence <em>Xml Persistence</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence
- * @generated
- */
- public EClass getXmlPersistence()
- {
- return xmlPersistenceEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence#getPersistenceUnits <em>Persistence Units</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Persistence Units</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence#getPersistenceUnits()
- * @see #getXmlPersistence()
- * @generated
- */
- public EReference getXmlPersistence_PersistenceUnits()
- {
- return (EReference)xmlPersistenceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit <em>Xml Persistence Unit</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence Unit</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit
- * @generated
- */
- public EClass getXmlPersistenceUnit()
- {
- return xmlPersistenceUnitEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getDescription()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_Description()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProvider <em>Provider</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Provider</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProvider()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_Provider()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource <em>Jta Data Source</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Jta Data Source</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_JtaDataSource()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource <em>Non Jta Data Source</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Non Jta Data Source</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_NonJtaDataSource()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getMappingFiles <em>Mapping Files</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Mapping Files</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getMappingFiles()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EReference getXmlPersistenceUnit_MappingFiles()
- {
- return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJarFiles <em>Jar Files</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Jar Files</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJarFiles()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EReference getXmlPersistenceUnit_JarFiles()
- {
- return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getClasses <em>Classes</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Classes</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getClasses()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EReference getXmlPersistenceUnit_Classes()
- {
- return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses <em>Exclude Unlisted Classes</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Exclude Unlisted Classes</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_ExcludeUnlistedClasses()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProperties <em>Properties</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Properties</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProperties()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EReference getXmlPersistenceUnit_Properties()
- {
- return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getName()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_Name()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(9);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getTransactionType <em>Transaction Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Transaction Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getTransactionType()
- * @see #getXmlPersistenceUnit()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_TransactionType()
- {
- return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(10);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties <em>Xml Properties</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Properties</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties
- * @generated
- */
- public EClass getXmlProperties()
- {
- return xmlPropertiesEClass;
- }
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties#getProperties <em>Properties</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Properties</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties#getProperties()
- * @see #getXmlProperties()
- * @generated
- */
- public EReference getXmlProperties_Properties()
- {
- return (EReference)xmlPropertiesEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty <em>Xml Property</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Property</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty
- * @generated
- */
- public EClass getXmlProperty()
- {
- return xmlPropertyEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getName()
- * @see #getXmlProperty()
- * @generated
- */
- public EAttribute getXmlProperty_Name()
- {
- return (EAttribute)xmlPropertyEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getValue <em>Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Value</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getValue()
- * @see #getXmlProperty()
- * @generated
- */
- public EAttribute getXmlProperty_Value()
- {
- return (EAttribute)xmlPropertyEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType <em>Xml Persistence Unit Transaction Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Xml Persistence Unit Transaction Type</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType
- * @generated
- */
- public EEnum getXmlPersistenceUnitTransactionType()
- {
- return xmlPersistenceUnitTransactionTypeEEnum;
- }
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- public PersistenceFactory getPersistenceFactory()
- {
- return (PersistenceFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- xmlJavaClassRefEClass = createEClass(XML_JAVA_CLASS_REF);
- createEAttribute(xmlJavaClassRefEClass, XML_JAVA_CLASS_REF__JAVA_CLASS);
-
- xmlJarFileRefEClass = createEClass(XML_JAR_FILE_REF);
- createEAttribute(xmlJarFileRefEClass, XML_JAR_FILE_REF__FILE_NAME);
-
- xmlMappingFileRefEClass = createEClass(XML_MAPPING_FILE_REF);
- createEAttribute(xmlMappingFileRefEClass, XML_MAPPING_FILE_REF__FILE_NAME);
-
- xmlPersistenceEClass = createEClass(XML_PERSISTENCE);
- createEReference(xmlPersistenceEClass, XML_PERSISTENCE__PERSISTENCE_UNITS);
-
- xmlPersistenceUnitEClass = createEClass(XML_PERSISTENCE_UNIT);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__DESCRIPTION);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__PROVIDER);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE);
- createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__MAPPING_FILES);
- createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__JAR_FILES);
- createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__CLASSES);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES);
- createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__PROPERTIES);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__NAME);
- createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__TRANSACTION_TYPE);
-
- xmlPropertiesEClass = createEClass(XML_PROPERTIES);
- createEReference(xmlPropertiesEClass, XML_PROPERTIES__PROPERTIES);
-
- xmlPropertyEClass = createEClass(XML_PROPERTY);
- createEAttribute(xmlPropertyEClass, XML_PROPERTY__NAME);
- createEAttribute(xmlPropertyEClass, XML_PROPERTY__VALUE);
-
- // Create enums
- xmlPersistenceUnitTransactionTypeEEnum = createEEnum(XML_PERSISTENCE_UNIT_TRANSACTION_TYPE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI);
- EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
- XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
-
- // Add subpackages
- getESubpackages().add(thePersistenceV2_0Package);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- xmlPersistenceEClass.getESuperTypes().add(theCommonPackage.getAbstractJpaRootEObject());
- xmlPersistenceUnitEClass.getESuperTypes().add(thePersistenceV2_0Package.getXmlPersistenceUnit_2_0());
-
- // Initialize classes and features; add operations and parameters
- initEClass(xmlJavaClassRefEClass, XmlJavaClassRef.class, "XmlJavaClassRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlJavaClassRef_JavaClass(), theEcorePackage.getEString(), "javaClass", "", 0, 1, XmlJavaClassRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
-
- initEClass(xmlJarFileRefEClass, XmlJarFileRef.class, "XmlJarFileRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlJarFileRef_FileName(), theEcorePackage.getEString(), "fileName", "", 0, 1, XmlJarFileRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
-
- initEClass(xmlMappingFileRefEClass, XmlMappingFileRef.class, "XmlMappingFileRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlMappingFileRef_FileName(), theEcorePackage.getEString(), "fileName", "", 0, 1, XmlMappingFileRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
-
- initEClass(xmlPersistenceEClass, XmlPersistence.class, "XmlPersistence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlPersistence_PersistenceUnits(), this.getXmlPersistenceUnit(), null, "persistenceUnits", null, 0, -1, XmlPersistence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPersistenceUnitEClass, XmlPersistenceUnit.class, "XmlPersistenceUnit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlPersistenceUnit_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_Provider(), theXMLTypePackage.getString(), "provider", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_JtaDataSource(), theXMLTypePackage.getString(), "jtaDataSource", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_NonJtaDataSource(), theXMLTypePackage.getString(), "nonJtaDataSource", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlPersistenceUnit_MappingFiles(), this.getXmlMappingFileRef(), null, "mappingFiles", null, 0, -1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlPersistenceUnit_JarFiles(), this.getXmlJarFileRef(), null, "jarFiles", null, 0, -1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlPersistenceUnit_Classes(), this.getXmlJavaClassRef(), null, "classes", null, 0, -1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_ExcludeUnlistedClasses(), theXMLTypePackage.getBooleanObject(), "excludeUnlistedClasses", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlPersistenceUnit_Properties(), this.getXmlProperties(), null, "properties", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_TransactionType(), this.getXmlPersistenceUnitTransactionType(), "transactionType", "JTA", 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPropertiesEClass, XmlProperties.class, "XmlProperties", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getXmlProperties_Properties(), this.getXmlProperty(), null, "properties", null, 0, -1, XmlProperties.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(xmlPropertyEClass, XmlProperty.class, "XmlProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlProperty_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlProperty_Value(), theXMLTypePackage.getString(), "value", null, 1, 1, XmlProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(xmlPersistenceUnitTransactionTypeEEnum, XmlPersistenceUnitTransactionType.class, "XmlPersistenceUnitTransactionType");
- addEEnumLiteral(xmlPersistenceUnitTransactionTypeEEnum, XmlPersistenceUnitTransactionType.JTA);
- addEEnumLiteral(xmlPersistenceUnitTransactionTypeEEnum, XmlPersistenceUnitTransactionType.RESOURCE_LOCAL);
-
- // Create resource
- createResource(eNS_URI);
- }
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- public interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef <em>Xml Java Class Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJavaClassRef()
- * @generated
- */
- public static final EClass XML_JAVA_CLASS_REF = eINSTANCE.getXmlJavaClassRef();
-
- /**
- * The meta object literal for the '<em><b>Java Class</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_JAVA_CLASS_REF__JAVA_CLASS = eINSTANCE.getXmlJavaClassRef_JavaClass();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef <em>Xml Jar File Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJarFileRef()
- * @generated
- */
- public static final EClass XML_JAR_FILE_REF = eINSTANCE.getXmlJarFileRef();
-
- /**
- * The meta object literal for the '<em><b>File Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_JAR_FILE_REF__FILE_NAME = eINSTANCE.getXmlJarFileRef_FileName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef <em>Xml Mapping File Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlMappingFileRef()
- * @generated
- */
- public static final EClass XML_MAPPING_FILE_REF = eINSTANCE.getXmlMappingFileRef();
-
- /**
- * The meta object literal for the '<em><b>File Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_MAPPING_FILE_REF__FILE_NAME = eINSTANCE.getXmlMappingFileRef_FileName();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence <em>Xml Persistence</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistence()
- * @generated
- */
- public static final EClass XML_PERSISTENCE = eINSTANCE.getXmlPersistence();
-
- /**
- * The meta object literal for the '<em><b>Persistence Units</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE__PERSISTENCE_UNITS = eINSTANCE.getXmlPersistence_PersistenceUnits();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit <em>Xml Persistence Unit</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit()
- * @generated
- */
- public static final EClass XML_PERSISTENCE_UNIT = eINSTANCE.getXmlPersistenceUnit();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__DESCRIPTION = eINSTANCE.getXmlPersistenceUnit_Description();
-
- /**
- * The meta object literal for the '<em><b>Provider</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__PROVIDER = eINSTANCE.getXmlPersistenceUnit_Provider();
-
- /**
- * The meta object literal for the '<em><b>Jta Data Source</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE = eINSTANCE.getXmlPersistenceUnit_JtaDataSource();
-
- /**
- * The meta object literal for the '<em><b>Non Jta Data Source</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE = eINSTANCE.getXmlPersistenceUnit_NonJtaDataSource();
-
- /**
- * The meta object literal for the '<em><b>Mapping Files</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE_UNIT__MAPPING_FILES = eINSTANCE.getXmlPersistenceUnit_MappingFiles();
-
- /**
- * The meta object literal for the '<em><b>Jar Files</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE_UNIT__JAR_FILES = eINSTANCE.getXmlPersistenceUnit_JarFiles();
-
- /**
- * The meta object literal for the '<em><b>Classes</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE_UNIT__CLASSES = eINSTANCE.getXmlPersistenceUnit_Classes();
-
- /**
- * The meta object literal for the '<em><b>Exclude Unlisted Classes</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES = eINSTANCE.getXmlPersistenceUnit_ExcludeUnlistedClasses();
-
- /**
- * The meta object literal for the '<em><b>Properties</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PERSISTENCE_UNIT__PROPERTIES = eINSTANCE.getXmlPersistenceUnit_Properties();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__NAME = eINSTANCE.getXmlPersistenceUnit_Name();
-
- /**
- * The meta object literal for the '<em><b>Transaction Type</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT__TRANSACTION_TYPE = eINSTANCE.getXmlPersistenceUnit_TransactionType();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties <em>Xml Properties</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperties()
- * @generated
- */
- public static final EClass XML_PROPERTIES = eINSTANCE.getXmlProperties();
-
- /**
- * The meta object literal for the '<em><b>Properties</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_PROPERTIES__PROPERTIES = eINSTANCE.getXmlProperties_Properties();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty <em>Xml Property</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperty()
- * @generated
- */
- public static final EClass XML_PROPERTY = eINSTANCE.getXmlProperty();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PROPERTY__NAME = eINSTANCE.getXmlProperty_Name();
-
- /**
- * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PROPERTY__VALUE = eINSTANCE.getXmlProperty_Value();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType <em>Xml Persistence Unit Transaction Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnitTransactionType()
- * @generated
- */
- public static final EEnum XML_PERSISTENCE_UNIT_TRANSACTION_TYPE = eINSTANCE.getXmlPersistenceUnitTransactionType();
-
- }
-
-} //PersistencePackage
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceXmlResourceFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceXmlResourceFactory.java
deleted file mode 100644
index 4d10dbb3dc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/PersistenceXmlResourceFactory.java
+++ /dev/null
@@ -1,52 +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.jpa.core.resource.persistence;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.wst.common.internal.emf.resource.Renderer;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;
-
-/**
- *
- *
- * 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.
- */
-public class PersistenceXmlResourceFactory extends TranslatorResourceFactory
-{
- public PersistenceXmlResourceFactory() {
- this(RendererFactory.getDefaultRendererFactory());
- }
-
- public PersistenceXmlResourceFactory(RendererFactory aRendererFactory) {
- super(aRendererFactory);
- }
-
- public PersistenceXmlResourceFactory(RendererFactory aRendererFactory, boolean listeningForUpdates) {
- super(aRendererFactory, listeningForUpdates);
- }
-
-
- /**
- * @see TranslatorResourceFactory#createResource(URI, Renderer)
- */
- @Override
- protected TranslatorResource createResource(URI uri, Renderer renderer) {
- return new JpaXmlResource(uri, renderer, JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE, XmlPersistence.getRootTranslator());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJarFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJarFileRef.java
deleted file mode 100644
index 262a22e9c5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJarFileRef.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.persistence;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Jar File Ref</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef#getFileName <em>File Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJarFileRef()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlJarFileRef extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getFileName() <em>File Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFileName()
- * @generated
- * @ordered
- */
- protected static final String FILE_NAME_EDEFAULT = "";
-
- /**
- * The cached value of the '{@link #getFileName() <em>File Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFileName()
- * @generated
- * @ordered
- */
- protected String fileName = FILE_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlJarFileRef()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_JAR_FILE_REF;
- }
-
- /**
- * Returns the value of the '<em><b>File Name</b></em>' attribute.
- * The default value is <code>""</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>File Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>File Name</em>' attribute.
- * @see #setFileName(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJarFileRef_FileName()
- * @model default="" unique="false" ordered="false"
- * @generated
- */
- public String getFileName()
- {
- return fileName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef#getFileName <em>File Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>File Name</em>' attribute.
- * @see #getFileName()
- * @generated
- */
- public void setFileName(String newFileName)
- {
- String oldFileName = fileName;
- fileName = newFileName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_JAR_FILE_REF__FILE_NAME, oldFileName, fileName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
- return getFileName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
- setFileName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
- setFileName(FILE_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
- return FILE_NAME_EDEFAULT == null ? fileName != null : !FILE_NAME_EDEFAULT.equals(fileName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (fileName: ");
- result.append(fileName);
- result.append(')');
- return result.toString();
- }
-
- @Override
- public TextRange getValidationTextRange() {
- return (! StringTools.stringIsEmpty(this.fileName)) ?
- getTextTextRange() :
- super.getValidationTextRange();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildFileNameTranslator(),
- };
- }
-
- private static Translator buildFileNameTranslator() {
- return new Translator(
- Translator.TEXT_ATTRIBUTE_VALUE,
- PersistencePackage.eINSTANCE.getXmlJarFileRef_FileName()
- );
- }
-
-
- // *********** refactoring ***********
-
- public ReplaceEdit createReplaceFolderEdit(IFolder originalFolder, String newName) {
- IDOMNode domNode = getTextNode();
- String originalName = originalFolder.getName();
- int nameIndex = this.fileName.indexOf(originalName);
-
- int offset = domNode.getStartOffset();
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJavaClassRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJavaClassRef.java
deleted file mode 100644
index 876b169bcb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlJavaClassRef.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.resource.persistence;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Class Ref</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef#getJavaClass <em>Java Class</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJavaClassRef()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlJavaClassRef extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getJavaClass() <em>Java Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJavaClass()
- * @generated
- * @ordered
- */
- protected static final String JAVA_CLASS_EDEFAULT = "";
-
- /**
- * The cached value of the '{@link #getJavaClass() <em>Java Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJavaClass()
- * @generated
- * @ordered
- */
- protected String javaClass = JAVA_CLASS_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlJavaClassRef()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_JAVA_CLASS_REF;
- }
-
- /**
- * Returns the value of the '<em><b>Java Class</b></em>' attribute.
- * The default value is <code>""</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Java Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Java Class</em>' attribute.
- * @see #setJavaClass(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlJavaClassRef_JavaClass()
- * @model default="" unique="false" ordered="false"
- * @generated
- */
- public String getJavaClass()
- {
- return javaClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef#getJavaClass <em>Java Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Java Class</em>' attribute.
- * @see #getJavaClass()
- * @generated
- */
- public void setJavaClass(String newJavaClass)
- {
- String oldJavaClass = javaClass;
- javaClass = newJavaClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS, oldJavaClass, javaClass));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
- return getJavaClass();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
- setJavaClass((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
- setJavaClass(JAVA_CLASS_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
- return JAVA_CLASS_EDEFAULT == null ? javaClass != null : !JAVA_CLASS_EDEFAULT.equals(javaClass);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (javaClass: ");
- result.append(javaClass);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildClassNameTranslator(),
- };
- }
-
- private static Translator buildClassNameTranslator() {
- return new Translator(
- Translator.TEXT_ATTRIBUTE_VALUE,
- PersistencePackage.eINSTANCE.getXmlJavaClassRef_JavaClass()
- );
- }
-
-
- // *********** refactoring ***********
-
- public ReplaceEdit createRenameEdit(IType originalType, String newName) {
- String originalName = originalType.getTypeQualifiedName();
- int nameIndex = this.javaClass.lastIndexOf(originalName);
- int offset = getTextNode().getStartOffset();
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenamePackageEdit(String newPackageName) {
- int packageLength = this.javaClass.lastIndexOf('.');
- if (newPackageName == "") {//$NON-NLS-1$
- //moving to the default package, remove the '.'
- packageLength++;
- }
- if (packageLength == -1) {
- //moving from the default package or unspecified package
- packageLength = 0;
- newPackageName = newPackageName + '.';
- }
- int offset = getTextNode().getStartOffset();
- return new ReplaceEdit(offset, packageLength, newPackageName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlMappingFileRef.java
deleted file mode 100644
index 42470d7f90..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlMappingFileRef.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.resource.persistence;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Mapping File Ref</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef#getFileName <em>File Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlMappingFileRef()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlMappingFileRef extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getFileName() <em>File Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFileName()
- * @generated
- * @ordered
- */
- protected static final String FILE_NAME_EDEFAULT = "";
-
- /**
- * The cached value of the '{@link #getFileName() <em>File Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFileName()
- * @generated
- * @ordered
- */
- protected String fileName = FILE_NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlMappingFileRef()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_MAPPING_FILE_REF;
- }
-
- /**
- * Returns the value of the '<em><b>File Name</b></em>' attribute.
- * The default value is <code>""</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>File Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>File Name</em>' attribute.
- * @see #setFileName(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlMappingFileRef_FileName()
- * @model default="" unique="false" ordered="false"
- * @generated
- */
- public String getFileName()
- {
- return fileName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef#getFileName <em>File Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>File Name</em>' attribute.
- * @see #getFileName()
- * @generated
- */
- public void setFileName(String newFileName)
- {
- String oldFileName = fileName;
- fileName = newFileName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME, oldFileName, fileName));
- }
-
- @Override
- public EList<Adapter> eAdapters() {
- // TODO Auto-generated method stub
- return super.eAdapters();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
- return getFileName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
- setFileName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
- setFileName(FILE_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
- return FILE_NAME_EDEFAULT == null ? fileName != null : !FILE_NAME_EDEFAULT.equals(fileName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (fileName: ");
- result.append(fileName);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildFileNameTranslator(),
- };
- }
-
- private static Translator buildFileNameTranslator() {
- return new Translator(
- Translator.TEXT_ATTRIBUTE_VALUE,
- PersistencePackage.eINSTANCE.getXmlMappingFileRef_FileName()
- );
- }
-
-
- public ReplaceEdit createRenameEdit(IFile originalFile, String newName) {
- IDOMNode domNode = getTextNode();
- String originalName = originalFile.getName();
- int nameIndex = this.fileName.lastIndexOf(originalName);
-
- int offset = domNode.getStartOffset();
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenameFolderEdit(IFolder originalFolder, String newName) {
- IDOMNode domNode = getTextNode();
- String originalName = originalFolder.getName();
- int nameIndex = this.fileName.indexOf(originalName);
-
- int offset = domNode.getStartOffset();
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createMoveEdit(IFile originalFile, IPath destination) {
- String originalName = originalFile.getName();
- int nameIndex = this.fileName.lastIndexOf(originalName);
-
- int offset = getTextNode().getStartOffset();
- return new ReplaceEdit(offset, nameIndex - 1, destination.toString());
- }
-
- public ReplaceEdit createMoveEdit(IPath originalLocation, IPath destination) {
- String originalName = originalLocation.toString();
-
- int offset = getTextNode().getStartOffset();
- return new ReplaceEdit(offset, originalName.length(), destination.toString());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java
deleted file mode 100644
index 0b1599a171..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java
+++ /dev/null
@@ -1,249 +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.jpa.core.resource.persistence;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleRootTranslator;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>XmlPersistence</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence#getPersistenceUnits <em>Persistence Units</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistence()
- * @model kind="class"
- * @generated
- */
-public class XmlPersistence extends AbstractJpaRootEObject
-{
- /**
- * The cached value of the '{@link #getPersistenceUnits() <em>Persistence Units</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPersistenceUnits()
- * @generated
- * @ordered
- */
- protected EList<XmlPersistenceUnit> persistenceUnits;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlPersistence()
- {
- super();
- }
-
- @Override
- public EObject eContainer() {
- return super.eContainer();
- }
-
- @Override
- protected void eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID) {
- super.eBasicSetContainer(newContainer, newContainerFeatureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_PERSISTENCE;
- }
-
- /**
- * Returns the value of the '<em><b>Persistence Units</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XmlPersistence Units</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Persistence Units</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistence_PersistenceUnits()
- * @model containment="true"
- * @generated
- */
- public EList<XmlPersistenceUnit> getPersistenceUnits()
- {
- if (persistenceUnits == null)
- {
- persistenceUnits = new EObjectContainmentEList<XmlPersistenceUnit>(XmlPersistenceUnit.class, this, PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS);
- }
- return persistenceUnits;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
- return ((InternalEList<?>)getPersistenceUnits()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
- return getPersistenceUnits();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
- getPersistenceUnits().clear();
- getPersistenceUnits().addAll((Collection<? extends XmlPersistenceUnit>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
- getPersistenceUnits().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
- return persistenceUnits != null && !persistenceUnits.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-
- // **************** version -> schema location mapping ********************
-
- private static String namespace = JPA.SCHEMA_NAMESPACE;
-
- @Override
- protected String getNamespace() {
- return namespace;
- }
-
- private static Map<String, String> versionsToSchemaLocations = buildVersionsToSchemaLocations();
-
- private static Map<String, String> buildVersionsToSchemaLocations() {
- Map<String, String> map = new HashMap<String, String>();
- map.put(JPA.SCHEMA_VERSION, JPA.SCHEMA_LOCATION);
- map.put(JPA2_0.SCHEMA_VERSION, JPA2_0.SCHEMA_LOCATION);
- return map;
- }
-
- @Override
- protected String getSchemaLocationForVersion(String version) {
- return versionsToSchemaLocations.get(version);
- }
-
-
- // **************** translators *******************************************
-
- private static final Translator ROOT_TRANSLATOR = buildRootTranslator();
-
- public static Translator getRootTranslator() {
- return ROOT_TRANSLATOR;
- }
-
- private static Translator buildRootTranslator() {
- return new SimpleRootTranslator(
- JPA.PERSISTENCE,
- PersistencePackage.eINSTANCE.getXmlPersistence(),
- buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildVersionTranslator(versionsToSchemaLocations),
- buildNamespaceTranslator(namespace),
- buildSchemaNamespaceTranslator(),
- buildSchemaLocationTranslator(namespace, versionsToSchemaLocations),
- XmlPersistenceUnit.buildTranslator(JPA.PERSISTENCE_UNIT, PersistencePackage.eINSTANCE.getXmlPersistence_PersistenceUnits())
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnit.java
deleted file mode 100644
index 5e9b32d7ab..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnit.java
+++ /dev/null
@@ -1,1105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.resource.persistence;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.BooleanTranslator;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.JPA2_0;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Unit</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProvider <em>Provider</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource <em>Jta Data Source</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource <em>Non Jta Data Source</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getMappingFiles <em>Mapping Files</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJarFiles <em>Jar Files</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getClasses <em>Classes</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses <em>Exclude Unlisted Classes</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProperties <em>Properties</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getTransactionType <em>Transaction Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit()
- * @model kind="class"
- * @generated
- */
-public class XmlPersistenceUnit extends AbstractJpaEObject implements XmlPersistenceUnit_2_0
-{
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final XmlPersistenceUnitCachingType_2_0 SHARED_CACHE_MODE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSharedCacheMode() <em>Shared Cache Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSharedCacheMode()
- * @generated
- * @ordered
- */
- protected XmlPersistenceUnitCachingType_2_0 sharedCacheMode = SHARED_CACHE_MODE_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final XmlPersistenceUnitValidationModeType_2_0 VALIDATION_MODE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValidationMode() <em>Validation Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValidationMode()
- * @generated
- * @ordered
- */
- protected XmlPersistenceUnitValidationModeType_2_0 validationMode = VALIDATION_MODE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getProvider() <em>Provider</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProvider()
- * @generated
- * @ordered
- */
- protected static final String PROVIDER_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getProvider() <em>Provider</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProvider()
- * @generated
- * @ordered
- */
- protected String provider = PROVIDER_EDEFAULT;
-
- /**
- * The default value of the '{@link #getJtaDataSource() <em>Jta Data Source</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJtaDataSource()
- * @generated
- * @ordered
- */
- protected static final String JTA_DATA_SOURCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getJtaDataSource() <em>Jta Data Source</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJtaDataSource()
- * @generated
- * @ordered
- */
- protected String jtaDataSource = JTA_DATA_SOURCE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getNonJtaDataSource() <em>Non Jta Data Source</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNonJtaDataSource()
- * @generated
- * @ordered
- */
- protected static final String NON_JTA_DATA_SOURCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getNonJtaDataSource() <em>Non Jta Data Source</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNonJtaDataSource()
- * @generated
- * @ordered
- */
- protected String nonJtaDataSource = NON_JTA_DATA_SOURCE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getMappingFiles() <em>Mapping Files</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappingFiles()
- * @generated
- * @ordered
- */
- protected EList<XmlMappingFileRef> mappingFiles;
-
- /**
- * The cached value of the '{@link #getJarFiles() <em>Jar Files</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJarFiles()
- * @generated
- * @ordered
- */
- protected EList<XmlJarFileRef> jarFiles;
-
- /**
- * The cached value of the '{@link #getClasses() <em>Classes</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasses()
- * @generated
- * @ordered
- */
- protected EList<XmlJavaClassRef> classes;
-
- /**
- * The default value of the '{@link #getExcludeUnlistedClasses() <em>Exclude Unlisted Classes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getExcludeUnlistedClasses()
- * @generated
- * @ordered
- */
- protected static final Boolean EXCLUDE_UNLISTED_CLASSES_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getExcludeUnlistedClasses() <em>Exclude Unlisted Classes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getExcludeUnlistedClasses()
- * @generated
- * @ordered
- */
- protected Boolean excludeUnlistedClasses = EXCLUDE_UNLISTED_CLASSES_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProperties()
- * @generated
- * @ordered
- */
- protected XmlProperties properties;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * changed this to null and removed the generated flag so emf won't generate over it
- * we don't want a default for enums, just null if the tag does not exist
- */
- protected static final XmlPersistenceUnitTransactionType TRANSACTION_TYPE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTransactionType() <em>Transaction Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransactionType()
- * @generated
- * @ordered
- */
- protected XmlPersistenceUnitTransactionType transactionType = TRANSACTION_TYPE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlPersistenceUnit()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_PERSISTENCE_UNIT;
- }
-
- /**
- * Returns the value of the '<em><b>Shared Cache Mode</b></em>' attribute.
- * The default value is <code>"UNSPECIFIED"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Shared Cache Mode</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Shared Cache Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @see #setSharedCacheMode(XmlPersistenceUnitCachingType_2_0)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_2_0_SharedCacheMode()
- * @model default="UNSPECIFIED" unique="false"
- * @generated
- */
- public XmlPersistenceUnitCachingType_2_0 getSharedCacheMode()
- {
- return sharedCacheMode;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getSharedCacheMode <em>Shared Cache Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Shared Cache Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @see #getSharedCacheMode()
- * @generated
- */
- public void setSharedCacheMode(XmlPersistenceUnitCachingType_2_0 newSharedCacheMode)
- {
- XmlPersistenceUnitCachingType_2_0 oldSharedCacheMode = sharedCacheMode;
- sharedCacheMode = newSharedCacheMode == null ? SHARED_CACHE_MODE_EDEFAULT : newSharedCacheMode;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE, oldSharedCacheMode, sharedCacheMode));
- }
-
- /**
- * Returns the value of the '<em><b>Validation Mode</b></em>' attribute.
- * The default value is <code>"AUTO"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Validation Mode</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Validation Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @see #setValidationMode(XmlPersistenceUnitValidationModeType_2_0)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_2_0_ValidationMode()
- * @model default="AUTO" unique="false"
- * @generated
- */
- public XmlPersistenceUnitValidationModeType_2_0 getValidationMode()
- {
- return validationMode;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getValidationMode <em>Validation Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Validation Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @see #getValidationMode()
- * @generated
- */
- public void setValidationMode(XmlPersistenceUnitValidationModeType_2_0 newValidationMode)
- {
- XmlPersistenceUnitValidationModeType_2_0 oldValidationMode = validationMode;
- validationMode = newValidationMode == null ? VALIDATION_MODE_EDEFAULT : newValidationMode;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE, oldValidationMode, validationMode));
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Transaction Type</b></em>' attribute.
- * The default value is <code>"JTA"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Transaction Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Transaction Type</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType
- * @see #setTransactionType(XmlPersistenceUnitTransactionType)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_TransactionType()
- * @model default="JTA" unique="false"
- * @generated
- */
- public XmlPersistenceUnitTransactionType getTransactionType()
- {
- return transactionType;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getTransactionType <em>Transaction Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Transaction Type</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType
- * @see #getTransactionType()
- * @generated
- */
- public void setTransactionType(XmlPersistenceUnitTransactionType newTransactionType)
- {
- XmlPersistenceUnitTransactionType oldTransactionType = transactionType;
- transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE, oldTransactionType, transactionType));
- }
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Description()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * Returns the value of the '<em><b>Provider</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Provider</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Provider</em>' attribute.
- * @see #setProvider(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Provider()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getProvider()
- {
- return provider;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProvider <em>Provider</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Provider</em>' attribute.
- * @see #getProvider()
- * @generated
- */
- public void setProvider(String newProvider)
- {
- String oldProvider = provider;
- provider = newProvider;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER, oldProvider, provider));
- }
-
- /**
- * Returns the value of the '<em><b>Jta Data Source</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Jta Data Source</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Jta Data Source</em>' attribute.
- * @see #setJtaDataSource(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_JtaDataSource()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getJtaDataSource()
- {
- return jtaDataSource;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource <em>Jta Data Source</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Jta Data Source</em>' attribute.
- * @see #getJtaDataSource()
- * @generated
- */
- public void setJtaDataSource(String newJtaDataSource)
- {
- String oldJtaDataSource = jtaDataSource;
- jtaDataSource = newJtaDataSource;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE, oldJtaDataSource, jtaDataSource));
- }
-
- /**
- * Returns the value of the '<em><b>Non Jta Data Source</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Non Jta Data Source</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Non Jta Data Source</em>' attribute.
- * @see #setNonJtaDataSource(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_NonJtaDataSource()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- public String getNonJtaDataSource()
- {
- return nonJtaDataSource;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource <em>Non Jta Data Source</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Non Jta Data Source</em>' attribute.
- * @see #getNonJtaDataSource()
- * @generated
- */
- public void setNonJtaDataSource(String newNonJtaDataSource)
- {
- String oldNonJtaDataSource = nonJtaDataSource;
- nonJtaDataSource = newNonJtaDataSource;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE, oldNonJtaDataSource, nonJtaDataSource));
- }
-
- /**
- * Returns the value of the '<em><b>Mapping Files</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapping Files</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapping Files</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_MappingFiles()
- * @model containment="true"
- * @generated
- */
- public EList<XmlMappingFileRef> getMappingFiles()
- {
- if (mappingFiles == null)
- {
- mappingFiles = new EObjectContainmentEList<XmlMappingFileRef>(XmlMappingFileRef.class, this, PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES);
- }
- return mappingFiles;
- }
-
- /**
- * Returns the value of the '<em><b>Jar Files</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Jar Files</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Jar Files</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_JarFiles()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJarFileRef> getJarFiles()
- {
- if (jarFiles == null)
- {
- jarFiles = new EObjectContainmentEList<XmlJarFileRef>(XmlJarFileRef.class, this, PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES);
- }
- return jarFiles;
- }
-
- /**
- * Returns the value of the '<em><b>Classes</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Classes</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Classes</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Classes()
- * @model containment="true"
- * @generated
- */
- public EList<XmlJavaClassRef> getClasses()
- {
- if (classes == null)
- {
- classes = new EObjectContainmentEList<XmlJavaClassRef>(XmlJavaClassRef.class, this, PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES);
- }
- return classes;
- }
-
- /**
- * Returns the value of the '<em><b>Exclude Unlisted Classes</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Exclude Unlisted Classes</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Exclude Unlisted Classes</em>' attribute.
- * @see #setExcludeUnlistedClasses(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_ExcludeUnlistedClasses()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
- * @generated
- */
- public Boolean getExcludeUnlistedClasses()
- {
- return excludeUnlistedClasses;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses <em>Exclude Unlisted Classes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Exclude Unlisted Classes</em>' attribute.
- * @see #getExcludeUnlistedClasses()
- * @generated
- */
- public void setExcludeUnlistedClasses(Boolean newExcludeUnlistedClasses)
- {
- Boolean oldExcludeUnlistedClasses = excludeUnlistedClasses;
- excludeUnlistedClasses = newExcludeUnlistedClasses;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES, oldExcludeUnlistedClasses, excludeUnlistedClasses));
- }
-
- /**
- * Returns the value of the '<em><b>Properties</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XmlProperties</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Properties</em>' containment reference.
- * @see #setProperties(XmlProperties)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Properties()
- * @model containment="true"
- * @generated
- */
- public XmlProperties getProperties()
- {
- return properties;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetProperties(XmlProperties newProperties, NotificationChain msgs)
- {
- XmlProperties oldProperties = properties;
- properties = newProperties;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, oldProperties, newProperties);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit#getProperties <em>Properties</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Properties</em>' containment reference.
- * @see #getProperties()
- * @generated
- */
- public void setProperties(XmlProperties newProperties)
- {
- if (newProperties != properties)
- {
- NotificationChain msgs = null;
- if (properties != null)
- msgs = ((InternalEObject)properties).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, null, msgs);
- if (newProperties != null)
- msgs = ((InternalEObject)newProperties).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, null, msgs);
- msgs = basicSetProperties(newProperties, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, newProperties, newProperties));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
- return ((InternalEList<?>)getMappingFiles()).basicRemove(otherEnd, msgs);
- case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
- return ((InternalEList<?>)getJarFiles()).basicRemove(otherEnd, msgs);
- case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
- return ((InternalEList<?>)getClasses()).basicRemove(otherEnd, msgs);
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
- return basicSetProperties(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
- return getSharedCacheMode();
- case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
- return getValidationMode();
- case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
- return getDescription();
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
- return getProvider();
- case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
- return getJtaDataSource();
- case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
- return getNonJtaDataSource();
- case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
- return getMappingFiles();
- case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
- return getJarFiles();
- case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
- return getClasses();
- case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
- return getExcludeUnlistedClasses();
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
- return getProperties();
- case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
- return getName();
- case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
- return getTransactionType();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
- setSharedCacheMode((XmlPersistenceUnitCachingType_2_0)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
- setValidationMode((XmlPersistenceUnitValidationModeType_2_0)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
- setProvider((String)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
- setJtaDataSource((String)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
- setNonJtaDataSource((String)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
- getMappingFiles().clear();
- getMappingFiles().addAll((Collection<? extends XmlMappingFileRef>)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
- getJarFiles().clear();
- getJarFiles().addAll((Collection<? extends XmlJarFileRef>)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
- getClasses().clear();
- getClasses().addAll((Collection<? extends XmlJavaClassRef>)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
- setExcludeUnlistedClasses((Boolean)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
- setProperties((XmlProperties)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
- setName((String)newValue);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
- setTransactionType((XmlPersistenceUnitTransactionType)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
- setSharedCacheMode(SHARED_CACHE_MODE_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
- setValidationMode(VALIDATION_MODE_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
- setProvider(PROVIDER_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
- setJtaDataSource(JTA_DATA_SOURCE_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
- setNonJtaDataSource(NON_JTA_DATA_SOURCE_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
- getMappingFiles().clear();
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
- getJarFiles().clear();
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
- getClasses().clear();
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
- setExcludeUnlistedClasses(EXCLUDE_UNLISTED_CLASSES_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
- setProperties((XmlProperties)null);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
- setName(NAME_EDEFAULT);
- return;
- case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
- setTransactionType(TRANSACTION_TYPE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
- return sharedCacheMode != SHARED_CACHE_MODE_EDEFAULT;
- case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
- return validationMode != VALIDATION_MODE_EDEFAULT;
- case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
- return PROVIDER_EDEFAULT == null ? provider != null : !PROVIDER_EDEFAULT.equals(provider);
- case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
- return JTA_DATA_SOURCE_EDEFAULT == null ? jtaDataSource != null : !JTA_DATA_SOURCE_EDEFAULT.equals(jtaDataSource);
- case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
- return NON_JTA_DATA_SOURCE_EDEFAULT == null ? nonJtaDataSource != null : !NON_JTA_DATA_SOURCE_EDEFAULT.equals(nonJtaDataSource);
- case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
- return mappingFiles != null && !mappingFiles.isEmpty();
- case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
- return jarFiles != null && !jarFiles.isEmpty();
- case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
- return classes != null && !classes.isEmpty();
- case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
- return EXCLUDE_UNLISTED_CLASSES_EDEFAULT == null ? excludeUnlistedClasses != null : !EXCLUDE_UNLISTED_CLASSES_EDEFAULT.equals(excludeUnlistedClasses);
- case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
- return properties != null;
- case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
- return transactionType != TRANSACTION_TYPE_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (sharedCacheMode: ");
- result.append(sharedCacheMode);
- result.append(", validationMode: ");
- result.append(validationMode);
- result.append(", description: ");
- result.append(description);
- result.append(", provider: ");
- result.append(provider);
- result.append(", jtaDataSource: ");
- result.append(jtaDataSource);
- result.append(", nonJtaDataSource: ");
- result.append(nonJtaDataSource);
- result.append(", excludeUnlistedClasses: ");
- result.append(excludeUnlistedClasses);
- result.append(", name: ");
- result.append(name);
- result.append(", transactionType: ");
- result.append(transactionType);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- PersistencePackage pkg = PersistencePackage.eINSTANCE;
- return new Translator[] {
- buildNameTranslator(),
- buildTransactionTypeTranslator(),
- buildDescriptionTranslator(),
- buildProviderTranslator(),
- buildJtaDataSourceTranslator(),
- buildNonJtaDataSourceTranslator(),
- XmlMappingFileRef.buildTranslator(JPA.MAPPING_FILE, pkg.getXmlPersistenceUnit_MappingFiles()),
- XmlJarFileRef.buildTranslator(JPA.JAR_FILE, pkg.getXmlPersistenceUnit_JarFiles()),
- XmlJavaClassRef.buildTranslator(JPA.CLASS, pkg.getXmlPersistenceUnit_Classes()),
- buildExcludeUnlistedClassesTranslator(),
- buildSharedCacheModeTranslator(),
- buildValidationModeTranslator(),
- XmlProperties.buildTranslator(JPA.PROPERTIES, pkg.getXmlPersistenceUnit_Properties())};
- }
-
- protected static Translator buildNameTranslator() {
- return new Translator(
- JPA.PERSISTENCE_UNIT__NAME,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_Name(),
- Translator.DOM_ATTRIBUTE);
- }
-
- protected static Translator buildTransactionTypeTranslator() {
- return new Translator(
- JPA.PERSISTENCE_UNIT__TRANSACTION_TYPE,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_TransactionType(),
- Translator.DOM_ATTRIBUTE | Translator.UNSET_IF_NULL);
- }
-
- protected static Translator buildDescriptionTranslator() {
- return new Translator(
- JPA.DESCRIPTION,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_Description());
- }
-
- protected static Translator buildProviderTranslator() {
- return new Translator(
- JPA.PROVIDER,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_Provider());
- }
-
- protected static Translator buildJtaDataSourceTranslator() {
- return new Translator(
- JPA.JTA_DATA_SOURCE,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_JtaDataSource());
- }
-
- protected static Translator buildNonJtaDataSourceTranslator() {
- return new Translator(
- JPA.NON_JTA_DATA_SOURCE,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_NonJtaDataSource());
- }
-
- protected static Translator buildExcludeUnlistedClassesTranslator() {
- return new BooleanTranslator(
- JPA.EXCLUDE_UNLISTED_CLASSES,
- PersistencePackage.eINSTANCE.getXmlPersistenceUnit_ExcludeUnlistedClasses());
- }
-
- protected static Translator buildSharedCacheModeTranslator() {
- return new Translator(
- JPA2_0.PERSISTENCE_UNIT__SHARED_CACHE_MODE,
- PersistenceV2_0Package.eINSTANCE.getXmlPersistenceUnit_2_0_SharedCacheMode());
- }
-
- protected static Translator buildValidationModeTranslator() {
- return new Translator(
- JPA2_0.PERSISTENCE_UNIT__VALIDATION_MODE,
- PersistenceV2_0Package.eINSTANCE.getXmlPersistenceUnit_2_0_ValidationMode());
- }
-
-
- public int getLocationToInsertMappingFileRef() {
- if (getMappingFiles().size() > 0) {
- XmlMappingFileRef mappingFileRef = CollectionTools.last(this.getMappingFiles());
- return mappingFileRef.getNodeEndOffset();
- }
-
- IDOMNode elementNode = null;
- if (getNonJtaDataSource() != null) {
- elementNode = getElementNode(JPA.NON_JTA_DATA_SOURCE);
- }
- else if (getJtaDataSource() != null) {
- elementNode = getElementNode(JPA.JTA_DATA_SOURCE);
- }
- else if (getProvider() != null) {
- elementNode = getElementNode(JPA.PROVIDER);
- }
- else if (getDescription() != null) {
- elementNode = getElementNode(JPA.DESCRIPTION);
- }
- if (elementNode != null) {
- return elementNode.getLastStructuredDocumentRegion().getEnd();
- }
- return this.node.getFirstStructuredDocumentRegion().getEnd();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnitTransactionType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnitTransactionType.java
deleted file mode 100644
index 1935e3abb4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistenceUnitTransactionType.java
+++ /dev/null
@@ -1,236 +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.jpa.core.resource.persistence;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Unit Transaction Type</b></em>',
- * and utility methods for working with them.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlPersistenceUnitTransactionType()
- * @model
- * @generated
- */
-public enum XmlPersistenceUnitTransactionType implements Enumerator
-{
- /**
- * The '<em><b>JTA</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #JTA_VALUE
- * @generated
- * @ordered
- */
- JTA(0, "JTA", "JTA"),
-
- /**
- * The '<em><b>RESOURCE LOCAL</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #RESOURCE_LOCAL_VALUE
- * @generated
- * @ordered
- */
- RESOURCE_LOCAL(1, "RESOURCE_LOCAL", "RESOURCE_LOCAL");
-
- /**
- * The '<em><b>JTA</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>JTA</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #JTA
- * @model
- * @generated
- * @ordered
- */
- public static final int JTA_VALUE = 0;
-
- /**
- * The '<em><b>RESOURCE LOCAL</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>RESOURCE LOCAL</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #RESOURCE_LOCAL
- * @model
- * @generated
- * @ordered
- */
- public static final int RESOURCE_LOCAL_VALUE = 1;
-
- /**
- * An array of all the '<em><b>Xml Persistence Unit Transaction Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final XmlPersistenceUnitTransactionType[] VALUES_ARRAY =
- new XmlPersistenceUnitTransactionType[]
- {
- JTA,
- RESOURCE_LOCAL,
- };
-
- /**
- * A public read-only list of all the '<em><b>Xml Persistence Unit Transaction Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<XmlPersistenceUnitTransactionType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Transaction Type</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitTransactionType get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- XmlPersistenceUnitTransactionType result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Transaction Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitTransactionType getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- XmlPersistenceUnitTransactionType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Transaction Type</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitTransactionType get(int value)
- {
- switch (value)
- {
- case JTA_VALUE: return JTA;
- case RESOURCE_LOCAL_VALUE: return RESOURCE_LOCAL;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private XmlPersistenceUnitTransactionType(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //XmlPersistenceUnitTransactionType
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperties.java
deleted file mode 100644
index 6254cdafce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperties.java
+++ /dev/null
@@ -1,202 +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.jpa.core.resource.persistence;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>XmlProperties</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties#getProperties <em>Properties</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperties()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlProperties extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProperties()
- * @generated
- * @ordered
- */
- protected EList<XmlProperty> properties;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlProperties()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_PROPERTIES;
- }
-
- /**
- * Returns the value of the '<em><b>Properties</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XmlProperties</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Properties</em>' containment reference list.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperties_Properties()
- * @model containment="true"
- * @generated
- */
- public EList<XmlProperty> getProperties()
- {
- if (properties == null)
- {
- properties = new EObjectContainmentEList<XmlProperty>(XmlProperty.class, this, PersistencePackage.XML_PROPERTIES__PROPERTIES);
- }
- return properties;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTIES__PROPERTIES:
- return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTIES__PROPERTIES:
- return getProperties();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTIES__PROPERTIES:
- getProperties().clear();
- getProperties().addAll((Collection<? extends XmlProperty>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTIES__PROPERTIES:
- getProperties().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTIES__PROPERTIES:
- return properties != null && !properties.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- XmlProperty.buildTranslator(JPA.PROPERTY, PersistencePackage.eINSTANCE.getXmlProperties_Properties()),
- };
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperty.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperty.java
deleted file mode 100644
index 1f5583c7a6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlProperty.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 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.jpa.core.resource.persistence;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaEObject;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>XmlProperty</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getValue <em>Value</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperty()
- * @model kind="class"
- * @extends JpaEObject
- * @generated
- */
-public class XmlProperty extends AbstractJpaEObject implements JpaEObject
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected XmlProperty()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return PersistencePackage.Literals.XML_PROPERTY;
- }
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperty_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PROPERTY__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage#getXmlProperty_Value()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- public String getValue()
- {
- return value;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty#getValue <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- public void setValue(String newValue)
- {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PROPERTY__VALUE, oldValue, value));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTY__NAME:
- return getName();
- case PersistencePackage.XML_PROPERTY__VALUE:
- return getValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTY__NAME:
- setName((String)newValue);
- return;
- case PersistencePackage.XML_PROPERTY__VALUE:
- setValue((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTY__NAME:
- setName(NAME_EDEFAULT);
- return;
- case PersistencePackage.XML_PROPERTY__VALUE:
- setValue(VALUE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case PersistencePackage.XML_PROPERTY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case PersistencePackage.XML_PROPERTY__VALUE:
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- }
- return super.eIsSet(featureID);
- }
-
-
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuilder result = new StringBuilder(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", value: ");
- result.append(value);
- result.append(')');
- return result.toString();
- }
-
-
- // ********** translators **********
-
- public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
- return new SimpleTranslator(
- elementName,
- structuralFeature,
- Translator.END_TAG_NO_INDENT,
- buildTranslatorChildren()
- );
- }
-
- private static Translator[] buildTranslatorChildren() {
- return new Translator[] {
- buildNameTranslator(),
- buildValueTranslator()
- };
- }
-
- private static Translator buildNameTranslator() {
- return new Translator(
- JPA.PROPERTY__NAME,
- PersistencePackage.eINSTANCE.getXmlProperty_Name(),
- Translator.DOM_ATTRIBUTE
- );
- }
-
- private static Translator buildValueTranslator() {
- return new Translator(
- JPA.PROPERTY__VALUE,
- PersistencePackage.eINSTANCE.getXmlProperty_Value(),
- Translator.DOM_ATTRIBUTE
- );
- }
-
- public ReplaceEdit createRenameTypeEdit(IType originalType, String newName) {
- String originalName = originalType.getElementName();
- int nameIndex = originalType.getFullyQualifiedName('.').lastIndexOf(originalName);
-
- int offset = getAttributeNode(JPA.PROPERTY__VALUE).getValueRegionStartOffset() + 1;
- return new ReplaceEdit(offset + nameIndex, originalName.length(), newName);
- }
-
- public ReplaceEdit createRenamePackageEdit(String newName) {
- int packageLength = this.value.lastIndexOf('.');
-
- int offset = getAttributeNode(JPA.PROPERTY__VALUE).getValueRegionStartOffset() + 1;
- return new ReplaceEdit(offset, packageLength, newName);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/JPA2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/JPA2_0.java
deleted file mode 100644
index 3eb10219ff..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/JPA2_0.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.persistence.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.persistence.JPA;
-
-/**
- * JPA persistence2_0.xml-related stuff (elements, attributes etc.)
- *
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-@SuppressWarnings("nls")
-public interface JPA2_0
- extends JPA
-{
- String SCHEMA_NAMESPACE = JPA.SCHEMA_NAMESPACE;
- String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";
- String SCHEMA_VERSION = "2.0";
-
- // JPA 2.0 specific nodes
-
- String PERSISTENCE_UNIT__SHARED_CACHE_MODE = "shared-cache-mode";
- String PERSISTENCE_UNIT__VALIDATION_MODE = "validation-mode";
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Factory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Factory.java
deleted file mode 100644
index c3ae90621d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Factory.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence.v2_0;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package
- * @generated
- */
-public class PersistenceV2_0Factory extends EFactoryImpl
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final PersistenceV2_0Factory eINSTANCE = init();
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static PersistenceV2_0Factory init()
- {
- try
- {
- PersistenceV2_0Factory thePersistenceV2_0Factory = (PersistenceV2_0Factory)EPackage.Registry.INSTANCE.getEFactory("jpt.persistence.v2_0.xmi");
- if (thePersistenceV2_0Factory != null)
- {
- return thePersistenceV2_0Factory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new PersistenceV2_0Factory();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PersistenceV2_0Factory()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_CACHING_TYPE_20:
- return createXmlPersistenceUnitCachingType_2_0FromString(eDataType, initialValue);
- case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20:
- return createXmlPersistenceUnitValidationModeType_2_0FromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_CACHING_TYPE_20:
- return convertXmlPersistenceUnitCachingType_2_0ToString(eDataType, instanceValue);
- case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20:
- return convertXmlPersistenceUnitValidationModeType_2_0ToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistenceUnitCachingType_2_0 createXmlPersistenceUnitCachingType_2_0FromString(EDataType eDataType, String initialValue)
- {
- XmlPersistenceUnitCachingType_2_0 result = XmlPersistenceUnitCachingType_2_0.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertXmlPersistenceUnitCachingType_2_0ToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XmlPersistenceUnitValidationModeType_2_0 createXmlPersistenceUnitValidationModeType_2_0FromString(EDataType eDataType, String initialValue)
- {
- XmlPersistenceUnitValidationModeType_2_0 result = XmlPersistenceUnitValidationModeType_2_0.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertXmlPersistenceUnitValidationModeType_2_0ToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PersistenceV2_0Package getPersistenceV2_0Package()
- {
- return (PersistenceV2_0Package)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static PersistenceV2_0Package getPackage()
- {
- return PersistenceV2_0Package.eINSTANCE;
- }
-
-} //PersistenceV2_0Factory
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Package.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Package.java
deleted file mode 100644
index 6bc9f2150e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/PersistenceV2_0Package.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence.v2_0;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage;
-import org.eclipse.jpt.jpa.core.resource.xml.CommonPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Factory
- * @model kind="package"
- * @generated
- */
-public class PersistenceV2_0Package extends EPackageImpl
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNAME = "v2_0";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_URI = "jpt.persistence.v2_0.xmi";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_PREFIX = "org.eclipse.jpt.jpa.core.resource.persistence.v2_0";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final PersistenceV2_0Package eINSTANCE = org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0 <em>Xml Persistence Unit 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_20 = 0;
-
- /**
- * The feature id for the '<em><b>Shared Cache Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE = 0;
-
- /**
- * The feature id for the '<em><b>Validation Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_20__VALIDATION_MODE = 1;
-
- /**
- * The number of structural features of the '<em>Xml Persistence Unit 20</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_PERSISTENCE_UNIT_20_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0 <em>Xml Persistence Unit Caching Type 20</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitCachingType_2_0()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_CACHING_TYPE_20 = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0 <em>Xml Persistence Unit Validation Mode Type 20</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitValidationModeType_2_0()
- * @generated
- */
- public static final int XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20 = 2;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass xmlPersistenceUnit_2_0EClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum xmlPersistenceUnitCachingType_2_0EEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum xmlPersistenceUnitValidationModeType_2_0EEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#eNS_URI
- * @see #init()
- * @generated
- */
- private PersistenceV2_0Package()
- {
- super(eNS_URI, PersistenceV2_0Factory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link PersistenceV2_0Package#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static PersistenceV2_0Package init()
- {
- if (isInited) return (PersistenceV2_0Package)EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI);
-
- // Obtain or create and register package
- PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PersistenceV2_0Package());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
- OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
- OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
- PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
-
- // Create package meta-data objects
- thePersistenceV2_0Package.createPackageContents();
- theCommonPackage.createPackageContents();
- theOrmPackage.createPackageContents();
- theOrmV2_0Package.createPackageContents();
- thePersistencePackage.createPackageContents();
-
- // Initialize created meta-data
- thePersistenceV2_0Package.initializePackageContents();
- theCommonPackage.initializePackageContents();
- theOrmPackage.initializePackageContents();
- theOrmV2_0Package.initializePackageContents();
- thePersistencePackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- thePersistenceV2_0Package.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(PersistenceV2_0Package.eNS_URI, thePersistenceV2_0Package);
- return thePersistenceV2_0Package;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0 <em>Xml Persistence Unit 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Xml Persistence Unit 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0
- * @generated
- */
- public EClass getXmlPersistenceUnit_2_0()
- {
- return xmlPersistenceUnit_2_0EClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode <em>Shared Cache Mode</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Shared Cache Mode</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode()
- * @see #getXmlPersistenceUnit_2_0()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_2_0_SharedCacheMode()
- {
- return (EAttribute)xmlPersistenceUnit_2_0EClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode <em>Validation Mode</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Validation Mode</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode()
- * @see #getXmlPersistenceUnit_2_0()
- * @generated
- */
- public EAttribute getXmlPersistenceUnit_2_0_ValidationMode()
- {
- return (EAttribute)xmlPersistenceUnit_2_0EClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0 <em>Xml Persistence Unit Caching Type 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Xml Persistence Unit Caching Type 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @generated
- */
- public EEnum getXmlPersistenceUnitCachingType_2_0()
- {
- return xmlPersistenceUnitCachingType_2_0EEnum;
- }
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0 <em>Xml Persistence Unit Validation Mode Type 20</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Xml Persistence Unit Validation Mode Type 20</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @generated
- */
- public EEnum getXmlPersistenceUnitValidationModeType_2_0()
- {
- return xmlPersistenceUnitValidationModeType_2_0EEnum;
- }
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- public PersistenceV2_0Factory getPersistenceV2_0Factory()
- {
- return (PersistenceV2_0Factory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- xmlPersistenceUnit_2_0EClass = createEClass(XML_PERSISTENCE_UNIT_20);
- createEAttribute(xmlPersistenceUnit_2_0EClass, XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE);
- createEAttribute(xmlPersistenceUnit_2_0EClass, XML_PERSISTENCE_UNIT_20__VALIDATION_MODE);
-
- // Create enums
- xmlPersistenceUnitCachingType_2_0EEnum = createEEnum(XML_PERSISTENCE_UNIT_CACHING_TYPE_20);
- xmlPersistenceUnitValidationModeType_2_0EEnum = createEEnum(XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(xmlPersistenceUnit_2_0EClass, XmlPersistenceUnit_2_0.class, "XmlPersistenceUnit_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlPersistenceUnit_2_0_SharedCacheMode(), this.getXmlPersistenceUnitCachingType_2_0(), "sharedCacheMode", "UNSPECIFIED", 0, 1, XmlPersistenceUnit_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlPersistenceUnit_2_0_ValidationMode(), this.getXmlPersistenceUnitValidationModeType_2_0(), "validationMode", "AUTO", 0, 1, XmlPersistenceUnit_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.class, "XmlPersistenceUnitCachingType_2_0");
- addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.ALL);
- addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.NONE);
- addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.ENABLE_SELECTIVE);
- addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.DISABLE_SELECTIVE);
- addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.UNSPECIFIED);
-
- initEEnum(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.class, "XmlPersistenceUnitValidationModeType_2_0");
- addEEnumLiteral(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.AUTO);
- addEEnumLiteral(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.CALLBACK);
- addEEnumLiteral(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.NONE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- public interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0 <em>Xml Persistence Unit 20</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0()
- * @generated
- */
- public static final EClass XML_PERSISTENCE_UNIT_20 = eINSTANCE.getXmlPersistenceUnit_2_0();
-
- /**
- * The meta object literal for the '<em><b>Shared Cache Mode</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE = eINSTANCE.getXmlPersistenceUnit_2_0_SharedCacheMode();
-
- /**
- * The meta object literal for the '<em><b>Validation Mode</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_PERSISTENCE_UNIT_20__VALIDATION_MODE = eINSTANCE.getXmlPersistenceUnit_2_0_ValidationMode();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0 <em>Xml Persistence Unit Caching Type 20</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitCachingType_2_0()
- * @generated
- */
- public static final EEnum XML_PERSISTENCE_UNIT_CACHING_TYPE_20 = eINSTANCE.getXmlPersistenceUnitCachingType_2_0();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0 <em>Xml Persistence Unit Validation Mode Type 20</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitValidationModeType_2_0()
- * @generated
- */
- public static final EEnum XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20 = eINSTANCE.getXmlPersistenceUnitValidationModeType_2_0();
-
- }
-
-} //PersistenceV2_0Package
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java
deleted file mode 100644
index 9adf1f8d93..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence.v2_0;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Xml Persistence Unit Caching Type 20</b></em>',
- * and utility methods for working with them.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitCachingType_2_0()
- * @model
- * @generated
- */
-public enum XmlPersistenceUnitCachingType_2_0 implements Enumerator
-{
- /**
- * The '<em><b>ALL</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #ALL_VALUE
- * @generated
- * @ordered
- */
- ALL(0, "ALL", "ALL"),
-
- /**
- * The '<em><b>NONE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #NONE_VALUE
- * @generated
- * @ordered
- */
- NONE(1, "NONE", "NONE"),
-
- /**
- * The '<em><b>ENABLE SELECTIVE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #ENABLE_SELECTIVE_VALUE
- * @generated
- * @ordered
- */
- ENABLE_SELECTIVE(2, "ENABLE_SELECTIVE", "ENABLE_SELECTIVE"),
-
- /**
- * The '<em><b>DISABLE SELECTIVE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #DISABLE_SELECTIVE_VALUE
- * @generated
- * @ordered
- */
- DISABLE_SELECTIVE(3, "DISABLE_SELECTIVE", "DISABLE_SELECTIVE"),
-
- /**
- * The '<em><b>UNSPECIFIED</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #UNSPECIFIED_VALUE
- * @generated
- * @ordered
- */
- UNSPECIFIED(4, "UNSPECIFIED", "UNSPECIFIED");
-
- /**
- * The '<em><b>ALL</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ALL</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #ALL
- * @model
- * @generated
- * @ordered
- */
- public static final int ALL_VALUE = 0;
-
- /**
- * The '<em><b>NONE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #NONE
- * @model
- * @generated
- * @ordered
- */
- public static final int NONE_VALUE = 1;
-
- /**
- * The '<em><b>ENABLE SELECTIVE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ENABLE SELECTIVE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #ENABLE_SELECTIVE
- * @model
- * @generated
- * @ordered
- */
- public static final int ENABLE_SELECTIVE_VALUE = 2;
-
- /**
- * The '<em><b>DISABLE SELECTIVE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>DISABLE SELECTIVE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #DISABLE_SELECTIVE
- * @model
- * @generated
- * @ordered
- */
- public static final int DISABLE_SELECTIVE_VALUE = 3;
-
- /**
- * The '<em><b>UNSPECIFIED</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>UNSPECIFIED</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #UNSPECIFIED
- * @model
- * @generated
- * @ordered
- */
- public static final int UNSPECIFIED_VALUE = 4;
-
- /**
- * An array of all the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final XmlPersistenceUnitCachingType_2_0[] VALUES_ARRAY =
- new XmlPersistenceUnitCachingType_2_0[]
- {
- ALL,
- NONE,
- ENABLE_SELECTIVE,
- DISABLE_SELECTIVE,
- UNSPECIFIED,
- };
-
- /**
- * A public read-only list of all the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<XmlPersistenceUnitCachingType_2_0> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitCachingType_2_0 get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- XmlPersistenceUnitCachingType_2_0 result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitCachingType_2_0 getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- XmlPersistenceUnitCachingType_2_0 result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitCachingType_2_0 get(int value)
- {
- switch (value)
- {
- case ALL_VALUE: return ALL;
- case NONE_VALUE: return NONE;
- case ENABLE_SELECTIVE_VALUE: return ENABLE_SELECTIVE;
- case DISABLE_SELECTIVE_VALUE: return DISABLE_SELECTIVE;
- case UNSPECIFIED_VALUE: return UNSPECIFIED;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private XmlPersistenceUnitCachingType_2_0(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //XmlPersistenceUnitCachingType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java
deleted file mode 100644
index 437b260ed9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence.v2_0;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>',
- * and utility methods for working with them.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitValidationModeType_2_0()
- * @model
- * @generated
- */
-public enum XmlPersistenceUnitValidationModeType_2_0 implements Enumerator
-{
- /**
- * The '<em><b>AUTO</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #AUTO_VALUE
- * @generated
- * @ordered
- */
- AUTO(0, "AUTO", "AUTO"),
-
- /**
- * The '<em><b>CALLBACK</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #CALLBACK_VALUE
- * @generated
- * @ordered
- */
- CALLBACK(1, "CALLBACK", "CALLBACK"),
-
- /**
- * The '<em><b>NONE</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #NONE_VALUE
- * @generated
- * @ordered
- */
- NONE(2, "NONE", "NONE");
-
- /**
- * The '<em><b>AUTO</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>AUTO</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #AUTO
- * @model
- * @generated
- * @ordered
- */
- public static final int AUTO_VALUE = 0;
-
- /**
- * The '<em><b>CALLBACK</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>CALLBACK</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #CALLBACK
- * @model
- * @generated
- * @ordered
- */
- public static final int CALLBACK_VALUE = 1;
-
- /**
- * The '<em><b>NONE</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #NONE
- * @model
- * @generated
- * @ordered
- */
- public static final int NONE_VALUE = 2;
-
- /**
- * An array of all the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final XmlPersistenceUnitValidationModeType_2_0[] VALUES_ARRAY =
- new XmlPersistenceUnitValidationModeType_2_0[]
- {
- AUTO,
- CALLBACK,
- NONE,
- };
-
- /**
- * A public read-only list of all the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<XmlPersistenceUnitValidationModeType_2_0> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitValidationModeType_2_0 get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- XmlPersistenceUnitValidationModeType_2_0 result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitValidationModeType_2_0 getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- XmlPersistenceUnitValidationModeType_2_0 result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static XmlPersistenceUnitValidationModeType_2_0 get(int value)
- {
- switch (value)
- {
- case AUTO_VALUE: return AUTO;
- case CALLBACK_VALUE: return CALLBACK;
- case NONE_VALUE: return NONE;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private XmlPersistenceUnitValidationModeType_2_0(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //XmlPersistenceUnitValidationModeType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java
deleted file mode 100644
index b5e85154b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jpa.core.resource.persistence.v2_0;
-
-import org.eclipse.jpt.jpa.core.resource.xml.JpaEObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Xml Persistence Unit 20</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode <em>Shared Cache Mode</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode <em>Validation Mode</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface XmlPersistenceUnit_2_0 extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Shared Cache Mode</b></em>' attribute.
- * The default value is <code>"UNSPECIFIED"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Shared Cache Mode</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Shared Cache Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @see #setSharedCacheMode(XmlPersistenceUnitCachingType_2_0)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0_SharedCacheMode()
- * @model default="UNSPECIFIED" unique="false"
- * @generated
- */
- XmlPersistenceUnitCachingType_2_0 getSharedCacheMode();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode <em>Shared Cache Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Shared Cache Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
- * @see #getSharedCacheMode()
- * @generated
- */
- void setSharedCacheMode(XmlPersistenceUnitCachingType_2_0 value);
-
- /**
- * Returns the value of the '<em><b>Validation Mode</b></em>' attribute.
- * The default value is <code>"AUTO"</code>.
- * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Validation Mode</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Validation Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @see #setValidationMode(XmlPersistenceUnitValidationModeType_2_0)
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0_ValidationMode()
- * @model default="AUTO" unique="false"
- * @generated
- */
- XmlPersistenceUnitValidationModeType_2_0 getValidationMode();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode <em>Validation Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Validation Mode</em>' attribute.
- * @see org.eclipse.jpt.jpa.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
- * @see #getValidationMode()
- * @generated
- */
- void setValidationMode(XmlPersistenceUnitValidationModeType_2_0 value);
-
-} // XmlPersistenceUnit_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaEObject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaEObject.java
deleted file mode 100644
index 765994410e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaEObject.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 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.core.resource.xml;
-
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.jpt.common.core.internal.utility.SimpleTextRange;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
- * 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.
- *
- * @version 3.0
- * @since 2.2
- */
-public abstract class AbstractJpaEObject
- extends EObjectImpl
- implements JpaEObject
-{
- protected IDOMNode node;
-
- /**
- * Sets of "insignificant" feature ids, keyed by class.
- * This is built up lazily, as the objects are modified.
- */
- private static final Hashtable<Class<? extends AbstractJpaEObject>, HashSet<Integer>> insignificantFeatureIdSets = new Hashtable<Class<? extends AbstractJpaEObject>, HashSet<Integer>>();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractJpaEObject() {
- super();
- }
-
-
- // ********** JpaEObject implementation **********
-
- public boolean isUnset() {
- for (EStructuralFeature feature : this.eClass().getEAllStructuralFeatures()) {
- if (this.eIsSet(feature)) {
- return false;
- }
- }
- return true;
- }
-
-
- // ********** change notification **********
-
- /**
- * override to build a custom list for the adapters
- */
- @Override
- public EList<Adapter> eAdapters() {
- if (this.eAdapters == null) {
- this.eAdapters = new XmlEAdapterList<Adapter>(this);
- }
- return this.eAdapters;
- }
-
- /**
- * override to prevent notification when the object's state is unchanged
- */
- @Override
- public void eNotify(Notification notification) {
- if ( ! notification.isTouch()) {
- super.eNotify(notification);
- this.featureChanged(notification.getFeatureID(this.getClass()));
- }
- }
-
- protected void featureChanged(int featureId) {
- if (this.featureIsSignificant(featureId)) {
- this.getXmlResource().resourceModelChanged();
- }
- }
-
- protected JpaXmlResource getXmlResource() {
- return (JpaXmlResource) this.eResource();
- }
-
- protected boolean featureIsSignificant(int featureId) {
- return ! this.featureIsInsignificant(featureId);
- }
-
- protected boolean featureIsInsignificant(int featureId) {
- return this.insignificantFeatureIds().contains(Integer.valueOf(featureId));
- }
-
- /**
- * Return a set of the object's "insignificant" feature ids.
- * These are the EMF features that will not be used to determine if all
- * the features are unset. We use this to determine when to remove
- * an element from the xml.
- *
- * If you need instance-based calculation of your xml "insignificant" aspects,
- * override this method. If class-based calculation is sufficient,
- * override #addInsignificantXmlFeatureIdsTo(Set).
- *
- * @see #isUnset()
- */
- protected Set<Integer> insignificantFeatureIds() {
- synchronized (insignificantFeatureIdSets) {
- HashSet<Integer> insignificantXmlFeatureIds = insignificantFeatureIdSets.get(this.getClass());
- if (insignificantXmlFeatureIds == null) {
- insignificantXmlFeatureIds = new HashSet<Integer>();
- this.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
- insignificantFeatureIdSets.put(this.getClass(), insignificantXmlFeatureIds);
- }
- return insignificantXmlFeatureIds;
- }
- }
-
- /**
- * Add the object's "insignificant" feature ids to the specified set.
- * These are the EMF features that, when they change, will NOT cause the
- * object (or its containing tree) to be updated, i.e. defaults calculated.
- * If class-based calculation of your "insignificant" features is sufficient,
- * override this method. If you need instance-based calculation,
- * override #insignificantXmlFeatureIds().
- */
- protected void addInsignificantXmlFeatureIdsTo(@SuppressWarnings("unused") Set<Integer> insignificantXmlFeatureIds) {
- // when you override this method, don't forget to include:
- // super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
- }
-
-
- // ********** text ranges **********
-
- /**
- * Return a text range for the "text" node.
- * If the text node does not exist, return a text range for this object's node
- */
- protected TextRange getTextTextRange() {
- IDOMNode textNode = this.getTextNode();
- return (textNode != null) ? this.buildTextRange(textNode) : this.getValidationTextRange();
- }
-
- protected IDOMNode getTextNode() {
- // TODO bjv null check no longer needed? (orm nodes are no longer virtual)
- // virtual objects have no node
- return (this.node == null) ? null : selectTextNode(this.node.getChildNodes());
- }
-
-
- protected IDOMNode selectTextNode(NodeList nodes) {
- for (int i = 0; i < nodes.getLength(); i++) {
- IDOMNode n = (IDOMNode) nodes.item(i);
- if (n.getNodeType() == Node.TEXT_NODE) {
- return n;
- }
- }
- return null;
- }
-
- /**
- * Return a text range for the specified attribute node.
- * If the attribute node does not exist, return a text range for this object's
- * node
- */
- protected TextRange getAttributeTextRange(String attributeName) {
- IDOMNode attributeNode = this.getAttributeNode(attributeName);
- return (attributeNode != null) ? this.buildTextRange(attributeNode) : this.getValidationTextRange();
- }
-
- protected IDOMAttr getAttributeNode(String attributeName) {
- return (this.node == null) ? // virtual objects have no node
- null : (IDOMAttr) this.node.getAttributes().getNamedItem(attributeName);
- }
-
- /**
- * Return a text range for the specified element node.
- * If the element node does not exist, return a text range for this object's
- * node
- */
- protected TextRange getElementTextRange(String elementName) {
- IDOMNode elementNode = this.getElementNode(elementName);
- return (elementNode != null) ? this.buildTextRange(elementNode) : this.getValidationTextRange();
- }
-
- /**
- * Returns the first element node with the given name, if one exists
- */
- protected IDOMNode getElementNode(String elementName) {
- if (this.node == null) return null; // virtual objects have no node
- NodeList children = this.node.getChildNodes();
- for (int i = 0; i < children.getLength(); i ++) {
- IDOMNode child = (IDOMNode) children.item(i);
- if ((child.getNodeType() == Node.ELEMENT_NODE)
- && elementName.equals(child.getNodeName())) {
- return child;
- }
- }
- return null;
- }
-
- public TextRange getValidationTextRange() {
- return this.getFullTextRange();
- }
-
- public TextRange getSelectionTextRange() {
- return this.getFullTextRange();
- }
-
- protected TextRange getFullTextRange() {
- return this.buildTextRange(this.node);
- }
-
- protected TextRange buildTextRange(IDOMNode domNode) {
- return (domNode == null) ? null : this.buildTextRange_(domNode, null);
- }
-
- protected TextRange buildTextRange(IDOMNode domNode, TextRange textRange) {
- return (domNode == null) ? null : this.buildTextRange_(domNode, textRange);
- }
-
- /**
- * pre-condition: the specified DOM node is not <code>null</code>
- */
- protected TextRange buildTextRange_(IDOMNode domNode, TextRange textRange) {
- int offset = domNode.getStartOffset();
- int length = (domNode.getNodeType() == Node.ELEMENT_NODE) ?
- (((IDOMElement) domNode).getStartEndOffset() - offset) :
- domNode.getLength();
- int lineNumber = domNode.getStructuredDocument().getLineOfOffset(offset) + 1;
- return (textRange == null) ?
- new SimpleTextRange(offset, length, lineNumber) :
- textRange.buildTextRange(offset, length, lineNumber);
- }
-
- public boolean containsOffset(int textOffset) {
- return (this.node == null) ? false : this.node.contains(textOffset);
- }
-
-
- // ********** content assist **********
-
- /**
- * Return a text range for the specified attribute node.
- * If the attribute node does not exist, return null
- *
- * This is used for content assist to return the exact text range of an attribute.
- * It is different from the text range used by validation which returns
- * the parent's text range if the specified attribute node does not exist
- */
- protected TextRange getAttributeCodeAssistTextRange(String attributeName) {
- IDOMNode attributeNode = this.getAttributeNode(attributeName);
- return (attributeNode != null) ? this.buildTextRange(attributeNode) : null;
- }
-
- /**
- * Return a text range for the specified element node.
- * If the element node does not exist, return null
- *
- * This is used for content assist to return the exact text range of an element.
- * It is different from the text range used by validation which returns
- * the parent's text range if the specified element node does not exist
- */
- protected TextRange getElementCodeAssistTextRange(String elementName) {
- IDOMNode elementNode = this.getElementNode(elementName);
- return (elementNode != null) ? this.buildElementCodeAssistTextRange(elementNode) : null;
- }
-
- protected TextRange buildElementCodeAssistTextRange(IDOMNode domNode) {
- return (domNode == null) ? null : this.buildElementCodeAssistTextRange(domNode, null);
- }
-
- protected TextRange buildElementCodeAssistTextRange(IDOMNode domNode, TextRange textRange) {
- return (domNode == null) ? null : this.buildElementCodeAssistTextRange_(domNode, textRange);
- }
- /**
- * pre-condition: the specified DOM node is not <code>null</code>
- */
- protected TextRange buildElementCodeAssistTextRange_(IDOMNode domNode, TextRange textRange) {
- int offset = domNode.getStartOffset();
- int length = (domNode.getNodeType() == Node.ELEMENT_NODE) ?
- (((IDOMElement) domNode).getEndStartOffset() - offset) :
- domNode.getLength();
- int lineNumber = domNode.getStructuredDocument().getLineOfOffset(offset) + 1;
- return (textRange == null) ?
- new SimpleTextRange(offset, length, lineNumber) :
- textRange.buildTextRange(offset, length, lineNumber);
- }
-
- // ********** Refactoring TextEdits **********
-
- public DeleteEdit createDeleteEdit() {
- int deletionOffset = getDeletionOffset();
- int deletionLength = this.node.getEndOffset() - deletionOffset;
- return new DeleteEdit(deletionOffset, deletionLength);
- }
-
- public int getNodeEndOffset() {
- return this.node.getEndOffset();
- }
-
- /**
- * deletion offset needs to include any text that is before the node
- */
- protected int getDeletionOffset() {
- int emptyTextLength = 0;
- Node previousSibling = this.node.getPreviousSibling();
- if (previousSibling != null && previousSibling.getNodeType() == Node.TEXT_NODE) {
- emptyTextLength = ((Text) previousSibling).getLength();
- }
- return this.node.getStartOffset() - emptyTextLength;
- }
-
-
- // ********** custom adapter list **********
-
- protected static class XmlEAdapterList<E extends Object & Adapter>
- extends EAdapterList<E>
- {
- public XmlEAdapterList(AbstractJpaEObject jpaEObject) {
- super(jpaEObject);
- }
-
- @Override
- protected void didAdd(int index, E newObject) {
- super.didAdd(index, newObject);
- if (newObject instanceof EMF2DOMAdapter) {
- Object n = ((EMF2DOMAdapter) newObject).getNode();
- if (n instanceof IDOMNode) {
- ((AbstractJpaEObject) this.notifier).node = (IDOMNode) n;
- }
- }
- }
-
- @Override
- protected void didRemove(int index, E oldObject) {
- if ((oldObject instanceof EMF2DOMAdapter) &&
- (((EMF2DOMAdapter) oldObject).getNode() == ((AbstractJpaEObject) this.notifier).node)) {
- ((AbstractJpaEObject) this.notifier).node = null;
- }
- super.didRemove(index, oldObject);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaRootEObject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaRootEObject.java
deleted file mode 100644
index df72ac8864..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/AbstractJpaRootEObject.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.xml;
-
-import java.util.Map;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.common.core.internal.utility.translators.EnumeratedValueTranslator;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.wst.common.internal.emf.resource.ConstantAttributeTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Jpa Root EObject</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getAbstractJpaRootEObject()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractJpaRootEObject extends AbstractJpaEObject implements JpaRootEObject
-{
- /**
- * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersion()
- * @generated
- * @ordered
- */
- protected static final String VERSION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersion()
- * @generated
- * @ordered
- */
- protected String version = VERSION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchemaLocation() <em>Schema Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchemaLocation()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_LOCATION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSchemaLocation() <em>Schema Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchemaLocation()
- * @generated
- * @ordered
- */
- protected String schemaLocation = SCHEMA_LOCATION_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AbstractJpaRootEObject()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return CommonPackage.Literals.ABSTRACT_JPA_ROOT_EOBJECT;
- }
-
- /**
- * Returns the value of the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Version</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Version</em>' attribute.
- * @see #setVersion(String)
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject_Version()
- * @model required="true"
- * @generated
- */
- public String getVersion()
- {
- return version;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject#getVersion <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Version</em>' attribute.
- * @see #getVersion()
- * @generated
- */
- protected void setVersionGen(String newVersion)
- {
- String oldVersion = version;
- version = newVersion;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION, oldVersion, version));
- }
-
- public void setVersion(String newVersion) {
- setVersionGen(newVersion);
- setSchemaLocation(buildSchemaLocationString(getNamespace(), getSchemaLocationForVersion(newVersion)));
- }
-
- /**
- * Returns the value of the '<em><b>Schema Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema Location</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema Location</em>' attribute.
- * @see #setSchemaLocation(String)
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject_SchemaLocation()
- * @model required="true"
- * @generated
- */
- public String getSchemaLocation()
- {
- return schemaLocation;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject#getSchemaLocation <em>Schema Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema Location</em>' attribute.
- * @see #getSchemaLocation()
- * @generated
- */
- public void setSchemaLocation(String newSchemaLocation)
- {
- String oldSchemaLocation = schemaLocation;
- schemaLocation = newSchemaLocation;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION, oldSchemaLocation, schemaLocation));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
- return getVersion();
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
- return getSchemaLocation();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
- setVersion((String)newValue);
- return;
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
- setSchemaLocation((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
- setVersion(VERSION_EDEFAULT);
- return;
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
- setSchemaLocation(SCHEMA_LOCATION_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
- return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
- case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
- return SCHEMA_LOCATION_EDEFAULT == null ? schemaLocation != null : !SCHEMA_LOCATION_EDEFAULT.equals(schemaLocation);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (version: ");
- result.append(version);
- result.append(", schemaLocation: ");
- result.append(schemaLocation);
- result.append(')');
- return result.toString();
- }
-
-
- // **************** validation ********************************************
-
- public TextRange getVersionTextRange() {
- return getAttributeTextRange(XML.VERSION);
- }
-
-
- // **************** version -> schema location mapping ********************
-
- protected abstract String getNamespace();
-
- protected abstract String getSchemaLocationForVersion(String version);
-
- private static String buildSchemaLocationString(String namespace, String schemaLocation) {
- return namespace + ' ' + schemaLocation;
- }
-
-
- // **************** translators *******************************************
-
- protected static Translator buildVersionTranslator(final Map<String, String> versionsToSchemaLocations) {
- return new EnumeratedValueTranslator(
- XML.VERSION,
- CommonPackage.eINSTANCE.getJpaRootEObject_Version(),
- Translator.DOM_ATTRIBUTE) {
-
- @Override
- protected Iterable<String> getEnumeratedObjectValues() {
- return versionsToSchemaLocations.keySet();
- }
- };
- }
-
- protected static Translator buildNamespaceTranslator(String namespace) {
- return new ConstantAttributeTranslator(XML.NAMESPACE, namespace);
- }
-
- protected static Translator buildSchemaNamespaceTranslator() {
- return new ConstantAttributeTranslator(XML.NAMESPACE_XSI, XML.XSI_NAMESPACE_URL);
- }
-
- protected static Translator buildSchemaLocationTranslator(
- final String namespace,
- final Map<String, String> versionsToSchemaLocations) {
-
- return new EnumeratedValueTranslator(
- XML.XSI_SCHEMA_LOCATION,
- CommonPackage.eINSTANCE.getJpaRootEObject_SchemaLocation(),
- Translator.DOM_ATTRIBUTE) {
-
- @Override
- protected Iterable<String> getEnumeratedObjectValues() {
- return new TransformationIterable<String, String>(versionsToSchemaLocations.values()) {
- @Override
- protected String transform(String next) {
- return buildSchemaLocationString(namespace, next);
- }
- };
- }
- };
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonFactory.java
deleted file mode 100644
index 335de1d84a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonFactory.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.xml;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage
- * @generated
- */
-public class CommonFactory extends EFactoryImpl
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final CommonFactory eINSTANCE = init();
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static CommonFactory init()
- {
- try
- {
- CommonFactory theCommonFactory = (CommonFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.common.xmi");
- if (theCommonFactory != null)
- {
- return theCommonFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new CommonFactory();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CommonFactory()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CommonPackage getCommonPackage()
- {
- return (CommonPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static CommonPackage getPackage()
- {
- return CommonPackage.eINSTANCE;
- }
-
-} //CommonFactory
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonPackage.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonPackage.java
deleted file mode 100644
index b633baded5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/CommonPackage.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.xml;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_0.OrmV2_0Package;
-import org.eclipse.jpt.jpa.core.resource.persistence.PersistencePackage;
-import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Package;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * 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.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonFactory
- * @model kind="package"
- * @generated
- */
-public class CommonPackage extends EPackageImpl
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNAME = "xml";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_URI = "jpt.common.xmi";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_PREFIX = "org.eclipse.jpt.jpa.core.resource.xml";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final CommonPackage eINSTANCE = org.eclipse.jpt.jpa.core.resource.xml.CommonPackage.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject <em>Jpa Root EObject</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject()
- * @generated
- */
- public static final int JPA_ROOT_EOBJECT = 1;
-
- /**
- * The feature id for the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JPA_ROOT_EOBJECT__VERSION = 0;
-
- /**
- * The feature id for the '<em><b>Schema Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JPA_ROOT_EOBJECT__SCHEMA_LOCATION = 1;
-
- /**
- * The number of structural features of the '<em>Jpa Root EObject</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JPA_ROOT_EOBJECT_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject <em>Abstract Jpa Root EObject</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getAbstractJpaRootEObject()
- * @generated
- */
- public static final int ABSTRACT_JPA_ROOT_EOBJECT = 0;
-
- /**
- * The feature id for the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JPA_ROOT_EOBJECT__VERSION = JPA_ROOT_EOBJECT__VERSION;
-
- /**
- * The feature id for the '<em><b>Schema Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION = JPA_ROOT_EOBJECT__SCHEMA_LOCATION;
-
- /**
- * The number of structural features of the '<em>Abstract Jpa Root EObject</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT = JPA_ROOT_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractJpaRootEObjectEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass jpaRootEObjectEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private CommonPackage()
- {
- super(eNS_URI, CommonFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link CommonPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static CommonPackage init()
- {
- if (isInited) return (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
-
- // Obtain or create and register package
- CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CommonPackage());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
- OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
- PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
- PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
-
- // Create package meta-data objects
- theCommonPackage.createPackageContents();
- theOrmPackage.createPackageContents();
- theOrmV2_0Package.createPackageContents();
- thePersistencePackage.createPackageContents();
- thePersistenceV2_0Package.createPackageContents();
-
- // Initialize created meta-data
- theCommonPackage.initializePackageContents();
- theOrmPackage.initializePackageContents();
- theOrmV2_0Package.initializePackageContents();
- thePersistencePackage.initializePackageContents();
- thePersistenceV2_0Package.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theCommonPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(CommonPackage.eNS_URI, theCommonPackage);
- return theCommonPackage;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject <em>Abstract Jpa Root EObject</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Jpa Root EObject</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject
- * @generated
- */
- public EClass getAbstractJpaRootEObject()
- {
- return abstractJpaRootEObjectEClass;
- }
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject <em>Jpa Root EObject</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Jpa Root EObject</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject
- * @generated
- */
- public EClass getJpaRootEObject()
- {
- return jpaRootEObjectEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getVersion <em>Version</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Version</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getVersion()
- * @see #getJpaRootEObject()
- * @generated
- */
- public EAttribute getJpaRootEObject_Version()
- {
- return (EAttribute)jpaRootEObjectEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getSchemaLocation <em>Schema Location</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Schema Location</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getSchemaLocation()
- * @see #getJpaRootEObject()
- * @generated
- */
- public EAttribute getJpaRootEObject_SchemaLocation()
- {
- return (EAttribute)jpaRootEObjectEClass.getEStructuralFeatures().get(1);
- }
-
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- public CommonFactory getCommonFactory()
- {
- return (CommonFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- abstractJpaRootEObjectEClass = createEClass(ABSTRACT_JPA_ROOT_EOBJECT);
-
- jpaRootEObjectEClass = createEClass(JPA_ROOT_EOBJECT);
- createEAttribute(jpaRootEObjectEClass, JPA_ROOT_EOBJECT__VERSION);
- createEAttribute(jpaRootEObjectEClass, JPA_ROOT_EOBJECT__SCHEMA_LOCATION);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- abstractJpaRootEObjectEClass.getESuperTypes().add(this.getJpaRootEObject());
-
- // Initialize classes and features; add operations and parameters
- initEClass(abstractJpaRootEObjectEClass, AbstractJpaRootEObject.class, "AbstractJpaRootEObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(jpaRootEObjectEClass, JpaRootEObject.class, "JpaRootEObject", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getJpaRootEObject_Version(), ecorePackage.getEString(), "version", null, 1, 1, JpaRootEObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getJpaRootEObject_SchemaLocation(), ecorePackage.getEString(), "schemaLocation", null, 1, 1, JpaRootEObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- public interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject <em>Abstract Jpa Root EObject</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.xml.AbstractJpaRootEObject
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getAbstractJpaRootEObject()
- * @generated
- */
- public static final EClass ABSTRACT_JPA_ROOT_EOBJECT = eINSTANCE.getAbstractJpaRootEObject();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject <em>Jpa Root EObject</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject()
- * @generated
- */
- public static final EClass JPA_ROOT_EOBJECT = eINSTANCE.getJpaRootEObject();
-
- /**
- * The meta object literal for the '<em><b>Version</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute JPA_ROOT_EOBJECT__VERSION = eINSTANCE.getJpaRootEObject_Version();
-
- /**
- * The meta object literal for the '<em><b>Schema Location</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute JPA_ROOT_EOBJECT__SCHEMA_LOCATION = eINSTANCE.getJpaRootEObject_SchemaLocation();
-
- }
-
-} //CommonPackage
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/EmfTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/EmfTools.java
deleted file mode 100644
index 6a4656a939..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/EmfTools.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.xml;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * 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.
- *
- * @version 2.3
- * @since 2.3
- */
-public class EmfTools {
-
- public static <T extends EObject> T create(EFactory eFactory, EClass eClass, Class<T> javaClass) {
- for (EClassifier factoryEClassifier : eFactory.getEPackage().getEClassifiers()) {
- if (factoryEClassifier instanceof EClass) {
- EClass factoryEClass = (EClass) factoryEClassifier;
- if (eClass.isSuperTypeOf(factoryEClass)) {
- return javaClass.cast(eFactory.create(factoryEClass));
- }
- }
- }
- throw new IllegalArgumentException("Factory does not support objects of type \'" + eClass.getName() + '\''); //$NON-NLS-1$
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaEObject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaEObject.java
deleted file mode 100644
index 97b4dbbb3f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaEObject.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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.jpa.core.resource.xml;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.text.edits.DeleteEdit;
-
-/**
- * Common Dali behavior for EMF objects.
- *
- * 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.
- *
- * @version 3.0
- * @since 2.2
- */
-public interface JpaEObject
- extends EObject
-{
- /**
- * Return whether all the object's EMF features are "unset".
- */
- boolean isUnset();
-
- /**
- * Return true if this object's text representation contains the text offset
- */
- boolean containsOffset(int textOffset);
-
- /**
- * Return the text range to be used for validation. This is the source
- * range that will be highlighted for a validation error.
- */
- TextRange getValidationTextRange();
-
- /**
- * Return the text range to be used for selection. This is the source
- * range that will be highlighted when selecting in the structure view.
- */
- TextRange getSelectionTextRange();
-
-
- // ********** refactoring **********
-
- /**
- * Create a text DeleteEdit for deleting the entire IDOMNode and any text that precedes it.
- */
- DeleteEdit createDeleteEdit();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaRootEObject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaRootEObject.java
deleted file mode 100644
index 57aa329d20..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaRootEObject.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.xml;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Jpa Root EObject</b></em>'.
- *
- * 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.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getVersion <em>Version</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getSchemaLocation <em>Schema Location</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject()
- * @model kind="class" interface="true" abstract="true"
- * @extends JpaEObject
- * @generated
- */
-public interface JpaRootEObject extends JpaEObject
-{
- /**
- * Returns the value of the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Version</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Version</em>' attribute.
- * @see #setVersion(String)
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject_Version()
- * @model required="true"
- * @generated
- */
- String getVersion();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getVersion <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Version</em>' attribute.
- * @see #getVersion()
- * @generated
- */
- void setVersion(String value);
-
- /**
- * Returns the value of the '<em><b>Schema Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema Location</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema Location</em>' attribute.
- * @see #setSchemaLocation(String)
- * @see org.eclipse.jpt.jpa.core.resource.xml.CommonPackage#getJpaRootEObject_SchemaLocation()
- * @model required="true"
- * @generated
- */
- String getSchemaLocation();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.xml.JpaRootEObject#getSchemaLocation <em>Schema Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Schema Location</em>' attribute.
- * @see #getSchemaLocation()
- * @generated
- */
- void setSchemaLocation(String value);
-
- TextRange getVersionTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java
deleted file mode 100644
index d8f2af4944..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 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.core.resource.xml;
-
-import java.io.IOException;
-import java.util.Collections;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-import org.eclipse.jpt.common.core.JptResourceModel;
-import org.eclipse.jpt.common.core.JptResourceModelListener;
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.utility.internal.ListenerList;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver;
-import org.eclipse.wst.common.internal.emf.resource.Renderer;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl;
-import org.xml.sax.EntityResolver;
-
-/**
- * To retrieve the JPA XML resource corresponding to an Eclipse file:
- * <pre>
- * IFile file = (IFile) ResourcesPlugin.getWorkspace().getRoot().findMember("Foo.java");
- * JpaXmlResource jpaXmlResource = (JpaXmlResource) file.getAdapter(JpaXmlResource.class);
- * </pre>
- * This is a non-blocking call; and as a result it will return <code>null</code>
- * if the JPA XML resource or its JPA project is currently under construction.
- * <p>
- * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
- * <p>
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-public class JpaXmlResource
- extends TranslatorResourceImpl
- implements JptResourceModel
-{
- /**
- * cache the content type - if the content type changes, the JPA project
- * will throw out the JPA file holding the xml resource and build a new one
- */
- protected final IContentType contentType;
-
- protected final Translator rootTranslator;
-
- protected final ListenerList<JptResourceModelListener> resourceModelListenerList =
- new ListenerList<JptResourceModelListener>(JptResourceModelListener.class);
-
-
- public JpaXmlResource(URI uri, Renderer renderer, IContentType contentType, Translator rootTranslator) {
- super(uri, renderer);
- this.contentType = contentType;
- this.rootTranslator = rootTranslator;
- }
-
- public IContentType getContentType() {
- return this.contentType;
- }
-
- public String getVersion() {
- JpaRootEObject root = this.getRootObject();
- return (root == null) ? null : root.getVersion();
- }
-
- /**
- * Build a new resource type every time(?).
- */
- public JptResourceType getResourceType() {
- String version = this.getVersion();
- return ((this.contentType == null) || (version == null)) ?
- null :
- new JptResourceType(this.contentType, version);
- }
-
-
- // ********** BasicNotifierImpl override **********
-
- /**
- * Override to fire notification only when:<ul>
- * <li>the resource's state has actually changed; and
- * <li>the resource is loaded; and
- * <li>the resource's resource set is still present (EMF will fire an
- * notification when the resource set is set to 'null', just before
- * the resource is "unloaded" - we want to swallow this notification)
- * </ul>
- */
- @Override
- public void eNotify(Notification notification) {
- // unload events can happen before the resource set is removed - should always react to unload events
- if (this.loadedFlagCleared(notification)) {
- super.eNotify(notification);
- if (this.isReverting()) {
- this.resourceModelReverted();
- } else {
- this.resourceModelUnloaded();
- }
- }
- else if ( ! notification.isTouch() && this.isLoaded() && (this.resourceSet != null)) {
- super.eNotify(notification);
- this.resourceModelChanged();
- }
- }
-
- /**
- * Return whether the specified notification indicates the resource has been
- * unloaded.
- * we could use this method to suppress some notifications; or we could just
- * check whether 'resourceSet' is 'null' (which is what we do)
- */
- protected boolean loadedFlagCleared(Notification notification) {
- return (notification.getNotifier() == this) &&
- (notification.getEventType() == Notification.SET) &&
- (notification.getFeatureID(Resource.class) == RESOURCE__IS_LOADED) &&
- ( ! notification.getNewBooleanValue());
- }
-
- /**
- * Return whether the specified notification indicates the resource's
- * resource set was cleared.
- * We could use this method to suppress some resource set notifications;
- * or we could just check whether <code>resourceSet</code> is
- * <code>null</code> (which is what we do)/
- */
- protected boolean resultSetCleared(Notification notification) {
- return (notification.getNotifier() == this) &&
- (notification.getEventType() == Notification.SET) &&
- (notification.getFeatureID(Resource.class) == RESOURCE__RESOURCE_SET) &&
- (notification.getNewValue() == null);
- }
-
-
- // ********** TranslatorResource implementation **********
-
- /**
- * only applicable for DTD-based files
- */
- public String getDoctype() {
- return null;
- }
-
- public Translator getRootTranslator() {
- return this.rootTranslator;
- }
-
-
- // ********** TranslatorResourceImpl implementation **********
-
- /**
- * only applicable for DTD-based files
- */
- @Override
- protected String getDefaultPublicId() {
- return null;
- }
-
- /**
- * only applicable for DTD-based files
- */
- @Override
- protected String getDefaultSystemId() {
- return null;
- }
-
- /**
- * this seems to be the default version of the spec for this doc
- * and the id 10 maps to the version 1.0
- */
- @Override
- protected int getDefaultVersionID() {
- return 10;
- }
-
- @Override
- public JpaRootEObject getRootObject() {
- EObject root = super.getRootObject();
- try {
- return (JpaRootEObject) root;
- } catch (ClassCastException ex) {
- throw new IllegalStateException("The root object of a JPA XML resource must implement JpaRootEObject: " + root, ex); //$NON-NLS-1$
- }
- }
-
- //296544 - override this to avoid internet access finding the schema during tests
- @Override
- public EntityResolver getEntityResolver() {
- return J2EEXmlDtDEntityResolver.INSTANCE;
- }
-
-
- // ********** convenience methods **********
-
- public boolean fileExists() {
- return this.getFile().exists();
- }
-
- public IFile getFile() {
- IFile file = this.getFile(this.uri);
- return (file != null) ? file : this.getConvertedURIFile();
- }
-
- protected IFile getConvertedURIFile() {
- if (this.resourceSet == null) {
- return null;
- }
- URI convertedURI = this.resourceSet.getURIConverter().normalize(this.uri);
- return this.uri.equals(convertedURI) ? null : this.getFile(convertedURI);
- }
-
- /**
- * Return the Eclipse file for the specified URI.
- * This URI is assumed to be absolute in the following format:
- * platform:/resource/....
- */
- protected IFile getFile(URI fileURI) {
- if ( ! WorkbenchResourceHelperBase.isPlatformResourceURI(fileURI)) {
- return null;
- }
- String fileName = URI.decode(fileURI.path()).substring(JEMUtilPlugin.PLATFORM_RESOURCE.length() + 1);
- return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileName));
- }
-
- public void save() {
- try {
- this.save(Collections.EMPTY_MAP);
- } catch (IOException ex) {
- JptJpaCorePlugin.log(ex);
- }
- }
-
- @Override
- public String toString() {
- // implementation in TranslatorResourceImpl is a bit off...
- return StringTools.buildToStringFor(this, this.getURI());
- }
-
-
- // ********** JptResourceModel implementation **********
-
- public void addResourceModelListener(JptResourceModelListener listener) {
- this.resourceModelListenerList.add(listener);
- }
-
- public void removeResourceModelListener(JptResourceModelListener listener) {
- this.resourceModelListenerList.remove(listener);
- }
-
-
- // ********** listener notifications **********
-
- protected void resourceModelChanged() {
- for (JptResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
- listener.resourceModelChanged(this);
- }
- }
-
- protected void resourceModelReverted() {
- for (JptResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
- listener.resourceModelReverted(this);
- }
- }
-
- protected void resourceModelUnloaded() {
- for (JptResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
- listener.resourceModelUnloaded(this);
- }
- }
-
-
- // ********** cast things back to what they are in EMF **********
-
- @SuppressWarnings("unchecked")
- @Override
- public EList<Adapter> eAdapters() {
- return super.eAdapters();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public EList<EObject> getContents() {
- return super.getContents();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/XML.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/XML.java
deleted file mode 100644
index 53e161227f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/XML.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.core.resource.xml;
-
-/**
- * XML-related stuff.
- *
- * 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.
- *
- * @version 2.3
- * @since 2.2
- */
-@SuppressWarnings("nls")
-public interface XML
-{
- String VERSION = "version";
-
- String NAMESPACE = "xmlns";
-
- String NAMESPACE_XSI = "xmlns:xsi";
- String XSI_NAMESPACE_URL = "http://www.w3.org/2001/XMLSchema-instance";
-
- String XSI_SCHEMA_LOCATION = "xsi:schemaLocation";
-}

Back to the top