java-spring与mongodb的整合方式一 自动注入xml(4)
- UID
- 1066743
|
java-spring与mongodb的整合方式一 自动注入xml(4)
实现类接口:UserReposity
package com.mongo.reposity;
import java.util.List;
import com.mongo.entity.User;
public interface UserReposity extends GenericReposity<User>{
public List<User> getUsers(int begin,int end);
/**
*
* @param projectName
* @return
*/
public List<User> getUsers(String projectName);
public List<User> getUsers(int begin, int end, List<Condition> conditions);
public long getCount(String message);
public List<User> getUsersBynames(int begin, int end,
List<String> names);
public WriteResult updateUserUpdateName(User user,String name);
}
条件类(辅助类):
Condition.java
package com.mongo.reposity;
/**
* 条件
*
* @作者 zoe
* @版本
* @更新时间
*/
public class Condition {
private String key;
private Object value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
} |
|
|
|
|
|