Mapping (Grails 2.2.5)
Date: 2014-03-04

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

## org.codehaus.groovy.grails.orm.hibernate.cfg
[Groovy] Class Mapping

    java.lang.Object
      org.codehaus.groovy.grails.orm.hibernate.cfg.Mapping

    class Mapping
    extends java.lang.Object

Models the mapping from GORM classes to the db.

Authors:
  Graeme Rocher

Since:
  1.0

Property Summary
`boolean` | `autoImport` Sets whether packaged domain classes should be auto-imported in HQL queries
`boolean` | `autoTimestamp` Sets whether automatic timestamping should occur for columns like last_updated and date_created
`java.lang.Integer` | `batchSize` The batch size to use for lazy loading
`CacheConfig` | `cache` Caching config
`java.util.Map` | `columns`
`java.lang.String` | `comment` DDL comment.
`java.util.List` | `datasources` Get the datasource names that this domain class works with.
`java.lang.String` | `discriminator` Value used to discriminate entities in table-per-hierarchy inheritance mapping
`ColumnConfig` | `discriminatorColumn` Used to configure the disriminator column properties
`java.util.Map` | `discriminatorMap` Used to hold the attributes for Discriminator, such as formula, type and insertable
`boolean` | `dynamicInsert` Whether to use dynamically created insert queries, at the cost of some performance
`boolean` | `dynamicUpdate` Whether to use dynamically created update queries, at the cost of some performance
`java.lang.Object` | `identity` The identity definition
`java.lang.String` | `order` Default direction to sort by
`java.lang.String` | `sort` The name of the default property to sort by
`Table` | `table` The table
`boolean` | `tablePerHierarchy` Sets whether to use table-per-hierarchy or table-per-subclass mapping
`java.util.Map` | `userTypes` Custom hibernate user types
`java.lang.String` | `versionColumn` The name of the column used for the version number
`boolean` | `versioned` Whether the class is versioned for optimistic locking

Method Summary
`PropertyConfig` | `getPropertyConfig(java.lang.String name)` Obtains a PropertyConfig object for the given name
`java.lang.String` | `getTableName()` The table name
`java.lang.String` | `getTypeName(java.lang.Class theClass)` Return a type name of the known custom user types
`void` | `setTableName(java.lang.String name)` Set the table name

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### autoImport

    boolean autoImport

  Sets whether packaged domain classes should be auto-imported in HQL queries

### autoTimestamp

    boolean autoTimestamp

  Sets whether automatic timestamping should occur for columns like last_updated and date_created

### batchSize

    java.lang.Integer batchSize

  The batch size to use for lazy loading

### cache

    CacheConfig cache

  Caching config

### columns

    java.util.Map columns

### comment

    java.lang.String comment

  DDL comment.

### datasources

    java.util.List datasources

  Get the datasource names that this domain class works with.
  Returns:
    the datasource names

### discriminator

    java.lang.String discriminator

  Value used to discriminate entities in table-per-hierarchy inheritance mapping

### discriminatorColumn

    ColumnConfig discriminatorColumn

  Used to configure the disriminator column properties

### discriminatorMap

    java.util.Map discriminatorMap

  Used to hold the attributes for Discriminator, such as formula, type and insertable

### dynamicInsert

    boolean dynamicInsert

  Whether to use dynamically created insert queries, at the cost of some performance

### dynamicUpdate

    boolean dynamicUpdate

  Whether to use dynamically created update queries, at the cost of some performance

### identity

    java.lang.Object identity

  The identity definition

### order

    java.lang.String order

  Default direction to sort by

### sort

    java.lang.String sort

  The name of the default property to sort by

### table

    Table table

  The table

### tablePerHierarchy

    boolean tablePerHierarchy

  Sets whether to use table-per-hierarchy or table-per-subclass mapping

### userTypes

    java.util.Map userTypes

  Custom hibernate user types

### versionColumn

    java.lang.String versionColumn

  The name of the column used for the version number

### versioned

    boolean versioned

  Whether the class is versioned for optimistic locking

Method Detail

### getPropertyConfig

    PropertyConfig getPropertyConfig(java.lang.String name)

  Obtains a PropertyConfig object for the given name

### getTableName

    java.lang.String getTableName()

  The table name

### getTypeName

    java.lang.String getTypeName(java.lang.Class theClass)

  Return a type name of the known custom user types

### setTableName

    void setTableName(java.lang.String name)

  Set the table name

Groovy Documentation