public class DateBridge extends Object implements TwoWayStringBridge, ParameterizedBridge
java.util.Date
to a String
, truncated to the specified resolution.
GMT is used as time zone.
Modifier and Type | Field and Description |
---|---|
static TwoWayStringBridge |
DATE_DAY |
static TwoWayStringBridge |
DATE_HOUR |
static TwoWayStringBridge |
DATE_MILLISECOND |
static TwoWayStringBridge |
DATE_MINUTE |
static TwoWayStringBridge |
DATE_MONTH |
static TwoWayStringBridge |
DATE_SECOND |
static TwoWayStringBridge |
DATE_YEAR |
Constructor and Description |
---|
DateBridge() |
DateBridge(Resolution resolution) |
Modifier and Type | Method and Description |
---|---|
String |
objectToString(Object object)
Converts the object representation to a string.
|
void |
setParameterValues(Map<String,String> parameters)
Called on the bridge implementation to pass the parameters.
|
Object |
stringToObject(String stringValue)
Convert the index string representation to an object.
|
public static final TwoWayStringBridge DATE_YEAR
public static final TwoWayStringBridge DATE_MONTH
public static final TwoWayStringBridge DATE_DAY
public static final TwoWayStringBridge DATE_HOUR
public static final TwoWayStringBridge DATE_MINUTE
public static final TwoWayStringBridge DATE_SECOND
public static final TwoWayStringBridge DATE_MILLISECOND
public DateBridge()
public DateBridge(Resolution resolution)
public Object stringToObject(String stringValue)
TwoWayStringBridge
stringToObject
in interface TwoWayStringBridge
stringValue
- The index value.Object
.public String objectToString(Object object)
StringBridge
objectToString
in interface StringBridge
object
- The object to transform into a string representation.null
. It can be empty though.public void setParameterValues(Map<String,String> parameters)
ParameterizedBridge
setParameterValues
in interface ParameterizedBridge
parameters
- map containing string based parameters to be passed to the parameterized bridge. The map is never
null
.Copyright © 2006–2014 Hibernate. All rights reserved.