public static List<Entry<String, Object>> getKeyValueList( Object obj, boolean fulltextIndex ) { return getKeyValueList( null, obj, fulltextIndex ); }
public MessageIndexUpdate( Message message ) { this.message = message; if ( message.isIndexed() ) { propertyEntryList = new HashMap<String, List<Map.Entry<String, Object>>>(); for ( Map.Entry<String, Object> property : message.getProperties().entrySet() ) { if ( !MESSAGE_PROPERTIES.containsKey( property.getKey() ) && validIndexableValueOrJson( property.getValue() ) ) { List<Map.Entry<String, Object>> list = getKeyValueList( property.getKey(), property.getValue(), FULLTEXT ); propertyEntryList.put( property.getKey(), list ); } } } else { propertyEntryList = null; } }
public void dumpJson( String path, Object json ) { List<Map.Entry<String, Object>> list = IndexUtils.getKeyValueList( path, json, true ); for ( Map.Entry<String, Object> e : list ) { logger.info( e.getKey() + " = " + e.getValue() ); } }
@Test public void testKeyValue() throws Exception { User user = new User(); user.setUsername( "edanuff" ); user.setEmail( "ed@anuff.com" ); Activity activity = Activity.newActivity( Activity.VERB_POST, null, "I ate another sammich", null, user, null, "tweet", null, null ); List<Entry<String, Object>> l = IndexUtils.getKeyValueList( activity, false ); for ( Entry<String, Object> e : l ) { logger.info( e.getKey() + " = " + e.getValue() ); } assertEquals( 7, l.size() ); } }
List<Map.Entry<String, Object>> list = getKeyValueList( entryName, entryValue, false );