Groovy Documentation

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

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

    class PropertyConfig

Custom mapping for a single domain property. Note that a property can have multiple columns via a component or a user type.

Authors:
  pledbrook

Since:
  1.0.4

Property Summary
`java.lang.Integer` | `batchSize` The batch size used for lazy loading
`CacheConfig` | `cache`
`java.lang.String` | `cascade` Cascading strategy for this property.
`java.util.List` | `columns`
`FetchMode` | `fetch` The fetch strategy for this property.
`java.lang.String` | `formula`
`boolean` | `ignoreNotFound` Whether to ignore ObjectNotFoundException
`PropertyConfig` | `indexColumn` The column used to produce the index for index based collections (lists and maps)
`boolean` | `insertable` Whether or not this is column is insertable by hibernate
`JoinTable` | `joinTable`
`boolean` | `lazy`
`java.lang.String` | `order` The default sort order
`java.lang.String` | `sort` The default sort property name
`java.lang.Object` | `type` The Hibernate type or user type of the property.
`java.util.Properties` | `typeParams` The parameters for the property that can be used to configure a Hibernate ParameterizedType implementation.
`boolean` | `updateable` Whether or not this column is updateable by hibernate

Method Summary
`java.lang.String` | `getColumn()` Shortcut to get the column name for this property.
`java.lang.String` | `getEnumType()`
`java.lang.String` | `getIndex()` Shortcut to get the index setting for this property's column.
`int` | `getLength()` Shortcut to get the length of this property's column.
`int` | `getPrecision()` Shortcut to get the precision of this property's column.
`int` | `getScale()` Shortcut to get the scale of this property's column.
`java.lang.String` | `getSqlType()` Shortcut to get the SQL type of the corresponding column.
`boolean` | `isUnique()` Shortcut to determine whether the property's column is configured to be unique.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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

### batchSize

    java.lang.Integer batchSize

  The batch size used for lazy loading

### cache

    CacheConfig cache

### cascade

    java.lang.String cascade

  Cascading strategy for this property. Only makes sense if the property is an association or collection.

### columns

    java.util.List columns

### fetch

    FetchMode fetch

  The fetch strategy for this property.

### formula

    java.lang.String formula

### ignoreNotFound

    boolean ignoreNotFound

  Whether to ignore ObjectNotFoundException

### indexColumn

    PropertyConfig indexColumn

  The column used to produce the index for index based collections (lists and maps)

### insertable

    boolean insertable

  Whether or not this is column is insertable by hibernate

### joinTable

    JoinTable joinTable

### lazy

    boolean lazy

### order

    java.lang.String order

  The default sort order

### sort

    java.lang.String sort

  The default sort property name

### type

    java.lang.Object type

  The Hibernate type or user type of the property. This can be a string or a class.

### typeParams

    java.util.Properties typeParams

  The parameters for the property that can be used to configure a Hibernate ParameterizedType implementation.

### updateable

    boolean updateable

  Whether or not this column is updateable by hibernate

Method Detail

### getColumn

    java.lang.String getColumn()

  Shortcut to get the column name for this property.
  throws:
    RuntimeException if this property maps to more than one column.

### getEnumType

    java.lang.String getEnumType()

### getIndex

    java.lang.String getIndex()

  Shortcut to get the index setting for this property's column.
  throws:
    RuntimeException if this property maps to more than one column.

### getLength

    int getLength()

  Shortcut to get the length of this property's column.
  throws:
    RuntimeException if this property maps to more than one column.

### getPrecision

    int getPrecision()

  Shortcut to get the precision of this property's column.
  throws:
    RuntimeException if this property maps to more than one column.

### getScale

    int getScale()

  Shortcut to get the scale of this property's column.
  throws:
    RuntimeException if this property maps to more than one column.

### getSqlType

    java.lang.String getSqlType()

  Shortcut to get the SQL type of the corresponding column.
  throws:
    RuntimeException if this property maps to more than one column.

### isUnique

    boolean isUnique()

  Shortcut to determine whether the property's column is configured to be unique.
  throws:
    RuntimeException if this property maps to more than one column.

### toString

    java.lang.String toString()

Groovy Documentation