public class HubTableColumn
extends Object
Modifier and Type | Field and Description |
---|---|
static int |
NAME_MAX |
static int |
TYPE_INT |
static int |
TYPE_LONG |
static int |
TYPE_REAL |
static int |
TYPE_VARCHAR |
Constructor and Description |
---|
HubTableColumn(String name,
int type,
int len,
int seq,
Field f,
boolean isKey) |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Obtain the original name passed to the constructor but possibly truncated to NAME_MAX
characters in length.
|
int |
getSequence()
Return the column index.
|
int |
getType()
the HubTableColumn.TYPE_* column data type
|
int |
getVarcharLen()
Maximum declared length of a varchar field
|
void |
javaDeclare(StringBuilder sb,
boolean instanceDeclare)
Return a java declaration phrase for the column field such as
"int columnName"
|
static String |
listNames(HubTableColumn[] columns)
return a list of names for the specified columns
|
static String |
namesCommaList(HubTableColumn[] columns)
Obtain a comma separated list of column names.
|
public static final int NAME_MAX
public static final int TYPE_INT
public static final int TYPE_LONG
public static final int TYPE_REAL
public static final int TYPE_VARCHAR
public HubTableColumn(String name, int type, int len, int seq, Field f, boolean isKey)
public String getName()
public int getSequence()
public int getType()
public int getVarcharLen()
public void javaDeclare(StringBuilder sb, boolean instanceDeclare)
sb
- a StringBuilder for the returned datainstanceDeclare
- whether to surround the result with "Public " and ";\n"public static String listNames(HubTableColumn[] columns)
columns
- should not be nullpublic static String namesCommaList(HubTableColumn[] columns)
columns
- should not be null