This commit is contained in:
@@ -8,7 +8,7 @@ package org.redkale.test.source;
|
|||||||
import org.redkale.source.EntityInfo;
|
import org.redkale.source.EntityInfo;
|
||||||
import org.redkale.source.EntityCache;
|
import org.redkale.source.EntityCache;
|
||||||
import org.redkale.util.Attribute;
|
import org.redkale.util.Attribute;
|
||||||
import org.redkale.source.DataSource.Reckon;
|
import org.redkale.source.DataSource.FuncEnum;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
|
||||||
@@ -37,12 +37,12 @@ public class CacheTestBean {
|
|||||||
EntityCache<CacheTestBean> cache = new EntityCache(EntityInfo.load(CacheTestBean.class, 0, true, null));
|
EntityCache<CacheTestBean> cache = new EntityCache(EntityInfo.load(CacheTestBean.class, 0, true, null));
|
||||||
cache.fullLoad(list);
|
cache.fullLoad(list);
|
||||||
|
|
||||||
System.out.println(cache.getMapResult("pkgid", Reckon.COUNT, "name", null));
|
System.out.println(cache.getMapResult("pkgid", FuncEnum.COUNT, "name", null));
|
||||||
System.out.println(cache.getMapResult("pkgid", Reckon.DISTINCTCOUNT, "name", null));
|
System.out.println(cache.getMapResult("pkgid", FuncEnum.DISTINCTCOUNT, "name", null));
|
||||||
System.out.println(cache.getMapResult("pkgid", Reckon.AVG, "price", null));
|
System.out.println(cache.getMapResult("pkgid", FuncEnum.AVG, "price", null));
|
||||||
System.out.println(cache.getMapResult("pkgid", Reckon.SUM, "price", null));
|
System.out.println(cache.getMapResult("pkgid", FuncEnum.SUM, "price", null));
|
||||||
System.out.println(cache.getMapResult("pkgid", Reckon.MAX, "price", null));
|
System.out.println(cache.getMapResult("pkgid", FuncEnum.MAX, "price", null));
|
||||||
System.out.println(cache.getMapResult("pkgid", Reckon.MIN, "price", null));
|
System.out.println(cache.getMapResult("pkgid", FuncEnum.MIN, "price", null));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CacheTestBean() {
|
public CacheTestBean() {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ package org.redkale.test.source;
|
|||||||
|
|
||||||
import org.redkale.convert.json.JsonFactory;
|
import org.redkale.convert.json.JsonFactory;
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import static javax.persistence.GenerationType.SEQUENCE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CREATE TABLE `LoginTestRecord` (
|
* CREATE TABLE `LoginTestRecord` (
|
||||||
@@ -26,7 +25,7 @@ import static javax.persistence.GenerationType.SEQUENCE;
|
|||||||
public class LoginTestRecord {
|
public class LoginTestRecord {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = SEQUENCE, generator = "SEQ")
|
@GeneratedValue
|
||||||
//@SequenceGenerator(name = "SEQ", initialValue = 100001, allocationSize = 1000)
|
//@SequenceGenerator(name = "SEQ", initialValue = 100001, allocationSize = 1000)
|
||||||
private String sessionid;
|
private String sessionid;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user