org.clazzes.jdbc2xml.schema.impl
Class ColumnHelper

java.lang.Object
  extended by org.clazzes.jdbc2xml.schema.impl.ColumnHelper

public abstract class ColumnHelper
extends java.lang.Object

Helper functions to play with ColumnInfo objects.

Author:
wglas

Constructor Summary
ColumnHelper()
           
 
Method Summary
static ColumnInfo adaptDefault(ColumnInfo ci, java.lang.String defaultValue)
          Return a column information with the given default value.
static ColumnInfo adaptNullability(ColumnInfo ci, boolean nullable)
          Return a column information with the given nullability set.
static ColumnInfo rename(ColumnInfo ci, java.lang.String name)
          Return a column information with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnHelper

public ColumnHelper()
Method Detail

adaptNullability

public static ColumnInfo adaptNullability(ColumnInfo ci,
                                          boolean nullable)
Return a column information with the given nullability set.

Parameters:
ci - The original column information.
nullable - The nullable flag to set to the returned object.
Returns:
A column description with the desired nullability flag. If the nullability of the original column description is equal to the desired nullability, the original description is returned.

adaptDefault

public static ColumnInfo adaptDefault(ColumnInfo ci,
                                      java.lang.String defaultValue)
Return a column information with the given default value.

Parameters:
ci - The original column information.
defaultValue - The default value to set to the returned object.
Returns:
A column description with the desired default value. If the default value of the original column description is equal to the desired default value, the original description is returned.

rename

public static ColumnInfo rename(ColumnInfo ci,
                                java.lang.String name)
Return a column information with the given name.

Parameters:
ci - The original column information.
name - The name to set to the returned object.
Returns:
A column description with the name. If the name of the original column description is equal to the desired name, the original description is returned.


Copyright © 2007. All Rights Reserved.