Top Description Fields Constructors Methods
org.hibernate.tool.schema.internal.exec

public Class ScriptSourceInputFromFile

extends AbstractScriptSourceInput
implements ScriptSourceInput
Class Inheritance
All Implemented Interfaces
org.hibernate.tool.schema.spi.ScriptSourceInput
Imports
java.io.File, .FileInputStream, .IOException, .InputStreamReader, .Reader, org.hibernate.tool.schema.spi.SchemaManagementException, .ScriptSourceInput, org.jboss.logging.Logger

ScriptSourceInput implementation for File references. A reader is opened here and then explicitly closed on release.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final String
private final File
private static final Logger
private Reader

Constructor Summary

AccessConstructor and Description
public
ScriptSourceInputFromFile(File
The file to read from
file
,
String
The charset name
charsetName
)

Constructs a ScriptSourceInputFromFile

Method Summary

Modifier and TypeMethod and Description
protected String
public void
prepare()

Overrides org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput.prepare.

Implements org.hibernate.tool.schema.spi.ScriptSourceInput.prepare.

Prepare source for use, and log that this script is about to be imported.
protected Reader
public void
private static Reader
toReader(File file, String charsetName)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput:
read

Field Detail

charsetNameback to summary
private final String charsetName
fileback to summary
private final File file
logback to summary
private static final Logger log

Hides org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput.log.

readerback to summary
private Reader reader

Constructor Detail

ScriptSourceInputFromFileback to summary
public ScriptSourceInputFromFile(File file, String charsetName)

Constructs a ScriptSourceInputFromFile

Parameters
file:File

The file to read from

charsetName:String

The charset name

Method Detail

getScriptDescriptionback to summary
protected String getScriptDescription()

Implements abstract org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput.getScriptDescription.

Annotations
@Override
prepareback to summary
public void prepare()

Overrides org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput.prepare.

Implements org.hibernate.tool.schema.spi.ScriptSourceInput.prepare.

Doc from org.hibernate.tool.schema.spi.ScriptSourceInput.prepare.

Prepare source for use, and log that this script is about to be imported.

Annotations
@Override
readerback to summary
protected Reader reader()

Implements abstract org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput.reader.

Annotations
@Override
releaseback to summary
public void release()

Overrides org.hibernate.tool.schema.internal.exec.AbstractScriptSourceInput.release.

Implements org.hibernate.tool.schema.spi.ScriptSourceInput.release.

Doc from org.hibernate.tool.schema.spi.ScriptSourceInput.release.

Release this input.

Annotations
@Override
toReaderback to summary
private static Reader toReader(File file, String charsetName)
Annotations
@SuppressWarnings:ResultOfMethodCallIgnored
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override