/****************************************************************************** * * Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore. * All rights reserved. * ******************************************************************************/ package com.fourelementscapital.db; import java.sql.Connection; import java.util.List; import java.util.Vector; /** * Abstract class implements methods related to Contract */ public abstract class ContractDB extends SuperDB{ /** * Update records * @param con connection * @param records records * @throws Exception */ public abstract void updateRecords(Connection con,Vector records) throws Exception; /** * Add records * @param con connection * @param records records * @throws Exception */ public abstract void addRecords(Connection con,Vector records) throws Exception; /** * Create table * @param con connection * @param decimalpoint decimal point * @throws Exception */ public abstract void createTable(Connection con, int decimalpoint) throws Exception; /** * Update sval records * @param con connection * @param records records * @throws Exception */ public abstract void updateSValRecords(Connection con,Vector records) throws Exception; /** * Add sval records * @param con connection * @param records records * @throws Exception */ public abstract void addSValRecords(Connection con,Vector records) throws Exception; /** * Create sval table * @param con connection * @param decimalpoint decimal point * @throws Exception */ public abstract void createSValTable(Connection con, int decimalpoint) throws Exception; /** * Check s value field * @param con connection * @return record count * @throws Exception */ public abstract int checkSValueField(Connection con) throws Exception; /** * Count records * @param con connection * @return record count * @throws Exception */ public abstract int countRecords(Connection con) throws Exception; /** * Check whether s value field type exist * @param con connection * @return true if record exist * @throws Exception */ public abstract boolean checkSValueFieldTypeExist(Connection con) throws Exception; /** * Get contract titles by connection * @param con connection * @return contract titles * @throws Exception */ public abstract List getContractTitles(Connection con) throws Exception; /** * Get contract titles by connection & date query * @param con connection * @param datequery date query * @return contract titles * @throws Exception */ public abstract List getContractTitles(Connection con, String datequery) throws Exception; /** * Update master table * @param con connection * @param mtable master table * @param fieldname field name * @throws Exception */ public abstract void updateMasterTable(Connection con,String mtable,String fieldname) throws Exception; /** * Generate SQL XL Query Plain query * @param fieldtable field table * @param nmonths n months * @param contractTitleList contract title list * @return contract date */ public abstract String generateSQLXLQueryPlainQuery(String fieldtable, int nmonths, List contractTitleList); }