* Add setValue() method that allows to directly set the value and type

of the property
* Change the default string representation of date values to be
  compatible with MySQL.
This commit is contained in:
hns 2003-04-23 12:34:27 +00:00
parent bdb1cb8f06
commit 4e47de9963

View file

@ -190,7 +190,7 @@ public final class Property implements IProperty, Serializable, Cloneable {
/**
*
*
* @return ...
* @return the property's value in its native class
*/
public Object getValue() {
return value;
@ -199,12 +199,24 @@ public final class Property implements IProperty, Serializable, Cloneable {
/**
*
*
* @return ...
* @return the property's type as defined in helma.objectmodel.IProperty.java
*/
public int getType() {
return type;
}
/**
* Directly set the value of this property.
*/
protected void setValue(Object value, int type) {
if (type == NODE) {
unregisterNode();
}
this.value = value;
this.type = type;
dirty = true;
}
/**
*
*
@ -419,7 +431,7 @@ public final class Property implements IProperty, Serializable, Cloneable {
case DATE:
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yy hh:mm:ss");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
return format.format((Date) value);