
rapture.repo.StructuredRepo Maven / Gradle / Ivy
The newest version!
/**
* The MIT License (MIT)
*
* Copyright (c) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package rapture.repo;
import rapture.common.CallingContext;
import rapture.common.ForeignKey;
import rapture.common.StoredProcedureParams;
import rapture.common.StoredProcedureResponse;
import rapture.common.TableIndex;
import rapture.common.TableMeta;
import rapture.structured.StructuredStore;
import java.util.List;
import java.util.Map;
/**
* Created by seanchen on 7/1/15.
*/
public class StructuredRepo {
private StructuredStore store;
public StructuredRepo (StructuredStore store) {
this.store = store;
}
public void drop(){
store.drop();
}
public boolean commit(String txId){
return store.commit(txId);
}
public boolean rollback(String txId){
return store.rollback(txId);
}
public Boolean createTableUsingSql(CallingContext context, String rawSql){
return store.createTableUsingSql(context, rawSql);
}
public Boolean createTable(String tableName, Map columns){
return store.createTable(tableName, columns);
}
public Boolean dropTable(String tableName){
return store.dropTable(tableName);
}
public Boolean tableExists(String tableName){
return store.tableExists(tableName);
}
public List getTables() {
return store.getTables();
}
public TableMeta describeTable(String tableName){
return store.describeTable(tableName);
}
public Boolean addTableColumns(String tableName, Map columns){
// TODO RAP-3141: Does this count as a write???
return store.addTableColumns(tableName, columns);
}
public Boolean deleteTableColumns(String tableName, List columnNames){
return store.deleteTableColumns(tableName, columnNames);
}
public Boolean updateTableColumns(String tableName, Map columns){
// TODO RAP-3141: Does this count as a write???
return store.updateTableColumns(tableName, columns);
}
public Boolean renameTableColumns(String tableName, Map columnNames){
return store.renameTableColumns(tableName, columnNames);
}
public Boolean createIndex(String tableName, String indexName, List columnNames){
return store.createIndex(tableName, indexName, columnNames);
}
public Boolean dropIndex(String indexName){
return store.dropIndex(indexName);
}
public List getIndexes(String tablename) {
return store.getIndexes(tablename);
}
public String getPrimaryKey(String tableName) {
return store.getPrimaryKey(tableName);
}
public List getForeignKeys(String tableName) {
return store.getForeignKeys(tableName);
}
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy