public String showConverters() { Converter[] cs = config.getConverters().getConverters(); String[] names = new String[cs.length]; for (int i = 0; i < cs.length; i++) names[i] = cs[i].getClass().getName(); return MBeanUtil.format(names); }
Converters converters = config.getConverters();
Converters converters = config.getConverters();
public HibernateProxy getProxyInstance(String persistentClassName, String entityName, Serializable id) { try { // Get ProxyFactory. Class<?> persistentClass = TypeUtil.forName(persistentClassName); Class<?> factory = (Class<?>)getProxyFactory.invoke(null, new Object[] { persistentClass, INTERFACES }); // Convert id (if necessary). Object[] identifierInfo = getIdentifierInfo(persistentClass); Type identifierType = (Type)identifierInfo[0]; Method identifierGetter = (Method)identifierInfo[1]; if (id == null || !identifierType.equals(id.getClass())) { GraniteConfig config = GraniteContext.getCurrentInstance().getGraniteConfig(); id = (Serializable)config.getConverters().convert(id, identifierType); } // Get Proxy (with or without the extra parameter classOverridesEquals) if (classOverridesEqualsParameter) { return (HibernateProxy)getProxy.invoke(null, new Object[]{ factory, entityName, persistentClass, INTERFACES, identifierGetter, null, null, id, null, overridesEquals(persistentClass)}); } return (HibernateProxy)getProxy.invoke(null, new Object[] { factory, entityName, persistentClass, INTERFACES, identifierGetter, null, null, id, null }); } catch (Exception e) { throw new ServiceException("Error with proxy description: " + persistentClassName + '/' + entityName + " and id: " + id, e); } }
protected JavaClassDescriptor(Class<?> type) { GraniteConfig config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = config.getExternalizer(type.getName()); this.converters = config.getConverters(); this.encoding = findEncoding(type); this.properties = introspectProperties(); }
protected ActionScriptClassDescriptor(String type, byte encoding) { GraniteConfig config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = (type == null ? "" : config.getAliasRegistry().getTypeForAlias(type)); this.instantiator = config.getInstantiator(type); this.encoding = encoding; this.externalizer = findExternalizer(); this.converters = config.getConverters(); this.properties = new ArrayList<Property>(); }
Converters converters = GraniteContext.getCurrentInstance().getGraniteConfig().getConverters();