io.xream.x7.repository.BaseRepository Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.xream.x7.repository;
import io.xream.x7.common.bean.Criteria;
import io.xream.x7.common.bean.RowHandler;
import io.xream.x7.common.bean.condition.InCondition;
import io.xream.x7.common.bean.condition.RefreshCondition;
import io.xream.x7.common.bean.condition.RemoveRefreshCreate;
import io.xream.x7.common.web.Page;
import java.util.List;
import java.util.Map;
/**
* jdbc-template-plus programmer API
*
* @param
* @author Sim
*/
public interface BaseRepository extends Typed {
long createId();
void refreshCache();
boolean createBatch(List objList);
long create(T obj);
/**
* replace: clear all the value of the row, and insert the new value >
* is not refreshOrCreate >
* x7 will not support refreshOrCreate, coding: query at first, then refresh of create
*/
boolean createOrReplace(T obj);
boolean refresh(RefreshCondition RefreshCondition_build);
/**
*
* refreshCondition without keyOne
*/
boolean refreshUnSafe(RefreshCondition RefreshCondition_build);
boolean remove(String keyOne);
boolean remove(long keyOne);
/**
*
* caution: sometimes, should not use the api >
*
*/
boolean removeRefreshCreate(RemoveRefreshCreate RemoveRrefreshCreate_wrap);
/**
* @param keyOne
*/
T get(long keyOne);
T get(String keyOne);
/**
* LOAD
*
*/
List list();
/**
* 根据对象查询
*
* @param conditionObj
*/
List list(T conditionObj);
T getOne(T conditionObj);
/**
* in API
*
*/
List in(InCondition InCondition_wrap);
/**
* Standard query pageable API
*
* @param CriteriaBuilder_build_get
*/
Page find(Criteria CriteriaBuilder_build_get);
Page
© 2015 - 2025 Weber Informatics LLC | Privacy Policy