diff options
author | kmoore | 2008-03-26 17:45:50 +0000 |
---|---|---|
committer | kmoore | 2008-03-26 17:45:50 +0000 |
commit | dec48e3f28ed2935835bd48b0081343c30fef7b2 (patch) | |
tree | f56c5ec7a7500e4e8cfe01110d0d5d4db51cc39a | |
parent | dbda73e5b0ab2a782781f937eda3e49a7c2b4e67 (diff) | |
download | webtools.dali-dec48e3f28ed2935835bd48b0081343c30fef7b2.tar.gz webtools.dali-dec48e3f28ed2935835bd48b0081343c30fef7b2.tar.xz webtools.dali-dec48e3f28ed2935835bd48b0081343c30fef7b2.zip |
more get prefix changes to jpt.core.context
80 files changed, 323 insertions, 323 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java index 832812237b..4e5205fb4a 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java @@ -31,12 +31,12 @@ public interface PersistentAttribute extends JpaContextNode, JpaStructureNode * The key may be for either the "specified" mapping or, if the "specified" * mapping is missing, the "default" mapping. */ - String mappingKey(); + String getMappingKey(); /** * Return the key for the attribute's "default" mapping. */ - String defaultMappingKey(); + String getDefaultMappingKey(); /** * Return the attribute's "specified" mapping, or if it is null @@ -58,15 +58,15 @@ public interface PersistentAttribute extends JpaContextNode, JpaStructureNode String SPECIFIED_MAPPING_PROPERTY = "specifiedMappingProperty"; String DEFAULT_MAPPING_PROPERTY = "defaultMappingProperty"; - TypeMapping typeMapping(); + TypeMapping getTypeMapping(); - PersistentType persistentType(); + PersistentType getPersistentType(); /** * If the attribute is mapped to a primary key column, return the * column's name, otherwise return null. */ - String primaryKeyColumnName(); + String getPrimaryKeyColumnName(); /** * Return whether the attribute's "attribute" mapping can be overridden. diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java index e978f58f73..3ea2640bfc 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java @@ -29,11 +29,11 @@ public interface PersistentType extends JpaContextNode, JpaStructureNode String getName(); String NAME_PROPERTY = "nameProperty"; - AccessType access(); + AccessType getAccess(); String ACCESS_PROPERTY = "accessProperty"; TypeMapping getMapping(); - String mappingKey(); + String getMappingKey(); void setMappingKey(String key); String MAPPING_PROPERTY = "mappingProperty"; diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java index 08851efd71..dca5406ada 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java @@ -54,9 +54,9 @@ public interface Table extends JpaContextNode // EList<IUniqueConstraint> getUniqueConstraints(); // IUniqueConstraint createUniqueConstraint(int index); - org.eclipse.jpt.db.Table dbTable(); + org.eclipse.jpt.db.Table getDbTable(); - Schema dbSchema(); + Schema getDbSchema(); /** * Return true if this table is connected to a datasource diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java index f700f868e7..c34e0b5254 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java @@ -95,13 +95,13 @@ public interface TableGenerator extends Generator * Return a db Schema object with the specified/default schema name. * This can return null if no Schema exists on the database with that name. */ - Schema dbSchema(); + Schema getDbSchema(); /** * Return a db Table object with the specified/default table name. * This can return null if no Table exists on the database with that name. */ - Table dbTable(); + Table getDbTable(); // class UniqueConstraintOwner implements IUniqueConstraint.Owner diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java index 6cad51585f..48881841e7 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java @@ -31,14 +31,14 @@ public interface TypeMapping extends JpaContextNode */ String getKey(); - PersistentType persistentType(); + PersistentType getPersistentType(); boolean isMapped(); /** * Return the type mapping's primary table name, null if a primary table does not apply */ - String tableName(); + String getTableName(); /** * Return the type mapping's "associated" tables, which includes the @@ -63,9 +63,9 @@ public interface TypeMapping extends JpaContextNode /** * return the resolved primary db table */ - org.eclipse.jpt.db.Table primaryDbTable(); + org.eclipse.jpt.db.Table getPrimaryDbTable(); - Schema dbSchema(); + Schema getDbSchema(); /** * return the resolved associated db table with the passed in name diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java index 4c2e495020..3c36c54c9d 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java @@ -29,9 +29,9 @@ public interface JavaPersistentAttribute extends PersistentAttribute, JavaJpaCon JavaAttributeMapping getSpecifiedMapping(); - JavaTypeMapping typeMapping(); + JavaTypeMapping getTypeMapping(); - JavaPersistentType persistentType(); + JavaPersistentType getPersistentType(); void initializeFromResource(JavaResourcePersistentAttribute resourcePersistentAttribute); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java index d31b74e49c..e9d76f86bf 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java @@ -32,7 +32,7 @@ public interface JavaTypeMapping extends TypeMapping, JavaJpaContextNode Iterator<String> correspondingAnnotationNames(); - JavaPersistentType persistentType(); + JavaPersistentType getPersistentType(); @SuppressWarnings("unchecked") Iterator<JavaPersistentAttribute> overridableAttributes(); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java index 52d7c5bcd7..77665aaf30 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java @@ -46,12 +46,12 @@ public interface OrmPersistentAttribute extends PersistentAttribute, OrmJpaConte /** * Overriden to return {@link OrmTypeMapping}s */ - OrmTypeMapping typeMapping(); + OrmTypeMapping getTypeMapping(); /** * Overriden to return {@link OrmPersistentType}s */ - OrmPersistentType persistentType(); + OrmPersistentType getPersistentType(); boolean contains(int textOffset); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java index 8fa0a45a37..b39a5de5f2 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java @@ -80,7 +80,7 @@ public interface OrmTypeMapping extends TypeMapping, OrmJpaContextNode boolean containsOffset(int textOffset); - OrmPersistentType persistentType(); + OrmPersistentType getPersistentType(); @SuppressWarnings("unchecked") Iterator<OrmPersistentAttribute> overridableAttributes(); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/RelationshipMappingTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/RelationshipMappingTools.java index 37752cdff2..5ac8fff699 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/RelationshipMappingTools.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/RelationshipMappingTools.java @@ -54,7 +54,7 @@ public class RelationshipMappingTools if (!relationshipMapping.isRelationshipOwner()) { return null; } - String owningTableName = relationshipMapping.getTypeMapping().tableName(); + String owningTableName = relationshipMapping.getTypeMapping().getTableName(); if (owningTableName == null) { return null; } @@ -62,7 +62,7 @@ public class RelationshipMappingTools if (targetEntity == null) { return null; } - String targetTableName = targetEntity.tableName(); + String targetTableName = targetEntity.getTableName(); if (targetTableName == null) { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java index cb45bd85b2..c5088bb6ee 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java @@ -69,7 +69,7 @@ public abstract class AbstractJavaAttributeMapping<T extends JavaResourceNode> e } public TypeMapping getTypeMapping() { - return this.persistentAttribute().typeMapping(); + return this.persistentAttribute().getTypeMapping(); } public String attributeName() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java index 5460fe10a2..bf1ca473a9 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java @@ -286,7 +286,7 @@ public abstract class AbstractJavaBaseEmbeddedMapping<T extends JavaResourceNode } protected VirtualAttributeOverride buildVirtualAttributeOverrideResource(JavaResourcePersistentAttribute resourcePersistentAttribute, String attributeName) { - ColumnMapping columnMapping = (ColumnMapping) this.embeddable().persistentType().attributeNamed(attributeName).getMapping(); + ColumnMapping columnMapping = (ColumnMapping) this.embeddable().getPersistentType().attributeNamed(attributeName).getMapping(); return new VirtualAttributeOverride(resourcePersistentAttribute, attributeName, columnMapping.getColumn()); } @@ -327,7 +327,7 @@ public abstract class AbstractJavaBaseEmbeddedMapping<T extends JavaResourceNode if (this.embeddable() == null) { return EmptyIterator.instance(); } - return new FilteringIterator<PersistentAttribute, PersistentAttribute>(this.embeddable().persistentType().attributes()) { + return new FilteringIterator<PersistentAttribute, PersistentAttribute>(this.embeddable().getPersistentType().attributes()) { @Override protected boolean accept(PersistentAttribute o) { return o.isOverridableAttribute(); @@ -371,7 +371,7 @@ public abstract class AbstractJavaBaseEmbeddedMapping<T extends JavaResourceNode } PersistentType persistentType = persistentAttribute.getPersistenceUnit().persistentType(qualifiedTypeName); if (persistentType != null) { - if (persistentType.mappingKey() == MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY) { + if (persistentType.getMappingKey() == MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY) { return (Embeddable) persistentType.getMapping(); } } @@ -382,7 +382,7 @@ public abstract class AbstractJavaBaseEmbeddedMapping<T extends JavaResourceNode if (attributeName == null || embeddable == null) { return null; } - for (Iterator<PersistentAttribute> stream = embeddable.persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = embeddable.getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute persAttribute = stream.next(); if (attributeName.equals(persAttribute.getName())) { if (persAttribute.getMapping() instanceof ColumnMapping) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java index 08a89b60da..70e66bbcd2 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java @@ -405,7 +405,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<T extends Relationshi return; } - PersistentAttribute attribute = targetEntity.persistentType().resolveAttribute(mappedBy); + PersistentAttribute attribute = targetEntity.getPersistentType().resolveAttribute(mappedBy); if (attribute == null) { messages.add( diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java index 7672a4a92c..d0ab8c2794 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java @@ -146,7 +146,7 @@ public abstract class AbstractJavaRelationshipMapping<T extends RelationshipMapp return null; } PersistentType persistentType = getPersistenceUnit().persistentType(qualifiedTargetEntity); - if (persistentType != null && persistentType.mappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { + if (persistentType != null && persistentType.getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { return (Entity) persistentType.getMapping(); } return null; @@ -161,7 +161,7 @@ public abstract class AbstractJavaRelationshipMapping<T extends RelationshipMapp public Iterator<String> allTargetEntityAttributeNames() { Entity targetEntity = this.getResolvedTargetEntity(); - return (targetEntity == null) ? EmptyIterator.<String> instance() : targetEntity.persistentType().allAttributeNames(); + return (targetEntity == null) ? EmptyIterator.<String> instance() : targetEntity.getPersistentType().allAttributeNames(); } public Iterator<String> candidateMappedByAttributeNames() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java index 26f1f63674..579b5e0c6c 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java @@ -364,7 +364,7 @@ public abstract class AbstractJavaSingleRelationshipMapping<T extends Relationsh * by default, the join column is in the type mapping's primary table */ public String defaultTableName() { - return AbstractJavaSingleRelationshipMapping.this.getTypeMapping().tableName(); + return AbstractJavaSingleRelationshipMapping.this.getTypeMapping().getTableName(); } public Entity getTargetEntity() { @@ -400,7 +400,7 @@ public abstract class AbstractJavaSingleRelationshipMapping<T extends Relationsh public Table dbReferencedColumnTable() { Entity targetEntity = getTargetEntity(); - return (targetEntity == null) ? null : targetEntity.primaryDbTable(); + return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java index c0bca3cc18..2fb24caabc 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java @@ -296,21 +296,21 @@ public abstract class AbstractJavaTable extends AbstractJavaJpaContextNode return (textRange != null) ? textRange : this.getParent().validationTextRange(astRoot); } - public org.eclipse.jpt.db.Table dbTable() { - Schema schema = this.dbSchema(); + public org.eclipse.jpt.db.Table getDbTable() { + Schema schema = this.getDbSchema(); return (schema == null) ? null : schema.tableNamed(this.getName()); } - public Schema dbSchema() { + public Schema getDbSchema() { return this.database().schemaNamed(this.getSchema()); } public boolean hasResolvedSchema() { - return this.dbSchema() != null; + return this.getDbSchema() != null; } public boolean isResolved() { - return this.dbTable() != null; + return this.getDbTable() != null; } @Override @@ -351,7 +351,7 @@ public abstract class AbstractJavaTable extends AbstractJavaJpaContextNode } private Iterator<String> candidateNames() { - Schema dbSchema = this.dbSchema(); + Schema dbSchema = this.getDbSchema(); return (dbSchema != null) ? dbSchema.tableNames() : EmptyIterator.<String> instance(); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java index f2fef342eb..2b47d4cee4 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java @@ -39,15 +39,15 @@ public abstract class AbstractJavaTypeMapping extends AbstractJavaJpaContextNode //***************** ITypeMapping implementation ***************** - public JavaPersistentType persistentType() { + public JavaPersistentType getPersistentType() { return (JavaPersistentType) getParent(); } - public String tableName() { + public String getTableName() { return null; } - public org.eclipse.jpt.db.Table primaryDbTable() { + public org.eclipse.jpt.db.Table getPrimaryDbTable() { return null; } @@ -55,7 +55,7 @@ public abstract class AbstractJavaTypeMapping extends AbstractJavaJpaContextNode return null; } - public Schema dbSchema() { + public Schema getDbSchema() { return null; } @@ -124,6 +124,6 @@ public abstract class AbstractJavaTypeMapping extends AbstractJavaJpaContextNode public TextRange validationTextRange(CompilationUnit astRoot) { TextRange textRange = this.mappingResource().textRange(astRoot); - return (textRange != null) ? textRange : this.persistentType().validationTextRange(astRoot); + return (textRange != null) ? textRange : this.getPersistentType().validationTextRange(astRoot); } } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAssociationOverride.java index 4eebf2a222..fd2be6c790 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAssociationOverride.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAssociationOverride.java @@ -286,7 +286,7 @@ public class GenericJavaAssociationOverride extends AbstractJavaOverride * by default, the join column is in the type mapping's primary table */ public String defaultTableName() { - return GenericJavaAssociationOverride.this.owner.getTypeMapping().tableName(); + return GenericJavaAssociationOverride.this.owner.getTypeMapping().getTableName(); } public String getDefaultColumnName() { @@ -332,7 +332,7 @@ public class GenericJavaAssociationOverride extends AbstractJavaOverride public Table dbReferencedColumnTable() { Entity targetEntity = getTargetEntity(); - return (targetEntity == null) ? null : targetEntity.primaryDbTable(); + return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAttributeOverride.java index debf0aca69..6fa82003c6 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAttributeOverride.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaAttributeOverride.java @@ -75,7 +75,7 @@ public class GenericJavaAttributeOverride extends AbstractJavaOverride if (tableName != null) { return tableName; } - return getOwner().getTypeMapping().tableName(); + return getOwner().getTypeMapping().getTableName(); } protected ColumnMapping columnMapping() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaBasicMapping.java index 529fe54213..4b9d050a09 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaBasicMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaBasicMapping.java @@ -109,7 +109,7 @@ public class GenericJavaBasicMapping extends AbstractJavaAttributeMapping<Basic> } public String defaultTableName() { - return getTypeMapping().tableName(); + return getTypeMapping().getTableName(); } //************** IBasicMapping implementation *************** diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaDiscriminatorColumn.java index edda57dbed..de8990e295 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaDiscriminatorColumn.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaDiscriminatorColumn.java @@ -118,7 +118,7 @@ public class GenericJavaDiscriminatorColumn extends AbstractJavaNamedColumn<Disc @Override protected String tableName() { - return javaEntity().tableName(); + return javaEntity().getTableName(); } public TextRange validationTextRange(CompilationUnit astRoot) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaEntity.java index fb5bada019..b44e2393aa 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaEntity.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaEntity.java @@ -336,19 +336,19 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn } @Override - public String tableName() { + public String getTableName() { return getTable().getName(); } @Override - public org.eclipse.jpt.db.Table primaryDbTable() { - return getTable().dbTable(); + public org.eclipse.jpt.db.Table getPrimaryDbTable() { + return getTable().getDbTable(); } @Override public org.eclipse.jpt.db.Table getDbTable(String tableName) { for (Iterator<Table> stream = this.associatedTablesIncludingInherited(); stream.hasNext();) { - org.eclipse.jpt.db.Table dbTable = stream.next().dbTable(); + org.eclipse.jpt.db.Table dbTable = stream.next().getDbTable(); if (dbTable != null && dbTable.matchesShortJavaClassName(tableName)) { return dbTable; } @@ -357,8 +357,8 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn } @Override - public Schema dbSchema() { - return getTable().dbSchema(); + public Schema getDbSchema() { + return getTable().getDbSchema(); } @@ -1141,7 +1141,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn } public Entity parentEntity() { - for (Iterator<PersistentType> i = persistentType().inheritanceHierarchy(); i.hasNext();) { + for (Iterator<PersistentType> i = getPersistentType().inheritanceHierarchy(); i.hasNext();) { TypeMapping typeMapping = i.next().getMapping(); if (typeMapping != this && typeMapping instanceof Entity) { return (Entity) typeMapping; @@ -1152,7 +1152,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn public Entity rootEntity() { Entity rootEntity = this; - for (Iterator<PersistentType> i = persistentType().inheritanceHierarchy(); i.hasNext();) { + for (Iterator<PersistentType> i = getPersistentType().inheritanceHierarchy(); i.hasNext();) { PersistentType persistentType = i.next(); if (persistentType.getMapping() instanceof Entity) { rootEntity = (Entity) persistentType.getMapping(); @@ -1162,14 +1162,14 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn } public String primaryKeyColumnName() { - return primaryKeyColumnName(persistentType().allAttributes()); + return primaryKeyColumnName(getPersistentType().allAttributes()); } public static String primaryKeyColumnName(Iterator<PersistentAttribute> attributes) { String pkColumnName = null; for (Iterator<PersistentAttribute> stream = attributes; stream.hasNext();) { PersistentAttribute attribute = stream.next(); - String name = attribute.primaryKeyColumnName(); + String name = attribute.getPrimaryKeyColumnName(); if (pkColumnName == null) { pkColumnName = name; } @@ -1239,7 +1239,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn * and terminates at the root entity (or at the point of cyclicity). */ protected Iterator<TypeMapping> inheritanceHierarchy() { - return new TransformationIterator<PersistentType, TypeMapping>(persistentType().inheritanceHierarchy()) { + return new TransformationIterator<PersistentType, TypeMapping>(getPersistentType().inheritanceHierarchy()) { @Override protected TypeMapping transform(PersistentType type) { return type.getMapping(); @@ -1790,7 +1790,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn } private boolean entityHasId() { - for (Iterator<PersistentAttribute> stream = persistentType().allAttributes(); stream.hasNext(); ) { + for (Iterator<PersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext(); ) { if (stream.next().isIdAttribute()) { return true; } @@ -1862,7 +1862,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn public org.eclipse.jpt.db.Table dbReferencedColumnTable() { Entity parentEntity = GenericJavaEntity.this.parentEntity(); - return (parentEntity == null) ? null : parentEntity.primaryDbTable(); + return (parentEntity == null) ? null : parentEntity.getPrimaryDbTable(); } public int joinColumnsSize() { @@ -1887,7 +1887,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn if (attributeName == null) { return null; } - for (Iterator<PersistentAttribute> stream = persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute persAttribute = stream.next(); if (attributeName.equals(persAttribute.getName())) { if (persAttribute.getMapping() instanceof ColumnMapping) { @@ -1922,7 +1922,7 @@ public class GenericJavaEntity extends AbstractJavaTypeMapping implements JavaEn if (attributeName == null) { return null; } - for (Iterator<PersistentAttribute> stream = persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute persAttribute = stream.next(); if (attributeName.equals(persAttribute.getName())) { if (persAttribute.getMapping() instanceof RelationshipMapping) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdMapping.java index 5449ba02d3..0b572b9093 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdMapping.java @@ -130,7 +130,7 @@ public class GenericJavaIdMapping extends AbstractJavaAttributeMapping<Id> imple } public String defaultTableName() { - return getTypeMapping().tableName(); + return getTypeMapping().getTableName(); } //************** IIdMapping implementation *************** diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java index dd4367d0f3..659ee81b8a 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java @@ -611,7 +611,7 @@ public class GenericJavaJoinTable extends AbstractJavaTable implements JavaJoinT if (GenericJavaJoinTable.this.getName() == null) { return null; } - return (GenericJavaJoinTable.this.getName().equals(tableName)) ? GenericJavaJoinTable.this.dbTable() : null; + return (GenericJavaJoinTable.this.getName().equals(tableName)) ? GenericJavaJoinTable.this.getDbTable() : null; } /** @@ -658,7 +658,7 @@ public class GenericJavaJoinTable extends AbstractJavaTable implements JavaJoinT public org.eclipse.jpt.db.Table dbReferencedColumnTable() { Entity targetEntity = getTargetEntity(); - return (targetEntity == null) ? null : targetEntity.primaryDbTable(); + return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { @@ -696,7 +696,7 @@ public class GenericJavaJoinTable extends AbstractJavaTable implements JavaJoinT return null; } String attributeName = GenericJavaJoinTable.this.relationshipMapping().persistentAttribute().getName(); - for (Iterator<PersistentAttribute> stream = targetEntity.persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = targetEntity.getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute attribute = stream.next(); AttributeMapping mapping = attribute.getMapping(); if (mapping instanceof NonOwningMapping) { @@ -719,7 +719,7 @@ public class GenericJavaJoinTable extends AbstractJavaTable implements JavaJoinT } public org.eclipse.jpt.db.Table dbReferencedColumnTable() { - return getTypeMapping().primaryDbTable(); + return getTypeMapping().getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedSuperclass.java index fa868c4351..b4cdf74230 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedSuperclass.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedSuperclass.java @@ -106,7 +106,7 @@ public class GenericJavaMappedSuperclass extends AbstractJavaTypeMapping @Override public Iterator<JavaPersistentAttribute> overridableAttributes() { - return new FilteringIterator<JavaPersistentAttribute, JavaPersistentAttribute>(this.persistentType().attributes()) { + return new FilteringIterator<JavaPersistentAttribute, JavaPersistentAttribute>(this.getPersistentType().attributes()) { @Override protected boolean accept(JavaPersistentAttribute o) { return o.isOverridableAttribute(); @@ -121,7 +121,7 @@ public class GenericJavaMappedSuperclass extends AbstractJavaTypeMapping @Override public Iterator<JavaPersistentAttribute> overridableAssociations() { - return new FilteringIterator<JavaPersistentAttribute, JavaPersistentAttribute>(this.persistentType().attributes()) { + return new FilteringIterator<JavaPersistentAttribute, JavaPersistentAttribute>(this.getPersistentType().attributes()) { @Override protected boolean accept(JavaPersistentAttribute o) { return o.isOverridableAssociation(); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneMapping.java index f0c4ba9b48..9bfffd4d64 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneMapping.java @@ -143,7 +143,7 @@ public class GenericJavaOneToOneMapping extends AbstractJavaSingleRelationshipMa return; } - PersistentAttribute attribute = targetEntity.persistentType().resolveAttribute(mappedBy); + PersistentAttribute attribute = targetEntity.getPersistentType().resolveAttribute(mappedBy); if (attribute == null) { messages.add( diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentAttribute.java index 595fd7b2c8..10a2caa047 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentAttribute.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentAttribute.java @@ -68,15 +68,15 @@ public class GenericJavaPersistentAttribute extends AbstractJavaJpaContextNode return this.resourcePersistentAttribute; } - public JavaPersistentType persistentType() { + public JavaPersistentType getPersistentType() { return (JavaPersistentType) this.getParent(); } - public JavaTypeMapping typeMapping() { - return this.persistentType().getMapping(); + public JavaTypeMapping getTypeMapping() { + return this.getPersistentType().getMapping(); } - public String primaryKeyColumnName() { + public String getPrimaryKeyColumnName() { return this.getMapping().primaryKeyColumnName(); } @@ -138,14 +138,14 @@ public class GenericJavaPersistentAttribute extends AbstractJavaJpaContextNode return (this.specifiedMapping != null) ? this.specifiedMapping : this.defaultMapping; } - public String mappingKey() { + public String getMappingKey() { return this.getMapping().getKey(); } /** * return null if there is no "default" mapping for the attribute */ - public String defaultMappingKey() { + public String getDefaultMappingKey() { return this.defaultMapping.getKey(); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentType.java index 4b8f8841f6..482db7f35e 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentType.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPersistentType.java @@ -85,7 +85,7 @@ public class GenericJavaPersistentType extends AbstractJavaJpaContextNode implem return this.mapping; } - public String mappingKey() { + public String getMappingKey() { return getMapping().getKey(); } @@ -122,7 +122,7 @@ public class GenericJavaPersistentType extends AbstractJavaJpaContextNode implem return getMapping().isMapped(); } - public AccessType access() { + public AccessType getAccess() { return this.access; } @@ -300,7 +300,7 @@ public class GenericJavaPersistentType extends AbstractJavaJpaContextNode implem protected void initializePersistentAttributes(JavaResourcePersistentType persistentTypeResource) { Iterator<JavaResourcePersistentAttribute> resourceAttributes = persistentTypeResource.fields(); - if (access() == AccessType.PROPERTY) { + if (getAccess() == AccessType.PROPERTY) { resourceAttributes = persistentTypeResource.properties(); } @@ -344,7 +344,7 @@ public class GenericJavaPersistentType extends AbstractJavaJpaContextNode implem } if (javaAccess == null) { if (parentPersistentType() != null) { - javaAccess = parentPersistentType().access(); + javaAccess = parentPersistentType().getAccess(); } } if (javaAccess == null) { @@ -404,7 +404,7 @@ public class GenericJavaPersistentType extends AbstractJavaJpaContextNode implem protected void updatePersistentAttributes(JavaResourcePersistentType resourcePersistentType) { ListIterator<JavaPersistentAttribute> contextAttributes = attributes(); Iterator<JavaResourcePersistentAttribute> resourceAttributes = resourcePersistentType.fields(); - if (access() == AccessType.PROPERTY) { + if (getAccess() == AccessType.PROPERTY) { resourceAttributes = resourcePersistentType.properties(); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumn.java index 65c42b3266..b0c8a8c089 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumn.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumn.java @@ -95,7 +95,7 @@ public class GenericJavaPrimaryKeyJoinColumn extends AbstractJavaNamedColumn<Pri @Override protected String tableName() { - return this.getOwner().getTypeMapping().tableName(); + return this.getOwner().getTypeMapping().getTableName(); } public Column dbReferencedColumn() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaSecondaryTable.java index c0bd7bf91e..24f9b8bc9e 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaSecondaryTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaSecondaryTable.java @@ -317,11 +317,11 @@ public class GenericJavaSecondaryTable extends AbstractJavaTable } public Table getDbTable(String tableName) { - return GenericJavaSecondaryTable.this.dbTable(); + return GenericJavaSecondaryTable.this.getDbTable(); } public Table dbReferencedColumnTable() { - return getTypeMapping().primaryDbTable(); + return getTypeMapping().getPrimaryDbTable(); } public int joinColumnsSize() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaTableGenerator.java index 7e362db36d..f9940ab441 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaTableGenerator.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaTableGenerator.java @@ -328,12 +328,12 @@ public class GenericJavaTableGenerator extends AbstractJavaGenerator // return JavaUniqueConstraint.createTableGeneratorUniqueConstraint(new UniqueConstraintOwner(this), this.getMember(), index); // } - public Table dbTable() { - Schema schema = this.dbSchema(); + public Table getDbTable() { + Schema schema = this.getDbSchema(); return (schema == null) ? null : schema.tableNamed(this.getTable()); } - public Schema dbSchema() { + public Schema getDbSchema() { return this.database().schemaNamed(this.getSchema()); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaVersionMapping.java index 18255b2450..4d2ae2613a 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaVersionMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaVersionMapping.java @@ -83,7 +83,7 @@ public class GenericJavaVersionMapping extends AbstractJavaAttributeMapping<Vers } public String defaultTableName() { - return getTypeMapping().tableName(); + return getTypeMapping().getTableName(); } //************** IVersionMapping implementation *************** diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java index e1dfacccb3..668de2a060 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java @@ -174,7 +174,7 @@ public abstract class AbstractOrmAttributeMapping<T extends XmlAttributeMapping> } public OrmTypeMapping getTypeMapping() { - return this.persistentAttribute().typeMapping(); + return this.persistentAttribute().getTypeMapping(); } @@ -207,7 +207,7 @@ public abstract class AbstractOrmAttributeMapping<T extends XmlAttributeMapping> } protected JavaPersistentAttribute javaPersistentAttribute() { - JavaPersistentType javaPersistentType = persistentAttribute().persistentType().javaPersistentType(); + JavaPersistentType javaPersistentType = persistentAttribute().getPersistentType().javaPersistentType(); if (javaPersistentType != null && getName() != null) { return javaPersistentType.attributeNamed(getName()); } @@ -267,7 +267,7 @@ public abstract class AbstractOrmAttributeMapping<T extends XmlAttributeMapping> DefaultJpaValidationMessages.buildMessage( IMessage.HIGH_SEVERITY, JpaValidationMessages.PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME, - new String[] {getName(), persistentAttribute().persistentType().getMapping().getClass_()}, + new String[] {getName(), persistentAttribute().getPersistentType().getMapping().getClass_()}, this, nameTextRange()) ); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java index aaa94faf46..2387ab050d 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java @@ -141,7 +141,7 @@ public abstract class AbstractOrmBaseEmbeddedMapping<T extends BaseXmlEmbedded> if (this.embeddable() == null) { return EmptyIterator.instance(); } - return new FilteringIterator<PersistentAttribute, PersistentAttribute>(this.embeddable().persistentType().attributes()) { + return new FilteringIterator<PersistentAttribute, PersistentAttribute>(this.embeddable().getPersistentType().attributes()) { @Override protected boolean accept(PersistentAttribute o) { return o.isOverridableAttribute(); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java index b4c96ed12e..e5323ef058 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java @@ -332,7 +332,7 @@ public abstract class AbstractOrmMultiRelationshipMapping<T extends XmlMultiRela return; } - PersistentAttribute attribute = getResolvedTargetEntity().persistentType().attributeNamed(getMappedBy()); + PersistentAttribute attribute = getResolvedTargetEntity().getPersistentType().attributeNamed(getMappedBy()); if (attribute == null) { messages.add( diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java index dcee079b91..6483671bca 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java @@ -123,7 +123,7 @@ public abstract class AbstractOrmRelationshipMapping<T extends XmlRelationshipMa public Iterator<String> allTargetEntityAttributeNames() { Entity targetEntity = this.getResolvedTargetEntity(); - return (targetEntity == null) ? EmptyIterator.<String> instance() : targetEntity.persistentType().allAttributeNames(); + return (targetEntity == null) ? EmptyIterator.<String> instance() : targetEntity.getPersistentType().allAttributeNames(); } public Iterator<String> candidateMappedByAttributeNames() { @@ -200,7 +200,7 @@ public abstract class AbstractOrmRelationshipMapping<T extends XmlRelationshipMa return null; } PersistentType persistentType = getPersistenceUnit().persistentType(qualifiedTargetEntity); - if (persistentType != null && persistentType.mappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { + if (persistentType != null && persistentType.getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { return (Entity) persistentType.getMapping(); } return null; diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java index fd7fc725dd..5d9210b79b 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java @@ -381,7 +381,7 @@ public abstract class AbstractOrmSingleRelationshipMapping<T extends XmlSingleRe * by default, the join column is in the type mapping's primary table */ public String defaultTableName() { - return AbstractOrmSingleRelationshipMapping.this.getTypeMapping().tableName(); + return AbstractOrmSingleRelationshipMapping.this.getTypeMapping().getTableName(); } public Entity getTargetEntity() { @@ -417,7 +417,7 @@ public abstract class AbstractOrmSingleRelationshipMapping<T extends XmlSingleRe public Table dbReferencedColumnTable() { Entity targetEntity = getTargetEntity(); - return (targetEntity == null) ? null : targetEntity.primaryDbTable(); + return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java index eed6f8b641..79db992806 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java @@ -191,21 +191,21 @@ public abstract class AbstractOrmTable extends AbstractOrmJpaContextNode impleme // return uniqueConstraints; // } - public org.eclipse.jpt.db.Table dbTable() { - Schema schema = this.dbSchema(); + public org.eclipse.jpt.db.Table getDbTable() { + Schema schema = this.getDbSchema(); return (schema == null) ? null : schema.tableNamed(getName()); } - public Schema dbSchema() { + public Schema getDbSchema() { return getConnectionProfile().database().schemaNamed(getSchema()); } public boolean hasResolvedSchema() { - return dbSchema() != null; + return getDbSchema() != null; } public boolean isResolved() { - return dbTable() != null; + return getDbTable() != null; } protected void initialize(XmlBaseTable table) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java index 8b2623c0e8..f3e7f72eab 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java @@ -56,7 +56,7 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e return true; } - public String tableName() { + public String getTableName() { return null; } @@ -69,7 +69,7 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e this.class_ = newClass; this.typeMappingResource().setClassName(newClass); firePropertyChanged(CLASS_PROPERTY, oldClass, newClass); - persistentType().classChanged(oldClass, newClass); + getPersistentType().classChanged(oldClass, newClass); } public AccessType getDefaultAccess() { @@ -127,7 +127,7 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e firePropertyChanged(SPECIFIED_METADATA_COMPLETE_PROPERTY, oldMetadataComplete, newSpecifiedMetadataComplete); } - public OrmPersistentType persistentType() { + public OrmPersistentType getPersistentType() { return (OrmPersistentType) getParent(); } @@ -145,7 +145,7 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e this.setDefaultMetadataComplete(oldMapping.isDefaultMetadataComplete()); } - public Table primaryDbTable() { + public Table getPrimaryDbTable() { return null; } @@ -153,7 +153,7 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e return null; } - public Schema dbSchema() { + public Schema getDbSchema() { return null; } @@ -214,10 +214,10 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e if (!isMetadataComplete()) { if (getJavaPersistentType() != null) { if (getJavaPersistentType().hasAnyAttributeMappingAnnotations()) { - return getJavaPersistentType().access(); + return getJavaPersistentType().getAccess(); } - if (persistentType().parentPersistentType() != null) { - return persistentType().parentPersistentType().access(); + if (getPersistentType().parentPersistentType() != null) { + return getPersistentType().parentPersistentType().getAccess(); } } } @@ -290,7 +290,7 @@ public abstract class AbstractOrmTypeMapping<T extends AbstractXmlTypeMapping> e public JpaStructureNode structureNode(int offset) { if (this.typeMapping.containsOffset(offset)) { - return persistentType(); + return getPersistentType(); } return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmAssociationOverride.java index d5a3ea2784..0a0238767b 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmAssociationOverride.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmAssociationOverride.java @@ -195,7 +195,7 @@ public class GenericOrmAssociationOverride extends AbstractOrmJpaContextNode * by default, the join column is in the type mapping's primary table */ public String defaultTableName() { - return GenericOrmAssociationOverride.this.owner.getTypeMapping().tableName(); + return GenericOrmAssociationOverride.this.owner.getTypeMapping().getTableName(); } public String getDefaultColumnName() { @@ -236,7 +236,7 @@ public class GenericOrmAssociationOverride extends AbstractOrmJpaContextNode public Table dbReferencedColumnTable() { Entity targetEntity = getTargetEntity(); - return (targetEntity == null) ? null : targetEntity.primaryDbTable(); + return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmBasicMapping.java index ed00e0abd4..50a1017057 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmBasicMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmBasicMapping.java @@ -196,7 +196,7 @@ public class GenericOrmBasicMapping extends AbstractOrmAttributeMapping<XmlBasic } public String defaultTableName() { - return getTypeMapping().tableName(); + return getTypeMapping().getTableName(); } public Table getDbTable(String tableName) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmDiscriminatorColumn.java index 974a86e174..c305633b11 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmDiscriminatorColumn.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmDiscriminatorColumn.java @@ -118,7 +118,7 @@ public class GenericOrmDiscriminatorColumn extends AbstractOrmNamedColumn<XmlDis @Override protected String tableName() { - return this.getOwner().getTypeMapping().tableName(); + return this.getOwner().getTypeMapping().getTableName(); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEmbeddable.java index 4e24f52cb2..0d82b45c92 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEmbeddable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEmbeddable.java @@ -64,7 +64,7 @@ public class GenericOrmEmbeddable extends AbstractOrmTypeMapping<XmlEmbeddable> public XmlEmbeddable addToResourceModel(XmlEntityMappings entityMappings) { XmlEmbeddable embeddable = OrmFactory.eINSTANCE.createXmlEmbeddable(); - persistentType().initialize(embeddable); + getPersistentType().initialize(embeddable); entityMappings.getEmbeddables().add(embeddable); return embeddable; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEntity.java index d5d38096ce..d315111956 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEntity.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmEntity.java @@ -180,19 +180,19 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen } @Override - public String tableName() { + public String getTableName() { return getTable().getName(); } @Override - public org.eclipse.jpt.db.Table primaryDbTable() { - return getTable().dbTable(); + public org.eclipse.jpt.db.Table getPrimaryDbTable() { + return getTable().getDbTable(); } @Override public org.eclipse.jpt.db.Table getDbTable(String tableName) { for (Iterator<Table> stream = this.associatedTablesIncludingInherited(); stream.hasNext();) { - org.eclipse.jpt.db.Table dbTable = stream.next().dbTable(); + org.eclipse.jpt.db.Table dbTable = stream.next().getDbTable(); if (dbTable != null && dbTable.matchesShortJavaClassName(tableName)) { return dbTable; } @@ -201,13 +201,13 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen } @Override - public Schema dbSchema() { - return getTable().dbSchema(); + public Schema getDbSchema() { + return getTable().getDbSchema(); } public JavaEntity javaEntity() { JavaPersistentType javaPersistentType = getJavaPersistentType(); - if (javaPersistentType != null && javaPersistentType.mappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { + if (javaPersistentType != null && javaPersistentType.getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { return (JavaEntity) javaPersistentType.getMapping(); } return null; @@ -921,7 +921,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen } public Entity parentEntity() { - for (Iterator<PersistentType> i = persistentType().inheritanceHierarchy(); i.hasNext();) { + for (Iterator<PersistentType> i = getPersistentType().inheritanceHierarchy(); i.hasNext();) { TypeMapping typeMapping = i.next().getMapping(); if (typeMapping != this && typeMapping instanceof Entity) { return (Entity) typeMapping; @@ -932,7 +932,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen public Entity rootEntity() { Entity rootEntity = null; - for (Iterator<PersistentType> i = persistentType().inheritanceHierarchy(); i.hasNext();) { + for (Iterator<PersistentType> i = getPersistentType().inheritanceHierarchy(); i.hasNext();) { PersistentType persistentType = i.next(); if (persistentType.getMapping() instanceof Entity) { rootEntity = (Entity) persistentType.getMapping(); @@ -988,7 +988,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen * and terminates at the root entity (or at the point of cyclicity). */ protected Iterator<TypeMapping> inheritanceHierarchy() { - return new TransformationIterator<PersistentType, TypeMapping>(persistentType().inheritanceHierarchy()) { + return new TransformationIterator<PersistentType, TypeMapping>(getPersistentType().inheritanceHierarchy()) { @Override protected TypeMapping transform(PersistentType type) { return type.getMapping(); @@ -1503,7 +1503,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen // ************************************************************************* public String primaryKeyColumnName() { - return GenericJavaEntity.primaryKeyColumnName(persistentType().allAttributes()); + return GenericJavaEntity.primaryKeyColumnName(getPersistentType().allAttributes()); } //********** Validation ************************** @@ -1598,7 +1598,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen } private boolean entityHasId() { - for (Iterator<PersistentAttribute> stream = this.persistentType().allAttributes(); stream.hasNext(); ) { + for (Iterator<PersistentAttribute> stream = this.getPersistentType().allAttributes(); stream.hasNext(); ) { if (stream.next().isIdAttribute()) { return true; } @@ -1616,7 +1616,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen public XmlEntity addToResourceModel(XmlEntityMappings entityMappings) { XmlEntity entity = OrmFactory.eINSTANCE.createXmlEntity(); - persistentType().initialize(entity); + getPersistentType().initialize(entity); entityMappings.getEntities().add(entity); return entity; } @@ -1639,7 +1639,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen public org.eclipse.jpt.db.Table dbReferencedColumnTable() { Entity parentEntity = GenericOrmEntity.this.parentEntity(); - return (parentEntity == null) ? null : parentEntity.primaryDbTable(); + return (parentEntity == null) ? null : parentEntity.getPrimaryDbTable(); } public int joinColumnsSize() { @@ -1669,7 +1669,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen if (attributeName == null) { return null; } - for (Iterator<PersistentAttribute> stream = persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute persAttribute = stream.next(); if (attributeName.equals(persAttribute.getName())) { if (persAttribute.getMapping() instanceof ColumnMapping) { @@ -1701,7 +1701,7 @@ public class GenericOrmEntity extends AbstractOrmTypeMapping<XmlEntity> implemen if (attributeName == null) { return null; } - for (Iterator<PersistentAttribute> stream = persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute persAttribute = stream.next(); if (attributeName.equals(persAttribute.getName())) { if (persAttribute.getMapping() instanceof RelationshipMapping) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdMapping.java index 1c5d2a8260..b745eb9b2b 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdMapping.java @@ -236,7 +236,7 @@ public class GenericOrmIdMapping extends AbstractOrmAttributeMapping<XmlId> } public String defaultTableName() { - return getTypeMapping().tableName(); + return getTypeMapping().getTableName(); } @Override diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java index f1b8b0b410..e7982f7c69 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java @@ -569,7 +569,7 @@ public class GenericOrmJoinTable extends AbstractOrmTable implements OrmJoinTabl if (GenericOrmJoinTable.this.getName() == null) { return null; } - return (GenericOrmJoinTable.this.getName().equals(tableName)) ? GenericOrmJoinTable.this.dbTable() : null; + return (GenericOrmJoinTable.this.getName().equals(tableName)) ? GenericOrmJoinTable.this.getDbTable() : null; } /** @@ -616,7 +616,7 @@ public class GenericOrmJoinTable extends AbstractOrmTable implements OrmJoinTabl public org.eclipse.jpt.db.Table dbReferencedColumnTable() { Entity targetEntity = getTargetEntity(); - return (targetEntity == null) ? null : targetEntity.primaryDbTable(); + return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { @@ -655,7 +655,7 @@ public class GenericOrmJoinTable extends AbstractOrmTable implements OrmJoinTabl return null; } String attributeName = GenericOrmJoinTable.this.relationshipMapping().getName(); - for (Iterator<PersistentAttribute> stream = targetEntity.persistentType().allAttributes(); stream.hasNext();) { + for (Iterator<PersistentAttribute> stream = targetEntity.getPersistentType().allAttributes(); stream.hasNext();) { PersistentAttribute attribute = stream.next(); AttributeMapping mapping = attribute.getMapping(); if (mapping instanceof NonOwningMapping) { @@ -678,7 +678,7 @@ public class GenericOrmJoinTable extends AbstractOrmTable implements OrmJoinTabl } public org.eclipse.jpt.db.Table dbReferencedColumnTable() { - return getTypeMapping().primaryDbTable(); + return getTypeMapping().getPrimaryDbTable(); } public boolean isVirtual(BaseJoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedSuperclass.java index c8e9d1e4d0..79dbc73460 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedSuperclass.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedSuperclass.java @@ -101,7 +101,7 @@ public class GenericOrmMappedSuperclass extends AbstractOrmTypeMapping<XmlMapped @Override public Iterator<OrmPersistentAttribute> overridableAttributes() { - return new FilteringIterator<OrmPersistentAttribute, OrmPersistentAttribute>(this.persistentType().attributes()) { + return new FilteringIterator<OrmPersistentAttribute, OrmPersistentAttribute>(this.getPersistentType().attributes()) { @Override protected boolean accept(OrmPersistentAttribute o) { return o.isOverridableAttribute(); @@ -116,7 +116,7 @@ public class GenericOrmMappedSuperclass extends AbstractOrmTypeMapping<XmlMapped @Override public Iterator<OrmPersistentAttribute> overridableAssociations() { - return new FilteringIterator<OrmPersistentAttribute, OrmPersistentAttribute>(this.persistentType().attributes()) { + return new FilteringIterator<OrmPersistentAttribute, OrmPersistentAttribute>(this.getPersistentType().attributes()) { @Override protected boolean accept(OrmPersistentAttribute o) { return o.isOverridableAssociation(); @@ -147,7 +147,7 @@ public class GenericOrmMappedSuperclass extends AbstractOrmTypeMapping<XmlMapped public XmlMappedSuperclass addToResourceModel(XmlEntityMappings entityMappings) { XmlMappedSuperclass mappedSuperclass = OrmFactory.eINSTANCE.createXmlMappedSuperclass(); - persistentType().initialize(mappedSuperclass); + getPersistentType().initialize(mappedSuperclass); entityMappings.getMappedSuperclasses().add(mappedSuperclass); return mappedSuperclass; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentAttribute.java index 81a7ea66aa..f0c63c50bd 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentAttribute.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentAttribute.java @@ -106,26 +106,26 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode return this.attributeMapping; } - public String mappingKey() { + public String getMappingKey() { return this.getMapping().getKey(); } - public String defaultMappingKey() { + public String getDefaultMappingKey() { return null; } public void setSpecifiedMappingKey(String newMappingKey) { - if (this.mappingKey() == newMappingKey) { + if (this.getMappingKey() == newMappingKey) { return; } OrmAttributeMapping oldMapping = getMapping(); this.attributeMapping = buildAttributeMapping(newMappingKey); - persistentType().changeMapping(this, oldMapping, this.attributeMapping); + getPersistentType().changeMapping(this, oldMapping, this.attributeMapping); firePropertyChanged(SPECIFIED_MAPPING_PROPERTY, oldMapping, this.attributeMapping); } protected void setSpecifiedMappingKey_(String newMappingKey) { - if (this.mappingKey() == newMappingKey) { + if (this.getMappingKey() == newMappingKey) { return; } OrmAttributeMapping oldMapping = getMapping(); @@ -137,23 +137,23 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode return this.attributeMappingProviders; } - public OrmPersistentType persistentType() { + public OrmPersistentType getPersistentType() { return (OrmPersistentType) getParent(); } - public OrmTypeMapping typeMapping() { - return persistentType().getMapping(); + public OrmTypeMapping getTypeMapping() { + return getPersistentType().getMapping(); } public boolean isVirtual() { - return persistentType().containsVirtualPersistentAttribute(this); + return getPersistentType().containsVirtualPersistentAttribute(this); } public void setVirtual(boolean virtual) { getOrmPersistentType().setPersistentAttributeVirtual(this, virtual); } - public String primaryKeyColumnName() { + public String getPrimaryKeyColumnName() { return getMapping().primaryKeyColumnName(); } @@ -232,7 +232,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } public void update(XmlId id) { - if (mappingKey() == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) { ((OrmIdMapping) getMapping()).update(id); } else { @@ -242,7 +242,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } public void update(XmlEmbeddedId embeddedId) { - if (mappingKey() == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) { ((OrmEmbeddedIdMapping) getMapping()).update(embeddedId); } else { @@ -252,7 +252,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } public void update(XmlBasic basic) { - if (mappingKey() == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) { ((OrmBasicMapping) getMapping()).update(basic); } else { @@ -262,7 +262,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } public void update(XmlVersion version) { - if (mappingKey() == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) { ((OrmVersionMapping) getMapping()).update(version); } else { @@ -271,7 +271,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } } public void update(XmlManyToOne manyToOne) { - if (mappingKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) { ((OrmManyToOneMapping) getMapping()).update(manyToOne); } else { @@ -280,7 +280,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } } public void update(XmlOneToMany oneToMany) { - if (mappingKey() == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) { ((OrmOneToManyMapping) getMapping()).update(oneToMany); } else { @@ -289,7 +289,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } } public void update(XmlOneToOne oneToOne) { - if (mappingKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) { ((OrmOneToOneMapping) getMapping()).update(oneToOne); } else { @@ -298,7 +298,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } } public void update(XmlManyToMany manyToMany) { - if (mappingKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) { ((OrmManyToManyMapping) getMapping()).update(manyToMany); } else { @@ -308,7 +308,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } public void update(XmlEmbedded embedded) { - if (mappingKey() == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) { ((OrmEmbeddedMapping) getMapping()).update(embedded); } else { @@ -318,7 +318,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode } public void update(XmlTransient transientResource) { - if (mappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) { ((OrmTransientMapping) getMapping()).update(transientResource); } else { @@ -340,7 +340,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode public TextRange selectionTextRange() { if (isVirtual()) { - return persistentType().selectionTextRange(); + return getPersistentType().selectionTextRange(); } return this.attributeMapping.selectionTextRange(); } @@ -353,7 +353,7 @@ public class GenericOrmPersistentAttribute extends AbstractOrmJpaContextNode public TextRange validationTextRange() { if (isVirtual()) { - return persistentType().getMapping().attributesTextRange(); + return getPersistentType().getMapping().attributesTextRange(); } return this.attributeMapping.validationTextRange(); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java index 8a6344b6e8..e0d452ff00 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java @@ -134,7 +134,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } public void setMappingKey(String newMappingKey) { - if (this.mappingKey() == newMappingKey) { + if (this.getMappingKey() == newMappingKey) { return; } OrmTypeMapping oldMapping = getMapping(); @@ -144,7 +144,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } protected void setMappingKey_(String newMappingKey) { - if (this.mappingKey() == newMappingKey) { + if (this.getMappingKey() == newMappingKey) { return; } OrmTypeMapping oldMapping = getMapping(); @@ -166,7 +166,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen return this.parentPersistentType; } - public AccessType access() { + public AccessType getAccess() { return getMapping().getAccess(); } @@ -199,7 +199,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen else { int index = this.virtualPersistentAttributes.indexOf(ormPersistentAttribute); this.virtualPersistentAttributes.remove(ormPersistentAttribute); - addSpecifiedPersistentAttribute(ormPersistentAttribute.mappingKey(), ormPersistentAttribute.getName()); + addSpecifiedPersistentAttribute(ormPersistentAttribute.getMappingKey(), ormPersistentAttribute.getName()); fireItemRemoved(VIRTUAL_ATTRIBUTES_LIST, index, ormPersistentAttribute); } } @@ -360,7 +360,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen return true; } - public String mappingKey() { + public String getMappingKey() { return getMapping().getKey(); } @@ -479,7 +479,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } public void update(XmlEntity entity) { - if (mappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) { ((OrmEntity) getMapping()).update(entity); } else { @@ -491,7 +491,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } public void update(XmlMappedSuperclass mappedSuperclass) { - if (mappingKey() == MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY) { ((OrmMappedSuperclass) getMapping()).update(mappedSuperclass); } else { @@ -503,7 +503,7 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } public void update(XmlEmbeddable embeddable) { - if (mappingKey() == MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY) { + if (getMappingKey() == MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY) { ((OrmEmbeddable) getMapping()).update(embeddable); } else { @@ -545,34 +545,34 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } protected void updateVirtualAttribute(OrmPersistentAttribute ormPersistentAttribute, JavaPersistentAttribute javaAttribute) { - if (javaAttribute.mappingKey() == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) { + if (javaAttribute.getMappingKey() == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlBasic(getMapping(), (JavaBasicMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlEmbedded(getMapping(), (JavaEmbeddedMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlEmbeddedId(getMapping(), (JavaEmbeddedIdMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlId(getMapping(), (JavaIdMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlManyToMany(ormPersistentAttribute, (JavaManyToManyMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlManyToOne((JavaManyToOneMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlOneToMany(ormPersistentAttribute, (JavaOneToManyMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlOneToOne((JavaOneToOneMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlTransient((JavaTransientMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.update(new VirtualXmlVersion(getMapping(), (JavaVersionMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } } @@ -603,35 +603,35 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen } protected OrmPersistentAttribute createVirtualPersistentAttribute(JavaPersistentAttribute javaAttribute) { - OrmPersistentAttribute ormPersistentAttribute = jpaFactory().buildOrmPersistentAttribute(this, javaAttribute.mappingKey()); - if (javaAttribute.mappingKey() == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) { + OrmPersistentAttribute ormPersistentAttribute = jpaFactory().buildOrmPersistentAttribute(this, javaAttribute.getMappingKey()); + if (javaAttribute.getMappingKey() == MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlBasic(getMapping(), (JavaBasicMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlEmbeddedId(getMapping(), (JavaEmbeddedIdMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlEmbedded(getMapping(), (JavaEmbeddedMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.ID_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlId(getMapping(), (JavaIdMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlManyToMany(ormPersistentAttribute, (JavaManyToManyMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlManyToOne((JavaManyToOneMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlOneToMany(ormPersistentAttribute, (JavaOneToManyMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlOneToOne((JavaOneToOneMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlTransient((JavaTransientMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } - else if (javaAttribute.mappingKey() == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) { + else if (javaAttribute.getMappingKey() == MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY) { ormPersistentAttribute.initialize(new VirtualXmlVersion(getMapping(), (JavaVersionMapping) javaAttribute.getMapping(), getMapping().isMetadataComplete())); } return ormPersistentAttribute; diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumn.java index 9c71adc94f..b8bea95927 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumn.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumn.java @@ -100,7 +100,7 @@ public class GenericOrmPrimaryKeyJoinColumn extends AbstractOrmNamedColumn<XmlPr @Override protected String tableName() { - return this.getOwner().getTypeMapping().tableName(); + return this.getOwner().getTypeMapping().getTableName(); } public boolean isReferencedColumnResolved() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmSecondaryTable.java index e1395703a9..ce452bcbf2 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmSecondaryTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmSecondaryTable.java @@ -321,11 +321,11 @@ public class GenericOrmSecondaryTable extends AbstractOrmTable } public Table getDbTable(String tableName) { - return GenericOrmSecondaryTable.this.dbTable(); + return GenericOrmSecondaryTable.this.getDbTable(); } public Table dbReferencedColumnTable() { - return getTypeMapping().primaryDbTable(); + return getTypeMapping().getPrimaryDbTable(); } public int joinColumnsSize() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmTableGenerator.java index e819a1235a..5703a946c1 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmTableGenerator.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmTableGenerator.java @@ -242,12 +242,12 @@ public class GenericOrmTableGenerator extends AbstractOrmGenerator<XmlTableGener // return OrmFactory.eINSTANCE.createXmlUniqueConstraint(); // } - public Table dbTable() { - Schema schema = this.dbSchema(); + public Table getDbTable() { + Schema schema = this.getDbSchema(); return (schema == null) ? null : schema.tableNamed(this.getTable()); } - public Schema dbSchema() { + public Schema getDbSchema() { return this.database().schemaNamed(this.getSchema()); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmVersionMapping.java index 5f8b384d6b..c81f55fd30 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmVersionMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmVersionMapping.java @@ -99,7 +99,7 @@ public class GenericOrmVersionMapping extends AbstractOrmAttributeMapping<XmlVer } public String defaultTableName() { - return getTypeMapping().tableName(); + return getTypeMapping().getTableName(); } public Table getDbTable(String tableName) { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java index 5b7d1106af..483ca615d4 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java @@ -125,7 +125,7 @@ public class VirtualXmlColumn extends AbstractJpaEObject implements XmlColumn return this.javaColumn.getSpecifiedTable(); } } - return this.ormTypeMapping.tableName(); + return this.ormTypeMapping.getTableName(); } public void setTable(String value) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/PersistentAttributeActionFilter.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/PersistentAttributeActionFilter.java index fa0329a444..3e5e0c155e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/PersistentAttributeActionFilter.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/PersistentAttributeActionFilter.java @@ -36,7 +36,7 @@ public class PersistentAttributeActionFilter return false; } - boolean mapped = ((PersistentAttribute) target).mappingKey() != MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY; + boolean mapped = ((PersistentAttribute) target).getMappingKey() != MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY; return mapped == booleanValue; } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java index b54649d0d7..00f06f7169 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/JavaPersistentAttributeDetailsPage.java @@ -79,7 +79,7 @@ public class JavaPersistentAttributeDetailsPage extends PersistentAttributeDetai @Override protected AttributeMappingUiProvider<? extends AttributeMapping>[] attributeMappingUiProvidersFor(PersistentAttribute persistentAttribute) { AttributeMappingUiProvider<? extends AttributeMapping>[] providers = new AttributeMappingUiProvider<?>[CollectionTools.size(attributeMappingUiProviders()) + 1]; - providers[0] = defaultAttributeMappingUiProvider(persistentAttribute.defaultMappingKey()); + providers[0] = defaultAttributeMappingUiProvider(persistentAttribute.getDefaultMappingKey()); int i = 1; for (Iterator<AttributeMappingUiProvider<? extends AttributeMapping>> iterator = attributeMappingUiProviders(); iterator.hasNext(); ) { providers[i++] = iterator.next(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnDialogPane.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnDialogPane.java index 0883b7d766..9d2784b28e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnDialogPane.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnDialogPane.java @@ -78,7 +78,7 @@ public class InverseJoinColumnDialogPane extends BaseJoinColumnDialogPane<JoinCo JoinTable joinTable = subject.getOwner(); if (joinTable != null) { - Table joinDBTable = joinTable.dbTable(); + Table joinDBTable = joinTable.getDbTable(); if (joinDBTable != null) { Iterator<String> columnNames = joinDBTable.columnNames(); @@ -135,7 +135,7 @@ public class InverseJoinColumnDialogPane extends BaseJoinColumnDialogPane<JoinCo Entity targetEntity = relationshipMapping.getResolvedTargetEntity(); if (targetEntity != null) { - Table referencedDbTable = targetEntity.primaryDbTable(); + Table referencedDbTable = targetEntity.getPrimaryDbTable(); if (referencedDbTable != null) { Iterator<String> columnNames = referencedDbTable.columnNames(); diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java index becd327df3..9399d9b821 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InverseJoinColumnInJoinTableStateObject.java @@ -54,7 +54,7 @@ public class InverseJoinColumnInJoinTableStateObject extends BaseJoinColumnState */ @Override public Table getNameTable() { - return getOwner().dbTable(); + return getOwner().getDbTable(); } /* @@ -76,7 +76,7 @@ public class InverseJoinColumnInJoinTableStateObject extends BaseJoinColumnState return null; } - return targetEntity.primaryDbTable(); + return targetEntity.getPrimaryDbTable(); } /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java index d7db858bb6..94c719b09d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInAssociationOverrideStateObject.java @@ -44,7 +44,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO return getJoinColumn().getDefaultTable(); } - return typeMapping().tableName(); + return typeMapping().getTableName(); } /* @@ -52,7 +52,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO */ @Override public Table getNameTable() { - return typeMapping().primaryDbTable(); + return typeMapping().getPrimaryDbTable(); } /* @@ -79,7 +79,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO Entity targetEntity = relationshipMapping.getResolvedTargetEntity(); if (targetEntity != null) { - return targetEntity.primaryDbTable(); + return targetEntity.getPrimaryDbTable(); } return null; @@ -90,7 +90,7 @@ public class JoinColumnInAssociationOverrideStateObject extends JoinColumnStateO */ @Override public Schema getSchema() { - return typeMapping().dbSchema(); + return typeMapping().getDbSchema(); } /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java index 1cb7666647..dce0169062 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInJoinTableStateObject.java @@ -53,7 +53,7 @@ public class JoinColumnInJoinTableStateObject extends BaseJoinColumnStateObject */ @Override public Table getNameTable() { - return getOwner().dbTable(); + return getOwner().getDbTable(); } /* @@ -69,7 +69,7 @@ public class JoinColumnInJoinTableStateObject extends BaseJoinColumnStateObject */ @Override public Table getReferencedNameTable() { - return relationshipMapping().getTypeMapping().primaryDbTable(); + return relationshipMapping().getTypeMapping().getPrimaryDbTable(); } /** diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java index cace259af4..875f92ed8e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinColumnInRelationshipMappingStateObject.java @@ -52,7 +52,7 @@ public class JoinColumnInRelationshipMappingStateObject extends JoinColumnStateO return joinColumn.getDefaultTable(); } - return getOwner().getTypeMapping().tableName(); + return getOwner().getTypeMapping().getTableName(); } /* @@ -80,7 +80,7 @@ public class JoinColumnInRelationshipMappingStateObject extends JoinColumnStateO Entity targetEntity = getOwner().getResolvedTargetEntity(); if (targetEntity != null) { - return targetEntity.primaryDbTable(); + return targetEntity.getPrimaryDbTable(); } return null; @@ -91,6 +91,6 @@ public class JoinColumnInRelationshipMappingStateObject extends JoinColumnStateO */ @Override public Schema getSchema() { - return getOwner().getTypeMapping().dbSchema(); + return getOwner().getTypeMapping().getDbSchema(); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java index cf46ab8567..171b79d95f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/JoinTableComposite.java @@ -239,7 +239,7 @@ public class JoinTableComposite extends AbstractFormPane<JoinTable> @Override protected org.eclipse.jpt.db.Table table() { - return subject().dbTable(); + return subject().getDbTable(); } private Schema tableSchema() { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java index 999fd36313..02e57247e8 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentAttributeMapAsComposite.java @@ -73,19 +73,19 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr @Override protected MappingUiProvider<T> buildDefaultProvider() { - if (subject().defaultMappingKey() == null) { + if (subject().getDefaultMappingKey() == null) { return null; } return new MappingUiProvider<T>() { public Image image() { - String mappingKey = subject().defaultMappingKey(); + String mappingKey = subject().getDefaultMappingKey(); return JpaMappingImageHelper.imageForAttributeMapping(mappingKey); } public String label() { - String mappingKey = subject().defaultMappingKey(); + String mappingKey = subject().getDefaultMappingKey(); return SWTUtil.buildDisplayString( JptUiMessages.class, @@ -108,7 +108,7 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr return new MappingChangeHandler() { public String labelText() { - String mappingKey = subject().mappingKey(); + String mappingKey = subject().getMappingKey(); if (mappingKey != null) { return JptUiMessages.MapAsComposite_mappedAttributeText; @@ -118,7 +118,7 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr } public String mappingType() { - String mappingKey = subject().mappingKey(); + String mappingKey = subject().getMappingKey(); if (mappingKey == null) { return JptUiMessages.MapAsComposite_changeMappingType; @@ -177,7 +177,7 @@ public abstract class PersistentAttributeMapAsComposite<T extends PersistentAttr */ @Override protected String mappingKey() { - return subject().mappingKey(); + return subject().getMappingKey(); } /* diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java index d0685427e8..a4a5f9a24d 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PersistentTypeMapAsComposite.java @@ -64,7 +64,7 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext return new MappingChangeHandler() { public String labelText() { - String mappingKey = subject().mappingKey(); + String mappingKey = subject().getMappingKey(); if (mappingKey != null) { return JptUiMessages.MapAsComposite_mappedTypeText; @@ -74,7 +74,7 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext } public String mappingType() { - String mappingKey = subject().mappingKey(); + String mappingKey = subject().getMappingKey(); if (mappingKey == null) { return JptUiMessages.MapAsComposite_changeMappingType; @@ -117,7 +117,7 @@ public abstract class PersistentTypeMapAsComposite<T extends PersistentType> ext */ @Override protected String mappingKey() { - return subject().mappingKey(); + return subject().getMappingKey(); } /* diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java index 8c35560cdc..8307f12d2f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnInSecondaryTableStateObject.java @@ -53,7 +53,7 @@ public class PrimaryKeyJoinColumnInSecondaryTableStateObject extends BaseJoinCol */ @Override public Table getNameTable() { - return getOwner().dbTable(); + return getOwner().getDbTable(); } /* @@ -68,6 +68,6 @@ public class PrimaryKeyJoinColumnInSecondaryTableStateObject extends BaseJoinCol */ @Override public Table getReferencedNameTable() { - return getOwner().getParent().primaryDbTable(); + return getOwner().getParent().getPrimaryDbTable(); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java index a822f11712..238e2061e4 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnStateObject.java @@ -53,7 +53,7 @@ public class PrimaryKeyJoinColumnStateObject extends BaseJoinColumnStateObject */ @Override public Table getNameTable() { - return getOwner().primaryDbTable(); + return getOwner().getPrimaryDbTable(); } /* @@ -69,6 +69,6 @@ public class PrimaryKeyJoinColumnStateObject extends BaseJoinColumnStateObject */ @Override public Table getReferencedNameTable() { - return getOwner().parentEntity().primaryDbTable(); + return getOwner().parentEntity().getPrimaryDbTable(); } }
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java index 951f4c5d1c..d4f52090a6 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableComposite.java @@ -163,7 +163,7 @@ public class TableComposite extends AbstractFormPane<Table> @Override protected org.eclipse.jpt.db.Table table() { - return subject().dbTable(); + return subject().getDbTable(); } private Schema tableSchema() { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java index 9d78912ae3..684e6b441e 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/TableGeneratorComposite.java @@ -117,7 +117,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override @@ -175,7 +175,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override @@ -242,7 +242,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override @@ -313,7 +313,7 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java index 98c405e9a6..9459977fc2 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/orm/details/OrmTableGeneratorComposite.java @@ -106,7 +106,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override @@ -147,7 +147,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override @@ -188,7 +188,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override @@ -242,7 +242,7 @@ public class OrmTableGeneratorComposite extends AbstractPane<OrmTableGenerator> @Override protected Table table() { - return subject().dbTable(); + return subject().getDbTable(); } @Override diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java index b049f4f330..af231ab334 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/persistence/details/PersistenceUnitClassesComposite.java @@ -231,7 +231,7 @@ public class PersistenceUnitClassesComposite extends AbstractPane<PersistenceUni Image image = null; if (persistentType != null) { - image = JpaMappingImageHelper.imageForTypeMapping(persistentType.mappingKey()); + image = JpaMappingImageHelper.imageForTypeMapping(persistentType.getMappingKey()); } if (image != null) { diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentAttributeItemLabelProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentAttributeItemLabelProvider.java index f04239360c..4adb421a6f 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentAttributeItemLabelProvider.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentAttributeItemLabelProvider.java @@ -42,7 +42,7 @@ public class PersistentAttributeItemLabelProvider extends AbstractItemLabelProvi (PersistentAttribute) model()) { @Override protected Image buildValue_() { - Image image = JpaMappingImageHelper.imageForAttributeMapping(subject.mappingKey()); + Image image = JpaMappingImageHelper.imageForAttributeMapping(subject.getMappingKey()); if (((PersistentAttribute) model()).isVirtual()) { return JptUiIcons.ghost(image); } diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentTypeItemLabelProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentTypeItemLabelProvider.java index 334434324f..bd6b45633a 100644 --- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentTypeItemLabelProvider.java +++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/PersistentTypeItemLabelProvider.java @@ -39,7 +39,7 @@ public class PersistentTypeItemLabelProvider extends AbstractItemLabelProvider return new PropertyAspectAdapter<PersistentType, Image>(PersistentType.MAPPING_PROPERTY, (PersistentType) model()) { @Override protected Image buildValue_() { - return JpaMappingImageHelper.imageForTypeMapping(subject.mappingKey()); + return JpaMappingImageHelper.imageForTypeMapping(subject.getMappingKey()); } }; } diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java index 0a6d43acb9..bd8802661a 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java @@ -428,7 +428,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase classRefs.next(); Embeddable embeddable = (Embeddable) classRefs.next().getJavaPersistentType().getMapping(); - BasicMapping cityMapping = (BasicMapping) embeddable.persistentType().attributeNamed("city").getMapping(); + BasicMapping cityMapping = (BasicMapping) embeddable.getPersistentType().attributeNamed("city").getMapping(); cityMapping.getColumn().setSpecifiedName("FOO"); cityMapping.getColumn().setSpecifiedTable("BAR"); diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedMappingTests.java index 051f5c425c..0bdcaebe05 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEmbeddedMappingTests.java @@ -427,7 +427,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase classRefs.next(); Embeddable embeddable = (Embeddable) classRefs.next().getJavaPersistentType().getMapping(); - BasicMapping cityMapping = (BasicMapping) embeddable.persistentType().attributeNamed("city").getMapping(); + BasicMapping cityMapping = (BasicMapping) embeddable.getPersistentType().attributeNamed("city").getMapping(); cityMapping.getColumn().setSpecifiedName("FOO"); cityMapping.getColumn().setSpecifiedTable("BAR"); diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEntityTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEntityTests.java index 0c3c64521d..d977e7e1d9 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEntityTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaEntityTests.java @@ -445,7 +445,7 @@ public class JavaEntityTests extends ContextModelTestCase public void testAccessNoAnnotations() throws Exception { createTestEntity(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(AccessType.FIELD, javaPersistentType().access()); + assertEquals(AccessType.FIELD, javaPersistentType().getAccess()); } public void testAccessAnnotationsOnParent() throws Exception { @@ -460,40 +460,40 @@ public class JavaEntityTests extends ContextModelTestCase JavaPersistentType childPersistentType = javaPersistentType(); PersistentType parentPersistentType = childPersistentType.parentPersistentType(); - assertEquals(AccessType.PROPERTY, parentPersistentType.access()); - assertEquals(AccessType.PROPERTY, childPersistentType.access()); + assertEquals(AccessType.PROPERTY, parentPersistentType.getAccess()); + assertEquals(AccessType.PROPERTY, childPersistentType.getAccess()); ((IdMapping) parentPersistentType.attributeNamed("id").getMapping()).getColumn().setSpecifiedName("FOO"); JavaResourcePersistentType typeResource = jpaProject().javaPersistentTypeResource(FULLY_QUALIFIED_TYPE_NAME); typeResource.properties().next().setMappingAnnotation(null); //no mapping(Id) annotation, but still a Column annotation, so access should still be property - assertEquals(AccessType.PROPERTY, parentPersistentType.access()); - assertEquals(AccessType.PROPERTY, childPersistentType.access()); + assertEquals(AccessType.PROPERTY, parentPersistentType.getAccess()); + assertEquals(AccessType.PROPERTY, childPersistentType.getAccess()); ((BasicMapping) parentPersistentType.attributeNamed("id").getMapping()).getColumn().setSpecifiedName(null); - assertEquals(AccessType.FIELD, parentPersistentType.access()); - assertEquals(AccessType.FIELD, childPersistentType.access()); + assertEquals(AccessType.FIELD, parentPersistentType.getAccess()); + assertEquals(AccessType.FIELD, childPersistentType.getAccess()); entityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY); - assertEquals(AccessType.PROPERTY, parentPersistentType.access()); - assertEquals(AccessType.PROPERTY, childPersistentType.access()); + assertEquals(AccessType.PROPERTY, parentPersistentType.getAccess()); + assertEquals(AccessType.PROPERTY, childPersistentType.getAccess()); entityMappings().setSpecifiedAccess(AccessType.FIELD); //still accessType of PROPERTY because the java class is not specified in this orm.xml - assertEquals(AccessType.PROPERTY, parentPersistentType.access()); - assertEquals(AccessType.PROPERTY, childPersistentType.access()); + assertEquals(AccessType.PROPERTY, parentPersistentType.getAccess()); + assertEquals(AccessType.PROPERTY, childPersistentType.getAccess()); OrmPersistentType ormPersistentType = entityMappings().addOrmPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); removeXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); //only parent specified in orm.xml, i think this outcome is right?? - assertEquals(AccessType.FIELD, ormPersistentType.javaPersistentType().access()); - assertEquals(AccessType.FIELD, childPersistentType.access()); + assertEquals(AccessType.FIELD, ormPersistentType.javaPersistentType().getAccess()); + assertEquals(AccessType.FIELD, childPersistentType.getAccess()); OrmPersistentType childOrmPersistentType = entityMappings().addOrmPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".AnnotationTestTypeChild"); removeXmlClassRef(PACKAGE_NAME + ".AnnotationTestTypeChild"); //both parent and child specified in orm.xml - assertEquals(AccessType.FIELD, ormPersistentType.javaPersistentType().access()); - assertEquals(AccessType.FIELD, childOrmPersistentType.javaPersistentType().access()); + assertEquals(AccessType.FIELD, ormPersistentType.javaPersistentType().getAccess()); + assertEquals(AccessType.FIELD, childOrmPersistentType.javaPersistentType().getAccess()); } public void testAccessWithXmlSettings() throws Exception { @@ -503,33 +503,33 @@ public class JavaEntityTests extends ContextModelTestCase mappingFileRef.setFileName(JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH); xmlPersistenceUnit().getMappingFiles().add(mappingFileRef); - assertEquals(AccessType.PROPERTY, javaPersistentType().access()); + assertEquals(AccessType.PROPERTY, javaPersistentType().getAccess()); ((IdMapping) javaPersistentType().attributeNamed("id").getMapping()).getColumn().setSpecifiedName("FOO"); JavaResourcePersistentType typeResource = jpaProject().javaPersistentTypeResource(FULLY_QUALIFIED_TYPE_NAME); typeResource.properties().next().setMappingAnnotation(null); //no mapping(Id) annotation, but still a Column annotation, so access should still be property - assertEquals(AccessType.PROPERTY, javaPersistentType().access()); + assertEquals(AccessType.PROPERTY, javaPersistentType().getAccess()); ((BasicMapping) javaPersistentType().attributeNamed("id").getMapping()).getColumn().setSpecifiedName(null); - assertEquals(AccessType.FIELD, javaPersistentType().access()); + assertEquals(AccessType.FIELD, javaPersistentType().getAccess()); entityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY); - assertEquals(AccessType.PROPERTY, javaPersistentType().access()); + assertEquals(AccessType.PROPERTY, javaPersistentType().getAccess()); entityMappings().setSpecifiedAccess(AccessType.FIELD); //still accessType of PROPERTY because the java class is not specified in this orm.xml - assertEquals(AccessType.PROPERTY, javaPersistentType().access()); + assertEquals(AccessType.PROPERTY, javaPersistentType().getAccess()); OrmPersistentType ormPersistentType = entityMappings().addOrmPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); //now class is specified in orm.xml, so entityMappings access setting wins over persistence-unit-defaults - assertEquals(AccessType.FIELD, ormPersistentType.javaPersistentType().access()); + assertEquals(AccessType.FIELD, ormPersistentType.javaPersistentType().getAccess()); ((OrmEntity) ormPersistentType.getMapping()).setSpecifiedAccess(AccessType.PROPERTY); //accessType should be PROPERTY now, java gets the access from xml entity if it is specified - assertEquals(AccessType.PROPERTY, ormPersistentType.javaPersistentType().access()); + assertEquals(AccessType.PROPERTY, ormPersistentType.javaPersistentType().getAccess()); } public void testGetSpecifiedNameNull() throws Exception { @@ -615,21 +615,21 @@ public class JavaEntityTests extends ContextModelTestCase addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); createTestEntityWithName(); - assertEquals(ENTITY_NAME, javaEntity().tableName()); + assertEquals(ENTITY_NAME, javaEntity().getTableName()); } public void testGetTableName2() throws Exception { createTestEntity(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(TYPE_NAME, javaEntity().tableName()); + assertEquals(TYPE_NAME, javaEntity().getTableName()); } public void testGetTableName3() throws Exception { createTestEntityWithTable(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(TABLE_NAME, javaEntity().tableName()); + assertEquals(TABLE_NAME, javaEntity().getTableName()); } public void testSetTableNameWithNullTable() throws Exception { @@ -643,7 +643,7 @@ public class JavaEntityTests extends ContextModelTestCase table.setSpecifiedName(TABLE_NAME); assertSourceContains("@Table(name=\"" + TABLE_NAME + "\")"); - assertEquals(TABLE_NAME, javaEntity().tableName()); + assertEquals(TABLE_NAME, javaEntity().getTableName()); assertEquals(TABLE_NAME, table.getName()); table.setSpecifiedCatalog(TABLE_NAME); @@ -1716,7 +1716,7 @@ public class JavaEntityTests extends ContextModelTestCase MappedSuperclass mappedSuperclass = (MappedSuperclass) javaPersistentType().getMapping(); - BasicMapping idMapping = (BasicMapping) mappedSuperclass.persistentType().attributeNamed("id").getMapping(); + BasicMapping idMapping = (BasicMapping) mappedSuperclass.getPersistentType().attributeNamed("id").getMapping(); idMapping.getColumn().setSpecifiedName("FOO"); idMapping.getColumn().setSpecifiedTable("BAR"); diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentAttributeTests.java index 61e9a0e0fe..aeb24183c4 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentAttributeTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentAttributeTests.java @@ -127,10 +127,10 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase PersistentAttribute persistentAttribute = javaPersistentType().attributes().next(); - assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); persistentAttribute.setSpecifiedMappingKey(null); - assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); } public void testDefaultMappingKey() throws Exception { @@ -139,8 +139,8 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase PersistentAttribute persistentAttribute = javaPersistentType().attributes().next(); - assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); - assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, persistentAttribute.defaultMappingKey()); + assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); + assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getDefaultMappingKey()); } public void testSetSpecifiedMappingKey() throws Exception { @@ -157,7 +157,7 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase assertNotNull(attributeResource.mappingAnnotation()); assertTrue(attributeResource.mappingAnnotation() instanceof Embedded); - assertEquals(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); assertTrue(persistentAttribute.getSpecifiedMapping() instanceof JavaEmbeddedMapping); } @@ -166,7 +166,7 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = javaPersistentType().attributes().next(); - assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); persistentAttribute.setSpecifiedMappingKey(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY); @@ -175,7 +175,7 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase assertNotNull(attributeResource.mappingAnnotation()); assertTrue(attributeResource.mappingAnnotation() instanceof Embedded); - assertEquals(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); assertTrue(persistentAttribute.getSpecifiedMapping() instanceof JavaEmbeddedMapping); } @@ -184,7 +184,7 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = javaPersistentType().attributes().next(); - assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); persistentAttribute.setSpecifiedMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY); @@ -201,13 +201,13 @@ public class JavaPersistentAttributeTests extends ContextModelTestCase addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = javaPersistentType().attributes().next(); - assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); JavaResourcePersistentType typeResource = jpaProject().javaPersistentTypeResource(FULLY_QUALIFIED_TYPE_NAME); JavaResourcePersistentAttribute attributeResource = typeResource.attributes().next(); attributeResource.setMappingAnnotation(Embedded.ANNOTATION_NAME); - assertEquals(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY, persistentAttribute.mappingKey()); + assertEquals(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey()); } public void testGetMappingKeyMappingChangeInResourceModel2() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentTypeTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentTypeTests.java index 602520e4bc..49847c5b56 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentTypeTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaPersistentTypeTests.java @@ -237,28 +237,28 @@ public class JavaPersistentTypeTests extends ContextModelTestCase createTestType(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(AccessType.FIELD, javaPersistentType().access()); + assertEquals(AccessType.FIELD, javaPersistentType().getAccess()); } public void testAccessField() throws Exception { createTestEntityAnnotatedField(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(AccessType.FIELD, javaPersistentType().access()); + assertEquals(AccessType.FIELD, javaPersistentType().getAccess()); } public void testAccessProperty() throws Exception { createTestEntityAnnotatedMethod(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(AccessType.PROPERTY, javaPersistentType().access()); + assertEquals(AccessType.PROPERTY, javaPersistentType().getAccess()); } public void testAccessFieldAndMethodAnnotated() throws Exception { createTestEntityAnnotatedFieldAndMethod(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(AccessType.FIELD, javaPersistentType().access()); + assertEquals(AccessType.FIELD, javaPersistentType().getAccess()); } public void testAccessInheritance() throws Exception { @@ -275,7 +275,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = classRef.getJavaPersistentType(); assertEquals(PACKAGE_NAME + ".AnnotationTestTypeChild", javaPersistentType.getName()); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } public void testAccessInheritance2() throws Exception { @@ -292,7 +292,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = classRef.getJavaPersistentType(); assertEquals(PACKAGE_NAME + ".AnnotationTestTypeChild", javaPersistentType.getName()); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); } public void testAccessInheritance3() throws Exception { @@ -309,7 +309,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = classRef.getJavaPersistentType(); assertEquals(PACKAGE_NAME + ".AnnotationTestTypeChild", javaPersistentType.getName()); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } public void testAccessInheritance4() throws Exception { @@ -326,7 +326,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase assertEquals(PACKAGE_NAME + ".AnnotationTestTypeChild", javaPersistentType.getName()); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); } //inherited class having annotations set wins over the default access set on persistence-unit-defaults @@ -345,7 +345,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase assertEquals(PACKAGE_NAME + ".AnnotationTestTypeChild", javaPersistentType.getName()); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } public void testAccessXmlNoAccessNoAnnotations() throws Exception { @@ -353,7 +353,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase createTestEntity(); JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); } public void testAccessXmlEntityAccessNoAnnotations() throws Exception { @@ -362,10 +362,10 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); entityPersistentType.getMapping().setSpecifiedAccess(AccessType.FIELD); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); entityPersistentType.getMapping().setSpecifiedAccess(AccessType.PROPERTY); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } public void testAccessXmlPersistenceUnitDefaultsAccessNoAnnotations() throws Exception { @@ -374,10 +374,10 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); entityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); entityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } public void testAccessXmlEntityPropertyAccessAndFieldAnnotations() throws Exception { @@ -387,7 +387,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); entityPersistentType.getMapping().setSpecifiedAccess(AccessType.PROPERTY); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } public void testAccessXmlEntityFieldAccessAndPropertyAnnotations() throws Exception { @@ -397,7 +397,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); entityPersistentType.getMapping().setSpecifiedAccess(AccessType.FIELD); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); } public void testAccessXmlPersistenceUnitDefaultsAccessFieldAnnotations() throws Exception { @@ -406,7 +406,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); entityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); } //inheritance wins over entity-mappings specified access @@ -419,8 +419,8 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType childJavaPersistentType = childEntityPersistentType.javaPersistentType(); entityMappings().setSpecifiedAccess(AccessType.FIELD); - assertEquals(AccessType.PROPERTY, entityPersistentType.javaPersistentType().access()); - assertEquals(AccessType.PROPERTY, childJavaPersistentType.access()); + assertEquals(AccessType.PROPERTY, entityPersistentType.javaPersistentType().getAccess()); + assertEquals(AccessType.PROPERTY, childJavaPersistentType.getAccess()); } public void testAccessXmlMetadataCompleteFieldAnnotations() throws Exception { @@ -432,7 +432,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase entityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY); entityMappings().getPersistenceUnitMetadata().setXmlMappingMetadataComplete(true); - assertEquals(AccessType.PROPERTY, javaPersistentType.access()); + assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess()); } @@ -444,7 +444,7 @@ public class JavaPersistentTypeTests extends ContextModelTestCase JavaPersistentType javaPersistentType = entityPersistentType.javaPersistentType(); entityMappings().getPersistenceUnitMetadata().setXmlMappingMetadataComplete(true); - assertEquals(AccessType.FIELD, javaPersistentType.access()); + assertEquals(AccessType.FIELD, javaPersistentType.getAccess()); } public void testParentPersistentType() throws Exception { @@ -553,21 +553,21 @@ public class JavaPersistentTypeTests extends ContextModelTestCase createTestEntityAnnotatedMethod(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testMappingKeyNull() throws Exception { createTestType(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testSetMappingKey() throws Exception { createTestType(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); javaPersistentType().setMappingKey(MappingKeys.ENTITY_TYPE_MAPPING_KEY); @@ -575,14 +575,14 @@ public class JavaPersistentTypeTests extends ContextModelTestCase assertNotNull(typeResource.mappingAnnotation()); assertTrue(typeResource.mappingAnnotation() instanceof EntityAnnotation); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testSetMappingKey2() throws Exception { createTestEntityAnnotatedField(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); javaPersistentType().setMappingKey(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY); @@ -590,14 +590,14 @@ public class JavaPersistentTypeTests extends ContextModelTestCase assertNotNull(typeResource.mappingAnnotation()); assertTrue(typeResource.mappingAnnotation() instanceof EmbeddableAnnotation); - assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testSetMappingKeyNull() throws Exception { createTestEntityAnnotatedMethod(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); javaPersistentType().setMappingKey(MappingKeys.NULL_TYPE_MAPPING_KEY); @@ -605,31 +605,31 @@ public class JavaPersistentTypeTests extends ContextModelTestCase assertNull(typeResource.mappingAnnotation()); assertNull(typeResource.mappingAnnotation(EntityAnnotation.ANNOTATION_NAME)); - assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testGetMappingKeyMappingChangeInResourceModel() throws Exception { createTestEntityAnnotatedField(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); JavaResourcePersistentType typeResource = jpaProject().javaPersistentTypeResource(FULLY_QUALIFIED_TYPE_NAME); typeResource.setMappingAnnotation(EmbeddableAnnotation.ANNOTATION_NAME); - assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testGetMappingKeyMappingChangeInResourceModel2() throws Exception { createTestType(); addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); - assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); JavaResourcePersistentType typeResource = jpaProject().javaPersistentTypeResource(FULLY_QUALIFIED_TYPE_NAME); typeResource.setMappingAnnotation(EntityAnnotation.ANNOTATION_NAME); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, javaPersistentType().getMappingKey()); } public void testIsMapped() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaSecondaryTableTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaSecondaryTableTests.java index ca6d53be95..fa710d0f19 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaSecondaryTableTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/java/JavaSecondaryTableTests.java @@ -366,7 +366,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase assertEquals("id", defaultPkJoinColumn.getDefaultReferencedColumnName()); - IdMapping idMapping = (IdMapping) javaEntity().persistentType().attributeNamed("id").getMapping(); + IdMapping idMapping = (IdMapping) javaEntity().getPersistentType().attributeNamed("id").getMapping(); idMapping.getColumn().setSpecifiedName("FOO"); assertEquals("FOO", defaultPkJoinColumn.getDefaultName()); assertEquals("FOO", defaultPkJoinColumn.getDefaultReferencedColumnName()); diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddableTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddableTests.java index 929dac2e11..c1f8207037 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddableTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddableTests.java @@ -246,8 +246,8 @@ public class OrmEmbeddableTests extends ContextModelTestCase assertEquals(AccessType.PROPERTY, ormEntity.getSpecifiedAccess()); ListIterator<OrmPersistentType> persistentTypes = entityMappings().ormPersistentTypes(); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); - assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); + assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); } public void testMakeEmbeddableMappedSuperclass() throws Exception { @@ -290,8 +290,8 @@ public class OrmEmbeddableTests extends ContextModelTestCase assertEquals(AccessType.PROPERTY, ormMappedSuperclass.getSpecifiedAccess()); ListIterator<OrmPersistentType> persistentTypes = entityMappings().ormPersistentTypes(); - assertEquals(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); - assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); + assertEquals(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); + assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); } }
\ No newline at end of file diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmMappedSuperclassTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmMappedSuperclassTests.java index 760443b2fa..176aa0c4b3 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmMappedSuperclassTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmMappedSuperclassTests.java @@ -250,8 +250,8 @@ public class OrmMappedSuperclassTests extends ContextModelTestCase assertEquals(AccessType.PROPERTY, ormEntity.getSpecifiedAccess()); ListIterator<OrmPersistentType> persistentTypes = entityMappings().ormPersistentTypes(); - assertEquals(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); - assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); + assertEquals(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); + assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); } public void testMakeMappedSuperclassEmbeddable() throws Exception { @@ -293,8 +293,8 @@ public class OrmMappedSuperclassTests extends ContextModelTestCase assertEquals(AccessType.PROPERTY, ormEmbeddable.getSpecifiedAccess()); ListIterator<OrmPersistentType> persistentTypes = entityMappings().ormPersistentTypes(); - assertEquals(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); - assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, persistentTypes.next().mappingKey()); + assertEquals(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); + assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, persistentTypes.next().getMappingKey()); } public void testUpdateIdClass() throws Exception { |