Skip to content

Commit

Permalink
OGM-1050 Fixing various typos noted while reading the code
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet authored and gunnarmorling committed May 12, 2016
1 parent 1c52e3b commit 4d8824b
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
Expand Up @@ -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.
*/
Expand All @@ -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<String, String> getAllRoles();

Expand Down
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -77,7 +77,7 @@ protected Type getPropertyType(String entityType, List<String> propertyPath) {
return propertyType;
}
else if ( propertyType.isComponentType() ) {
// Embeddded property
// Embedded property
return getComponentPropertyType( propertyType, pathIterator );
}
else if ( propertyType.isAssociationType() ) {
Expand Down Expand Up @@ -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<String> namesWithoutAlias) {
Expand Down Expand Up @@ -216,7 +216,7 @@ protected String getColumn(OgmEntityPersister persister, List<String> propertyPa
return persister.getPropertyColumnNames( propertyName )[0];
}
else if ( propertyType.isComponentType() ) {
// Embeddded property
// Embedded property
String componentPropertyName = StringHelper.join( propertyPath, "." );
return persister.getPropertyColumnNames( componentPropertyName )[0];
}
Expand All @@ -227,15 +227,15 @@ 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();
}
}
}
throw new UnsupportedOperationException( "Unrecognized property type: " + propertyType );
}

private void appendComponenCollectionPath(StringBuilder columnNameBuilder, OgmCollectionPersister persister, Iterator<String> pathIterator) {
private void appendComponentCollectionPath(StringBuilder columnNameBuilder, OgmCollectionPersister persister, Iterator<String> pathIterator) {
if ( pathIterator.hasNext() ) {
String property = pathIterator.next();
Type subType = componentPropertyType( (ComponentType) persister.getType(), property );
Expand Down
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/jbossts-properties.xml
Expand Up @@ -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.
-->
Expand Down
Expand Up @@ -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.
-->
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -91,7 +91,7 @@ public boolean isIdProperty(String entityType, List<String> 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<String> namesWithoutAlias) {
Expand Down

0 comments on commit 4d8824b

Please sign in to comment.