85 lines
1.7 KiB
TypeScript
85 lines
1.7 KiB
TypeScript
/** @module MxDbDatabase */
|
|
import MxDbEntity from '../MxDbEntity';
|
|
import MxDbGroup from '../MxDbGroup';
|
|
import MxDbLayerTableRecord from '../MxDbLayerTableRecord';
|
|
/**
|
|
* MxDbDatabase 当前数据库对象.
|
|
*
|
|
*/
|
|
export default class MxDbDatabase {
|
|
private _mxDatabase;
|
|
constructor(mxDatabase: any);
|
|
/**
|
|
* 添加图层.
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
addLayer(layer: string): MxDbLayerTableRecord;
|
|
/**
|
|
* 显示或隐藏图层
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
showLayer(layer: string, isVisible: boolean): void;
|
|
/**
|
|
* 设置当前图层
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
setCurrentLayer(layer: string): MxDbLayerTableRecord;
|
|
/**
|
|
* 得到图层对象.
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
getLayer(layer: string): MxDbLayerTableRecord;
|
|
/**
|
|
* 添加对象到当前数据库.
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
addEntity(ent: MxDbEntity): number;
|
|
/**
|
|
* 根据组名,得到组对象。
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
getGroup(sName: string): MxDbGroup;
|
|
/**
|
|
* 添加一个组,如果组已经存在,直接返回该组。
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
addGroup(sName: string): MxDbGroup;
|
|
/**
|
|
* 得到一个实体所在的所有组。
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
getEntityInGroup(id: number): MxDbGroup[];
|
|
/**
|
|
* 删除一个组.
|
|
* @example
|
|
* ```typescript
|
|
*
|
|
* ```
|
|
*/
|
|
deleteGroup(sName: string): MxDbGroup;
|
|
}
|