Package org.h2.command.ddl

# Class CreateTrigger

java.lang.Object
org.h2.command.Prepared
org.h2.command.ddl.DefineCommand
org.h2.command.ddl.SchemaCommand
org.h2.command.ddl.CreateTrigger

public class CreateTrigger extends SchemaCommand
This class represents the statement CREATE TRIGGER

## Field Summary

### Fields inherited from class org.h2.command.ddl.DefineCommand

`transactional`

### Fields inherited from class org.h2.command.Prepared

`create, parameters, prepareAlways, session, sqlStatement, sqlTokens`

## Constructor Summary

Constructors
Constructor
Description
`CreateTrigger(SessionLocal session, Schema schema)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getType()`
Get the command type as defined in CommandInterface
`void`
`setBefore(boolean before)`
`void`
`setForce(boolean force)`
`void`
`setIfNotExists(boolean ifNotExists)`
`void`
`setInsteadOf(boolean insteadOf)`
`void`
`setNoWait(boolean noWait)`
`void`
`setOnRollback(boolean onRollback)`
`void`
`setQueueSize(int size)`
`void`
`setRowBased(boolean rowBased)`
`void`
`setTableName(String tableName)`
`void`
`setTriggerClassName(String triggerClassName)`
`void`
`setTriggerName(String name)`
`void`
`setTriggerSource(String triggerSource)`
`void`
`setTypeMask(int typeMask)`
`long`
`update()`
Execute the statement.

### Methods inherited from class org.h2.command.ddl.SchemaCommand

`getSchema`

### Methods inherited from class org.h2.command.ddl.DefineCommand

`isReadOnly, isRetryable, isTransactional, queryMeta, setTransactional`

### Methods inherited from class org.h2.command.Prepared

`checkCanceled, checkParameters, collectDependencies, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, invalidateCachedResult, isCacheable, isQuery, isWithParamValues, needRecompile, prepare, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString`

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

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

## Constructor Details

### CreateTrigger

public CreateTrigger(SessionLocal session, Schema schema)

## Method Details

### setInsteadOf

public void setInsteadOf(boolean insteadOf)

### setBefore

public void setBefore(boolean before)

### setTriggerClassName

public void setTriggerClassName(String triggerClassName)

### setTriggerSource

public void setTriggerSource(String triggerSource)

### setTypeMask

public void setTypeMask(int typeMask)

### setRowBased

public void setRowBased(boolean rowBased)

### setQueueSize

public void setQueueSize(int size)

### setNoWait

public void setNoWait(boolean noWait)

### setTableName

public void setTableName(String tableName)

### setTriggerName

public void setTriggerName(String name)

### setIfNotExists

public void setIfNotExists(boolean ifNotExists)

### update

public long update()
Description copied from class: `Prepared`
Execute the statement.

Overrides:
  `update` in class `Prepared`
Returns:
  the update count

### setForce

public void setForce(boolean force)

### setOnRollback

public void setOnRollback(boolean onRollback)

### getType

public int getType()
Description copied from class: `Prepared`
Get the command type as defined in CommandInterface

Specified by:
  `getType` in class `Prepared`
Returns:
  the statement type