You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.4 KiB
96 lines
2.4 KiB
/**
|
|
* Copyright (c) 2002 Sinosoft Co.,LTD.
|
|
* All right reserved.
|
|
*/
|
|
|
|
package com.sinosoft.lis.db;
|
|
|
|
import com.sinosoft.lis.schema.LITranErrSchema;
|
|
import com.sinosoft.lis.vschema.LITranErrSet;
|
|
import com.sinosoft.persistence.DB;
|
|
import com.sinosoft.persistence.impl.DBOper;
|
|
import com.sinosoft.utility.SQLwithBindVariables;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import java.sql.Connection;
|
|
|
|
/**
|
|
* <p>ClassName: LITranErrDB </p>
|
|
* <p>Description: DB层数据库操作类文件 </p>
|
|
* <p>Company: Sinosoft Co.,LTD </p>
|
|
* @Database Schema2
|
|
* @author Makerx2
|
|
* @CreateDatetime 2019-03-16 16:05:19 629
|
|
*/
|
|
@Slf4j
|
|
public class LITranErrDB extends LITranErrSchema implements DB<LITranErrSet> {
|
|
// @Field
|
|
private Connection con;
|
|
private boolean readOnlyFlag = false;
|
|
|
|
// @Constructor
|
|
public LITranErrDB(Connection cConnection) {
|
|
con = cConnection;
|
|
}
|
|
|
|
public LITranErrDB() {
|
|
con = null;
|
|
}
|
|
|
|
public LITranErrDB(boolean readOnly) {
|
|
this();
|
|
readOnlyFlag = readOnly;
|
|
}
|
|
|
|
// @Method
|
|
public void readOnly(boolean readOnly) {
|
|
readOnlyFlag = readOnly;
|
|
}
|
|
|
|
public boolean deleteSQL() {
|
|
return DBOper.deleteSQL(this, con, mErrors, log);
|
|
}
|
|
|
|
public int getCount() {
|
|
return DBOper.getCount(this, con, readOnlyFlag, mErrors, log);
|
|
}
|
|
|
|
public boolean insert() {
|
|
return DBOper.insert(this, con, mErrors, log);
|
|
}
|
|
|
|
public boolean delete() {
|
|
return DBOper.delete(this, con, mErrors, log);
|
|
}
|
|
|
|
public boolean update() {
|
|
return DBOper.update(this, con, mErrors, log);
|
|
}
|
|
|
|
public boolean getInfo() {
|
|
return DBOper.getInfo(this, con, readOnlyFlag, mErrors, log);
|
|
}
|
|
|
|
public LITranErrSet query() {
|
|
return query(-1, -1);
|
|
}
|
|
|
|
public LITranErrSet query(int nStart, int nCount) {
|
|
return (LITranErrSet) DBOper.query(this, nStart, nCount, con, readOnlyFlag, mErrors, log);
|
|
}
|
|
|
|
|
|
|
|
public boolean getInfo(SQLwithBindVariables sqlbv) {
|
|
return DBOper.getInfo(this, sqlbv, con, readOnlyFlag, mErrors, log);
|
|
}
|
|
|
|
public LITranErrSet executeQuery(SQLwithBindVariables sqlbv) {
|
|
return executeQuery(sqlbv, -1, -1);
|
|
}
|
|
|
|
public LITranErrSet executeQuery(SQLwithBindVariables sqlbv, int nStart, int nCount) {
|
|
return (LITranErrSet) DBOper.executeQuery(this, sqlbv, nStart, nCount, con, readOnlyFlag, mErrors, log);
|
|
}
|
|
|
|
}
|
|
|