Class LongDateField
java.lang.Object
io.datarouter.model.field.BaseField<T>
io.datarouter.model.field.BasePrimitiveField<java.util.Date,LongDateFieldKey>
io.datarouter.model.field.imp.custom.LongDateField
- All Implemented Interfaces:
ByteEncodedField<java.util.Date>,StringEncodedField<java.util.Date>,Field<java.util.Date>,java.lang.Comparable<Field<java.util.Date>>
public class LongDateField extends BasePrimitiveField<java.util.Date,LongDateFieldKey>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.datarouter.model.field.BaseField
BaseField.FieldColumnNameComparator -
Field Summary
-
Constructor Summary
Constructors Constructor Description LongDateField(LongDateFieldKey key, java.util.Date value) -
Method Summary
Modifier and Type Method Description java.util.DatefromBytesButDoNotSet(byte[] bytes, int offset)byte[]getBytes()java.lang.StringgetStringEncodedValue()intnumBytesWithSeparator(byte[] bytes, int offset)java.util.DateparseStringEncodedValueButDoNotSet(java.lang.String str)Methods inherited from class io.datarouter.model.field.BaseField
fromBytesWithSeparatorButDoNotSet, fromString, getBytesWithSeparator, getPrefix, getPrefixedName, getPreparedStatementValue, getValue, getValueHashCode, getValueString, setPrefix, setUsingReflection, setValue, toString
-
Constructor Details
-
Method Details
-
getStringEncodedValue
public java.lang.String getStringEncodedValue()- Returns:
- the "long" format for persistence. Note that getValueString() returns the human-readable date
-
parseStringEncodedValueButDoNotSet
public java.util.Date parseStringEncodedValueButDoNotSet(java.lang.String str) -
getBytes
public byte[] getBytes() -
numBytesWithSeparator
public int numBytesWithSeparator(byte[] bytes, int offset) -
fromBytesButDoNotSet
public java.util.Date fromBytesButDoNotSet(byte[] bytes, int offset)
-