org.apache.cayenne.access.jdbc
Class SQLTemplateResourceManager
java.lang.Object
   org.apache.velocity.runtime.resource.loader.ResourceLoader
org.apache.velocity.runtime.resource.loader.ResourceLoader
       org.apache.cayenne.access.jdbc.SQLTemplateResourceManager
org.apache.cayenne.access.jdbc.SQLTemplateResourceManager
- All Implemented Interfaces: 
- org.apache.velocity.runtime.resource.ResourceManager
- public class SQLTemplateResourceManager 
- extends org.apache.velocity.runtime.resource.loader.ResourceLoader- implements org.apache.velocity.runtime.resource.ResourceManager
An implementation of the Velocity ResourceManager and ResourceLoader that
 creates templates from in-memory Strings.
- Since:
- 1.1
 
| Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader | 
| className, isCachingOn, modificationCheckInterval, rsvc | 
 
| Fields inherited from interface org.apache.velocity.runtime.resource.ResourceManager | 
| RESOURCE_CONTENT, RESOURCE_TEMPLATE | 
 
 
 
| Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader | 
| commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
templateCache
protected Map<String,org.apache.velocity.Template> templateCache
SQLTemplateResourceManager
public SQLTemplateResourceManager()
initialize
public void initialize(org.apache.velocity.runtime.RuntimeServices rs)
                throws Exception
- 
- Specified by:
- initializein interface- org.apache.velocity.runtime.resource.ResourceManager
 
- 
- Throws:
- Exception
 
clearCache
public void clearCache()
- 
 
- 
 
getResource
public org.apache.velocity.runtime.resource.Resource getResource(String resourceName,
                                                                 int resourceType,
                                                                 String encoding)
                                                          throws org.apache.velocity.exception.ResourceNotFoundException,
                                                                 org.apache.velocity.exception.ParseErrorException,
                                                                 Exception
- Returns a Velocity Resource which is a Template for the given SQL.
 
- 
- Specified by:
- getResourcein interface- org.apache.velocity.runtime.resource.ResourceManager
 
- 
- Throws:
- org.apache.velocity.exception.ResourceNotFoundException
- org.apache.velocity.exception.ParseErrorException
- Exception
 
getLoaderNameForResource
public String getLoaderNameForResource(String resourceName)
- 
- Specified by:
- getLoaderNameForResourcein interface- org.apache.velocity.runtime.resource.ResourceManager
 
- 
 
getLastModified
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
- 
- Specified by:
- getLastModifiedin class- org.apache.velocity.runtime.resource.loader.ResourceLoader
 
- 
 
getResourceStream
public InputStream getResourceStream(String source)
                              throws org.apache.velocity.exception.ResourceNotFoundException
- 
- Specified by:
- getResourceStreamin class- org.apache.velocity.runtime.resource.loader.ResourceLoader
 
- 
- Throws:
- org.apache.velocity.exception.ResourceNotFoundException
 
init
public void init(org.apache.commons.collections.ExtendedProperties configuration)
- 
- Specified by:
- initin class- org.apache.velocity.runtime.resource.loader.ResourceLoader
 
- 
 
isSourceModified
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
- 
- Specified by:
- isSourceModifiedin class- org.apache.velocity.runtime.resource.loader.ResourceLoader
 
- 
 
Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.