org.ujorm.orm
Class SqlDialectEx

java.lang.Object
  extended by org.ujorm.orm.SqlDialectEx

public class SqlDialectEx
extends Object

Extended SQL dialect class.


Field Summary
protected  SqlDialect dialect
          The main dialect
 
Constructor Summary
SqlDialectEx(SqlDialect dialect)
          Constructor
 
Method Summary
 String buildConstraintName(MetaColumn column, MetaTable table)
          SQL Name Provider
 String buildPrimaryKeyOverColumn(MetaTable table, List<MetaColumn> columns)
           
protected  SqlNameProvider getNameProvider()
          Returns a name provider
 Appendable printDropIndex(MetaIndex index, Appendable out)
          Print an DROP INDEX for the parameter column.
 Appendable printPrimaryKey(MetaColumn column, StringBuilder sql)
           
protected  void printPrimaryKeyConstraint(MetaTable table, List<MetaColumn> columns, Appendable out)
          Prints primary key constraint
 Appendable printSequenceListAllId(UjoSequencer sequence, Appendable out)
          Print SQL LIST ALL SEQUENCE IDs.
 Appendable printSequenceNextValueWithValues(UjoSequencer sequence, long seq, Appendable out)
          Print the next Sequence value
 Appendable printUniqueConstraint(List<MetaColumn> columns, StringBuilder out)
          Print Unique Constraint
 Appendable printUniqueConstraint(StringBuilder out, MetaColumn... columns)
          printUniqueConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dialect

protected final SqlDialect dialect
The main dialect

Constructor Detail

SqlDialectEx

public SqlDialectEx(SqlDialect dialect)
Constructor

Method Detail

printDropIndex

public Appendable printDropIndex(MetaIndex index,
                                 Appendable out)
                          throws IOException
Print an DROP INDEX for the parameter column.

Returns:
More statements separated by the ';' charactes are enabled
Throws:
IOException

printPrimaryKey

public Appendable printPrimaryKey(MetaColumn column,
                                  StringBuilder sql)
                           throws Exception
Throws:
Exception

buildConstraintName

public String buildConstraintName(MetaColumn column,
                                  MetaTable table)
SQL Name Provider


buildPrimaryKeyOverColumn

public String buildPrimaryKeyOverColumn(MetaTable table,
                                        List<MetaColumn> columns)
                                 throws IOException
Throws:
IOException

printUniqueConstraint

public Appendable printUniqueConstraint(List<MetaColumn> columns,
                                        StringBuilder out)
                                 throws IOException
Print Unique Constraint

Throws:
IOException

printUniqueConstraint

public Appendable printUniqueConstraint(StringBuilder out,
                                        MetaColumn... columns)
                                 throws IOException
printUniqueConstraint

Throws:
IOException

printPrimaryKeyConstraint

protected void printPrimaryKeyConstraint(MetaTable table,
                                         List<MetaColumn> columns,
                                         Appendable out)
                                  throws IOException
Prints primary key constraint

Throws:
IOException

printSequenceNextValueWithValues

public Appendable printSequenceNextValueWithValues(UjoSequencer sequence,
                                                   long seq,
                                                   Appendable out)
                                            throws IOException
Print the next Sequence value

Throws:
IOException

printSequenceListAllId

public Appendable printSequenceListAllId(UjoSequencer sequence,
                                         Appendable out)
                                  throws IOException
Print SQL LIST ALL SEQUENCE IDs.

Throws:
IOException

getNameProvider

protected final SqlNameProvider getNameProvider()
                                         throws IllegalStateException
Returns a name provider

Returns:
Current SQL name provider
Throws:
IllegalStateException - A problem during creating an instance.


Copyright 2013, Pavel Ponec