tshsobject.java

来自「旅游自助系统」· Java 代码 · 共 50 行

JAVA
50
字号
/**
 * 
 */
package org.tshs.entity;

import java.sql.SQLException;
import java.util.Vector;

import org.tshs.core.Constant.ObjectType;
import org.tshs.exception.DBLockedException;
import org.tshs.storage.rdbms.TableRow;

/**
 * The parent class of all real tshs system objects, used in the cache mechanism
 *  
 * @author Administrator
 * 
 */
public abstract class TshsObject {

	/** The unique key of the object in TSHS System corresponding to database primary key */
	protected Long id;

	/** The TshsObject type it belongs to, such as ObjectType.CLIENT, ObjectType.CORP etc. */
	protected ObjectType type;

	/** Any tshs objects only can be instantialized from database related factory */
	TshsObject(Long id, ObjectType type) {
		this.id = id;
		this.type = type;
	}

	public Long getId() {
		return id;
	}

	public ObjectType getType() {
		return type;
	}
	
	public abstract boolean checkPassword(String password);
	
	public abstract Vector selfList() throws Exception;
	
	public abstract boolean modify(Vector data);
	
	protected abstract TableRow buildTableRow();
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?