com.moximedia.aims
Class SqlColumn

java.lang.Object
  extended bycom.moximedia.aims.SqlColumn
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SqlColumn
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Object to hold information about a database column used in an SQL Query or Report.

Author:
Doug Cates
See Also:
Serialized Form

Field Summary
static int COLUMN_TYPE_QUERY
           
static int COLUMN_TYPE_RELATE
           
static int COLUMN_TYPE_RESULT
           
static int COLUMN_TYPE_UNKNOWN
           
static int DATA_TYPE_NUMBER
           
static int DATA_TYPE_STRING
           
 
Constructor Summary
SqlColumn()
          Creates a new instance of SqlColumn
SqlColumn(java.lang.String columnName, java.lang.String alias)
          Creates a new instance of SqlColumn
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
 java.lang.String getAlias()
          Returns the alias for this column, as reported by the database.
 int getColumnDataType()
           
 java.lang.String getColumnName()
           
 int getColumnType()
           
 SqlColumn getCopy()
          Returns a copy of this object.
 int getFieldDataType()
           
 java.lang.String getFieldName()
           
 int getObjectId()
          Returns the IMF internal object id for this object, guaranteed to be different from any other oobject of this type in the currently running application.
 java.lang.String quoteColumn(java.lang.String value)
          Puts single quotes around a value if this column is a string.
 java.lang.String quoteField(java.lang.String value)
          Puts single quotes around a value if this field is a string.
 void setAlias(java.lang.String alias)
          Sets the alias for this column.
 void setColumnDataType(int type)
           
 void setColumnDataType(java.lang.String type)
           
 void setColumnName(java.lang.String columnName)
           
 void setFieldDataType(int type)
           
 void setFieldDataType(java.lang.String type)
           
 void setFieldName(java.lang.String fieldName)
           
 void setXmlAttribute(java.lang.String tag, java.lang.String name, java.lang.String value)
          Sets one of the attributes of this object using a string value.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_TYPE_UNKNOWN

public static final int COLUMN_TYPE_UNKNOWN
See Also:
Constant Field Values

COLUMN_TYPE_RESULT

public static final int COLUMN_TYPE_RESULT
See Also:
Constant Field Values

COLUMN_TYPE_RELATE

public static final int COLUMN_TYPE_RELATE
See Also:
Constant Field Values

COLUMN_TYPE_QUERY

public static final int COLUMN_TYPE_QUERY
See Also:
Constant Field Values

DATA_TYPE_NUMBER

public static final int DATA_TYPE_NUMBER
See Also:
Constant Field Values

DATA_TYPE_STRING

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

SqlColumn

public SqlColumn()
Creates a new instance of SqlColumn


SqlColumn

public SqlColumn(java.lang.String columnName,
                 java.lang.String alias)
Creates a new instance of SqlColumn

Parameters:
columnName - The column name.
alias - The alias, or displayable title for the column.
Method Detail

clone

public java.lang.Object clone()
Returns a copy of this object.

Returns:
A copy of this object.

getCopy

public SqlColumn getCopy()
Returns a copy of this object.

Returns:
A copy of this object.

getObjectId

public int getObjectId()
Returns the IMF internal object id for this object, guaranteed to be different from any other oobject of this type in the currently running application.

Returns:
The internal id for this object.

getAlias

public java.lang.String getAlias()
Returns the alias for this column, as reported by the database.

Returns:
The alias, or column name if there isn't one.

setAlias

public void setAlias(java.lang.String alias)
Sets the alias for this column.

Parameters:
alias - The alias.

getColumnName

public java.lang.String getColumnName()

setColumnName

public void setColumnName(java.lang.String columnName)

getColumnType

public int getColumnType()

getColumnDataType

public int getColumnDataType()

setColumnDataType

public void setColumnDataType(int type)

setColumnDataType

public void setColumnDataType(java.lang.String type)

getFieldDataType

public int getFieldDataType()

setFieldDataType

public void setFieldDataType(int type)

setFieldDataType

public void setFieldDataType(java.lang.String type)

getFieldName

public java.lang.String getFieldName()

setFieldName

public void setFieldName(java.lang.String fieldName)

quoteColumn

public java.lang.String quoteColumn(java.lang.String value)
Puts single quotes around a value if this column is a string.

Returns:
A quoted value if a string, otherwise an unquoted value.

quoteField

public java.lang.String quoteField(java.lang.String value)
Puts single quotes around a value if this field is a string.

Returns:
A quoted value if a string, otherwise an unquoted value.

setXmlAttribute

public void setXmlAttribute(java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Parameters:
tag - The XML element tag containing this attribute.
name - The XML attribute name.
value - The XML attribute value.


Internet Mapping Framework for ArcIMS Java Object Model API (v5.1.00)
Copyright © 2006 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.