private static String initMultiGetEntitiesQuery(EntityKeyMetadata entityKeyMetadata, boolean includeEmbedded) {
		StringBuilder queryBuilder = new StringBuilder( "MATCH " );
		queryBuilder.append( "(" );
		queryBuilder.append( ENTITY_ALIAS );
		queryBuilder.append( ":" );
		queryBuilder.append( ENTITY );
		queryBuilder.append( ":" );
		appendLabel( entityKeyMetadata, queryBuilder );
		queryBuilder.append( ") " );
		queryBuilder.append( " WHERE " );
		if ( entityKeyMetadata.getColumnNames().length == 1 ) {
			queryBuilder.append( ENTITY_ALIAS );
			queryBuilder.append( "." );
			escapeIdentifier( queryBuilder, entityKeyMetadata.getColumnNames()[0] );
			queryBuilder.append( " IN {0}" );
			appendGetEmbeddedNodesIfNeeded( includeEmbedded, queryBuilder );
		}
		return queryBuilder.toString();
	}
private static String initMultiGetEntitiesQuery ( EntityKeyMetadata entityKeyMetadata , boolean includeEmbedded ) { StringBuilder queryBuilder = new StringBuilder ( "MATCH " ) ; queryBuilder . append ( "(" ) ; queryBuilder . append ( ENTITY_ALIAS ) ; queryBuilder . append ( ":" ) ; queryBuilder . append ( ENTITY ) ; queryBuilder . append ( ":" ) ; appendLabel ( entityKeyMetadata , queryBuilder ) ; queryBuilder . append ( ") " ) ; queryBuilder . append ( " WHERE " ) ; if ( entityKeyMetadata . getColumnNames ( ) . length == 1 ) { queryBuilder . append ( ENTITY_ALIAS ) ; queryBuilder . append ( "." ) ; escapeIdentifier ( queryBuilder , entityKeyMetadata . getColumnNames ( ) [ 0 ] ) ; queryBuilder . append ( " IN {0}" ) ; appendGetEmbeddedNodesIfNeeded ( includeEmbedded , queryBuilder ) ; } return queryBuilder . toString ( ) ; }
/*
This method will initialize the query string for a multi get.
The query is different in the two scenarios:
1) the id is mapped on a single property:

MATCH (n:ENTITY:table)
WHERE n.id IN {0}
RETURN n

2) id is mapped on multiple columns:

MATCH (n:ENTITY:table)
WHERE

In this case the query depends on how many id we are retrieving and it will be completed later