GrailsServiceClass (Grails 6.0.0)

Package: grails.core

## [Java] Interface GrailsServiceClass

- grails.core.support.GrailsApplicationAware

- All Superinterfaces:
    InjectableGrailsClass, GrailsClass, GrailsApplicationAware

      public interface GrailsServiceClass
      extends InjectableGrailsClass

  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 Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.lang.String` | `getDatasource()` Get the datasource name that this service class works with.
    `` | `public boolean` | `isTransactional()` Service should be configured with transaction demarcation.
    `` | `public 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

    - #### java.lang.String ALL_DATA_SOURCES

    - #### java.lang.String DATA_SOURCE

    - #### 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