GrailsServiceClass (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.commons
[Java] Interface GrailsServiceClass

    org.codehaus.groovy.grails.commons.GrailsServiceClass
      org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware
          org.codehaus.groovy.grails.commons.GrailsClass
              org.codehaus.groovy.grails.commons.InjectableGrailsClass

All Superinterfaces:
  GrailsApplicationAware, GrailsClass, InjectableGrailsClass

    public interface GrailsServiceClass
    extends InjectableGrailsClass

Authors:
  Steven Devijver

Field Summary
`java.lang.String` | `ALL_DATA_SOURCES`
`java.lang.String` | `DATA_SOURCE`
`java.lang.String` | `DEFAULT_DATA_SOURCE`

Method Summary
`java.lang.String` | `getDatasource()` Get the datasource name that this service class works with.
`boolean` | `isTransactional()` Service should be configured with transaction demarcation.
`boolean` | `usesDatasource(java.lang.String name)` Check if the service class can use the named DataSource.

Methods inherited from interface InjectableGrailsClass
byName, byType, getAvailable

Methods inherited from interface GrailsClass
getClazz, getFullName, getGrailsApplication, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyName, getPropertyValue, getPropertyValue, getReference, getReferenceInstance, getShortName, hasProperty, isAbstract, newInstance

Methods inherited from interface GrailsApplicationAware
setGrailsApplication

Field Detail

### ALL_DATA_SOURCES

    public java.lang.String ALL_DATA_SOURCES

### DATA_SOURCE

    public java.lang.String DATA_SOURCE

### DEFAULT_DATA_SOURCE

    public java.lang.String DEFAULT_DATA_SOURCE

Method Detail

### getDatasource

    public java.lang.String getDatasource()

  Get the datasource name that this service class works with.
  Returns:
    the name

### isTransactional

    public boolean isTransactional()

  Service should be configured with transaction demarcation.
  Returns:
    configure with transaction demarcation

### usesDatasource

    public boolean usesDatasource(java.lang.String name)

  Check if the service class can use the named DataSource.
  Parameters:
    `name` - the name

Groovy Documentation