📄 tablerow.java
字号:
/**
*
*/
package org.tshs.storage.rdbms;
import java.util.Map;
/**
* Represents a database row.
*
* @author Administrator
*
*/
public class TableRow {
/** The name of the database table containing this row */
private String tableName;
/** Represent the columns selected from database. */
private Map columns;
private ColumnInfo columnInfo;
public TableRow(String tableName, Map columns, ColumnInfo columnInfo){
this.columns = columns;
this.tableName = tableName;
this.columnInfo = columnInfo;
}
public void setTableName(String tableName){
this.tableName = tableName;
}
public String getTableName(){
return tableName;
}
public void addColumn(String column, String key, Object value){
columnInfo.addColumn(column, 1000);
columns.put(key, value);
}
public Object getColumn(String name){
if(!hasColumn(name)){
return null;
}
return columns.get(name);
}
public ColumnInfo getColumnInfo(){
return columnInfo;
}
/**
* @param name
* @return
*/
private boolean hasColumn(String name) {
if(columns.containsKey(name)){
return true;
}else{
return false;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -