Added @PersistenceConstructor to Circle.

This commit is contained in:
Oliver Gierke
2011-05-31 13:54:10 +01:00
parent 187f087270
commit aeea1bc5d5

View File

@@ -15,6 +15,7 @@
*/
package org.springframework.data.document.mongodb.geo;
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.util.Assert;
/**
@@ -28,6 +29,7 @@ public class Circle {
private Point center;
private double radius;
@PersistenceConstructor
public Circle(Point center, double radius) {
Assert.notNull(center);
Assert.isTrue(radius >= 0, "Radius must not be negative!");