com.netgrif.application.engine.petrinet.domain.dataset.DateField.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.petrinet.domain.dataset
import org.springframework.data.annotation.Transient
import org.springframework.data.mongodb.core.mapping.Document
import java.time.LocalDate
import java.time.ZoneId
@Document
class DateField extends Field {
@Transient
private String minDate
@Transient
private String maxDate
DateField() {
super()
}
@Override
FieldType getType() {
return FieldType.DATE
}
void setValue(Date value) {
this.value = value?.toInstant()?.atZone(ZoneId.systemDefault())?.toLocalDate()
}
void setDefaultValue(String value) {
this.setDefaultValue(LocalDate.parse(value))
}
void setDefaultValue(Date value) {
this.setDefaultValue(value.toInstant().atZone(ZoneId.systemDefault()).toLocalDate())
}
String getMinDate() {
return minDate
}
void setMinDate(String minDate) {
this.minDate = minDate
}
String getMaxDate() {
return maxDate
}
void setMaxDate(String maxDate) {
this.maxDate = maxDate
}
@Override
Field clone() {
DateField clone = new DateField()
super.clone(clone)
return clone
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy