/** * Add a Velocity Runtime property. * * @param key * @param value */ public void addProperty(String key, Object value) { ri.addProperty(key,value); }
/** * Add a Velocity Runtime property. * * @param key * @param value */ public void addProperty(String key, Object value) { ri.addProperty(key, value); }
/** * Add a Velocity Runtime property. * * @param String key * @param Object value */ public void addProperty(String key, Object value) { ri.addProperty(key,value); }
/** * Add a Velocity Runtime property. * * @param key * @param value */ public void addProperty(String key, Object value) { ri.addProperty(key,value); }
/** * Add a property to the configuration. If it already * exists then the value stated here will be added * to the configuration entry. For example, if * * resource.loader = file * * is already present in the configuration and you * * addProperty("resource.loader", "classpath") * * Then you will end up with a Vector like the * following: * * ["file", "classpath"] * * @param String key * @param String value */ public static void addProperty(String key, Object value) { ri.addProperty( key, value ); }
/** * Add a property to the configuration. If it already * exists then the value stated here will be added * to the configuration entry. For example, if * * resource.loader = file * * is already present in the configuration and you * * addProperty("resource.loader", "classpath") * * Then you will end up with a Vector like the * following: * * ["file", "classpath"] * * @param key * @param value * @see RuntimeInstance#addProperty(String, Object) */ public static void addProperty(String key, Object value) { ri.addProperty(key, value); }
/** * Add a property to the configuration. If it already * exists then the value stated here will be added * to the configuration entry. For example, if * * resource.loader = file * * is already present in the configuration and you * * addProperty("resource.loader", "classpath") * * Then you will end up with a Vector like the * following: * * ["file", "classpath"] * * @param key * @param value * @see RuntimeInstance#addProperty(String, Object) */ public static void addProperty(String key, Object value) { ri.addProperty( key, value ); }
/** * Add a property to the configuration. If it already * exists then the value stated here will be added * to the configuration entry. For example, if * * resource.loader = file * * is already present in the configuration and you * * addProperty("resource.loader", "classpath") * * Then you will end up with a Vector like the * following: * * ["file", "classpath"] * * @param key * @param value * @see RuntimeInstance#addProperty(String, Object) */ public static void addProperty(String key, Object value) { ri.addProperty( key, value ); }
public VelocitySQLTemplateProcessor() { this.renderingUtils = new SQLTemplateRenderingUtils(); this.velocityRuntime = new RuntimeInstance(); // set null logger velocityRuntime.addProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new NullLogChute()); velocityRuntime .addProperty(RuntimeConstants.RESOURCE_MANAGER_CLASS, SQLTemplateResourceManager.class.getName()); velocityRuntime.addProperty("userdirective", BindDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindNotEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindObjectEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindObjectNotEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", ResultDirective.class.getName()); velocityRuntime.addProperty("userdirective", ChainDirective.class.getName()); velocityRuntime.addProperty("userdirective", ChunkDirective.class.getName()); try { velocityRuntime.init(); } catch (Exception ex) { throw new CayenneRuntimeException("Error setting up Velocity RuntimeInstance.", ex); } }
private static void initVelocityRuntime() { // init static velocity engine sharedRuntime = new RuntimeInstance(); // set null logger sharedRuntime.addProperty( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new NullLogSystem()); sharedRuntime.addProperty( RuntimeConstants.RESOURCE_MANAGER_CLASS, SQLTemplateResourceManager.class.getName()); sharedRuntime.addProperty("userdirective", BindDirective.class.getName()); sharedRuntime.addProperty("userdirective", BindEqualDirective.class.getName()); sharedRuntime.addProperty("userdirective", BindNotEqualDirective.class.getName()); sharedRuntime.addProperty("userdirective", ResultDirective.class.getName()); sharedRuntime.addProperty("userdirective", ChainDirective.class.getName()); sharedRuntime.addProperty("userdirective", ChunkDirective.class.getName()); try { sharedRuntime.init(); } catch (Exception ex) { throw new CayenneRuntimeException( "Error setting up Velocity RuntimeInstance.", ex); } }
private static void initVelocityRuntime() { // init static velocity engine sharedRuntime = new RuntimeInstance(); // set null logger sharedRuntime.addProperty( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new NullLogSystem()); sharedRuntime.addProperty( RuntimeConstants.RESOURCE_MANAGER_CLASS, SQLTemplateResourceManager.class.getName()); sharedRuntime.addProperty("userdirective", BindDirective.class.getName()); sharedRuntime.addProperty("userdirective", BindEqualDirective.class.getName()); sharedRuntime.addProperty("userdirective", BindNotEqualDirective.class.getName()); sharedRuntime.addProperty("userdirective", ResultDirective.class.getName()); sharedRuntime.addProperty("userdirective", ChainDirective.class.getName()); sharedRuntime.addProperty("userdirective", ChunkDirective.class.getName()); try { sharedRuntime.init(); } catch (Exception ex) { throw new CayenneRuntimeException( "Error setting up Velocity RuntimeInstance.", ex); } }