@Test public void testCreateContextName() throws Exception { final ApplicationScopeImpl applicationScope = new ApplicationScopeImpl( new SimpleId( "application" ) ); final SearchEdgeImpl searchEdge = new SearchEdgeImpl( new SimpleId( "source" ), "users", SearchEdge.NodeType.TARGET ); final String output = IndexingUtils.createContextName( applicationScope, searchEdge ); final String expected = "appId(" + applicationScope.getApplication().getUuid() + ",application).nodeId(" + searchEdge.getNodeId() .getUuid() + "," + searchEdge.getNodeId().getType() + ").edgeName(users)"; assertEquals( output, expected ); }
public static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ) { StringBuilder sb = new StringBuilder(); idString( sb, APPID_NAME, applicationScope.getApplication() ); sb.append( FIELD_SEPERATOR ); idString( sb, NODEID_NAME, scope.getNodeId() ); sb.append( FIELD_SEPERATOR ); appendField( sb, EDGE_NAME, scope.getEdgeName() ); return sb.toString(); }
IndexingUtils { public static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ) { StringBuilder sb = new StringBuilder(); idString( sb, APPID_NAME, applicationScope.getApplication() ); sb.append( FIELD_SEPERATOR ); idString( sb, NODEID_NAME, scope.getNodeId() ); sb.append( FIELD_SEPERATOR ); appendField( sb, EDGE_NAME, scope.getEdgeName() ); return sb.toString(); } }
IndexingUtils { public static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ) { StringBuilder sb = new StringBuilder(); idString( sb, APPID_NAME, applicationScope.getApplication() ); sb.append( FIELD_SEPERATOR ); idString( sb, NODEID_NAME, scope.getNodeId() ); sb.append( FIELD_SEPERATOR ); appendField( sb, EDGE_NAME, scope.getEdgeName() ); return sb.toString(); }  }
IndexingUtils { public static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ) { StringBuilder sb = new StringBuilder(); idString( sb, APPID_NAME, applicationScope.getApplication() ); sb.append( FIELD_SEPERATOR ); idString( sb, NODEID_NAME, scope.getNodeId() ); sb.append( FIELD_SEPERATOR ); appendField( sb, EDGE_NAME, scope.getEdgeName() ); return sb.toString(); }  static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ); static String createIndexDocId( final ApplicationScope applicationScope, final Entity entity,
                                           final IndexEdge indexEdge ); static String createIndexDocId( final ApplicationScope applicationScope, final Id entityId,
                                           final UUID version, final SearchEdge searchEdge ); static final String entityId( final Id id ); static final String applicationId( final Id id ); static final String nodeId( final Id id ); static CandidateResult parseIndexDocId( final SearchHit hit ); static CandidateResult parseIndexDocId( final SearchHit hit, boolean hasGeoSortPredicates ); static CandidateResult parseIndexDocId( final String documentId ); static CandidateResult parseIndexDocId( final String documentId, final double distance ); static UUID parseAppIdFromIndexDocId( final String documentId); static String getType( ApplicationScope applicationScope, Id entityId ); static String getType( ApplicationScope applicationScope, String type ); static UUID getApplicationIdFromIndexDocId(String documentId); }
IndexingUtils { public static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ) { StringBuilder sb = new StringBuilder(); idString( sb, APPID_NAME, applicationScope.getApplication() ); sb.append( FIELD_SEPERATOR ); idString( sb, NODEID_NAME, scope.getNodeId() ); sb.append( FIELD_SEPERATOR ); appendField( sb, EDGE_NAME, scope.getEdgeName() ); return sb.toString(); }  static String createContextName( final ApplicationScope applicationScope, final SearchEdge scope ); static String createIndexDocId( final ApplicationScope applicationScope, final Entity entity,
                                           final IndexEdge indexEdge ); static String createIndexDocId( final ApplicationScope applicationScope, final Id entityId,
                                           final UUID version, final SearchEdge searchEdge ); static final String entityId( final Id id ); static final String applicationId( final Id id ); static final String nodeId( final Id id ); static CandidateResult parseIndexDocId( final SearchHit hit ); static CandidateResult parseIndexDocId( final SearchHit hit, boolean hasGeoSortPredicates ); static CandidateResult parseIndexDocId( final String documentId ); static CandidateResult parseIndexDocId( final String documentId, final double distance ); static UUID parseAppIdFromIndexDocId( final String documentId); static String getType( ApplicationScope applicationScope, Id entityId ); static String getType( ApplicationScope applicationScope, String type ); static UUID getApplicationIdFromIndexDocId(String documentId); static final String UUID_REX; static final String TYPE_REX; static final String FIELD_SEPERATOR; static final String ID_SEPERATOR; static final String ES_ENTITY_TYPE; static final String APPLICATION_ID_FIELDNAME; static final String ENTITY_ID_FIELDNAME; static final String ENTITY_SIZE_FIELDNAME; static final String ENTITY_VERSION_FIELDNAME; static final String ENTITY_TYPE_FIELDNAME; static final String EDGE_NODE_ID_FIELDNAME; static final String EDGE_NAME_FIELDNAME; static final String EDGE_NODE_TYPE_FIELDNAME; static final String EDGE_TIMESTAMP_FIELDNAME; static final String EDGE_SEARCH_FIELDNAME; static final String ENTITY_FIELDS; static final String FIELD_NAME; static final String FIELD_BOOLEAN; static final String FIELD_LONG; static final String FIELD_DOUBLE; static final String FIELD_LOCATION; static final String FIELD_STRING; static final String FIELD_UUID; static final String FIELD_NULL; static final String FIELD_NAME_NESTED; static final String FIELD_BOOLEAN_NESTED; static final String FIELD_LONG_NESTED; static final String FIELD_DOUBLE_NESTED; static final String FIELD_LOCATION_NESTED; static final String FIELD_STRING_NESTED; static final String FIELD_UUID_NESTED; static final String FIELD_STRING_NESTED_UNANALYZED; }