net.sf.dewdrop.util
Class SqlNameToken

java.lang.Object
  extended bynet.sf.dewdrop.util.SqlNameToken

public class SqlNameToken
extends Object

This class uses a string conversion heuristic to create names following the java convention (e.g. 'thisIsATableName') into names SQL name tokens following the most common sql convention (e.g. 'this_is_a_table_name').

Author:
Les A. Hazlewood

Field Summary
static int CHECK
           
static int FOREIGN_KEY
           
static int INDEX
           
static int NOT_NULL
           
static int PRIMARY_KEY
           
static int SEQUENCE
           
static int UNIQUE
           
 
Constructor Summary
SqlNameToken(String token)
           
 
Method Summary
static String create(String tableName, String columnName, int type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_NULL

public static final int NOT_NULL
See Also:
Constant Field Values

UNIQUE

public static final int UNIQUE
See Also:
Constant Field Values

CHECK

public static final int CHECK
See Also:
Constant Field Values

PRIMARY_KEY

public static final int PRIMARY_KEY
See Also:
Constant Field Values

FOREIGN_KEY

public static final int FOREIGN_KEY
See Also:
Constant Field Values

SEQUENCE

public static final int SEQUENCE
See Also:
Constant Field Values

INDEX

public static final int INDEX
See Also:
Constant Field Values
Constructor Detail

SqlNameToken

public SqlNameToken(String token)
Method Detail

create

public static String create(String tableName,
                            String columnName,
                            int type)

toString

public String toString()