From 4d8824b73186960773cd01dc9633dbef6a8c53cd Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 12 May 2016 16:05:08 +0200 Subject: [PATCH] OGM-1050 Fixing various typos noted while reading the code --- .../org/hibernate/ogm/dialect/spi/TupleContext.java | 4 ++-- .../java/org/hibernate/ogm/loader/impl/OgmLoader.java | 4 ++-- .../ogm/query/parsing/impl/ParserPropertyHelper.java | 10 +++++----- .../ogm/backendtck/queries/JpaQueriesTest.java | 4 ++-- core/src/test/resources/jbossts-properties.xml | 2 +- .../src/main/resources/jbossts-properties.xml | 2 +- .../src/main/asciidoc/en-US/modules/neo4j.asciidoc | 2 +- .../neo4j/dialect/impl/Neo4jEntityQueries.java | 2 +- .../neo4j/query/parsing/impl/Neo4jPropertyHelper.java | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/org/hibernate/ogm/dialect/spi/TupleContext.java b/core/src/main/java/org/hibernate/ogm/dialect/spi/TupleContext.java index 685fd45443..7c744aabc5 100644 --- a/core/src/main/java/org/hibernate/ogm/dialect/spi/TupleContext.java +++ b/core/src/main/java/org/hibernate/ogm/dialect/spi/TupleContext.java @@ -58,7 +58,7 @@ public interface TupleContext { AssociatedEntityKeyMetadata getAssociatedEntityKeyMetadata(String column); /** - * Get the the meta-data of all the associated entities keys + * Get the meta-data of all the associated entities keys * * @return the meta-data about all the *-to-one associations represented in a given tuple, keyed by column name. */ @@ -75,7 +75,7 @@ public interface TupleContext { /** * Get all the roles * - * @return the the roles, keyed by column name. + * @return the roles, keyed by column name. */ Map getAllRoles(); diff --git a/core/src/main/java/org/hibernate/ogm/loader/impl/OgmLoader.java b/core/src/main/java/org/hibernate/ogm/loader/impl/OgmLoader.java index 0475fa2165..c4a0b61083 100644 --- a/core/src/main/java/org/hibernate/ogm/loader/impl/OgmLoader.java +++ b/core/src/main/java/org/hibernate/ogm/loader/impl/OgmLoader.java @@ -1166,7 +1166,7 @@ private void loadFromResultSet( ); if ( persister.hasRowId() ) { - throw new HibernateException( "Hibernate OGM does nto support row id"); + throw new HibernateException( "Hibernate OGM does not support row id"); } final Object rowId = null; @@ -1218,7 +1218,7 @@ protected boolean upgradeLocks() { /** * For missing objects associated by one-to-one with another object in the - * result set, register the fact that the the object is missing with the + * result set, register the fact that the object is missing with the * session. * * copied form Loader#registerNonExists diff --git a/core/src/main/java/org/hibernate/ogm/query/parsing/impl/ParserPropertyHelper.java b/core/src/main/java/org/hibernate/ogm/query/parsing/impl/ParserPropertyHelper.java index b4f82aa20f..fd109173ae 100644 --- a/core/src/main/java/org/hibernate/ogm/query/parsing/impl/ParserPropertyHelper.java +++ b/core/src/main/java/org/hibernate/ogm/query/parsing/impl/ParserPropertyHelper.java @@ -77,7 +77,7 @@ protected Type getPropertyType(String entityType, List propertyPath) { return propertyType; } else if ( propertyType.isComponentType() ) { - // Embeddded property + // Embedded property return getComponentPropertyType( propertyType, pathIterator ); } else if ( propertyType.isAssociationType() ) { @@ -129,7 +129,7 @@ protected OgmEntityPersister getPersister(String entityType) { * Checks if the path leads to an embedded property or association. * * @param targetTypeName the entity with the property - * @param namesWithoutAlias the path to the the property with all the aliases resolved + * @param namesWithoutAlias the path to the property with all the aliases resolved * @return {@code true} if the property is an embedded, {@code false} otherwise. */ public boolean isEmbeddedProperty(String targetTypeName, List namesWithoutAlias) { @@ -216,7 +216,7 @@ protected String getColumn(OgmEntityPersister persister, List propertyPa return persister.getPropertyColumnNames( propertyName )[0]; } else if ( propertyType.isComponentType() ) { - // Embeddded property + // Embedded property String componentPropertyName = StringHelper.join( propertyPath, "." ); return persister.getPropertyColumnNames( componentPropertyName )[0]; } @@ -227,7 +227,7 @@ else if ( propertyType.isAssociationType() ) { if ( collectionPersister.getType().isComponentType() ) { StringBuilder columnNameBuilder = new StringBuilder( ); // Collection of embeddables - appendComponenCollectionPath( columnNameBuilder, collectionPersister, pathIterator ); + appendComponentCollectionPath( columnNameBuilder, collectionPersister, pathIterator ); return columnNameBuilder.toString(); } } @@ -235,7 +235,7 @@ else if ( propertyType.isAssociationType() ) { throw new UnsupportedOperationException( "Unrecognized property type: " + propertyType ); } - private void appendComponenCollectionPath(StringBuilder columnNameBuilder, OgmCollectionPersister persister, Iterator pathIterator) { + private void appendComponentCollectionPath(StringBuilder columnNameBuilder, OgmCollectionPersister persister, Iterator pathIterator) { if ( pathIterator.hasNext() ) { String property = pathIterator.next(); Type subType = componentPropertyType( (ComponentType) persister.getType(), property ); diff --git a/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java b/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java index 7444323755..198a8e83bd 100644 --- a/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java +++ b/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java @@ -122,7 +122,7 @@ public void testCreateNamedQueryTypeQuery() throws Exception { } @Test(expected = IllegalArgumentException.class) - public void testCreateNamedQueryTypeQueryWithWronReturnedClass() throws Exception { + public void testCreateNamedQueryTypeQueryWithWrongReturnedClass() throws Exception { em.createNamedQuery( Helicopter.BY_NAME, Hypothesis.class ) .setParameter( "name", POLICE_HELICOPTER ) .getSingleResult(); @@ -152,7 +152,7 @@ public void populateDb() throws Exception { @After public void closeEmAndRemoveEntities() throws Exception { - //Do not hide the real cause with an NPE if there are initialisation issues: + //Do not hide the real cause with an NPE if there are initialization issues: if ( em != null ) { em.getTransaction().commit(); removeEntities(); diff --git a/core/src/test/resources/jbossts-properties.xml b/core/src/test/resources/jbossts-properties.xml index c15ee38632..da4b66dc53 100644 --- a/core/src/test/resources/jbossts-properties.xml +++ b/core/src/test/resources/jbossts-properties.xml @@ -69,7 +69,7 @@ (which is needed in order to support multiple instances on the same machine). Use the value 0 to allow the system to select the first available port number. If the port number is non-zero and the port is in use then the value will be incremented until either a successful binding - to the loopback address is created or until the the maximum number of ports (specified by the + to the loopback address is created or until the maximum number of ports (specified by the CoreEnvironmentBean.socketProcessIdMaxPorts property) have been tried or until the port number reaches the maximum possible port number. --> diff --git a/documentation/examples/gettingstarted/src/main/resources/jbossts-properties.xml b/documentation/examples/gettingstarted/src/main/resources/jbossts-properties.xml index 96b00b04c1..10c03579fb 100644 --- a/documentation/examples/gettingstarted/src/main/resources/jbossts-properties.xml +++ b/documentation/examples/gettingstarted/src/main/resources/jbossts-properties.xml @@ -69,7 +69,7 @@ (which is needed in order to support multiple instances on the same machine). Use the value 0 to allow the system to select the first available port number. If the port number is non-zero and the port is in use then the value will be incremented until either a successful binding - to the loopback address is created or until the the maximum number of ports (specified by the + to the loopback address is created or until the maximum number of ports (specified by the CoreEnvironmentBean.socketProcessIdMaxPorts property) have been tried or until the port number reaches the maximum possible port number. --> diff --git a/documentation/manual/src/main/asciidoc/en-US/modules/neo4j.asciidoc b/documentation/manual/src/main/asciidoc/en-US/modules/neo4j.asciidoc index c5e0dd79e8..5b6e9d6faa 100644 --- a/documentation/manual/src/main/asciidoc/en-US/modules/neo4j.asciidoc +++ b/documentation/manual/src/main/asciidoc/en-US/modules/neo4j.asciidoc @@ -222,7 +222,7 @@ image::neo4j-@EmbeddedId-example.png[align="center", depth="", scalefit="1"] Embedded elements are stored as separate nodes labeled with `EMBEDDED`. -The the type of the relationship that connects the entity node to the embedded node is +The type of the relationship that connects the entity node to the embedded node is the attribute name representing the embedded in the java class. .Embedded object diff --git a/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/Neo4jEntityQueries.java b/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/Neo4jEntityQueries.java index 650d1f23b4..a160a91aaf 100644 --- a/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/Neo4jEntityQueries.java +++ b/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/Neo4jEntityQueries.java @@ -271,7 +271,7 @@ private static String initRemoveEntityQuery(EntityKeyMetadata entityKeyMetadata) * @param executionEngine the queries executor * @param columnValues the values for the entity key column names of the owner node * @param role the relationship type mapping the role of the association - * @return an iterator on the the results + * @return an iterator on the results */ // We should move this in Neo4jAssociationQueries but, at the moment, having a query that only requires an EntityKeyMetadata make it easier // to deal with the *ToOne scenario diff --git a/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java b/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java index 9870ee5495..07a69eac48 100644 --- a/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java +++ b/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java @@ -91,7 +91,7 @@ public boolean isIdProperty(String entityType, List propertyPath) { * Check if the property is part of the identifier of the entity. * * @param persister the {@link OgmEntityPersister} of the entity with the property - * @param namesWithoutAlias the path to the the property with all the aliases resolved + * @param namesWithoutAlias the path to the property with all the aliases resolved * @return {@code true} if the property is part of the id, {@code false} otherwise. */ public boolean isIdProperty(OgmEntityPersister persister, List namesWithoutAlias) {