This commit is contained in:
wentch
2015-12-10 15:02:32 +08:00
parent 91d0224949
commit 71bd5dfe57
2 changed files with 8 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ package org.redkale.test.source;
import org.redkale.source.EntityInfo;
import org.redkale.source.EntityCache;
import org.redkale.util.Attribute;
import org.redkale.source.DataSource.Reckon;
import org.redkale.source.DataSource.FuncEnum;
import java.util.*;
import javax.persistence.*;
@@ -37,12 +37,12 @@ public class CacheTestBean {
EntityCache<CacheTestBean> cache = new EntityCache(EntityInfo.load(CacheTestBean.class, 0, true, null));
cache.fullLoad(list);
System.out.println(cache.getMapResult("pkgid", Reckon.COUNT, "name", null));
System.out.println(cache.getMapResult("pkgid", Reckon.DISTINCTCOUNT, "name", null));
System.out.println(cache.getMapResult("pkgid", Reckon.AVG, "price", null));
System.out.println(cache.getMapResult("pkgid", Reckon.SUM, "price", null));
System.out.println(cache.getMapResult("pkgid", Reckon.MAX, "price", null));
System.out.println(cache.getMapResult("pkgid", Reckon.MIN, "price", null));
System.out.println(cache.getMapResult("pkgid", FuncEnum.COUNT, "name", null));
System.out.println(cache.getMapResult("pkgid", FuncEnum.DISTINCTCOUNT, "name", null));
System.out.println(cache.getMapResult("pkgid", FuncEnum.AVG, "price", null));
System.out.println(cache.getMapResult("pkgid", FuncEnum.SUM, "price", null));
System.out.println(cache.getMapResult("pkgid", FuncEnum.MAX, "price", null));
System.out.println(cache.getMapResult("pkgid", FuncEnum.MIN, "price", null));
}
public CacheTestBean() {

View File

@@ -7,7 +7,6 @@ package org.redkale.test.source;
import org.redkale.convert.json.JsonFactory;
import javax.persistence.*;
import static javax.persistence.GenerationType.SEQUENCE;
/**
* CREATE TABLE `LoginTestRecord` (
@@ -26,7 +25,7 @@ import static javax.persistence.GenerationType.SEQUENCE;
public class LoginTestRecord {
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "SEQ")
@GeneratedValue
//@SequenceGenerator(name = "SEQ", initialValue = 100001, allocationSize = 1000)
private String sessionid;