www.element4solution.com

e4s.db
Class E4DBColumnType

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.util.E4String
          extended by e4s.db.E4DBColumnType
All Implemented Interfaces:
java.lang.Comparable

public class E4DBColumnType
extends E4String

Datatype definition for the data dictionary classes.

Since:
JDK 1.4
See Also:
E4DBFreeFieldType, E4DBColumnType

Field Summary
static E4DBColumnType _DATATYPE_BOOL
          Internal datatype for boolean values.
static E4DBColumnType _DATATYPE_DATE
          Internal datatype for date values (can be day, time or day & time).
static E4DBColumnType _DATATYPE_FLOAT
          Internal datatype for numeric, decimal values.
static E4DBColumnType _DATATYPE_INT
          Internal datatype for numeric, non decimal values.
static E4DBColumnType _DATATYPE_STRING
          Internal datatype for String, length must be specified and will be between 1 and 255.
static E4DBColumnType _DATATYPE_TEXT
          Internal datatype for long Text (depending on the DBMS, up to 2 GB).
 
Fields inherited from class e4s.util.E4String
CLASSNAME, m_maxsize, m_nullable, m_string
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 boolean equals(E4DBColumnType c2)
          Compare the given column-type against the column type of this object.
 java.lang.String getColumnType()
          Get the type of the column.
static E4DBColumnType getInstance(java.lang.Class clazz)
          Finds or creates an instance of E4DBColumnType object by the given class name.
static E4DBColumnType getInstance(java.lang.String columnType)
          Finds or creates an instance of E4DBColumnType object by the given column (database-field) name.
 boolean is_e4sDefinedType()
           
static E4DBColumnType newInstance(java.lang.String type)
           
 boolean renameType(E4DBColumnType oldname, E4DBColumnType newname)
           
static E4DBColumnType toColumnType(java.lang.String s)
          Convert from a string into a column-type object.
 
Methods inherited from class e4s.util.E4String
_equals, charAt, clone, compareTo, compareTo, compareTo, compareToIgnoreCase, compareToIgnoreCase, concat, concat, concat, concat, concat, cut, cut, endsWith, endsWith, equals, equals, equalsIgnoreCase, equalsIgnoreCase, fixed, fixedRight, getMaxSize, getNullable, getString, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, left, left, length, matches, matchesIgnoreCase, regionMatches, regionMatches, regionMatches, regionMatches, remove, removeSpaces, removeSpaces, replace, replace, replace, replace, replace, replaceIgnoreCase, right, right, setMaxSize, setNullable, setString, startsWith, startsWith, startsWith, startsWith, substring, substring, toCharArray, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, trim, validate
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_DATATYPE_STRING

public static final E4DBColumnType _DATATYPE_STRING
Internal datatype for String, length must be specified and will be between 1 and 255. Index: possible
DBMS: nvarchar(n)
Java: String


_DATATYPE_TEXT

public static final E4DBColumnType _DATATYPE_TEXT
Internal datatype for long Text (depending on the DBMS, up to 2 GB). Index: not possible
DBMS: text
Java: String


_DATATYPE_INT

public static final E4DBColumnType _DATATYPE_INT
Internal datatype for numeric, non decimal values. Index: possible
DBMS: int
Java: long


_DATATYPE_FLOAT

public static final E4DBColumnType _DATATYPE_FLOAT
Internal datatype for numeric, decimal values. Index: possible
DBMS: float
Java: float


_DATATYPE_BOOL

public static final E4DBColumnType _DATATYPE_BOOL
Internal datatype for boolean values. Index: possible
DBMS: int
Java: boolean


_DATATYPE_DATE

public static final E4DBColumnType _DATATYPE_DATE
Internal datatype for date values (can be day, time or day & time). Index: possible
DBMS: nvarchar(14)
Java: java.util.Date

Method Detail

getInstance

public static E4DBColumnType getInstance(java.lang.String columnType)
Finds or creates an instance of E4DBColumnType object by the given column (database-field) name.

Parameters:
columnType - is either the name of a built in type (e.g. _DATATYPE_DATE), or a built in class (e.g. E4Client) or a user defined class (E4DBType.
See Also:
getInstance(Class)

getInstance

public static E4DBColumnType getInstance(java.lang.Class clazz)
Finds or creates an instance of E4DBColumnType object by the given class name. The column-type becomes equal to the class name without the package information.

Parameters:
clazz - is typically a built in or user defined class
See Also:
getInstance(String)

getColumnType

public java.lang.String getColumnType()
Get the type of the column.

Returns:
the type of the column as String.

is_e4sDefinedType

public boolean is_e4sDefinedType()

equals

public boolean equals(E4DBColumnType c2)
Compare the given column-type against the column type of this object.

Returns:
true if column types matches

toColumnType

public static E4DBColumnType toColumnType(java.lang.String s)
Convert from a string into a column-type object.

Parameters:
s - the string.
Returns:
the column type.
See Also:
E4DBFreeFieldType.toColumnType(String)

renameType

public boolean renameType(E4DBColumnType oldname,
                          E4DBColumnType newname)

newInstance

public static E4DBColumnType newInstance(java.lang.String type)

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com