Package: org.grails.core

## [Java] Class DefaultGrailsServiceClass

- org.grails.core.DefaultGrailsServiceClass

- All Implemented Interfaces and Traits:
    GrailsServiceClass

      public class DefaultGrailsServiceClass
      extends AbstractInjectableGrailsClass
      implements GrailsServiceClass

  Authors:
    Steven Devijver

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `SERVICE` |
    `private static java.lang.String` | `TRANSACTIONAL` |
    `private java.lang.String` | `datasourceName` |
    `private boolean` | `transactional` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractGrailsClass` | `classPropertyFetcher, clazz, fullName, grailsApplication, isAbstract, logicalPropertyName, name, naturalName, packageName, propertyName, shortName`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DefaultGrailsServiceClass (java.lang.Class<?> clazz)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.lang.String` | `getDatasource()` If service is transactional then get data source will always apply
    `` | `public boolean` | `isTransactional()`
    `` | `public boolean` | `usesDatasource(java.lang.String name)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractInjectableGrailsClass` | `byName, byType, getAvailable`
    `class AbstractGrailsClass` | `getApplication, getClazz, getFullName, getLogicalPropertyName, getMetaClass, getMetaProperties, getName, getNaturalName, getPackageName, getPluginName, getPropertyDescriptors, getPropertyName, getPropertyOrStaticPropertyOrFieldValue, getPropertyType, getPropertyValue, getPropertyValue, getPropertyValueObject, getReferenceInstance, getShortName, getStaticPropertyValue, hasMetaMethod, hasMetaMethod, hasMetaProperty, hasProperty, isAbstract, isActionMethod, isReadableProperty, newInstance, resolvePropertyFetcher, setGrailsApplication, toString`

- - ### Field Detail

    - #### public static final java.lang.String SERVICE

    - #### private static final java.lang.String TRANSACTIONAL

    - #### private java.lang.String datasourceName

    - #### private boolean transactional

  - ### Constructor Detail

    - #### public DefaultGrailsServiceClass(java.lang.Class<?> clazz)

  - ### Method Detail

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

      If service is transactional then get data source will always apply

      Returns:
        name of data source

    - #### public boolean isTransactional()

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