Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access.jdbc
Class SQLTemplateResourceManager

    java.lang.Object
      org.apache.velocity.runtime.resource.loader.ResourceLoader
          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
Author:
  Andrus Adamchik

Field Summary
`protected Map<String,org.apache.velocity.Template>` | `templateCache`

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`

Constructor Summary
`SQLTemplateResourceManager()`

Method Summary
`void` | `clearCache()`
`long` | `getLastModified(org.apache.velocity.runtime.resource.Resource resource)`
`String` | `getLoaderNameForResource(String resourceName)`
`org.apache.velocity.runtime.resource.Resource` | `getResource(String resourceName, int resourceType, String encoding)` Returns a Velocity Resource which is a Template for the given SQL.
`InputStream` | `getResourceStream(String source)`
`void` | `init(ExtendedProperties configuration)`
`void` | `initialize(org.apache.velocity.runtime.RuntimeServices rs)`
`boolean` | `isSourceModified(org.apache.velocity.runtime.resource.Resource resource)`

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`

Field Detail

### templateCache

    protected Map<String,org.apache.velocity.Template> templateCache

Constructor Detail

### SQLTemplateResourceManager

    public SQLTemplateResourceManager()

Method Detail

### initialize

    public void initialize(org.apache.velocity.runtime.RuntimeServices rs)
                    throws Exception

  Specified by:
    `initialize` in 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:
    `getResource` in 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:
    `getLoaderNameForResource` in interface `org.apache.velocity.runtime.resource.ResourceManager`

### getLastModified

    public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)

  Specified by:
    `getLastModified` in class `org.apache.velocity.runtime.resource.loader.ResourceLoader`

### getResourceStream

    public InputStream getResourceStream(String source)
                                  throws org.apache.velocity.exception.ResourceNotFoundException

  Specified by:
    `getResourceStream` in class `org.apache.velocity.runtime.resource.loader.ResourceLoader`
  Throws:
    `org.apache.velocity.exception.ResourceNotFoundException`

### init

    public void init(ExtendedProperties configuration)

  Specified by:
    `init` in class `org.apache.velocity.runtime.resource.loader.ResourceLoader`

### isSourceModified

    public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)

  Specified by:
    `isSourceModified` in class `org.apache.velocity.runtime.resource.loader.ResourceLoader`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.