Top Description Methods
org.hibernate.tool.schema.spi

public Interface TargetDescriptor

Known Direct Subinterfaces
org.hibernate.tool.schema.spi.JpaTargetAndSourceDescriptor
Known Direct Implementers
org.hibernate.tool.hbm2ddl.SchemaExport.TargetDescriptorImpl
Imports
java.util.EnumSet, org.hibernate.tool.schema.TargetType

Describes the target(s) of schema create, drop and migrate actions.

The purpose of this "abstraction" of a target is to enable other back-ends (OGM) by simply describing where to target rather than defining the targets themselves. The reason being that ultimately the Java type representing a "DDL command" sent to these targets might be different (e.g., String for JDBC).

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public ScriptTargetOutput

Returns:

The script output target
getScriptTargetOutput
()

If getTargetTypes() includes scripts, return a representation of the script file to write to.

public EnumSet<TargetType>

Returns:

The target type.
getTargetTypes
()

The target type described here.

Method Detail

getScriptTargetOutputback to summary
public ScriptTargetOutput getScriptTargetOutput()

If getTargetTypes() includes scripts, return a representation of the script file to write to. Otherwise, returns null.

While it is ultimately up to the actual tooling provider, it is generally an error for getTargetTypes() to indicate that scripts are a target and for this method to return null.

Returns:ScriptTargetOutput

The script output target

getTargetTypesback to summary
public EnumSet<TargetType> getTargetTypes()

The target type described here.

Returns:EnumSet<TargetType>

The target type.