/*******************************************************************************
 * Copyright (c) 2005 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.data.oda.jdbc.ui.util;

import org.eclipse.swt.graphics.Image;

/**
 * 
 * Utility class, to store information about a Jdbc Data base object
 * Currently the information stored is the name, and the type( Table, View )
 *  Used by the TableSelectionPage
 */
public class DbObject {
	
	private String name;
    private int type;
    private String displayName;
    private Image image;
    
	public final int ROOT_NODE_TYPE = 1;
	public final static int TABLE_TYPE = 2;
	public final static int VIEW_TYPE = 3;
    public final static int PROCEDURE_TYPE = 4;
    public final static int PROCEDURE_ITEM_TYPE = 5;
    public final static int SCHEMA_TYPE = 6;
    
	public DbObject(String name, int type)
	{
		this.name = name;
		this.type = type;
		this.displayName = name;
	}
	
	public DbObject(String name, String displayName, int type)
	{
		this.name = name;
		this.type = type;
		this.displayName = displayName;
	}

		
    
	/**
	 * @param name
	 * @param type
	 * @param displayName
	 * @param image
	 */
	public DbObject(String name, String displayName, int type, Image image) {
		super();
		this.name = name;
		this.type = type;
		this.displayName = displayName;
		this.image = image;
	}
	/**
	 * 
	 */
	public DbObject() {
		
		// TODO Auto-generated constructor stub
	}



	/**
	 * @return Returns the name.
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name The name to set.
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return Returns the type.
	 */
	public int getType() {
		return type;
	}
	/**
	 * @param type The type to set.
	 */
	public void setType(int type) {
		this.type = type;
	}
	/**
	 * @return Returns the displayName.
	 */
	public String getDisplayName() {
		return displayName;
	}
	/**
	 * @param displayName The displayName to set.
	 */
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	
	
	/**
	 * @return Returns the image.
	 */
	public Image getImage() {
		return image;
	}
	/**
	 * @param image The image to set.
	 */
	public void setImage(Image image) {
		this.image = image;
	}
}
