Groovy Documentation

org.codehaus.groovy.grails.commons
[Java] Interface GrailsDataSource

org.codehaus.groovy.grails.commons.GrailsDataSource
  org.codehaus.groovy.grails.commons.InjectableGrailsClass
      org.codehaus.groovy.grails.commons.GrailsClass
          org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware
All Superinterfaces:
InjectableGrailsClass, GrailsClass, GrailsApplicationAware

public interface GrailsDataSource
extends InjectableGrailsClass

Represents a data source in Grails.

Authors:
Steven Devijver


Method Summary
java.lang.Class getConfigurationClass()

@return The configuration class to use when setting up the database.

java.lang.String getDbCreate()

Whether to generate the database with HBM 2 DDL, values can be "create", "create-drop" or "update".

java.lang.Class getDialect()

The dialect implementation to use.

java.lang.String getDriverClassName()

The driver class name for the data source.

java.util.Properties getOtherProperties()

Other properties for this data source.

java.lang.String getPassword()

The password for the data source.

java.lang.String getUrl()

The URL for the data source.

java.lang.String getUsername()

The username for the data source.

boolean isLoggingSql()

Whether SQL logging is enabled

boolean isPooled()

True is connection pooling is enabled.

 
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
 

Method Detail

getConfigurationClass

@SuppressWarnings("rawtypes")
public java.lang.Class getConfigurationClass()
Returns:
The configuration class to use when setting up the database.


getDbCreate

public java.lang.String getDbCreate()
Whether to generate the database with HBM 2 DDL, values can be "create", "create-drop" or "update".
Returns:
The dbCreate method to use


getDialect

@SuppressWarnings("rawtypes")
public java.lang.Class getDialect()
The dialect implementation to use.
Returns:
The dialect class or null if none configured


getDriverClassName

public java.lang.String getDriverClassName()
The driver class name for the data source.
Returns:
driver class name


getOtherProperties

public java.util.Properties getOtherProperties()
Other properties for this data source.
Returns:
other properties


getPassword

public java.lang.String getPassword()
The password for the data source.
Returns:
password


getUrl

public java.lang.String getUrl()
The URL for the data source.
Returns:
URL


getUsername

public java.lang.String getUsername()
The username for the data source.
Returns:
username


isLoggingSql

public boolean isLoggingSql()
Whether SQL logging is enabled
Returns:
True if SQL logging is enabled


isPooled

public boolean isPooled()
True is connection pooling is enabled.
Returns:
connection pooling enabled


 

Groovy Documentation