@Test public void testGetValueMetaName() { assertEquals( "-", ValueMetaFactory.getValueMetaName( Integer.MIN_VALUE ) ); assertEquals( "None", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_NONE ) ); assertEquals( "Number", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_NUMBER ) ); assertEquals( "String", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_STRING ) ); assertEquals( "Date", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_DATE ) ); assertEquals( "Boolean", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_BOOLEAN ) ); assertEquals( "Integer", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_INTEGER ) ); assertEquals( "BigNumber", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_BIGNUMBER ) ); assertEquals( "Serializable", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_SERIALIZABLE ) ); assertEquals( "Binary", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_BINARY ) ); assertEquals( "Timestamp", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_TIMESTAMP ) ); assertEquals( "Internet Address", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_INET ) ); }
public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; } }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; }  }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; }  static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ); static ValueMetaInterface createValueMeta( String name, int type ); static ValueMetaInterface createValueMeta( int type ); static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ); static ValueMetaInterface cloneValueMeta( ValueMetaInterface source, int targetType ); static String[] getValueMetaNames(); static String[] getAllValueMetaNames(); static String getValueMetaName( int type ); static int getIdForValueMeta( String valueMetaName ); static List<ValueMetaInterface> getValueMetaPluginClasses(); static ValueMetaInterface guessValueMetaInterface( Object object ); }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; }  static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ); static ValueMetaInterface createValueMeta( String name, int type ); static ValueMetaInterface createValueMeta( int type ); static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ); static ValueMetaInterface cloneValueMeta( ValueMetaInterface source, int targetType ); static String[] getValueMetaNames(); static String[] getAllValueMetaNames(); static String getValueMetaName( int type ); static int getIdForValueMeta( String valueMetaName ); static List<ValueMetaInterface> getValueMetaPluginClasses(); static ValueMetaInterface guessValueMetaInterface( Object object ); static PluginRegistry pluginRegistry; }