mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix for issue 17, Fix JSON support for TimeZone
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package com.avaje.tests.model.basic;
|
||||
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class BeanWithTimeZone {
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
String name;
|
||||
|
||||
TimeZone timezone;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public TimeZone getTimezone() {
|
||||
return timezone;
|
||||
}
|
||||
|
||||
public void setTimezone(TimeZone timezone) {
|
||||
this.timezone = timezone;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.avaje.tests.model.basic;
|
||||
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class BeanWithTimezone {
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
String name;
|
||||
|
||||
TimeZone timezone;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public TimeZone getTimezone() {
|
||||
return timezone;
|
||||
}
|
||||
|
||||
public void setTimezone(TimeZone timezone) {
|
||||
this.timezone = timezone;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.avaje.tests.model.basic;
|
||||
|
||||
public enum SomeEnum {
|
||||
|
||||
ALPHA("Some nice Alpha"),
|
||||
BETA("Some nice Beta");
|
||||
|
||||
String description;
|
||||
|
||||
SomeEnum(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.avaje.tests.model.basic;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class SomeEnumBean {
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
@Enumerated
|
||||
SomeEnum someEnum;
|
||||
|
||||
String name;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public SomeEnum getSomeEnum() {
|
||||
return someEnum;
|
||||
}
|
||||
|
||||
public void setSomeEnum(SomeEnum someEnum) {
|
||||
this.someEnum = someEnum;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user