thinkmap.datasource.flatfile2
Class FFEdgeColumnModel<T>

java.lang.Object
  extended by thinkmap.datasource.relational.ColumnModel<T>
      extended by thinkmap.datasource.relational.EdgeColumnModel<T>
          extended by thinkmap.datasource.flatfile2.FFEdgeColumnModel<T>
All Implemented Interfaces:
Serializable, IFFColumnModel<T>

public class FFEdgeColumnModel<T>
extends EdgeColumnModel<T>
implements IFFColumnModel<T>

A flat file column.

Version:
$Revision: 1.5 $
See Also:
Serialized Form

Field Summary
protected  String datePattern
           
protected  boolean useEmptyString
           
 
Fields inherited from class thinkmap.datasource.relational.ColumnModel
entityModel
 
Constructor Summary
FFEdgeColumnModel(FFEdgeEntityModel model)
           
 
Method Summary
protected  boolean dateEquals(FFEdgeColumnModel<?> other)
           
 boolean equals(Object column)
           
 FieldDef<T> fieldDef()
           
 DateFormat getDateFormat()
          Returns the date format for this column model or null if a date format is not applicable for this column.
 boolean isUseEmptyString()
          Return true if an empty string will kept as is for all String columns.
 void setDateFormat(String dateFormatString)
          Set the date format string for this column.
 void setUseEmptyString(boolean val)
          If set to true, an empty string will be kept.
 
Methods inherited from class thinkmap.datasource.relational.EdgeColumnModel
getBindColumn, getBindTo, getBoundModelName, getColumn, getIsFrom, setBindColumn, setBindTo, setColumn
 
Methods inherited from class thinkmap.datasource.relational.ColumnModel
convert, getAlias, getEntityModel, getName, getType, isKey, isProperty, setAlias, setKey, setName, setProperty, setType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface thinkmap.datasource.flatfile2.IFFColumnModel
getAlias, getName, getType, isKey, isProperty
 

Field Detail

datePattern

protected String datePattern

useEmptyString

protected boolean useEmptyString
Constructor Detail

FFEdgeColumnModel

public FFEdgeColumnModel(FFEdgeEntityModel model)
Method Detail

fieldDef

public FieldDef<T> fieldDef()
Specified by:
fieldDef in interface IFFColumnModel<T>

setDateFormat

public void setDateFormat(String dateFormatString)
Set the date format string for this column. Only applicable if column type is date. The is a date format string is defined in java SimpleDateFormat.

If no date format string is specified, a date value will be interpreted as milliseconds since January 1, 1970.

Parameters:
dateFormatString - date format string
See Also:
SimpleDateFormat

getDateFormat

public DateFormat getDateFormat()
Description copied from interface: IFFColumnModel
Returns the date format for this column model or null if a date format is not applicable for this column.

Specified by:
getDateFormat in interface IFFColumnModel<T>
Returns:

equals

public boolean equals(Object column)
Overrides:
equals in class Object

setUseEmptyString

public void setUseEmptyString(boolean val)
If set to true, an empty string will be kept. If not, then it will be set as null.

Parameters:
val -

isUseEmptyString

public boolean isUseEmptyString()
Return true if an empty string will kept as is for all String columns. It returns false if empty strings should be returned as null.

Specified by:
isUseEmptyString in interface IFFColumnModel<T>
Returns:

dateEquals

protected boolean dateEquals(FFEdgeColumnModel<?> other)


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.