org.springframework.data.relational.core.conversion

## Class DbAction.Insert<T>

- java.lang.Object
- - org.springframework.data.relational.core.conversion.DbAction.Insert<T>

Type Parameters:
  `T` - type of the entity for which this represents a database interaction.

All Implemented Interfaces:
  DbAction<T>, DbAction.WithDependingOn<T>, DbAction.WithEntity<T>, DbAction.WithGeneratedId<T>, DbAction.WithPropertyPath<T>

Enclosing interface:
  DbAction<T>

    public static class DbAction.Insert<T>
    extends Object
    implements DbAction.WithGeneratedId<T>, DbAction.WithDependingOn<T>

Represents an insert statement for a single entity that is not the root of an aggregate.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.springframework.data.relational.core.conversion.DbAction

`DbAction.AcquireLockAllRoot<T>, DbAction.AcquireLockRoot<T>, DbAction.Delete<T>, DbAction.DeleteAll<T>, DbAction.DeleteAllRoot<T>, DbAction.DeleteRoot<T>, DbAction.Insert<T>, DbAction.InsertRoot<T>, DbAction.Merge<T>, DbAction.Update<T>, DbAction.UpdateRoot<T>, DbAction.WithDependingOn<T>, DbAction.WithEntity<T>, DbAction.WithGeneratedId<T>, DbAction.WithPropertyPath<T>`

### Constructor Summary

Constructors
Constructor and Description
`Insert(T entity, PersistentPropertyPath<RelationalPersistentProperty> propertyPath, DbAction.WithEntity<?> dependingOn, Map<PersistentPropertyPath<RelationalPersistentProperty>,Object> qualifiers)`

### Method Summary

All Methods Instance Methods Concrete Methods
`DbAction.WithEntity<?>` `getDependingOn()` The `DbAction` of a parent entity, possibly the aggregate root.
`T` `getEntity()`
`Class<T>` `getEntityType()`
`PersistentPropertyPath<RelationalPersistentProperty>` `getPropertyPath()`
`Map<PersistentPropertyPath<RelationalPersistentProperty>,Object>` `getQualifiers()` Additional values to be set during insert or update statements.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.springframework.data.relational.core.conversion.DbAction.WithDependingOn

`getQualifier`

### Constructor Detail

#### Insert

    public Insert(T entity,
                  PersistentPropertyPath<RelationalPersistentProperty> propertyPath,
                  DbAction.WithEntity<?> dependingOn,
                  Map<PersistentPropertyPath<RelationalPersistentProperty>,Object> qualifiers)

### Method Detail

#### getEntityType

    public Class<T> getEntityType()

Specified by:
  `getEntityType` in interface `DbAction<T>`
Specified by:
  `getEntityType` in interface `DbAction.WithDependingOn<T>`
Specified by:
  `getEntityType` in interface `DbAction.WithEntity<T>`
Specified by:
  `getEntityType` in interface `DbAction.WithGeneratedId<T>`
Specified by:
  `getEntityType` in interface `DbAction.WithPropertyPath<T>`

#### getEntity

    public T getEntity()

Specified by:
  `getEntity` in interface `DbAction.WithEntity<T>`
Returns:
  the entity to persist. Guaranteed to be not `null`.

#### getPropertyPath

    public PersistentPropertyPath<RelationalPersistentProperty> getPropertyPath()

Specified by:
  `getPropertyPath` in interface `DbAction.WithPropertyPath<T>`
Returns:
  the path from the aggregate root to the affected entity

#### getDependingOn

    public DbAction.WithEntity<?> getDependingOn()

Description copied from interface: `DbAction.WithDependingOn`
The `DbAction` of a parent entity, possibly the aggregate root. This is used to obtain values needed to persist the entity, that are not part of the current entity, especially the id of the parent, which might only become available once the parent entity got persisted.

Specified by:
  `getDependingOn` in interface `DbAction.WithDependingOn<T>`
Returns:
  guaranteed to be not `null`.
See Also:
  `DbAction.WithDependingOn.getQualifiers()`

#### getQualifiers

    public Map<PersistentPropertyPath<RelationalPersistentProperty>,Object> getQualifiers()

Description copied from interface: `DbAction.WithDependingOn`
Additional values to be set during insert or update statements.

Values come from parent entities but one might also add values manually.

Specified by:
  `getQualifiers` in interface `DbAction.WithDependingOn<T>`
Returns:
  guaranteed to be not `null`.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`