GrailsServiceClass (Grails 3.2.7)
Date: 2017-03-06

Package: grails.core

## [Java] Interface GrailsServiceClass

- grails.core.GrailsServiceClass

- All Superinterfaces:
    GrailsClass, InjectableGrailsClass, GrailsApplicationAware

  Authors:
    Steven Devijver

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `java.lang.String` | `ALL_DATA_SOURCES` |
    `java.lang.String` | `DATA_SOURCE` |
    `java.lang.String` | `DEFAULT_DATA_SOURCE` |

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface InjectableGrailsClass` | `byName, byType, getAvailable`
    `interface GrailsClass` | `getApplication, getClazz, getFullName, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPluginName, getPropertyName, getPropertyValue, getPropertyValue, getReferenceInstance, getShortName, hasProperty, isAbstract, newInstance`
    `interface GrailsApplicationAware` | `setGrailsApplication`

- - ### Field Detail

    - #### public java.lang.String ALL_DATA_SOURCES

    - #### public java.lang.String DATA_SOURCE

    - #### public java.lang.String DEFAULT_DATA_SOURCE

  - ### Method Detail

    - #### public java.lang.String getDatasource()

      Get the datasource name that this service class works with.

      Returns:
        the name

    - #### public boolean isTransactional()

      Service should be configured with transaction demarcation.

      Returns:
        configure with transaction demarcation

    - #### public boolean usesDatasource(java.lang.String name)

      Check if the service class can use the named DataSource.

      Parameters:
        `name` - the name