Top Description Constructors Methods
org.hibernate.tool.hbm2ddl

public Class SingleLineSqlCommandExtractor

extends Object
implements ImportSqlCommandExtractor
Class Inheritance
All Implemented Interfaces
org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor, org.hibernate.service.Service, java.io.Serializable
Imports
java.io.BufferedReader, .IOException, .Reader, java.util.LinkedList, .List, org.hibernate.internal.util.StringHelper

Class responsible for extracting SQL statements from import script. Treats each line as a complete SQL statement. Comment lines shall start with --, // or /* character sequence.
Author
Lukasz Antoniak (lukasz dot antoniak at gmail dot com)

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]
extractCommands(Reader
Character stream reader of SQL script.
reader
)

Implements org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor.extractCommands.

private boolean
isComment(final String line)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SingleLineSqlCommandExtractorback to summary
public SingleLineSqlCommandExtractor()

Method Detail

extractCommandsback to summary
public String[] extractCommands(Reader reader)

Implements org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor.extractCommands.

Parameters
reader:Reader

Doc from org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor.extractCommands.

Character stream reader of SQL script.

Returns:String[]

Doc from org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor.extractCommands.

List of single SQL statements. Each command may or may not contain semicolon at the end.

Annotations
@Override
isCommentback to summary
private boolean isComment(final String line)