Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2021, Haiyang Li.
*
* Licensed 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 com.landawn.abacus.jdbc.dao;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.landawn.abacus.annotation.Beta;
import com.landawn.abacus.condition.Condition;
import com.landawn.abacus.util.SQLBuilder;
/**
* Interface for a Data Access Object (DAO) that does not support update operations.
*
* @param
* @param
* @param
* @param
* @see com.landawn.abacus.condition.ConditionFactory
* @see com.landawn.abacus.condition.ConditionFactory.CF
*/
@Beta
public interface NoUpdateCrudDao>
extends NoUpdateDao, CrudDao {
/**
*
* @param entityToUpdate
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int update(final T entityToUpdate) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entityToUpdate
* @param propNamesToUpdate
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int update(final T entityToUpdate, final Collection propNamesToUpdate) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
*
* @param propName
* @param propValue
* @param id
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Override
@Deprecated
default int update(final String propName, final Object propValue, final ID id) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param updateProps
* @param id
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int update(final Map updateProps, final ID id) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchUpdate(final Collection extends T> entities) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param batchSize
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchUpdate(final Collection extends T> entities, final int batchSize) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param propNamesToUpdate
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchUpdate(final Collection extends T> entities, final Collection propNamesToUpdate)
throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param propNamesToUpdate
* @param batchSize
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchUpdate(final Collection extends T> entities, final Collection propNamesToUpdate, final int batchSize)
throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
* Execute {@code add} and return the added entity if the record doesn't, otherwise, {@code update} is executed and updated db record is returned.
*
* @param entity
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default T upsert(final T entity) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
* Execute {@code add} and return the added entity if the record doesn't, otherwise, {@code update} is executed and updated db record is returned.
*
* @param entity
* @param cond to verify if the record exists or not.
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default T upsert(final T entity, final Condition cond) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entity
* @param uniquePropNamesForQuery
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default T upsert(final T entity, final List uniquePropNamesForQuery) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Override
@Deprecated
default List batchUpsert(final Collection extends T> entities) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param batchSize
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Override
@Deprecated
default List batchUpsert(final Collection extends T> entities, final int batchSize) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param uniquePropNamesForQuery
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Override
@Deprecated
default List batchUpsert(final Collection extends T> entities, final List uniquePropNamesForQuery)
throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param uniquePropNamesForQuery
* @param batchSize
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Override
@Deprecated
default List batchUpsert(final Collection extends T> entities, final List uniquePropNamesForQuery, final int batchSize)
throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entity
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int delete(final T entity) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
* Delete by id.
*
* @param id
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int deleteById(final ID id) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
// /**
// *
// * @param entity
// * @param onDeleteAction
// * @return
// * @throws SQLException
// * @throws UnsupportedOperationException
// * @deprecated unsupported Operation
// */
// @Deprecated
// @Override
// default int delete(final T entity, final OnDeleteAction onDeleteAction) throws SQLException, UnsupportedOperationException {
// throw new UnsupportedOperationException();
// }
/**
*
* @param entities
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchDelete(final Collection extends T> entities) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param entities
* @param batchSize
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchDelete(final Collection extends T> entities, final int batchSize) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
// /**
// *
// * @param entities
// * @param onDeleteAction
// * @return
// * @throws SQLException
// * @throws UnsupportedOperationException
// * @deprecated unsupported Operation
// */
// @Deprecated
// @Override
// default int batchDelete(final Collection extends T> entities, final OnDeleteAction onDeleteAction)
// throws SQLException, UnsupportedOperationException {
// throw new UnsupportedOperationException();
// }
//
// /**
// *
// * @param entities
// * @param onDeleteAction
// * @param batchSize
// * @return
// * @throws SQLException
// * @throws UnsupportedOperationException
// * @deprecated unsupported Operation
// */
// @Deprecated
// @Override
// default int batchDelete(final Collection extends T> entities, final OnDeleteAction onDeleteAction, final int batchSize)
// throws SQLException, UnsupportedOperationException {
// throw new UnsupportedOperationException();
// }
/**
*
* @param ids
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchDeleteByIds(final Collection extends ID> ids) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
/**
*
* @param ids
* @param batchSize
* @return
* @throws SQLException
* @throws UnsupportedOperationException
* @deprecated unsupported Operation
*/
@Deprecated
@Override
default int batchDeleteByIds(final Collection extends ID> ids, final int batchSize) throws SQLException, UnsupportedOperationException {
throw new UnsupportedOperationException();
}
}